[Haskell-cafe] Parameterisations of Monads

Gabor Greif gabor at mac.com
Tue Feb 5 20:15:51 EST 2008


Am 05.02.2008 um 21:27 schrieb Dan Weston:

> Matthew,
>
> Your SuperMonad seems remarkably similar to Gabor Greif's Thrist  
> datatype [1,2] reported only six days ago on this list [3].
>
> Can you compare/contrast your class approach with his polymorphic  
> type approach? Or have I completely confused the two because of the  
> similar kind of their arguments?
>
>     data Thrist :: (* -> * -> *) -> * -> * -> * where
>     Nil :: Thrist p a a
>     Cons :: p a b -> Thrist p b c -> Thrist p a c
>
>     data Arrow' :: (* -> * -> *) -> * -> * -> * where
>     Arr :: Arrow a => a b c -> Arrow' a b c
>     First :: Arrow a => Arrow' a b c -> Arrow' a (b, d) (c, d)


For the record, I have done the monad into thrist embedding now:

http://heisenbug.blogspot.com/2008/02/embeddings-part-two-monad- 
thrist.html

Will start pondering about mfix and restricted monads now.

Cheers,

	Gabor



More information about the Haskell-Cafe mailing list