[Haskell-cafe] free vs. operational vs. free-operational
Alejandro Serrano Mena
trupill at gmail.com
Tue Nov 26 09:36:51 UTC 2013
I've been reading lately about the relation between the 'free' package and
the 'operational' package for rolling your own monads  . 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 :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe