[Haskell-cafe] Proving correctness

Pedro Vasconcelos pbv at dcc.fc.up.pt
Mon Feb 14 13:24:30 CET 2011

On Mon, 14 Feb 2011 12:54:55 +0100
Tillmann Rendel <rendel at informatik.uni-marburg.de> wrote:

> This benefit of explicit input and output values can interact nicely 
> with parametric polymorphism:
>    swap :: (a, b) -> (b, a)
> This more general type signature makes sure we are not just returning 
> the input values unswapped.

Good point. This is a good reason why it's good practice to look for
possiblity of writing more general functions and types even when
they end up being used in a single instance.


More information about the Haskell-Cafe mailing list