
6 Nov
2010
6 Nov
'10
10:22 a.m.
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: http://hackage.haskell.org/package/InfixApplicative although it still doesn't solve the problem of fixity. -Brent