[implement lazy getting and putting of library files for much faster access.
John Meacham <john@repetae.net>**20060427022954] hunk ./Ho/Build.hs 62
-version = 6
+version = 7
hunk ./Ho/Build.hs 131
-            let hoh = HoHeader { hohGeneration = 0,
-                                 hohDepends    = [ x | (_,x,_) <- sc],
+            let hoh = HoHeader { hohDepends    = [ x | (_,x,_) <- sc],
hunk ./Ho/Build.hs 152
-    bracket (openGetFileDep fn) (hClose . fst) $ \ (fh,dep) -> do
+    bracket (openGetFileDep fn) (\_ -> return ()) $ \ (fh,dep) -> do
hunk ./Ho/Build.hs 156
-    hh <- get bh
+    hh <- lazyGet bh
hunk ./Ho/Build.hs 159
-        ho <- get bh
+        ho <- lazyGet bh
hunk ./Ho/Build.hs 183
-    hClose fh
+    --hClose fh
hunk ./Ho/Build.hs 191
-    --putStrLn $ "Generation:" <+> tshow (hohGeneration hoh)
hunk ./Ho/Build.hs 250
-    --let header = HoHeader { hohGeneration = 0, hohDepends = snub (fd ++ concat [ hsdep:ds | (hs,hsdep,honm,ds) <- sc] )}
hunk ./Ho/Build.hs 276
-            put bh magic
-            put bh header
-            put bh (mapHoBodies eraseE ho { hoUsedIds = mempty, hoModules = mempty })
+            put_ bh magic
+            lazyPut bh header
+            lazyPut bh (mapHoBodies eraseE ho { hoUsedIds = mempty, hoModules = mempty })
hunk ./Ho/Library.hs 145
-    where hoh = HoHeader 1 [] [] (libraryDesc pkg)
+    where hoh = HoHeader [] [] (libraryDesc pkg)
hunk ./Ho/Type.hs 32
-    -- * FIXME - is this used for something?
-    hohGeneration :: Int,
hunk ./Ho/Type.hs 39
-    {-! derive: GhcBinary !-}
hunk ./Ho/Type.hs 59
-    {-! derive: GhcBinary, Monoid !-}
+    {-! derive: Monoid !-}
hunk ./Ho/Type.hs 74
+
+
+instance Binary HoHeader where
+    put_ bh (HoHeader ab ac ad) = do
+	    put_ bh ab
+	    lazyPut bh ac
+	    lazyPut bh ad
+    get bh = do
+    ab <- get bh
+    ac <- lazyGet bh
+    ad <- lazyGet bh
+    return (HoHeader ab ac ad)
+
+instance Binary Ho where
+    put_ bh (Ho aa ab ac ad ae af ag ah ai aj ak al am an) = do
+	    lazyPut bh aa
+	    lazyPut bh ab
+	    lazyPut bh ac
+	    lazyPut bh ad
+	    lazyPut bh ae
+	    lazyPut bh af
+	    lazyPut bh ag
+	    lazyPut bh ah
+	    lazyPut bh ai
+	    lazyPut bh aj
+	    lazyPut bh ak
+	    lazyPut bh al
+	    lazyPut bh am
+	    lazyPut bh an
+    get bh = do
+    aa <- lazyGet bh
+    ab <- lazyGet bh
+    ac <- lazyGet bh
+    ad <- lazyGet bh
+    ae <- lazyGet bh
+    af <- lazyGet bh
+    ag <- lazyGet bh
+    ah <- lazyGet bh
+    ai <- lazyGet bh
+    aj <- lazyGet bh
+    ak <- lazyGet bh
+    al <- lazyGet bh
+    am <- lazyGet bh
+    an <- lazyGet bh
+    return (Ho aa ab ac ad ae af ag ah ai aj ak al am an)
+
+
+--  Imported from other files :-
+