logo       

GADTs: malformed constructor signature: msg#00036

lang.haskell.glasgow.bugs

Subject: GADTs: malformed constructor signature

Rather unituitively, GHC allows

> {-# OPTIONS -fglasgow-exts #-}
> > data T :: * where
> C :: Int -> Int -> T

but not

> data T :: * where
> C :: Int -> (Int -> T)

Sometimes, I like to parenthesize the result type for emphasis.

Cheers, Ralf


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

News | FAQ | advertise