[GHC] #13449: Multiple pattern synonym declarations for one signature

GHC ghc-devs at haskell.org
Sun Mar 19 01:07:19 UTC 2017


#13449: Multiple pattern synonym declarations for one signature
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
  PatternSynonyms                    |
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I'm not sure if I've seen this before. I want to be able to write

 {{{#!hs
 data Ty  a where TBool :: Ty Bool
 data Exp a where Lit   :: Ty a -> a -> Exp a

 pattern Fls, Tru :: () => a ~ Bool => Exp a
 pattern Fls = Lit TBool False

 pattern Tru = Lit TBool False
 }}}

 instead of

 {{{#!hs
 pattern Fls :: () => a ~ Bool => Exp a
 pattern Fls = Lit TBool False

 pattern Tru :: () => a ~ Bool => Exp a
 pattern Tru = Lit TBool False
 }}}

 just as this is allowed
 {{{#!hs
 fls, tru :: Exp Bool
 fls = Lit TBool False
 tru = Lit TBool False
 }}}

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


More information about the ghc-tickets mailing list