
GHC understands that if `p1, ..., pn` are exhaustive patterns for the result type of `f`, then `f -> p1, ..., f -> pn` are exhaustive patterns for the input type of f. This to some extent solves the problem of mixing
#8779: Exhaustiveness checks for pattern synonyms -------------------------------------+------------------------------------- Reporter: nomeata | Owner: mpickering 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): Phab:D2669 Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I was specifically referring to the second bullet point at the end of comment:31 . patterns defined in different modules, as long as those patterns are defined in terms of the same "view functions". -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8779#comment:48 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler