-
Notifications
You must be signed in to change notification settings - Fork 126
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-kinded/Prop type variables? #1024
Comments
Oh, this is fun too.
|
I think we should split the
This would be a more precise fit for the Cryptol language: Then type variables have a |
I think I know what happened here---it used to be the case the you couldn't even write these in the parser, so we probably didn't do much checking. Then when I added abstract type declarations (e.g., the I think it should be relatively easy to check for this in the kind checker. I am not sure it is worth splitting the |
I don't have a strong opinion on splitting the kind datatype. Either way, I think we'll need to check that |
Should we allow declarations like this? It's currently allowed and seems sensible, although it doesn't really work great as you can only put a single atomic constraint in the actual argument position.
|
Currently, you are allowed to write down the following type alias and have it accepted by the type checker.
This is pretty strange, as I don't think you can actually do anything interesting with higher-kinded type variables. The following two lines each generate an error, for example.
You can also write this, which is pretty odd:
Again, there isn't really anything interesting you can do with this type, as you cannot assert the
Prop
anywhere.I think that for
type
andnewtype
declarations, we should probably restrict the kinds of parameters to either*
or#
.The text was updated successfully, but these errors were encountered: