[Haskell-cafe] Writer monad corresponds to synthesized attribute?

Sean Leather 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 [1]. 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...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110113/4419b906/attachment.htm>

More information about the Haskell-Cafe mailing list