X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnTypes.lhs;h=e2897ee41f076f0b9ae0b3761ae813d475040f90;hb=5e4375adca19f66803c3ad47fb1ba2c2ac6b4b62;hp=cb60b934d2907c1f387706be0f4886c74b63e237;hpb=354d1eb692be9fa5683dab82258062ebc61fdb2d;p=ghc-hetmet.git diff --git a/compiler/rename/RnTypes.lhs b/compiler/rename/RnTypes.lhs index cb60b93..e2897ee 100644 --- a/compiler/rename/RnTypes.lhs +++ b/compiler/rename/RnTypes.lhs @@ -18,6 +18,9 @@ module RnTypes ( ) where import {-# SOURCE #-} RnExpr( rnLExpr ) +#ifdef GHCI +import {-# SOURCE #-} TcSplice( runQuasiQuoteType ) +#endif /* GHCI */ import DynFlags import HsSyn @@ -182,16 +185,21 @@ rnHsType doc (HsPredTy pred) = do pred' <- rnPred doc pred return (HsPredTy pred') -rnHsType _ (HsSpliceTy sp) - = do { (sp', _fvs) <- rnSplice sp -- ToDo: deal with fvs - ; return (HsSpliceTy sp') } +rnHsType _ (HsSpliceTy sp _ k) + = do { (sp', fvs) <- rnSplice sp -- ToDo: deal with fvs + ; return (HsSpliceTy sp' fvs k) } rnHsType doc (HsDocTy ty haddock_doc) = do ty' <- rnLHsType doc ty haddock_doc' <- rnLHsDoc haddock_doc return (HsDocTy ty' haddock_doc') -rnHsType _ (HsSpliceTyOut {}) = panic "rnHsType" +#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 rnLHsTypes :: SDoc -> [LHsType RdrName] -> IOEnv (Env TcGblEnv TcLclEnv) [LHsType Name] @@ -200,7 +208,7 @@ rnLHsTypes doc tys = mapM (rnLHsType doc) tys \begin{code} -rnForAll :: SDoc -> HsExplicitForAll -> [LHsTyVarBndr RdrName] +rnForAll :: SDoc -> HsExplicitFlag -> [LHsTyVarBndr RdrName] -> LHsContext RdrName -> LHsType RdrName -> RnM (HsType Name) rnForAll doc _ [] (L _ []) (L _ ty) = rnHsType doc ty