[GHC] #8583: Associated pattern synonyms

GHC ghc-devs at haskell.org
Sun Feb 19 01:08:27 UTC 2017


#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):

 If this gets implement, please consider default associated patterns

 {{{#!hs
 class HasZero n where
   pattern Zero :: n

   default pattern Zero :: (Num n, Eq n) => n
   pattern Zero = 0
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8583#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list