
#8779: Exhaustiveness checks for pattern synonyms -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.8.1 checker) | Keywords: Resolution: | PatternSynonyms 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 rwbarton): In a case like this you would define a view `data CommandView = A1 | M1; viewCommand :: Command -> CommandView` which is presumed to be total thanks to your invariant. Then define `pattern AddOne = (viewCommand -> A1)`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8779#comment:35 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler