Infer send type in generator function decorated with effect
suned opened this issue · comments
Sune Debel commented
E.g
from pfun.maybe import with_effect, Maybe
from typing import Generator, Any, TypeVar
A = TypeVar('A')
Maybes = Generator[Maybe[Any], Any, A]
def g() -> Maybe[int]:
...
@with_effect
def f() -> Maybes[int]:
a = yield g()
reveal_type(a) # should be int