[Haskell-cafe] free vs. operational vs. free-operational

Alejandro Serrano Mena trupill at gmail.com
Tue Nov 26 09:36:51 UTC 2013


Dear Café,
I've been reading lately about the relation between the 'free' package and
the 'operational' package for rolling your own monads [1] [2]. Furthermore,
I've discovered that the 'free-operational' package, which is some sort of
bridge between the two worlds, and provides not only Monad but also
Applicative and Alternative instances for ProgramT.
The problem is that right now everything is a little confused in my head.
In particular, I have the following questions:
- I've read that free allows you to 'bake algebraic laws' in the resulting
monad. How does this work? Why doesn't operational offer that feature?
- One of the things I really like from the free package is that it provides
support for many monad transformer stacks, whereas operational does not? Is
there any special restriction why operational cannot do this? Would it be
possible to provide similar instances for free-operational?
- It seems that free gives more features (Alternative, Applicative) with
the same work. In which situations should I prefer operational to free? I
really like the separation between providing a data type and then a
interpretation that operational embodies...
- Should I replace my usage of operational with free-operational altogether?

Thanks for the help :)

[1]
http://www.reddit.com/r/haskell/comments/17a33g/free_functors_the_reason_free_and_operational_are/
[2]
http://stackoverflow.com/questions/14263363/is-operational-really-isomorphic-to-a-free-monad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20131126/e9342208/attachment.html>


More information about the Haskell-Cafe mailing list