Skip to content
  • Simon Peyton Jones's avatar
    Robustify lookupFamInstEnv · 27759873
    Simon Peyton Jones authored
    Suppose we have
            type family T a :: * -> *
            type instance T Int = []
    
    and now we encounter the type (T Int Bool).  That is perfectly
    fine, even though T is over-saturated here.
    
    This patch makes lookupFamInstEnv robust to such over-saturation.
    Previously one caller (TcTyFuns.tcUnfoldSynFamInst) dealt with
    the over-saturation case, but the others did not. It's better
    to desl with the issue at the root, in lookupFamInstEnv itself.
    27759873