[GHC] #11461: Allow pattern synonyms to be bundled with type classes?

GHC ghc-devs at haskell.org
Tue Jan 19 17:35:47 UTC 2016


#11461: Allow pattern synonyms to be bundled with type classes?
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
                                     |  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 Iceland_jack):

 Did you mean

 {{{#!hs
 instance Nullable Maybe where
   null = isNothing

 pattern Null :: Nullable f => f a
 pattern Null <- (null -> True)
 }}}

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


More information about the ghc-tickets mailing list