[Haskell-cafe] Parameterisations of Monads
gabor at mac.com
Tue Feb 5 20:15:51 EST 2008
Am 05.02.2008 um 21:27 schrieb Dan Weston:
> Your SuperMonad seems remarkably similar to Gabor Greif's Thrist
> datatype [1,2] reported only six days ago on this list .
> 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:
Will start pondering about mfix and restricted monads now.
More information about the Haskell-Cafe