ghc-7.8.4: The GHC API

Safe Haskell | None
Language | Haskell98

Binary

# Documentation

data Bin a

Instances

Bounded (Bin a) |
Eq (Bin a) |
Ord (Bin a) |
Show (Bin a) |
Binary (Bin a) |

class Binary a where

Minimal complete definition

get

Methods

put_ :: BinHandle -> a -> IO ()

put :: BinHandle -> a -> IO (Bin a)

get :: BinHandle -> IO a

Instances

Binary Bool |
Binary Char |
Binary Int |
Binary Int8 |
Binary Int16 |
Binary Int32 |
Binary Int64 |
Binary Integer |
Binary Word8 |
Binary Word16 |
Binary Word32 |
Binary Word64 |
Binary () |
Binary TypeRep |
Binary TyCon |
Binary Fingerprint |
Binary ByteString |
Binary UTCTime |
Binary Day |
Binary DiffTime |
Binary PackageId |
Binary ModuleName |
Binary Module |
Binary OccName |
Binary FastString |
Binary Name |
Binary InlineSpec |
Binary InlinePragma |
Binary RuleMatchInfo |
Binary Activation |
Binary DefMethSpec |
Binary TupleSort |
Binary OverlapFlag |
Binary RecFlag |
Binary FixityDirection |
Binary Fixity |
Binary WarningTxt |
Binary FunctionOrData |
Binary CType |
Binary Header |
Binary CCallConv |
Binary CCallTarget |
Binary CCallSpec |
Binary CExportSpec |
Binary Safety |
Binary ForeignCall |
Binary Serialized |
Binary NameSpace |
Binary IsCafCC |
Binary CostCentre |
Binary AvailInfo |
Binary Role |
Binary LeftOrRight |
Binary Literal |
Binary StrictSig |
Binary DmdType |
Binary CPRResult |
Binary DmdResult |
Binary Count |
Binary UseDmd |
Binary StrDmd |
Binary IfaceCoercion |
Binary IfaceTyCon |
Binary IfaceTyLit |
Binary IfaceType |
Binary IfaceBndr |
Binary IfaceLetBndr |
Binary IfaceBinding |
Binary IfaceConAlt |
Binary IfaceTickish |
Binary IfaceExpr |
Binary IfaceUnfolding |
Binary IfaceInfoItem |
Binary IfaceIdInfo |
Binary IfaceIdDetails |
Binary IfaceAnnotation |
Binary IfaceRule |
Binary IfaceFamInst |
Binary IfaceClsInst |
Binary IfaceBang |
Binary IfaceConDecl |
Binary IfaceConDecls |
Binary IfaceAxBranch |
Binary IfaceAT |
Binary IfaceClassOp |
Binary IfaceSynTyConRhs |
Binary IfaceDecl |
Binary IfaceTrustInfo |
Binary IfaceVectInfo |
Binary Usage |
Binary Dependencies |
Binary Warnings |
Binary ModIface |
Binary a => Binary [a] |
(Integral a, Binary a) => Binary (Ratio a) |
Binary a => Binary (Maybe a) |
Binary (Bin a) |
Binary a => Binary (BooleanFormula a) |
Binary name => Binary (AnnTarget name) |
(Binary a, Binary b) => Binary (Either a b) |
(Binary a, Binary b) => Binary (a, b) |
(Binary a, Binary b, Binary c) => Binary (a, b, c) |
(Binary a, Binary b, Binary c, Binary d) => Binary (a, b, c, d) |
(Binary a, Binary b, Binary c, Binary d, Binary e) => Binary (a, b, c, d, e) |
(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f) => Binary (a, b, c, d, e, f) |

data BinHandle

type SymbolTable = Array Int Name

type Dictionary = Array Int FastString

openBinMem :: Int -> IO BinHandle

seekBin :: BinHandle -> Bin a -> IO ()

seekBy :: BinHandle -> Int -> IO ()

tellBin :: BinHandle -> IO (Bin a)

castBin :: Bin a -> Bin b

writeBinMem :: BinHandle -> FilePath -> IO ()

readBinMem :: FilePath -> IO BinHandle

fingerprintBinMem :: BinHandle -> IO Fingerprint

computeFingerprint :: Binary a => (BinHandle -> Name -> IO ()) -> a -> IO Fingerprint

isEOFBin :: BinHandle -> IO Bool

putAt :: Binary a => BinHandle -> Bin a -> a -> IO ()

getAt :: Binary a => BinHandle -> Bin a -> IO a

putByte :: BinHandle -> Word8 -> IO ()

getByte :: BinHandle -> IO Word8

lazyGet :: Binary a => BinHandle -> IO a

lazyPut :: Binary a => BinHandle -> a -> IO ()

data ByteArray

Constructors

BA ByteArray# |

getByteArray :: BinHandle -> Int -> IO ByteArray

putByteArray :: BinHandle -> ByteArray# -> Int# -> IO ()

data UserData

Constructors

UserData |

Fields

ud_get_name :: BinHandle -> IO Name
ud_get_fs :: BinHandle -> IO FastString
ud_put_name :: BinHandle -> Name -> IO ()
ud_put_fs :: BinHandle -> FastString -> IO ()

getUserData :: BinHandle -> UserData

setUserData :: BinHandle -> UserData -> BinHandle

newReadState :: (BinHandle -> IO Name) -> (BinHandle -> IO FastString) -> UserData

newWriteState :: (BinHandle -> Name -> IO ()) -> (BinHandle -> FastString -> IO ()) -> UserData

putDictionary :: BinHandle -> Int -> UniqFM (Int, FastString) -> IO ()

getDictionary :: BinHandle -> IO Dictionary

putFS :: BinHandle -> FastString -> IO ()