Changes between Version 1 and Version 2 of ClassSystem
- Timestamp:
- 04/18/06 01:42:49 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ClassSystem
v1 v2 15 15 These are the proposals that seem to have some support. 16 16 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 19 26 * #70 allow TypeSynonymInstances 20 27 * #17 relax restriction on signatures of class methods 21 28 * #81 scoping of type variables in class instances 29 30 An opportunity for ScopedTypeVariables that is already present in the syntax. 31 22 32 * #52 Generalised deriving for newtype 23 33 … … 39 49 * #54 add overlapping or incoherent instances 40 50 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 50 53 * #18 add closed classes 51 54 * #19 control export and import of class instances … … 63 66 * #14 add Associated Types (ATs) 64 67 65 The bottom line is thatHaskell' should have multiparameter type68 '''Proposal:''' Haskell' should have multiparameter type 66 69 classes and functional dependencies. Multiparameter type classes are 67 70 useful for programming, and something like functional dependencies are
