diff options
author | simonpj@microsoft.com <unknown> | 2009-05-28 16:48:02 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2009-05-28 16:48:02 +0000 |
commit | 5463bfd3f0c3cb91d7852e6e35a0b3e3738da071 (patch) | |
tree | aa1630a01b4a6d05004878e88ca0ee67da6e9896 /compiler | |
parent | 5cc715b218c2da096055a38a453054cbe0b676c0 (diff) | |
download | haskell-5463bfd3f0c3cb91d7852e6e35a0b3e3738da071.tar.gz |
Adjust error message slightly
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/typecheck/TcTyFuns.lhs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/typecheck/TcTyFuns.lhs b/compiler/typecheck/TcTyFuns.lhs index 8b01749214..6426c924ca 100644 --- a/compiler/typecheck/TcTyFuns.lhs +++ b/compiler/typecheck/TcTyFuns.lhs @@ -1610,10 +1610,10 @@ misMatchMsg env0 (ty_act, ty_exp) open_tcs = [tc | TyConApp tc _ <- [ty_act, ty_exp] , isOpenTyCon tc ] pp_open_tc tc = ptext (sLit "NB:") <+> quotes (ppr tc) - <+> pp_inj <+> ptext (sLit "type function") - where - pp_inj | isInjectiveTyCon tc = ptext (sLit "is an (injective)") - | otherwise = ptext (sLit "is a (non-injective)") + <+> ptext (sLit "is a type function") <> pp_inj + where + pp_inj | isInjectiveTyCon tc = empty + | otherwise = ptext (sLit (", and may not be injective")) ppr_ty :: TidyEnv -> TcType -> (TidyEnv, SDoc, SDoc) ppr_ty env ty @@ -1639,7 +1639,7 @@ It's very confusing to get a message like Couldn't match expected type `Depend s' against inferred type `Depend s1' so pp_open_tc adds: - NB: `Depend' is a (non-injective) type function + NB: `Depend' is type function, and hence may not be injective Currently we add this independently for each argument, so we also get Couldn't match expected type `a' |