
9 Jun
2006
9 Jun
'06
3:34 p.m.
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