Simon Peyton Jones pushed to branch wip/T27844 at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Tc/Errors.hs
    ... ... @@ -2106,10 +2106,11 @@ mkTyVarEqErr' ctxt item tv1 ty2
    2106 2106
       -- See Note [Error messages for untouchables]
    
    2107 2107
       | (implic:_) <- cec_encl ctxt   -- Get the innermost context
    
    2108 2108
       , Implic { ic_tclvl = lvl } <- implic
    
    2109
    -  = assertPpr (not (isTouchableMetaTyVar lvl tv1) || hasCoercionHole ty2)
    
    2109
    +  = assertPpr (not (isTouchableMetaTyVar lvl tv1) || ei_suppress item)
    
    2110 2110
                   (ppr tv1 $$ ppr lvl) $ do -- See Note [Error messages for untouchables]
    
    2111 2111
              -- We can still get touchable meta-tyvars on the LHS if there is an
    
    2112 2112
              -- unsolved coercion hole, e.g.   (alpha::Type) ~ Int# |> co_hole
    
    2113
    +         -- Hence (ei_suppress item)
    
    2113 2114
         tv_extra <- extraTyVarEqInfo (tv1, Just implic) ty2
    
    2114 2115
         let tv_extra' = tv_extra { thisTyVarIsUntouchable = Just implic }
    
    2115 2116
             msg = Mismatch