-
Notifications
You must be signed in to change notification settings - Fork 375
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
linking behavior of record parameters names copied into values is confusing #2812
Comments
I don't understand why you expect |
There's no spec yet so I can only guess what should happen. But to be consistent, because |
I can't agree with you. Roughtly, record Ty (q param : Ty2) where
constructor MkTy
field1 : Ty3
field2: Ty4 is syntactically translated to data Ty : (q param : Ty2) -> Type where
MkTy : {q param : Ty2} -> (field1 : Ty3) -> (field2 : Ty4) -> Ty param That's why, type of So, considering the current (very simple in its spirit) translation of There is another question of what translation would you expect having the same names in the type signature and the field (your |
I mean, since you are matching implicit |
I was under the assumption that in the following code, copied from above for convenience,
that the I think you are agreeing with me on this, although maybe you can confirm? That was my guess as to how it should behave, that is, you should be able to do:
However that didn't work, so I found the implicit and explicit vars available and in
it seems that the If you run the following with showimplicits on, you get:
Which is very strange. Also I may not be quite understanding what this means, but my interpretation is there is a initial variable with no name that isn't used in the definition on
So actually, I don't know what to make it, but it seems like something isn't right here. Also, I don't understand your syntactic translation, specifically what
|
I don't think that should be the case. Records don't have any way to constrain the shape of their |
In the following, I would expect
foo
to fail andfoo2
to not fail or alternatively, forbar
to not fail.https://gist.github.com/redfish64/af6f7dae2e32f4236f0111eb5ebadc83
Steps to Reproduce
Typecheck
Expected Behavior
foo
to fail to typecheck,foo'
andbar
to typecheckObserved Behavior
The text was updated successfully, but these errors were encountered: