Changes between Version 44 and Version 45 of Status/Oct11


Ignore:
Timestamp:
Nov 4, 2011 1:37:18 AM (2 years ago)
Author:
FSalad
Comment:

Fix 'insert' example

Legend:

Unmodified
Added
Removed
Modified
  • Status/Oct11

    v44 v45  
    4444  type X a = Eq a 
    4545  insert x []  = [x] 
    46   insert x (y:ys) | x==y      = ys  
    47                   | otherwise = y : insert x ys  
     46  insert x ys0@(y:ys) | x==y      = ys0 
     47                      | otherwise = y : insert x ys  
    4848}}} 
    4949  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]].