summaryrefslogtreecommitdiff
path: root/ghc/compiler/specialise
diff options
context:
space:
mode:
authorsewardj <unknown>2000-10-19 10:06:47 +0000
committersewardj <unknown>2000-10-19 10:06:47 +0000
commit9aa6d18bd696e8861fb8c3e065e49a989d2d67ac (patch)
tree325f8e964e03991f41c261cfe6de4cc0b6800a72 /ghc/compiler/specialise
parent9bb6b6d0fbca6c82040027fab9859c9fcbc1ef7e (diff)
downloadhaskell-9aa6d18bd696e8861fb8c3e065e49a989d2d67ac.tar.gz
[project @ 2000-10-19 10:06:46 by sewardj]
Fix simplifier stuff.
Diffstat (limited to 'ghc/compiler/specialise')
-rw-r--r--ghc/compiler/specialise/Specialise.lhs16
1 files changed, 9 insertions, 7 deletions
diff --git a/ghc/compiler/specialise/Specialise.lhs b/ghc/compiler/specialise/Specialise.lhs
index cf55186172..272fa27271 100644
--- a/ghc/compiler/specialise/Specialise.lhs
+++ b/ghc/compiler/specialise/Specialise.lhs
@@ -8,7 +8,7 @@ module Specialise ( specProgram ) where
#include "HsVersions.h"
-import CmdLineOpts ( opt_D_verbose_core2core, opt_D_dump_spec, opt_D_dump_rules )
+import CmdLineOpts ( DynFlags, DynFlag(..), dopt )
import Id ( Id, idName, idType, mkTemplateLocals, mkUserLocal,
idSpecialisation, setIdNoDiscard, isExportedId,
modifyIdInfo, idUnfolding
@@ -42,7 +42,7 @@ import UniqSupply ( UniqSupply,
import Name ( nameOccName, mkSpecOcc, getSrcLoc )
import FiniteMap
import Maybes ( MaybeErr(..), catMaybes, maybeToBool )
-import ErrUtils ( dumpIfSet )
+import ErrUtils ( dumpIfSet_dyn )
import Bag
import List ( partition )
import Util ( zipEqual, zipWithEqual, mapAccumL )
@@ -579,17 +579,19 @@ Hence, the invariant is this:
%************************************************************************
\begin{code}
-specProgram :: UniqSupply -> [CoreBind] -> IO [CoreBind]
-specProgram us binds
+specProgram :: DynFlags -> UniqSupply -> [CoreBind] -> IO [CoreBind]
+specProgram dflags us binds
= do
- beginPass "Specialise"
+ beginPass dflags "Specialise"
let binds' = initSM us (go binds `thenSM` \ (binds', uds') ->
returnSM (dumpAllDictBinds uds' binds'))
- endPass "Specialise" (opt_D_dump_spec || opt_D_verbose_core2core) binds'
+ endPass dflags "Specialise"
+ (dopt Opt_D_dump_spec dflags
+ || dopt Opt_D_verbose_core2core dflags) binds'
- dumpIfSet opt_D_dump_rules "Top-level specialisations"
+ dumpIfSet_dyn dflags Opt_D_dump_rules "Top-level specialisations"
(vcat (map dump_specs (concat (map bindersOf binds'))))
return binds'