projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b1a8c26
)
Slight improvement in TH error reporting
author
simonpj@microsoft.com
<unknown>
Mon, 26 Jun 2006 09:59:52 +0000
(09:59 +0000)
committer
simonpj@microsoft.com
<unknown>
Mon, 26 Jun 2006 09:59:52 +0000
(09:59 +0000)
compiler/hsSyn/Convert.lhs
patch
|
blob
|
history
diff --git
a/compiler/hsSyn/Convert.lhs
b/compiler/hsSyn/Convert.lhs
index
6c14c11
..
77e9e08
100644
(file)
--- a/
compiler/hsSyn/Convert.lhs
+++ b/
compiler/hsSyn/Convert.lhs
@@
-47,7
+47,11
@@
convertToHsDecls :: SrcSpan -> [TH.Dec] -> Either Message [LHsDecl RdrName]
convertToHsDecls loc ds = initCvt loc (mapM cvtTop ds)
convertToHsExpr :: SrcSpan -> TH.Exp -> Either Message (LHsExpr RdrName)
convertToHsDecls loc ds = initCvt loc (mapM cvtTop ds)
convertToHsExpr :: SrcSpan -> TH.Exp -> Either Message (LHsExpr RdrName)
-convertToHsExpr loc e = initCvt loc (cvtl e)
+convertToHsExpr loc e
+ = case initCvt loc (cvtl e) of
+ Left msg -> Left (msg $$ (ptext SLIT("When converting TH expression")
+ <+> text (show e)))
+ Right res -> Right res
convertToHsType :: SrcSpan -> TH.Type -> Either Message (LHsType RdrName)
convertToHsType loc t = initCvt loc (cvtType t)
convertToHsType :: SrcSpan -> TH.Type -> Either Message (LHsType RdrName)
convertToHsType loc t = initCvt loc (cvtType t)