[Haskell-beginners] Sankey Diagram with monads
Brandon Allbery
allbery.b at gmail.com
Fri May 31 17:42:48 CEST 2013
On Fri, May 31, 2013 at 11:06 AM, Adrian May <adrian.alexander.may at gmail.com
> wrote:
> Well I figured out that I should be using the State monad, but it seems
> not to be behaving like most of the tutorials on the web. Did the syntax
> change? ....
>
mtl-2.x changed all the base monads (State, Reader, Writer, etc.) from
standalone to being transformers atop an Identity monad; this cleans up the
implementation considerably (since we don't have almost exactly the same
code for both the standalone and transformer versions, but means that all
uses of the standalone constructors must be replaced with functions that
build the appropriate transformer. (e.g. State becomes state, unless you
want to spell it out as StateT Identity.)
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130531/8854d155/attachment.htm>
More information about the Beginners
mailing list