-
Notifications
You must be signed in to change notification settings - Fork 1
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
What type role should NF's parameter have? #3
Comments
Hey @treeowl, I added you to the repo. I think nominal is more correct, so feel free to commit this change. |
@ezyang, thanks! I don't really feel strongly about it, but it seems to be the safer choice. |
Also add `nfCoercion` to work around the role annotation as needed. Fixes ezyang#3
@ezyang, I opened up a pull request for this. I also added a coercion to work around the role annotation locally. For now, I put it in a separate |
Currently, we let GHC infer
I think there's a minor potential problem here. Suppose we have
We can coerce from
NF T
(which is inT
-normal form) toNF U
(which claims to be inU
-normal form). It's not quite clear to me whose problem this is. Should whoever definedU
be expected to hide its constructor? Or should we havetype role NF nominal
?In practice, I suspect this to come up rather rarely, since types are generally expected to have just one notion of normal form, but there could be exceptions out there.
The text was updated successfully, but these errors were encountered: