-
Notifications
You must be signed in to change notification settings - Fork 119
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
Whither => #849
Comments
It is just that The following works, though, if you'd like to write an empty context:
|
To see that
Interestingly, the interpreter reports type constraints in the usual uncurried form. |
I agree that this is confusing to new users. (And, to some extent, veterans.) There are up to three sections to a type definition:
The first two are optional. Evidently, when type constraints are included, an operator is needed to apply them to the type. When there is only a type variable declaration with no constraints, why is no operator required to "apply" the type variable declarations to the type? At first, I was thinking that the But that would be an issue for curly braces as well. (Type declarations versus a record parameter.) |
Then you'd have an extra
|
Is there something to resolve here or shall we close this? Some potential tasks:
|
Its existence is most definitely intentional; the feature was requested in #599. |
Ah, good to know. Well, in that case, is there something that we need to do here? |
If the consensus is that |
We've attempted an English-language breakdown of types in the Cryptol course we've been working on. To check it out and see if you agree with our interpretation, search for "breakdown" here: https://github.com/weaversa/cryptol-course/blob/master/labs/Language/Basics.md |
@AssemblyZig Cryptol supports type inference, e.g. |
This seems to have converged in the need for a reference manual, which we now have a PR for: #1188 |
And there's a ticket for it now, as well: #1260 |
It appears that one can create a simple type specification without constraints thusly:
foo : {a} a -> a
And one can create a type specification with constraints:
foo2 : {a} (fin a) => a -> a
But it is an error to include
=>
when there are no constraints (e.g.,foo3 : {a} => a -> a
). (It is similarly verboten to elide the=>
when there are constraints -- as it should be.)Any reason that the seemingly descriptive
foo : {a} => a -> a
is poor form?The text was updated successfully, but these errors were encountered: