Skip to content

Conversation

pcapriotti
Copy link
Contributor

So far, every ErrorDescription type has been accompanied by a corresponding value created with mkErrorDescription. 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

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.
  • changelog.d contains the following bits of information:
    • A file with the changelog entry in one or more suitable sub-sections. The sub-sections are marked by directories inside changelog.d.

Copy link
Contributor

@fisx fisx left a 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) =
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@pcapriotti pcapriotti merged commit 18b90a8 into develop Sep 21, 2021
@pcapriotti pcapriotti deleted the pcapriotti/cleanup-error-desc branch September 21, 2021 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants