Fix a bug to do with recursive modules in one-shot mode
[ghc-hetmet.git] / compiler / main / HscTypes.lhs
index bba10e4..244b312 100644 (file)
@@ -102,6 +102,7 @@ import Packages hiding ( Version(..) )
 import DynFlags                ( DynFlags(..), isOneShot, HscTarget (..) )
 import DriverPhases    ( HscSource(..), isHsBoot, hscSourceString, Phase )
 import BasicTypes      ( IPName, Fixity, defaultFixity, DeprecTxt )
+import OptimizationFuel        ( OptFuelState )
 import IfaceSyn
 import FiniteMap       ( FiniteMap )
 import CoreSyn         ( CoreRule )
@@ -200,6 +201,15 @@ data HscEnv
                -- The finder's cache.  This caches the location of modules,
                -- so we don't have to search the filesystem multiple times.
 
+        hsc_OptFuel :: OptFuelState,
+                -- Settings to control the use of optimization fuel:
+                -- by limiting the number of transformations,
+                -- we can use binary search to help find compiler bugs.
+
+        hsc_type_env_var :: Maybe (Module, IORef TypeEnv),
+                -- Used for one-shot compilation only, to initialise
+                -- the IfGblEnv.  See TcRnTypes.TcGblEnv.tcg_type_env_var
+
         hsc_global_rdr_env :: GlobalRdrEnv,
         hsc_global_type_env :: TypeEnv
  }