[project @ 2000-10-17 13:22:10 by simonmar]
[ghc-hetmet.git] / ghc / compiler / stranal / WorkWrap.lhs
index 86f6437..e556ead 100644 (file)
@@ -10,7 +10,6 @@ module WorkWrap ( wwTopBinds, mkWrapper ) where
 
 import CoreSyn
 import CoreUnfold      ( Unfolding, certainlyWillInline )
-import CmdLineOpts     ( opt_D_verbose_core2core, opt_D_dump_worker_wrapper )
 import CoreLint                ( beginPass, endPass )
 import CoreUtils       ( exprType, exprEtaExpandArity )
 import MkId            ( mkWorkerId )
@@ -24,6 +23,7 @@ import IdInfo         ( mkStrictnessInfo, noStrictnessInfo, StrictnessInfo(..),
                        )
 import Demand           ( Demand, wwLazy )
 import UniqSupply      ( UniqSupply, initUs_, returnUs, thenUs, mapUs, getUniqueUs, UniqSM )
+import CmdLineOpts
 import WwLib
 import Outputable
 \end{code}
@@ -56,20 +56,23 @@ info for exported values).
 
 \begin{code}
 
-wwTopBinds :: UniqSupply
-            -> [CoreBind]
-            -> IO [CoreBind]
+wwTopBinds :: DynFlags 
+          -> UniqSupply
+          -> [CoreBind]
+          -> IO [CoreBind]
 
-wwTopBinds us binds
+wwTopBinds dflags us binds
   = do {
-       beginPass "Worker Wrapper binds";
+       beginPass dflags "Worker Wrapper binds";
 
        -- Create worker/wrappers, and mark binders with their
        -- "strictness info" [which encodes their worker/wrapper-ness]
        let { binds' = workersAndWrappers us binds };
 
-       endPass "Worker Wrapper binds" (opt_D_dump_worker_wrapper || 
-                                        opt_D_verbose_core2core) binds'
+       endPass dflags "Worker Wrapper binds" 
+               (dopt Opt_D_dump_worker_wrapper dflags || 
+                    dopt Opt_D_verbose_core2core dflags) 
+                binds'
     }
 \end{code}