projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Several TH/quasiquote changes
[ghc-hetmet.git]
/
compiler
/
rename
/
RnTypes.lhs
diff --git
a/compiler/rename/RnTypes.lhs
b/compiler/rename/RnTypes.lhs
index
cb60b93
..
ed3e6d0
100644
(file)
--- a/
compiler/rename/RnTypes.lhs
+++ b/
compiler/rename/RnTypes.lhs
@@
-18,6
+18,9
@@
module RnTypes (
) where
import {-# SOURCE #-} RnExpr( rnLExpr )
) where
import {-# SOURCE #-} RnExpr( rnLExpr )
+#ifdef GHCI
+import {-# SOURCE #-} TcSplice( runQuasiQuoteType )
+#endif /* GHCI */
import DynFlags
import HsSyn
import DynFlags
import HsSyn
@@
-191,6
+194,12
@@
rnHsType doc (HsDocTy ty haddock_doc) = do
haddock_doc' <- rnLHsDoc haddock_doc
return (HsDocTy ty' haddock_doc')
haddock_doc' <- rnLHsDoc haddock_doc
return (HsDocTy ty' haddock_doc')
+#ifndef GHCI
+rnHsType _ ty@(HsQuasiQuoteTy _) = pprPanic "Can't do quasiquotation without GHCi" (ppr ty)
+#else
+rnHsType doc (HsQuasiQuoteTy qq) = do { ty <- runQuasiQuoteType qq
+ ; rnHsType doc (unLoc ty) }
+#endif
rnHsType _ (HsSpliceTyOut {}) = panic "rnHsType"
rnLHsTypes :: SDoc -> [LHsType RdrName]
rnHsType _ (HsSpliceTyOut {}) = panic "rnHsType"
rnLHsTypes :: SDoc -> [LHsType RdrName]