type equality symbol

Manuel M T Chakravarty chak at cse.unsw.edu.au
Thu Dec 6 20:36:19 EST 2007

Wolfgang Jeltsch:
> Am Mittwoch, 5. Dezember 2007 17:05 schrieb Simon Peyton-Jones:
>> […]
>> Anyway, while on this subject, I am considering making the following
>> change:
>>        make all operator symbols into type constructors
>>        (currently they are type variables)
> This would be highly problematic!
> Concerning syntax, everything that holds for values should also hold  
> for
> types.  For values, identifiers starting with a capital letter and  
> operators
> starting with a colon denote “constants”, everything else denotes  
> variables.
> Exactly the same should hold for types since otherwise we would get  
> a very
> confusing result.  So we should keep things as they are concerning  
> type
> constructors and type variables.  And we should think about type  
> functions
> being denoted by lower case identifiers and operators not starting  
> with a
> colon because they are similar to non-constructor functions on the  
> value
> level.

The problem is that Haskell 98 already messed that up.  If type  
functions are to use lower-case letters, vanilla type synonyms should  
use lower case-letters; eg,

   type string = [Char]

Unfortunately, such a change would break about every single Haskell  
program.  So, unless we make some rather drastic changes breaking  
backwards compatibility, we will not be able to get an entirely clean  


More information about the Glasgow-haskell-users mailing list