
#15681: Take exhaustiveness checking into consideration when using MonadFailDesugaring -------------------------------------+------------------------------------- Reporter: chshersh | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.6.1 Resolution: | Keywords: pattern- | matching,monadfail,desugaring,PatternSynonyms,PatternMatchWarnings Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): The real problem here is that we are trying to ''infer'' whether any of the patterns can fail -- if so, generate a `MonadFail` constraint, but not if not. But pattern-match-coverage is a tricky thing, as the examples demonstrate. And making the generation of a constraint depend on how another set of constraints is solved is pretty thin ice. I wish it were possible to ''specify unambiguously'' whether you want `Applicative` or `Monad` or `MonadFail`. Something like `do{Monad}` or `do{Applicative}` or `do{MonadFail}`. That would be a lot clearer! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15681#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler