[Haskell-cafe] Signature of a function

Keith Wansbrough Keith.Wansbrough at cl.cam.ac.uk
Tue Jan 11 11:53:23 EST 2005


Daniel Fischer writes:

> One might replace type signatures with comments, of course, and so convey 
> better information, but that is more work, hence we poor ignorants will 
> settle for signatures.

You mean one might add comments _as well as_ type signatures, of
course.  The only thing worse than no comment is an incorrect comment.
At least type signatures are verified by the compiler, and cannot lie.

Haddock of course is based entirely on this concept - comments are
attached to type signatures, not code.

--KW 8-)



More information about the Haskell-Cafe mailing list