-
- go :: Outer -> TcType -> TcType -> TcM CoercionI
- go outer ty1 ty2 =
- do { traceTc (text "go " <+> ppr orig_ty1 <+> text "/" <+> ppr ty1
- <+> ppr orig_ty2 <+> text "/" <+> ppr ty2)
- ; go1 outer ty1 ty2
- }
-
- go1 :: Outer -> TcType -> TcType -> TcM CoercionI
+ bale_out :: Outer -> TcM a
+ bale_out outer = unifyMisMatch outer
+ -- We report a mis-match in terms of the original arugments to
+ -- u_tys, even though 'go' has recursed inwards somewhat
+ --
+ -- Note [Unifying AppTy]
+ -- A case in point is unifying (m Int) ~ (IO Int)
+ -- where m is a unification variable that is now bound to (say) (Bool ->)
+ -- Then we want to report "Can't unify (Bool -> Int) with (IO Int)
+ -- and not "Can't unify ((->) Bool) with IO"
+
+ go :: Outer -> TcType -> TcType -> TcType -> TcType -> TcM CoercionI