On Tue, 25 Mar 2008, Ryan Ingram wrote:
I was experimenting with Prompt today and found that you can get a "restricted monad" style of behavior out of a regular monad using Prompt:
I recently developed a similar trick: http://hsenag.livejournal.com/11803.html
It uses the regular MonadPlus rather than a custom mplus/mzero, and should work for any restricted monad. Your "mrestrict" is "Embed . unEmbed" in my code (and should be given a shorter name, like "reEmbed"). Of course, mplus and mzero can't optimise, since they don't have an Ord constraint.
Cheers, Ganesh _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe