-
Notifications
You must be signed in to change notification settings - Fork 642
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
Bound variable not as bound as one would think #75
Comments
This turns out to have been a mysterious scoping bug which only arose when type checking things with lambdas in their type that happened to have the same name as something whose scope had previously been resolved. Now fixed. |
I am afraid this could be an instance of the same problem, though in a slightly more involved situation. The following code type checks
But replacing |k| with |x| in the second pattern of the definition of |viableTh| yields test_bound.lidr:81:Can't unify (x' ** so (inC x' ...)) with (x ** so (inC x ...)) Maybe re-open the issue ? |
There was a rendering error in the above message (I used |pre| instead of |````| to mark code) which made the code unusable. It should type check, now. |
The following type checks
However, replacing |k| with |x| in the definition of |test|, so that we have
raises a type error:
bind.lidr:12:Can't unify (x' ** so (R x x')) with (x ** so (R x x))
Which then goes away if we replace the name of the bound variable in the type of |f| by, say, |k|:
The text was updated successfully, but these errors were encountered: