Changes between Version 3 and Version 4 of FlexibleInstances


Ignore:
Timestamp:
Dec 15, 2005 12:26:25 AM (9 years ago)
Author:
ross@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FlexibleInstances

    v3 v4  
    5454instance (C1 a, C2 a, C3 a) => C a 
    5555}}} 
    56    An alternative criterion using a multiset path ordering would allow the `Sized` example and the first of these, but the second cannot be shown to terminate without considering other instances in the program. 
     56   The second of these cannot be shown to terminate without considering other instances in the program. 
     57 
     58== Relaxed termination condition == 
     59An 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 
     61 * the assertion has fewer constructors and variables (taken together and counting repetitions) than the head. 
     62(These conditions ensure that under any ground substitution, the assertion contains fewer constructors than the head.) 
     63 
     64This rule would allow all instances accepted by the GHC rule, plus the `Sized` example, any instance without a context, and others.