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

> Roman Leshchinskiy <r...@cse.unsw.edu.au> writes:
> 
>> On 24/04/2010, at 18:06, Ivan Lazar Miljenovic wrote:
>>> 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?
> 
> What do you refer to by "semantics"?  Can you provide an example of when
> what you consider to be the API to change when the functions, types,
> etc. don't?

John Goerzen gave one in the very first post of this thread: the fix to 
old-locale which didn't change any types but apparently changed the behaviour 
of a function quite drastically. Another example would be a change to the Ord 
instances for Float and Double which would have compare raise an exception on 
NaNs as discussed in a different thread on this list. Another one, which is 
admittedly silly but demonstrates my point, would be changing the 
implementation of map to

map _ _ = []

In general, any significant tightening/changing of preconditions and 
loosening/changing of postconditions would qualify. 

Roman


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to