logo       

GADTs and infix?: msg#00054

lang.haskell.glasgow.bugs

Subject: GADTs and infix?

In ghc 6.5, why does this GADT definition get accepted

data DArrowX :: * -> * -> * where
First :: DArrowX a a' -> DArrowX (a,b) (a',b)

and also this one

data DArrowX :: * -> * -> * where
First :: a `DArrowX` a' -> DArrowX (a,b) (a',b)

but this not one

data DArrowX :: * -> * -> * where
First :: a `DArrowX` a' -> (a,b) `DArrowX` (a',b)

which yields

Malformed constructor signature: (a, b) DArrowX (a', b)
In the signature of a data constructor: a DArrowX a' -> (a, b)
DArrowX (a', b)
In the data type declaration for `DArrowX'

Is this a bug?

- Conal


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise