On Wed, 7 Sep 2005, Frederik Eaton wrote: > I want the type system to be able to do "automatic lifting" of monads, > i.e., since [] is a monad, I should be able to write the following: > > [1,2]+[3,4] > > and have it interpreted as "do {a<-[1,2]; b<-[3,4]; return (a+b)}".
You might want to take a look at "Monadification of Functional Programs" by Erwig and Ren (Science of Computer Programming, 52:101-129, 2004): http://web.engr.oregonstate.edu/~erwig/papers/abstracts.html which describes the transformation that introduces such a monadic structure. Jeremy [EMAIL PROTECTED] Oxford University Computing Laboratory, TEL: +44 1865 283508 Wolfson Building, Parks Road, FAX: +44 1865 273839 Oxford OX1 3QD, UK. URL: http://www.comlab.ox.ac.uk/oucl/people/jeremy.gibbons.html _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell