add final newlines
[ghc-hetmet.git] / compiler / utils / Binary.hs
index 4f48a42..c61f8a6 100644 (file)
@@ -67,6 +67,7 @@ import Panic
 import UniqFM
 import FastMutInt
 import Fingerprint
+import BasicTypes
 
 import Foreign
 import Data.Array
@@ -726,3 +727,13 @@ instance Binary Fingerprint where
   put_ h (Fingerprint w1 w2) = do put_ h w1; put_ h w2
   get  h = do w1 <- get h; w2 <- get h; return (Fingerprint w1 w2)
 
+instance Binary FunctionOrData where
+    put_ bh IsFunction = putByte bh 0
+    put_ bh IsData     = putByte bh 1
+    get bh = do
+        h <- getByte bh
+        case h of
+          0 -> return IsFunction
+          1 -> return IsData
+          _ -> panic "Binary FunctionOrData"
+