[Haskell-beginners] Lifting infix functions in applicative style

Brent Yorgey byorgey at seas.upenn.edu
Sat Nov 6 06:22:50 EDT 2010

On Sat, Nov 06, 2010 at 01:33:39AM +0100, Bastian Erdnüß wrote:
> When I want to lift an infix function into an applicative functor I use 'liftA2' -- I just call it 'up' for the sake of brevity.  But I always have to add some parenthesis since I don't know how to tell Haskel that `up op` shall have the same fixity as `op` has.  Is there a way to do that?

No, there isn't.  Also, `up op` is not valid syntax -- only names may
go in between `backticks`, not expressions in general.

You may be interested in the InfixApplicative package:


although it still doesn't solve the problem of fixity.


More information about the Beginners mailing list