Changes between Version 4 and Version 5 of FlexibleInstances


Ignore:
Timestamp:
Jan 4, 2006 7:55:10 PM (9 years ago)
Author:
ross@…
Comment:

minor rewording

Legend:

Unmodified
Added
Removed
Modified
  • FlexibleInstances

    v4 v5  
    5858== Relaxed termination condition == 
    5959An alternative rule would be that each assertion in the context must satisfy 
    60  * the variables of the assertion are a sub-multiset of those of the head (though they may be the same), and 
     60 * no variable has more occurrences in the assertion than in the head, and 
    6161 * the assertion has fewer constructors and variables (taken together and counting repetitions) than the head. 
    6262(These conditions ensure that under any ground substitution, the assertion contains fewer constructors than the head.) 
    6363 
    64 This rule would allow all instances accepted by the GHC rule, plus the `Sized` example, any instance without a context, and others. 
     64This rule would allow instances accepted by the GHC rule and more, including 
     65{{{ 
     66instance C a 
     67instance Show (s a) => Show (Sized s a) 
     68instance (C1 a, C2 b) => C a b 
     69instance C1 Int a => C2 Bool [a] 
     70instance C1 Int a => C2 [a] b 
     71instance C a a => C [a] [a] 
     72}}}