
Am Sonntag 18 Oktober 2009 22:57:38 schrieb Will Ness:
Daniel Fischer
writes: Am Sonntag 18 Oktober 2009 13:11:07 schrieb Will Ness:
(2`mod`) is a unary operation :: (Integral a) => a -> a. Putting it inside backticks would require it be a binary infix op, causing a type mis-match.
instance (Integral a) => Integral (b -> a) where ...
Evil, yes, but then f `(2 `mod`)` x would type-check.
Any problem that could be introduced for operators could be introduced for the regular named values as well.
But allowing only one level of backticks, and only on plain identifiers limits the scope of possible problems.
But anyway, there are operators where a backticked section would type-check:
f `(g `.`)` x
That's not good.
Why? Is it not just (g .) f x ? What's the problem with it?
It's incredibly ugly, looks almost like a perl regex.