March 17th, 2004

  • evan

monads for functional programming

I'm glad I've spent so much time with the Haskell manuals because so many papers are written using Haskell.
In the Haskell tutorial's monads section they mention a paper by Wadler called "Monads for functional programming", and I finally looked it up the other day.
This paper uses some simple examples as motivation and builds in a straightforward way. I can see why they recommend it.

I understand the idea and goals of monads, but not the deep understanding I would need to explain the idea to someone unfamiliar with it. It requires more thought.

Writing that made me also want to look up effects systems: they've come up a few times in class and I understand why Cyclone uses one for modelling memory accesses, but I can't quite explain it. (The Cyclone stuff is black magic, though: they're not really mentioned in the manual because they've manage to make the compiler infer most of the effects of functions; so when you're reading about the language you don't even think about it. They go into it here.)

PS. There's a bit where their CVS bit their TeX: they wanted to talk about a type called "Id", so for TeX-speak they wrapped it like $Id$, and then CVS happily expanded that to include the filename and revision time. Nobody appears to have noticed, because it's in the postscript file I've been reading...