projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add quasi-quotation, courtesy of Geoffrey Mainland
[ghc-hetmet.git]
/
compiler
/
hsSyn
/
HsUtils.lhs
diff --git
a/compiler/hsSyn/HsUtils.lhs
b/compiler/hsSyn/HsUtils.lhs
index
5d106f1
..
05352d0
100644
(file)
--- a/
compiler/hsSyn/HsUtils.lhs
+++ b/
compiler/hsSyn/HsUtils.lhs
@@
-161,6
+161,12
@@
unqualSplice = mkRdrUnqual (mkVarOccFS FSLIT("splice"))
-- A name (uniquified later) to
-- identify the splice
-- A name (uniquified later) to
-- identify the splice
+mkHsQuasiQuote quoter span quote = HsQuasiQuote unqualQuasiQuote quoter span quote
+
+unqualQuasiQuote = mkRdrUnqual (mkVarOccFS FSLIT("quasiquote"))
+ -- A name (uniquified later) to
+ -- identify the quasi-quote
+
mkHsString s = HsString (mkFastString s)
-------------
mkHsString s = HsString (mkFastString s)
-------------
@@
-417,6
+423,7
@@
collectl (L l pat) bndrs
go (SigPatIn pat _) = collectl pat bndrs
go (SigPatOut pat _) = collectl pat bndrs
go (SigPatIn pat _) = collectl pat bndrs
go (SigPatOut pat _) = collectl pat bndrs
+ go (QuasiQuotePat _) = bndrs
go (TypePat ty) = bndrs
go (CoPat _ pat ty) = collectl (noLoc pat) bndrs
\end{code}
go (TypePat ty) = bndrs
go (CoPat _ pat ty) = collectl (noLoc pat) bndrs
\end{code}