-
Notifications
You must be signed in to change notification settings - Fork 147
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
Higher-rank types are weirdly not instantiated #603
Comments
Marwes
changed the title
Higher-rank types are weirdly not instanciated
Higher-rank types are weirdly not instantiated
Aug 23, 2018
I fixed the other two issues with higher-rank issues. This one will need some extra work to make sure that I don't introduce any unsoundness. For instance, it interacts closely with the following where I don't want the type let make m =
let m2: forall m . m = m
let _ = m2 1
m
make 2 Lines 283 to 288 in 2562070
|
Thanks a lot ! |
Marwes
added a commit
to Marwes/gluon
that referenced
this issue
Dec 15, 2018
Should have been closed by 67a502f 🤷♂️ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code:
gives the following two errors:
Instead of instanciating the forall-quantified type, it seems to be trying to generalize the bound type variable. I have no clue what the second error is on about.
Moveover, there is no way to help the compiler, because adding a type annotation fails similarly.
A related issue is that annotating a bound polymorphic variable with its own type fails too:
I don't know if this is a know case that the type system cannot handle or a bug, but I found it surprising (and annoying).
The text was updated successfully, but these errors were encountered: