projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add (a) CoreM monad, (b) new Annotations feature
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcExpr.lhs
diff --git
a/compiler/typecheck/TcExpr.lhs
b/compiler/typecheck/TcExpr.lhs
index
2eb10ef
..
540292c
100644
(file)
--- a/
compiler/typecheck/TcExpr.lhs
+++ b/
compiler/typecheck/TcExpr.lhs
@@
-12,7
+12,7
@@
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
-- for details
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
-- for details
-module TcExpr ( tcPolyExpr, tcPolyExprNC, tcMonoExpr, tcInferRho, tcInferRhoNC, tcSyntaxOp ) where
+module TcExpr ( tcPolyExpr, tcPolyExprNC, tcMonoExpr, tcMonoExprNC, tcInferRho, tcInferRhoNC, tcSyntaxOp, addExprErrCtxt ) where
#include "HsVersions.h"
#include "HsVersions.h"
@@
-80,7
+80,7
@@
tcPolyExpr, tcPolyExprNC
-- to do so himself.
tcPolyExpr expr res_ty
-- to do so himself.
tcPolyExpr expr res_ty
- = addErrCtxt (exprCtxt expr) $
+ = addExprErrCtxt expr $
(do {traceTc (text "tcPolyExpr") ; tcPolyExprNC expr res_ty })
tcPolyExprNC expr res_ty
(do {traceTc (text "tcPolyExpr") ; tcPolyExprNC expr res_ty })
tcPolyExprNC expr res_ty
@@
-1245,7
+1245,10
@@
checkMissingFields data_con rbinds
Boring and alphabetical:
\begin{code}
Boring and alphabetical:
\begin{code}
-exprCtxt (L _ expr)
+addExprErrCtxt :: OutputableBndr id => LHsExpr id -> TcM a -> TcM a
+addExprErrCtxt expr = addErrCtxt (exprCtxt (unLoc expr))
+
+exprCtxt expr
= hang (ptext (sLit "In the expression:")) 4 (ppr expr)
fieldCtxt field_name
= hang (ptext (sLit "In the expression:")) 4 (ppr expr)
fieldCtxt field_name