Closed bhansconnect closed 2 years ago
I had a patch that did this in https://github.com/rtfeldman/roc/pull/2729, but I forgot why I didn't end up working.
Any help would be greatly appreciated. I want to continue testing using Roc with async future. For now, they will be directly returned via a tagged union with a continuation. So I need that feature or another work around.
i can take a look tomorrow
Currently
specialize_external
does not support zero argument thunks. Specifically, this match statement needs to be expanded.It currently has ZeroArgumentThunk as unreachable, but this is not accurate. It can be reached when returning a union from the main function. For example:
Or:
In the first example, it is technically possible to remove the
as Option
and get Roc to generate functioning code. That being said, in this second example, theas Continuation
is definitely needed because the type must be named to be self recursive.According to @folkertdev, we should only need to generate a size function for these types. Other functions should not need to be generated.