Galley polysemy (4/5) - Error effects#1907
Merged
pcapriotti merged 10 commits intodevelopfrom Nov 10, 2021
Merged
Conversation
4965697 to
9b65a81
Compare
228b800 to
c6c13e9
Compare
1446a25 to
539d109
Compare
4ed6d20 to
d10e4d7
Compare
0372e6c to
789ee79
Compare
Most instance of throwing in the IO monad have now been replaced by the use of an explicit `Error` effect. Note, however, that some interpretation code is still throwing exceptions.
617a0c5 to
febd7f7
Compare
mdimjasevic
approved these changes
Nov 9, 2021
Remove a commented out function signature
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is about introducing Error effects in Galley, as part of the polysemy refactoring, and towards fixing https://wearezeta.atlassian.net/browse/FS-40.
The all-encompassing
Wai.Errorhas now been split into several different error types, corresponding to some arbitrary error categories. The mapping between error categories and swagger error documentation is not yet established, and Servant integration is still missing.Eventually, I would like to make the
CanThrowcombinator in Servant type-safe, by removing the most error effects from the list of errors that are accepted by the finalSemmonad (AllErrorEffectsinGalley.API.Error), and allowing use ofCanThrowto "opt-in" to certain errors. Internal errors would still be handled by default.This PR is still not addressing the main point of https://wearezeta.atlassian.net/browse/FS-40. That will be taken care of once the refactoring is finished.
Overall plan for the Polysemy refactoring of Galley
Galleyinto a newtype overSem, and introduce "access" effects.Datacode into interpretations.Erroreffects. (this pr)Galleyinto a type synonym overSem, and get rid ofGalley0.Checklist
changelog.d.