X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fiface%2FBinIface.hs;h=ec85995b45263199c8556212e0b2744759dc28f7;hb=a51fe79ebcdcb8285573a18f12cade2101533419;hp=e608421a218a8f61674c8177cf445355745a6f82;hpb=215ce9f15215399ce30ae55c9521087847d78646;p=ghc-hetmet.git diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs index e608421..ec85995 100644 --- a/compiler/iface/BinIface.hs +++ b/compiler/iface/BinIface.hs @@ -23,7 +23,6 @@ import IfaceSyn import Module import Name import VarEnv -import Class import DynFlags import UniqFM import UniqSupply @@ -613,6 +612,19 @@ instance Binary InlinePragma where d <- get bh return (InlinePragma a b c d) +instance Binary InlineSpec where + put_ bh EmptyInlineSpec = putByte bh 0 + put_ bh Inline = putByte bh 1 + put_ bh Inlinable = putByte bh 2 + put_ bh NoInline = putByte bh 3 + + get bh = do h <- getByte bh + case h of + 0 -> return EmptyInlineSpec + 1 -> return Inline + 2 -> return Inlinable + _ -> return NoInline + instance Binary HsBang where put_ bh HsNoBang = putByte bh 0 put_ bh HsStrict = putByte bh 1 @@ -655,16 +667,16 @@ instance Binary RecFlag where 0 -> do return Recursive _ -> do return NonRecursive -instance Binary DefMeth where - put_ bh NoDefMeth = putByte bh 0 - put_ bh DefMeth = putByte bh 1 - put_ bh GenDefMeth = putByte bh 2 +instance Binary DefMethSpec where + put_ bh NoDM = putByte bh 0 + put_ bh VanillaDM = putByte bh 1 + put_ bh GenericDM = putByte bh 2 get bh = do h <- getByte bh case h of - 0 -> return NoDefMeth - 1 -> return DefMeth - _ -> return GenDefMeth + 0 -> return NoDM + 1 -> return VanillaDM + _ -> return GenericDM instance Binary FixityDirection where put_ bh InfixL = do @@ -1189,8 +1201,9 @@ instance Binary IfaceInfoItem where _ -> do return HsNoCafRefs instance Binary IfaceUnfolding where - put_ bh (IfCoreUnfold e) = do + put_ bh (IfCoreUnfold s e) = do putByte bh 0 + put_ bh s put_ bh e put_ bh (IfInlineRule a b c d) = do putByte bh 1 @@ -1211,8 +1224,9 @@ instance Binary IfaceUnfolding where get bh = do h <- getByte bh case h of - 0 -> do e <- get bh - return (IfCoreUnfold e) + 0 -> do s <- get bh + e <- get bh + return (IfCoreUnfold s e) 1 -> do a <- get bh b <- get bh c <- get bh