We've written a full-featured [OCaml Monad Library](/code/monads.ml). To use it, download the file and then in your OCaml session or file, write:
- #use "path/to/monads.ml";;
+ # #use "path/to/monads.ml";;
That's not the official, preferred way to load OCaml libraries, but it's quick and easy.
compare them for equality and use them for derefs, and so on.
+Acknowledgements: Our library is largely based on the mtl library distributed with the Glasgow Haskell Compiler. That in turn was inspired by Mark Jones' 1995 paper
+[Functional Programming with Overloading and Higher-Order Polymorphism](http://web.cecs.pdx.edu/~mpj/pubs/springschool.html).
+ I've also been helped in
+ various ways by posts and direct feedback from Oleg Kiselyov and
+ Chung-chieh Shan. The following were also useful:
+
+ * <http://pauillac.inria.fr/~xleroy/mpri/progfunc/>
+ * Ken Shan "Monads for natural language semantics" <http://arxiv.org/abs/cs/0205026v1>
+ * <http://www.grabmueller.de/martin/www/pub/Transformers.pdf>
+ * <http://en.wikibooks.org/wiki/Haskell/Monad_transformers>
+
+