The fiber implementation allow for a yield to occur at multiple function call depth. Right now the parser/codegen assume the yield type is the one of the wrapped function:
if we only allow yield to occur directly in wrapped function, it solves type checking, but it lefts out the ability to yield from anywhere
alternatively we can check that a yield occurs within a wrapped call, implying we keep track of function calls at codegen
The fiber implementation allow for a yield to occur at multiple function call depth. Right now the parser/codegen assume the yield type is the one of the wrapped function: