[Haskell-cafe] newbie type signature question

Simon Peyton-Jones simonpj at microsoft.com
Mon Jun 12 05:37:02 EDT 2006


you need at least one constructor if you say 'where'.  

S

| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Brock
| Peabody
| Sent: 09 June 2006 20:34
| To: haskell-cafe at haskell.org
| Subject: RE: [Haskell-cafe] newbie type signature question
| 
| > From: Brandon Moore
| 
| > Getting them both is tricky, but you can do it if you use a GADT to
| > write a type that means "exists a such that a = m and a is a Monad":
| 
| Is GADT a way to assemble types at compile-time?  It looks really
cool.
| 
| > {-# OPTIONS -fglasgow-exts #-}
| > data TyEq (a :: * -> *) (b :: * -> *) where
|                   ^
|                   ^
| 
| Compiling this fails here (the first '*') for me with "parse error on
| input '*'" (ghc 6.4.1), but I'll keep playing with it.
| 
| Thanks,
| 
| Brock
| 
| 
| _______________________________________________
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list