On Jan 13, 2010, at 2:16 PM, Antoine Latter wrote:

He's looking for the self-documentation aspect of "this argument is
completely irrelevant". Neither rolling a random unused type variable nor
"forall"ing it (my first idea) really accomplishes that.


Isn't that what we have here? a function of type (a -> A -> B) cannot
use the first argument in any meaningful way.

I think, he wants to document that the type variable 'a' is not used in the *type*.

Just like you can document that the second argument of 'const' is unused by using a wildcard. You can write

    const x _ = x

instead of

    const x y = x

and it would be nice to write 'const's type as

    a -> _ -> a

rather than

    a -> b -> a

Sebastian

--
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)



_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to