Changes between Version 1 and Version 2 of ClassSystem


Ignore:
Timestamp:
Apr 18, 2006 8:42:49 AM (9 years ago)
Author:
ross@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ClassSystem

    v1 v2  
    1515These are the proposals that seem to have some support.
    1616
    17  * #32  add FlexibleInstances   
    18  * #31  add FlexibleContexts   
     17 * #32  add FlexibleInstances
     18
     19 MultiParamTypeClasses and TypeSynonymInstances are little use without generalizing the form of instances.
     20 The proposal is to generalize but retain guaranteed termination of instance inference via (necessarily conservative) syntactic restrictions.
     21
     22 * #31  add FlexibleContexts
     23
     24 With FlexibleInstances, more contexts become irreducible.
     25
    1926 * #70  allow TypeSynonymInstances     
    2027 * #17  relax restriction on signatures of class methods       
    2128 * #81  scoping of type variables in class instances
     29
     30 An opportunity for ScopedTypeVariables that is already present in the syntax.
     31
    2232 * #52  Generalised deriving for newtype
    2333
     
    3949 * #54  add overlapping or incoherent instances
    4050     
    41  Overlapping instances add complexity to an already difficult problem. With overlapping instances:
    42    * Haskell would need to be a lot more specific about exactly where context reduction takes place.
    43    * A program that type checks can have its meaning changed by adding an instance declaration
    44    * Similarly adding "import M()" can change the meaning of a program (by  changing which instances are visible
    45    * When exactly is overlap permitted?  Is this ok?
    46     {{{   
    47            instance C a Int
    48            instance C Bool b
    49     }}}
     51 [wiki:OverlappingInstances Overlapping instances] add complexity to an already difficult problem, [wiki:IncoherentInstances incoherent instances] even more so.
     52
    5053 * #18  add closed classes
    5154 * #19  control export and import of class instances   
     
    6366 * #14  add Associated Types (ATs)
    6467
    65 The bottom line is that Haskell' should have multiparameter type
     68'''Proposal:''' Haskell' should have multiparameter type
    6669classes and functional dependencies. Multiparameter type classes are
    6770useful for programming, and something like functional dependencies are