projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed warnings in hsSyn/HsLit
[ghc-hetmet.git]
/
compiler
/
hsSyn
/
Convert.lhs
diff --git
a/compiler/hsSyn/Convert.lhs
b/compiler/hsSyn/Convert.lhs
index
d97bfd9
..
96b5fc1
100644
(file)
--- a/
compiler/hsSyn/Convert.lhs
+++ b/
compiler/hsSyn/Convert.lhs
@@
-13,7
+13,7
@@
This module converts Template Haskell syntax into HsSyn
-- 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 Convert( convertToHsExpr, convertToHsDecls,
+module Convert( convertToHsExpr, convertToPat, convertToHsDecls,
convertToHsType, thRdrName ) where
#include "HsVersions.h"
convertToHsType, thRdrName ) where
#include "HsVersions.h"
@@
-58,6
+58,13
@@
convertToHsExpr loc e
<+> text (show e)))
Right res -> Right res
<+> text (show e)))
Right res -> Right res
+convertToPat :: SrcSpan -> TH.Pat -> Either Message (LPat RdrName)
+convertToPat loc e
+ = case initCvt loc (cvtPat e) of
+ Left msg -> Left (msg $$ (ptext SLIT("When converting TH pattern")
+ <+> 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)