
#8583: Associated pattern synonyms -------------------------------------+------------------------------------- Reporter: cactus | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: 5144 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Quick reminder: I need this to work with GND. Using an `Int` instance of the above class {{{#!hs deriving instance HasZero Int }}} I want to be able to derive (`newtype`, not `anyclass`) {{{#!hs newtype USD = USD Int deriving newtype HasZero -- instance HasZero USD where -- pattern Zero :: USD -- pattern Zero <- (coerce -> Zero::Int) -- where Zero = coerce (Zero::Int) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8583#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler