Make PersistentLinkerState fields strict; fixes #4208
authorIan Lynagh <igloo@earth.li>
Tue, 27 Jul 2010 20:19:11 +0000 (20:19 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 27 Jul 2010 20:19:11 +0000 (20:19 +0000)
We modify fields a lot, so we retain the old value if they aren't forced.

compiler/ghci/Linker.lhs

index ebdeb32..45cbdc0 100644 (file)
@@ -103,18 +103,18 @@ data PersistentLinkerState
        -- When a new Unlinked is linked into the running image, or an existing
        -- module in the image is replaced, the itbl_env must be updated
        -- appropriately.
-        itbl_env    :: ItblEnv,
+        itbl_env    :: !ItblEnv,
 
        -- The currently loaded interpreted modules (home package)
-       bcos_loaded :: [Linkable],
+       bcos_loaded :: ![Linkable],
 
        -- And the currently-loaded compiled modules (home package)
-       objs_loaded :: [Linkable],
+       objs_loaded :: ![Linkable],
 
        -- The currently-loaded packages; always object code
        -- Held, as usual, in dependency order; though I am not sure if
        -- that is really important
-       pkgs_loaded :: [PackageId]
+       pkgs_loaded :: ![PackageId]
      }
 
 emptyPLS :: DynFlags -> PersistentLinkerState