-
Notifications
You must be signed in to change notification settings - Fork 123
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
More consistent naming scheme for type parameters in Cryptol prelude. #517
Comments
Also update test output for new type variable names. See #517.
836771a updates a bunch of type variable names. We're mostly using short names for now, with For variable order, we mostly try to put numeric types first, followed by value types. If a function's result type is not determined by its arguments, then we order variables so that positional partial type application is most useful. (For example, we have Let's give these types a try, and see if we like how they look in @yav also suggested that we could follow similar naming conventions for inferred type schemas, where numeric types would come first and have names like i,j,k,m,n; value types would come later and have names like a,b,c,d,e. |
Revision 4c6a69c implements the other type-variable-name-related improvements that we had planned, so I'm closing the ticket. |
Since 0bf3680, defaulting warnings and type error messages now display the type argument names from the type schemas of the functions involved. The usefulness of the error messages can be further improved by choosing descriptive type argument names that follow a consistent naming scheme.
Here's an example of a prelude function with nice type names:
And here's an example of not-so-nice names:
With
@@
, the type parameter names don't even suggest the kind (numeric vs value) of the types, let alone their purpose.Here are some initial observations:
a
,b
,c
,d
for both numeric and value types, for instance.The text was updated successfully, but these errors were encountered: