-
Notifications
You must be signed in to change notification settings - Fork 18
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
Document 87429 #156
Document 87429 #156
Conversation
title: Illegal datatype context | ||
summary: Constraints present in datatype declaration without DatatypeContexts. | ||
severity: error | ||
introduced: 9.6.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add extensions
that have to accompany this error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So by default, no extensions are needed to get the error. There is a possible extension to fix the error, but because it's deprecated I have not been using said error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the unnecessary NoDatatypeContexts
pragma.
|
||
Without the language extension `DatatypeContexts` enabled, it is illegal to add constraints to the context of a datatype definition. Whilst this can be solved with enabling `DatatypeContexts`, *however* this extension is deprecated and is considered a misfeature. Other solutions to fix this can include: | ||
|
||
- Placing constraints on the *use-site* of a datatype, or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add example of such "after" fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a second example.
@mknorps are you satisfied with the updates? |
No description provided.