Commit 1aaf9dc3 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix some build problems when GHCI is not definde

parent beded120
......@@ -441,10 +441,7 @@ ppr_expr (HsSpliceE s) = pprSplice s
ppr_expr (HsBracket b) = pprHsBracket b
ppr_expr (HsBracketOut e []) = ppr e
ppr_expr (HsBracketOut e ps) = ppr e $$ ptext (sLit "pending") <+> ppr ps
ppr_expr (HsQuasiQuoteE (HsQuasiQuote name quoter _ quote))
= char '$' <> brackets (ppr name) <>
ptext (sLit "[:") <> ppr quoter <> ptext (sLit "|") <>
ppr quote <> ptext (sLit "|]")
ppr_expr (HsQuasiQuoteE qq) = ppr qq
ppr_expr (HsProc pat (L _ (HsCmdTop cmd _ _ _)))
= hsep [ptext (sLit "proc"), ppr pat, ptext (sLit "->"), ppr cmd]
......
......@@ -210,6 +210,15 @@ data HsQuasiQuote id = HsQuasiQuote
id
SrcSpan
FastString
instance OutputableBndr id => Outputable (HsQuasiQuote id) where
ppr = ppr_qq
ppr_qq :: OutputableBndr id => HsQuasiQuote id -> SDoc
ppr_qq (HsQuasiQuote name quoter _ quote) =
char '$' <> brackets (ppr name) <>
ptext (sLit "[:") <> ppr quoter <> ptext (sLit "|") <>
ppr quote <> ptext (sLit "|]")
\end{code}
......
......@@ -157,6 +157,7 @@ The predicate we use is TcEnv.thTopLevelId.
%************************************************************************
\begin{code}
tcBracket :: HsBracket Name -> BoxyRhoType -> TcM (LHsExpr TcId)
tcSpliceDecls :: LHsExpr Name -> TcM [LHsDecl RdrName]
tcSpliceExpr :: HsSplice Name -> BoxyRhoType -> TcM (HsExpr TcId)
kcSpliceType :: HsSplice Name -> TcM (HsType Name, TcKind)
......@@ -166,8 +167,10 @@ runQuasiQuoteExpr :: HsQuasiQuote Name -> TcM (LHsExpr RdrName)
runQuasiQuotePat :: HsQuasiQuote Name -> TcM (LPat RdrName)
#ifndef GHCI
tcSpliceExpr _ e _ = pprPanic "Cant do tcSpliceExpr without GHCi" (ppr e)
tcSpliceDecls e = pprPanic "Cant do tcSpliceDecls without GHCi" (ppr e)
tcBracket x _ = pprPanic "Cant do tcBracket without GHCi" (ppr x)
tcSpliceExpr e = pprPanic "Cant do tcSpliceExpr without GHCi" (ppr e)
tcSpliceDecls x = pprPanic "Cant do tcSpliceDecls without GHCi" (ppr x)
kcSpliceType x = pprPanic "Cant do kcSpliceType without GHCi" (ppr x)
runQuasiQuoteExpr q = pprPanic "Cant do runQuasiQuoteExpr without GHCi" (ppr q)
runQuasiQuotePat q = pprPanic "Cant do runQuasiQuotePat without GHCi" (ppr q)
......@@ -193,7 +196,6 @@ Desugared: f = do { s7 <- g Int 3
; return (ConE "Data.Maybe.Just" s7) }
\begin{code}
tcBracket :: HsBracket Name -> BoxyRhoType -> TcM (LHsExpr TcId)
tcBracket brack res_ty = do
level <- getStage
case bracketOK level of {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment