pure
pure copied to clipboard
Compiler rejects type signatures for infix functions
The compiler accepts this:
l1 ++ l2 =
case l1 of
[] -> l2
h:t -> h : (t ++ l2)
main = Ret ()
But rejects any version with a type signature for ++
. For example, it rejects:
(++) :: [a] -> [a] -> [a]
l1 ++ l2 =
case l1 of
[] -> l2
h:t -> h : (t ++ l2)
main = Ret ()