Cache the package database the first time it is read
authorSimon Marlow <simonmar@microsoft.com>
Fri, 6 Oct 2006 10:42:21 +0000 (10:42 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Fri, 6 Oct 2006 10:42:21 +0000 (10:42 +0000)
This was a slight oversight on my part, I intended to store the
pristine database in the pkgDatabase of DynFlags, but managed to
forget to do it.

compiler/main/Packages.lhs

index fb54a12..ba51f80 100644 (file)
@@ -167,7 +167,8 @@ initPackages dflags = do
                 Just db -> return db
   (pkg_state, preload, this_pkg)       
         <- mkPackageState dflags pkg_db [] (thisPackage dflags)
-  return (dflags{ pkgState = pkg_state,
+  return (dflags{ pkgDatabase = Just pkg_db,
+                 pkgState = pkg_state,
                   thisPackage = this_pkg },
           preload)