summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Module.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-03-07 14:57:47 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-03-24 09:00:06 +0000
commit5440e8794bf8ccca291e649dd1a19b8302203de6 (patch)
tree8dccec3f1e28b4e1fb364668335ba0e912bfaea8 /compiler/GHC/Tc/Module.hs
parente6585ca168ba55ca81a3e6cd7221707719b7fa56 (diff)
downloadhaskell-wip/rn-ast-ghci.tar.gz
Make -ddump-rn-ast and -ddump-tc-ast work in GHCiwip/rn-ast-ghci
Fixes #17830
Diffstat (limited to 'compiler/GHC/Tc/Module.hs')
-rw-r--r--compiler/GHC/Tc/Module.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs
index e690d1e5a2..d8ec1e1b16 100644
--- a/compiler/GHC/Tc/Module.hs
+++ b/compiler/GHC/Tc/Module.hs
@@ -2241,6 +2241,9 @@ tcUserStmt :: GhciLStmt GhcPs -> TcM (PlanResult, FixityEnv)
-- An expression typed at the prompt is treated very specially
tcUserStmt (L loc (BodyStmt _ expr _ _))
= do { (rn_expr, fvs) <- checkNoErrs (rnLExpr expr)
+
+ ; dumpOptTcRn Opt_D_dump_rn_ast "Renamer" FormatHaskell
+ (showAstData NoBlankSrcSpan NoBlankEpAnnotations rn_expr)
-- Don't try to typecheck if the renamer fails!
; ghciStep <- getGhciStepIO
; uniq <- newUnique
@@ -2337,6 +2340,9 @@ tcUserStmt (L loc (BodyStmt _ expr _ _))
then no_it_plans
else it_plans
+ ; dumpOptTcRn Opt_D_dump_tc_ast "Typechecker AST" FormatHaskell
+ (showAstData NoBlankSrcSpan NoBlankEpAnnotations plan)
+
; fix_env <- getFixityEnv
; return (plan, fix_env) }