Serialise nested unfoldings across module boundaries
[ghc-hetmet.git] / compiler / iface / BinIface.hs
index f7a9aa2..7c84778 100644 (file)
@@ -1209,15 +1209,19 @@ instance Binary IfaceUnfolding where
        put_ bh b
        put_ bh c
        put_ bh d
-    put_ bh (IfWrapper a n) = do
+    put_ bh (IfLclWrapper a n) = do
        putByte bh 2
        put_ bh a
        put_ bh n
-    put_ bh (IfDFunUnfold as) = do
+    put_ bh (IfExtWrapper a n) = do
        putByte bh 3
+       put_ bh a
+       put_ bh n
+    put_ bh (IfDFunUnfold as) = do
+       putByte bh 4
        put_ bh as
     put_ bh (IfCompulsory e) = do
-       putByte bh 4
+       putByte bh 5
        put_ bh e
     get bh = do
        h <- getByte bh
@@ -1232,8 +1236,11 @@ instance Binary IfaceUnfolding where
                  return (IfInlineRule a b c d)
          2 -> do a <- get bh
                  n <- get bh
-                 return (IfWrapper a n)
-         3 -> do as <- get bh
+                 return (IfLclWrapper a n)
+         3 -> do a <- get bh
+                 n <- get bh
+                 return (IfExtWrapper a n)
+         4 -> do as <- get bh
                  return (IfDFunUnfold as)
          _ -> do e <- get bh
                  return (IfCompulsory e)