• sheaf's avatar
    Don't default type variables in type families · 9cc6c193
    sheaf authored and  Marge Bot's avatar Marge Bot committed
      This patch removes the following defaulting of type variables
      in type and data families:
    
        - type variables of kind RuntimeRep defaulting to LiftedRep
        - type variables of kind Levity defaulting to Lifted
        - type variables of kind Multiplicity defaulting to Many
    
      It does this by passing "defaulting options" to the `defaultTyVars`
      function; when calling from `tcTyFamInstEqnGuts` or
      `tcDataFamInstHeader` we pass options that avoid defaulting.
    
      This avoids wildcards being defaulted, which caused type families
      to unexpectedly fail to reduce.
    
      Note that kind defaulting, applicable only with -XNoPolyKinds,
      is not changed by this patch.
    
      Fixes #17536
    
    -------------------------
    Metric Increase:
        T12227
    -------------------------
    9cc6c193
HsType.hs 178 KB