[Haskell-cafe] newbie type signature question

Brock Peabody brock.peabody at npcinternational.com
Fri Jun 9 15:34:13 EDT 2006


> 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




More information about the Haskell-Cafe mailing list