RTS tidyup sweep, first phase
[ghc-hetmet.git] / compiler / iface / BinIface.hs
index 1a4a65a..15cefe8 100644 (file)
@@ -22,9 +22,7 @@ import Annotations
 import IfaceSyn
 import Module
 import Name
-import OccName
 import VarEnv
-import InstEnv
 import Class
 import DynFlags
 import UniqFM
@@ -149,7 +147,7 @@ writeBinIface dflags hi_path mod_iface = do
         -- The version and way descriptor go next
   put_ bh (show opt_HiVersion)
   way_descr <- getWayDescr
-  put  bh way_descr
+  put_  bh way_descr
 
         -- Remember where the symbol table pointer will go
   symtab_p_p <- tellBin bh
@@ -208,7 +206,7 @@ initBinMemSize :: Int
 initBinMemSize = 1024 * 1024
 
 -- The *host* architecture version:
-#include "MachDeps.h"
+#include "../includes/MachDeps.h"
 
 binaryInterfaceMagic :: Word32
 #if   WORD_SIZE_IN_BITS == 32
@@ -681,7 +679,7 @@ instance (Binary name) => Binary (IPName name) where
 
 instance Binary DmdType where
        -- Ignore DmdEnv when spitting out the DmdType
-  put bh (DmdType _ ds dr) = do p <- put bh ds; put bh dr; return (castBin p)
+  put bh (DmdType _ ds dr) = do p <- put bh ds; put_ bh dr; return (castBin p)
   get bh = do ds <- get bh; dr <- get bh; return (DmdType emptyVarEnv ds dr)
 
 instance Binary Demand where
@@ -1110,15 +1108,16 @@ instance Binary IfaceBinding where
                      return (IfaceRec ac)
 
 instance Binary IfaceIdDetails where
-    put_ bh IfVanillaId    = putByte bh 0
-    put_ bh (IfRecSelId b) = do { putByte bh 1; put_ bh b }
-    put_ bh IfDFunId       = putByte bh 2
+    put_ bh IfVanillaId      = putByte bh 0
+    put_ bh (IfRecSelId a b) = do { putByte bh 1; put_ bh a; put_ bh b }
+    put_ bh IfDFunId         = putByte bh 2
     get bh = do
            h <- getByte bh
            case h of
              0 -> return IfVanillaId
              1 -> do a <- get bh
-                     return (IfRecSelId a)
+                     b <- get bh
+                     return (IfRecSelId a b)
              _ -> return IfDFunId
 
 instance Binary IfaceIdInfo where