[Haskell-cafe] What are "free" Monads?

Daniel Peebles pumpkingod at gmail.com
Sat Feb 27 04:06:18 EST 2010


Given any functor you can get a monad for free!

data Free f a = Either a (f (Free f a))

Not sure about unfree, but there are cofree comonads that are pretty closely
related, and give you a comonad given a functor:

data Cofree f a = (a, f (Cofree f a))

I'm sure the more categorically minded can tell you way more.

Hope this helps,
Dan

2010/2/27 Günther Schmidt <gue.schmidt at web.de>

> Hello,
>
> I see the term "free monad" quite a lot, but don't really see an
> explanation what a free monad is. What sets a monad free and why in this day
> and age are there unfree monads?
>
> Günther
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100227/cc949988/attachment.html


More information about the Haskell-Cafe mailing list