[Haskell-cafe] binary operator modifiers

Tim Newsham newsham at lava.net
Mon Nov 19 20:22:13 EST 2007

>> liftM2 (/) sum length.  Anyway, the closest you can get in Haskell is
>> something like this, using the infix expressions of Ken Shan and Dylan
>> Thurston<http://www.haskell.org/pipermail/haskell-cafe/2002-July/003215.html>
> Hmm.. that might be decent if you added rules to pretty-print them in 
> lhs2tex.  The src code would be slightly messy but the formatted code would 
> be very clean.  And it opens the doors for other binop decorators. 
> Interesting idea.

I finally get my lhs2tex set up and put together a better example
of what I was talking about:


Though I don't know if you can coax lhs2tex into accepting something like

   %format -:liftM2 (+):-   =  "\widehat{+}"

Tim Newsham

More information about the Haskell-Cafe mailing list