Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C curry-frontend
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 72
    • Issues 72
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • curry
  • curry-frontend
  • Issues
  • #37
Closed
Open
Created Mar 20, 2019 by Kai Prott@kaiprottMaintainer

Add support for MonadFail in desugaring of do-notation

MonadFail Proposal

In ghc-8.6 and later do (a,b) <- action; return b has type Monad m => m a (Pattern match cannot fail)

and do (1,b) <- action; return b has type MonadFail m => m a (Pattern match can fail)

but action >>= \(1,b) -> return b has type Monad m => m a

Issues:

  • Without MonadFail the second and third example could be considered equivalent, with MonadFail they are not. But even now, the second example would have been equal to fail if the pattern match failed, whereas the second would have been a "non-exhaustive pattern match".
Edited Mar 21, 2019 by Kai Prott
Assignee
Assign to
Time tracking