-
Notifications
You must be signed in to change notification settings - Fork 17
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
type applications should start with a type atom #111
Comments
Your problem is that you assume |
Ahh okay, but that should just cause a type mismatch, not throw a wrench in its spokes :\ Do you know what unification algorithm elm uses? It can't be just AlgorithmW is it? Is there a specific paper they modeled after, like bottom-up or outside-in? |
You are right that this should be reported as a type mismatch. That it instead crashes the compiler is a compiler bug. A compiler bug that has been reported repeatedly (and doesn't really need an additional issue here in this repository, I think). Look, for example, at: elm/compiler#1326, elm/compiler#1231, #105. About your questions: No, I don't know. My impression from some cursory look into the type checking code a while ago was that unification was done in a quite ad-hoc way. But I may be wrong, and there may actually be a specific known algorithm followed there. |
Closing in favor of elm/compiler#1231 |
I'm not exactly sure what this means, but it happened during type inference for this function:
I've tried a number of tricks to adjust the terms, but for some reason it's not getting the system to work properly. Any ideas what I'm doing wrong here?
The text was updated successfully, but these errors were encountered: