Commit 75c431d1 authored by simonpj's avatar simonpj
Browse files

[project @ 2002-07-09 08:19:14 by simonpj]

Improve error message

	*** MERGE TO STABLE BRANCH ***
parent 1d37807e
......@@ -136,13 +136,13 @@ tcMonoExpr (HsIPVar ip) res_ty
\begin{code}
tcMonoExpr in_expr@(ExprWithTySig expr poly_ty) res_ty
= tcHsSigType ExprSigCtxt poly_ty `thenTc` \ sig_tc_ty ->
= tcAddErrCtxt (exprSigCtxt in_expr) $
tcHsSigType ExprSigCtxt poly_ty `thenTc` \ sig_tc_ty ->
tcExpr expr sig_tc_ty `thenTc` \ (expr', lie1) ->
-- Must instantiate the outer for-alls of sig_tc_ty
-- else we risk instantiating a ? res_ty to a forall-type
-- which breaks the invariant that tcMonoExpr only returns phi-types
tcAddErrCtxt (exprSigCtxt in_expr) $
tcInstCall SignatureOrigin sig_tc_ty `thenNF_Tc` \ (inst_fn, lie2, inst_sig_ty) ->
tcSubExp res_ty inst_sig_ty `thenTc` \ (co_fn, lie3) ->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment