[Haskell-cafe] The instability of Haskell libraries

Roman Leshchinskiy rl at cse.unsw.edu.au
Sat Apr 24 04:43:14 EDT 2010


On 24/04/2010, at 18:06, Ivan Lazar Miljenovic wrote:

> Roman Leshchinskiy <rl at cse.unsw.edu.au> writes:
> 
>> On 24/04/2010, at 07:29, Don Stewart wrote:
>> 
>>> Oh, the Platform has very strict standards about APIs,
>> 
>> What is an API? The package versioning policy only seems to talk about
>> types and function signatures. John's old-locale example shows that
>> this is not enough.
> 
> I would think that the API is all the
> functions/classes/datatypes/instances/etc. exported from the library in
> combination with their types.

So the semantics of those functions doesn't matter at all?

>> Would it perhaps make sense for at least the Platform to require
>> packages to have unit tests and to require versions to be bumped
>> whenever those change (sufficiently)?
> 
> I don't get this; just because someone changes a unit test (because they
> thought of a new case, etc.) they should bump the package version even
> if all the changes were internal and not exported?

Adding new tests (i.e., new postconditions) doesn't change the API. Loosening preconditions doesn't, either. Also, the tests would only cover the exposed part of the library, of course. Internal tests are of no concern to the library's clients.

Roman




More information about the Haskell-Cafe mailing list