summaryrefslogtreecommitdiff
path: root/compiler/deSugar
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-10-29 15:23:14 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2014-11-04 10:37:54 +0000
commitc8c18a106458c80ec0eb5108d11b4ed9e2bc7478 (patch)
treee75aa400cbc882a4e4f7b61de5d0788758caaa3b /compiler/deSugar
parent27ba070c56fa6c583a34dc9eaede0083530f1dbe (diff)
downloadhaskell-c8c18a106458c80ec0eb5108d11b4ed9e2bc7478.tar.gz
Some refactoring around endPass and debug dumping
I forget all the details, but I spent some time trying to understand the current setup, and tried to simplify it a bit
Diffstat (limited to 'compiler/deSugar')
-rw-r--r--compiler/deSugar/Desugar.lhs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/deSugar/Desugar.lhs b/compiler/deSugar/Desugar.lhs
index c979f9908f..e2170e7dd4 100644
--- a/compiler/deSugar/Desugar.lhs
+++ b/compiler/deSugar/Desugar.lhs
@@ -39,7 +39,7 @@ import Rules
import TysPrim (eqReprPrimTyCon)
import TysWiredIn (coercibleTyCon )
import BasicTypes ( Activation(.. ) )
-import CoreMonad ( endPass, CoreToDo(..) )
+import CoreMonad ( endPassIO, CoreToDo(..) )
import MkCore
import FastString
import ErrUtils
@@ -94,6 +94,7 @@ deSugar hsc_env
tcg_hpc = other_hpc_info })
= do { let dflags = hsc_dflags hsc_env
+ print_unqual = mkPrintUnqualified dflags rdr_env
; showPass dflags "Desugar"
-- Desugar the program
@@ -147,14 +148,14 @@ deSugar hsc_env
#ifdef DEBUG
-- Debug only as pre-simple-optimisation program may be really big
- ; endPass hsc_env CoreDesugar final_pgm rules_for_imps
+ ; endPassIO hsc_env print_unqual CoreDesugar final_pgm rules_for_imps
#endif
; (ds_binds, ds_rules_for_imps, ds_vects)
<- simpleOptPgm dflags mod final_pgm rules_for_imps vects0
-- The simpleOptPgm gets rid of type
-- bindings plus any stupid dead code
- ; endPass hsc_env CoreDesugarOpt ds_binds ds_rules_for_imps
+ ; endPassIO hsc_env print_unqual CoreDesugarOpt ds_binds ds_rules_for_imps
; let used_names = mkUsedNames tcg_env
; deps <- mkDependencies tcg_env