For example, this does not type check
\cons nil -> 5 `cons` 3 `cons` nil
nor does this
\(#) -> 5 # 3 # nil
Although both of these do
\cons nil -> 5 `cons` nil
\(#) nil -> 5 # nil
Is there a way to assign infixites to operators in lambdas. I tried
infixr 5 #
foo = \(#) nil -> 5 # 3 # nil
which gives an error for no definition of #
and
foo = \(infixr 5 #) nil -> 5 # 3 # nil
which is just a syntax error.
What can I do?