[Haskell-cafe] Writer monad corresponds to synthesized attribute?
leather at cs.uu.nl
Thu Jan 13 18:58:46 CET 2011
I have been attempting to translate something I did using UUAG into monadic
code. It involved inherited, synthesized, and chained attributes. It has
been said that such attributes correspond to the Reader, Writer, and State
monads, respectively . The former and latter are straightforward, but I'm
somehow missing the correlation between the Writer monad and synthesized
attributes. I couldn't figure out the appropriate combination of
tell/listen/pass/censor to do what I was doing with a synthesized Map. I
eventually gave up and passed the synthesized values along with the monadic
result. Has anybody done this before?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe