Hello Jacques,

Thursday, September 01, 2005, 6:55:43 PM, you wrote:


>>instance (Monad m, MyNum v) => MyNum (m v) where
>>    (.+) = liftM2 (.+)
>>  
>>
JC> Such simplified forms then occur often enough that, in a scrapping 
JC> boilerplate kind of way, I would really like to be able to write 
JC> something like

JC> instance (Monad m, MyNum v) => MyNum (m v) via lifting

JC> where all the operations from MyNum are obtained via applying the correct 
arity liftM function from the Monad class.

Template Haskell is a good instrument to do it


-- 
Best regards,
 Bulat                            mailto:[EMAIL PROTECTED]



_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to