Opened 6 weeks ago

Closed 6 weeks ago

Last modified 6 weeks ago

#13449 closed feature request (duplicate)

Multiple pattern synonym declarations for one signature

Reported by: Iceland_jack Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.0.1
Keywords: PatternSynonyms Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #11727 Differential Rev(s):
Wiki Page:

Description

I'm not sure if I've seen this before. I want to be able to write

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

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

fls, tru :: Exp Bool
fls = Lit TBool False
tru = Lit TBool False

Change History (2)

comment:1 Changed 6 weeks ago by RyanGlScott

Resolution: duplicate
Status: newclosed

This is a duplicate of #11727, which is fixed in GHC 8.2.

comment:2 Changed 6 weeks ago by Iceland_jack

Cheers

Note: See TracTickets for help on using tickets.