
#12924: Pattern Synonyms in Typeclasses -------------------------------------+------------------------------------- Reporter: xcmw | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: pattern | Operating System: Unknown/Multiple synonym type class | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs data A t where AX :: A X AY :: A Y AZ :: A Z class HasX a where data pattern X :: a X instance HasX A where data pattern X = AX d :: A t -> String d = \case X -> "" AY -> "" AZ -> "" }}} The above example should compile and emit no warnings with -fwarn- incomplete-patterns. Would require https://ghc.haskell.org/trac/ghc/ticket/8779 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12924 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler