-
Notifications
You must be signed in to change notification settings - Fork 333
Remove explicit instantiations of ErrorDescription values #1794
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
Conversation
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.
nice!
Wai.Error | ||
errorDescriptionToWai (ErrDesc.ErrorDescription msg) = | ||
errorDescriptionToWai (ErrorDescription msg) = |
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.
should this be hidden from export? we don't want to use it any more outside of this module, right?
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.
Some errors are parametrised, and in that case we need to use this function to convert them to Wai.Error
, because mkErrorDescription
is not sufficient.
So far, every
ErrorDescription
type has been accompanied by a corresponding value created withmkErrorDescription
. This PR removes all those definitions, and adds some convenience functions (to be used with type application) that make it easier to refer to the error without having an explicit typed instantiation available.Checklist
changelog.d
.