Deal correctly with infix type constructors in GADT decls
[ghc-hetmet.git] / compiler / iface / BinIface.hs
index 6b56119..6af109c 100644 (file)
@@ -15,7 +15,6 @@ import NewDemand
 import IfaceSyn
 import VarEnv
 import InstEnv         ( OverlapFlag(..) )
-import Packages                ( PackageIdH(..) )
 import Class           ( DefMeth(..) )
 import CostCentre
 import StaticFlags     ( opt_HiVersion, v_Build_tag )
@@ -97,7 +96,6 @@ instance Binary ModIface where
                 mi_module    = mod,
                 mi_boot      = is_boot,
                 mi_mod_vers  = mod_vers,
-                mi_package   = _, -- we ignore the package on output
                 mi_orphan    = orphan,
                 mi_deps      = deps,
                 mi_usages    = usages,
@@ -162,7 +160,6 @@ instance Binary ModIface where
        rules     <- {-# SCC "bin_rules" #-} lazyGet bh
        rule_vers <- get bh
        return (ModIface {
-                mi_package   = HomePackage, -- to be filled in properly later
                 mi_module    = mod_name,
                 mi_boot      = is_boot,
                 mi_mod_vers  = mod_vers,
@@ -562,11 +559,12 @@ instance Binary IfaceBndr where
 instance Binary Kind where
     put_ bh LiftedTypeKind   = putByte bh 0
     put_ bh UnliftedTypeKind = putByte bh 1
-    put_ bh OpenTypeKind     = putByte bh 2
-    put_ bh ArgTypeKind      = putByte bh 3
-    put_ bh UbxTupleKind     = putByte bh 4
+    put_ bh UnboxedTypeKind  = putByte bh 2
+    put_ bh OpenTypeKind     = putByte bh 3
+    put_ bh ArgTypeKind      = putByte bh 4
+    put_ bh UbxTupleKind     = putByte bh 5
     put_ bh (FunKind k1 k2)  = do 
-           putByte bh 5
+           putByte bh 6
            put_ bh k1
            put_ bh k2
     put_ bh (KindVar kv) = pprPanic "BinIface.put_: kind var" (ppr kv)
@@ -576,9 +574,10 @@ instance Binary Kind where
            case h of
              0 -> return LiftedTypeKind 
              1 -> return UnliftedTypeKind
-             2 -> return OpenTypeKind
-             3 -> return ArgTypeKind
-             4 -> return UbxTupleKind
+             2 -> return UnboxedTypeKind
+             3 -> return OpenTypeKind
+             4 -> return ArgTypeKind
+             5 -> return UbxTupleKind
              _ -> do k1 <- get bh
                      k2 <- get bh
                      return (FunKind k1 k2)