summaryrefslogtreecommitdiff
path: root/compiler/typecheck
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2017-09-13 14:02:42 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2017-09-13 19:52:36 +0200
commit2fe6f6baba70de071c391bccc77197ab4f81064d (patch)
treeb36e69864cf1f37b66667b54e0e49be889d4fd59 /compiler/typecheck
parent6139f7f7c1e95ffda13d8c5c05a3db1cc35e40bb (diff)
downloadhaskell-2fe6f6baba70de071c391bccc77197ab4f81064d.tar.gz
Option "-ddump-rn-ast" dumps imports and exports too
Summary: Previously the renamed source decls only were dumped, now the imports, exports and doc_hdr are too. Test Plan: ./validate Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14197 Differential Revision: https://phabricator.haskell.org/D3949
Diffstat (limited to 'compiler/typecheck')
-rw-r--r--compiler/typecheck/TcRnDriver.hs4
-rw-r--r--compiler/typecheck/TcRnMonad.hs5
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs
index c48b6558bb..e53a661d17 100644
--- a/compiler/typecheck/TcRnDriver.hs
+++ b/compiler/typecheck/TcRnDriver.hs
@@ -2512,9 +2512,7 @@ loadUnqualIfaces hsc_env ictxt
rnDump :: (Outputable a, Data a) => a -> TcRn ()
-- Dump, with a banner, if -ddump-rn
-rnDump rn = do { traceOptTcRn Opt_D_dump_rn (mkDumpDoc "Renamer" (ppr rn))
- ; traceOptTcRn Opt_D_dump_rn_ast
- (mkDumpDoc "Renamer" (showAstData NoBlankSrcSpan rn)) }
+rnDump rn = do { traceOptTcRn Opt_D_dump_rn (mkDumpDoc "Renamer" (ppr rn)) }
tcDump :: TcGblEnv -> TcRn ()
tcDump env
diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs
index b9638edb1f..0416e36621 100644
--- a/compiler/typecheck/TcRnMonad.hs
+++ b/compiler/typecheck/TcRnMonad.hs
@@ -224,8 +224,9 @@ initTc hsc_env hsc_src keep_rn_syntax mod loc do_this
maybe_rn_syntax :: forall a. a -> Maybe a ;
maybe_rn_syntax empty_val
- | keep_rn_syntax = Just empty_val
- | otherwise = Nothing ;
+ | dopt Opt_D_dump_rn_ast dflags = Just empty_val
+ | keep_rn_syntax = Just empty_val
+ | otherwise = Nothing ;
gbl_env = TcGblEnv {
tcg_th_topdecls = th_topdecls_var,