Changes between Version 22 and Version 23 of Status/Oct11


Ignore:
Timestamp:
Oct 31, 2011 1:46:16 AM (4 years ago)
Author:
acfoltzer
Comment:

fixed some typos

Legend:

Unmodified
Added
Removed
Modified
  • Status/Oct11

    v22 v23  
    4141  type X a :: Constraint
    4242  insert :: X a => a -> c a -> c a
    43 isntance Coll [] where
     43instance Coll [] where
    4444  type X a = Eq a
    4545  insert x []  = [x]
     
    4747                  | otherwise = y : insert x ys
    4848}}}
    49   Here `X` is an assocaited constraints synonmy of the class `Coll`. The key point is that differnet instances can give different definitions to `X`.  The GHC wiki page describese the design [[http://hackage.haskell.org/trac/ghc/wiki/KindFact WikiConstraint]], and Max's blog posts give more examples [[http://blog.omega-prime.co.uk/?p=61 ConstraintFamlies], [http://blog.omega-prime.co.uk/?p=127 ConstraintKind]].
     49  Here `X` is an associated constraint synonym of the class `Coll`. The key point is that differnet instances can give different definitions to `X`.  The GHC wiki page describes the design [[http://hackage.haskell.org/trac/ghc/wiki/KindFact WikiConstraint]], and Max's blog posts give more examples [[http://blog.omega-prime.co.uk/?p=61 ConstraintFamlies], [http://blog.omega-prime.co.uk/?p=127 ConstraintKind]].
    5050
    5151 * '''Associated type synonym defaults.'''  Haskell lets you give a ''default method'' for the operations of a class.
    52   Associated type synonym defaults let you declare a ''default type instance'' for the associated type synonyums of a class. This feature, implemented by Max Bolingbroke, nicely fills out missing design corner.  For example
     52  Associated type synonym defaults let you declare a ''default type instance'' for the associated type synonyms of a class. This feature, implemented by Max Bolingbroke, nicely fills out missing design corner.  For example
    5353{{{
    5454class C a where