I came across an implementation of reader monads by Andy Gill,
http://www.cse.ogi.edu/~andy/monads/MonadReader.htm
inspired by the paper "Functional Programming with Overloading
and Higher-Order Polymorphism" (by Mark P Jones)
http://www.cse.ogi.edu/~mpj/pubs/springschool.html:
--
Works for me under ghc4.05; for hugs you need to:
You have it right, except you need to
1) explicitly type test,
test:: Reader [Char] Char
2) have Reader derive Show
3) use the -98 option at startup
John Atwood
-
=?iso-8859-1?Q?Jos=E9_Romildo_Malaquias?= wrote: