Changes between Version 6 and Version 7 of TypeSynonymInstances


Ignore:
Timestamp:
Aug 24, 2006 3:45:39 PM (8 years ago)
Author:
nhn@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TypeSynonymInstances

    v6 v7  
    1818 
    1919== Pros == 
     20 
    2021 * Offered by GHC and Hugs for several years. 
    2122 * Synonyms can cut large instance heads to a manageable size, e.g. when building a monad using monad transformers. 
     
    3233== Cons == 
    3334 * Since constraints on the instance head refer to the expanded type, errors can be more obscure. 
     35 
     36== Comment == 
     37This change would make type synonyms a bit more like newtypes. NewtypeDeriving makes newtypes a bit more like 
     38type synonyms since they can be made to inherit properties of the underlying type, albeit (usefully) selectively. 
     39Having both type synonyms and newtype is a bit confusing, and the more alike they are, the more confusing it is. 
     40I guess looking for a single replacement is not an option for Haskell', but at least we should consider if 
     41automatic derivation for newtypes does not supersede this one as it would make it significantly less tiresome to 
     42introduce a newtype for purposes of abbreviation.