-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support higher-order definitions in the simulator #221
Comments
There are no significant blockers (as far as I'm aware) to supporting them on the type checker, but I also didn't test it at all as I was not prioritizing this. I'll try it out on both type and effect checking and get a better sense of where we are at. My intuition is that they should work with some potentital small adjustments. |
Update: at least for this example, it does work in the type checker but not in the effect checker.
The third line contains the inferred type for the operator: As for the effect checker, I have to refactor it to use the same context representation as I did later with types, and then it should work. At the moment, it uses different representations for operators and values, and it is looking up |
To support higher-order operators in user definitions, we have to know the parameter types. This requires the refactoring planned in #624. |
We can pass user-defined operators in the built-in operators. I don't think it is a high-impact feature actually. |
Made some progress in igor/ho-221 and got blocked by #624 this time :) |
I get the same crash trying to apply a named operator in, e.g., a fold:
i'm wondering if we can make the behavior here, so that, even if hit an unknown unepected corner of the language, repl still doesn't crash? |
We have to support higher-order definitions at some point:
It looks like we would need type information for
bar
, in order to produce the right number of registers in the simulator. This calls for integration with the type checker.@bugarela, are higher-order operators supported by the type checker already?
The text was updated successfully, but these errors were encountered: