Skip to content
  • Iavor S. Diatchki's avatar
    Implement OVERLAPPING and OVERLAPPABLE pragmas (see #9242) · 97f499b5
    Iavor S. Diatchki authored
    This also removes the short-lived NO_OVERLAP pragama, and renames
    OVERLAP to OVERLAPS.
    
    An instance may be annotated with one of 4 pragams, to control its
    interaction with other overlapping instances:
    
      * OVERLAPPABLE:
        this instance is ignored if a more specific candidate exists
    
      * OVERLAPPING:
        this instance is preferred over more general candidates
    
      * OVERLAPS:
        both OVERLAPPING and OVERLAPPABLE (i.e., the previous GHC behavior).
        When compiling with -XOverlappingInstances, all instance are OVERLAPS.
    
      * INCOHERENT:
        same as before (see manual for details).
        When compiling with -XIncoherentInstances, all instances are INCOHERENT.
    97f499b5