Multiple pattern synonym declarations for one signature
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
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |