This may be too late for Haskell 98, but who knows:
I could always write functions like
> f foo _ = ...
and when I see such a lhs, I know that the second argument of f is not
used. This is not a convention, but enforced.
Even if it is not used, I might like to document what the second
argument is, like this:
> f foo _bar = ... <as above>
This is the intended usage, if I remember right.
Now the reader sees that the second argument is something the
programmer would call bar, and the leading underscore gives a hint
that it might not be used. But this time, this is not enforced, and
the reader has to look through the rhs to be sure.
Knowing that an argument is not used is an advantage, and knowing what
it is is also an advantage, so to get both advantages we should
disallow identifiers starting with an underscore on the rhs.
The syntax could reflect this by not generating them as varid, but
as apat. Does this make sense?
Easier and less important: can't we allow _ as dummy type variable?
It should have the usual 'each occurance is different' semantics, so
that the most general type of
> fst3 (a,_,_) = a
could be expressed as
> fst3 :: (a,_,_) -> a
Or is it already allowed? I tried it with hugs right now, and it
worked, but I don't see how this is justified by the syntax given in
the 1.4 report.
Merry Haskell 98 day,
Christian Sievers