I would like to support Simon PJ's suggestion about Ints and Integers for
three reasons.

1. There is a meta argument that we simply have not reached a consensus on 
this issue: there are options -- such as a `word' view of Int -- which need
to be looked at, and there are details to do with libraries which need to be
niggled over. It therefore seems likely that whatever decision is taken now,
it will be substantially changed in Haskell 2, and so we should stick with
what we have and try to get it right for Haskell 2.

2. About the proposal to generalise signatures, I am uneasy. This is because in
an earlier version of the language length and friends *did* have more general 
types, but the current specific types which involve Int result from unhappiness 
with these functions having generic types. It seems unfortunate to go back on 
that decision, particularly in the light of the proposed changes to make the 
types of map and comprehensions more specific for similar reasons to those 
which prompted the original narrowing of type for length and friends.

3. From a teaching point of view it is substantially easier to deal with
non-overloaded types for length, take and drop, and I think this advantage 
more than outweighs a slight niggle that it would be better to talk about
Integer than Int: given the choice between Int and (Integral a), Int is much
to be favoured from a teaching point of view.

Simon Thompson
 


Reply via email to