Well, the short answer is you cannot. Imagine a terrible ambiguity with abc
if b
potentially infix. But you can define an operator for this. Any of them will work
a |+| b = method1 (|+|) ab = method1 ab (|+|) = method1
Then
a |+| b === a `method1` b === method1 ab
Valid characters for infix haskell statements are limited, select
:| !@ #$%^&*-+./<>?\~
In the shared library, the lens, there are many operators that act as synonyms for longer names. This is pretty common. Please use judgment, although otherwise you will get more perl than Haskell :)
source share