Handle unlifted tycons and tuples correctly during vectorisation
[ghc-hetmet.git] / compiler / iface / BinIface.hs
index 0ffd37d..d852559 100644 (file)
@@ -34,6 +34,7 @@ import Config
 import FastMutInt
 import Outputable
 
+import Data.List
 import Data.Word
 import Data.Array
 import Data.IORef
@@ -888,6 +889,10 @@ instance Binary IfaceExpr where
             putByte bh 11
             put_ bh ie
             put_ bh ico
+    put_ bh (IfaceTick m ix) = do
+            putByte bh 12
+            put_ bh m
+            put_ bh ix
     get bh = do
            h <- getByte bh
            case h of
@@ -927,6 +932,9 @@ instance Binary IfaceExpr where
               11 -> do ie <- get bh
                        ico <- get bh
                        return (IfaceCast ie ico)
+              12 -> do m <- get bh
+                       ix <- get bh
+                       return (IfaceTick m ix)
 
 instance Binary IfaceConAlt where
     put_ bh IfaceDefault = do
@@ -1222,10 +1230,14 @@ instance Binary IfaceRule where
            return (IfaceRule a1 a2 a3 a4 a5 a6 a7)
 
 instance Binary IfaceVectInfo where
-    put_ bh (IfaceVectInfo a1) = do
+    put_ bh (IfaceVectInfo a1 a2 a3) = do
            put_ bh a1
+           put_ bh a2
+           put_ bh a3
     get bh = do
            a1 <- get bh
-           return (IfaceVectInfo a1)
+           a2 <- get bh
+           a3 <- get bh
+           return (IfaceVectInfo a1 a2 a3)