- -- messages, such as "can't match foarall a. a->a with forall a. a->a"
- -- So instead I'm adding it when moving from tc_sub to u_tys
- tc_sub Nothing actual_ty actual_ty False expected_ty expected_ty
-
-tcFunResTy :: Name -> BoxySigmaType -> BoxySigmaType -> TcM ExprCoFn -- Locally used only
+ -- messages, such as "can't match forall a. a->a with forall a. a->a"
+ -- Example is tcfail165:
+ -- do var <- newEmptyMVar :: IO (MVar (forall a. Show a => a -> String))
+ -- putMVar var (show :: forall a. Show a => a -> String)
+ -- Here the info does not flow from the 'var' arg of putMVar to its 'show' arg
+ -- but after zonking it looks as if it does!
+ --
+ -- So instead I'm adding the error context when moving from tc_sub to u_tys
+
+ traceTc (text "tcSubExp" <+> ppr actual_ty <+> ppr expected_ty) >>
+ tc_sub SubOther actual_ty actual_ty False expected_ty expected_ty
+
+tcFunResTy :: Name -> BoxySigmaType -> BoxySigmaType -> TcM HsWrapper -- Locally used only