[Haskell-cafe] The instability of Haskell libraries

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sat Apr 24 05:47:49 EDT 2010


Mads Lindstrøm <mads.lindstroem at gmail.com> writes:
> You could automatically generate QuickCheck tests for many pure
> functions. It will not catch every API change, but it would catch some.
> It would have caught the API change that John mentioned.

As in comparing the old and the new functions?

> But automatically generating QuickCheck tests to test if funOld ==
> funNew, would require quite a bit work. But better than everybody having
> to write unit tests, as other have proposed.

Agreed; however, this has its own problems: you have to load up two
versions of the same library and compare each pair of functions.

Note that even this comparison isn't really legitimate: what happens if
there was some edge/corner case that the old version didn't handle
properly and thus the new one fixes it?  The QC tests would say that
they are different, even though they are actually the same.

Even if we could get around this, there remains another problem:
automatically generating the kind of input each function expects (how do
you encode pre-conditions automatically for such a tool to pick up?
What about pure parsing functions?).

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list