With multiple pattern-matching, different numbers of arguments are impossible, even with point-free!
foo True b = b + 2
foo _ = id
doesn’t work for example. But
foo True = (+2)
foo _ = id
does. Sometimes we can use point-free only in one part of the function, so…
Why? Is it too hard for GHC? :'(
No. It is not at all too hard for GHC. Actually, this is the fault of the Haskell Report.
See: Haskell Report 2010 > Declarations and Bindings > Function bindings
(emphasis mine)
While function definitions are semantically equivalent to a lambda & case expression, they are not necessarily compiled that way, as Mihai suggests.
The thing is, the Haskell report defines function declarations such that they must have the same number of inputs on the left-hand side of the equation. This is made clear by the fact that
kremains the same on both the 1st and the nth function declaration lines (and by implication, all lines in-between). This is the reason for the restriction; it has nothing to do with GHC’s implementation details.tl;dr