On 2004-04-29T18:27:32-0500, [EMAIL PROTECTED] wrote: > While writing monad programs, I sometimes want to do a return as it is in > imperative program. i.e., > do{return 1; return 2} is same as return 1
Hello, You can build an error monad transformer along the lines of the Control.Monad.Error module, in particular the ErrorT data type there (but without the Error class). You can then replace "return" above with "throwError" for your error monad transformer. Ken -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig BBC News: Universities face week of protest http://news.bbc.co.uk/1/hi/education/3508209.stm
pgp00000.pgp
Description: PGP signature
_______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell