GADTs: malformed constructor signature

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GADTs: malformed constructor signature

Ralf Hinze
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
_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Reply | Threaded
Open this post in threaded view
|

RE: GADTs: malformed constructor signature

Simon Peyton Jones
Quite right.  A stupid bug, now fixed.

| -----Original Message-----
| From: [hidden email]
[mailto:glasgow-haskell-bugs-
| [hidden email]] On Behalf Of Ralf Hinze
| Sent: 19 November 2005 11:44
| To: [hidden email]
| 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
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| [hidden email]
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs