ghc-7.0.3: The GHC API

Binary

# Documentation

data Bin a Source

Instances

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

class Binary a where Source

Methods

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

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

get :: BinHandle -> IO aSource

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 PackageId |
Binary ModuleName |
Binary Module |
Binary OccName |
Binary FastString |
Binary InlineSpec |
Binary InlinePragma |
Binary RuleMatchInfo |
Binary Activation |
Binary DefMethSpec |
Binary HsBang |
Binary TupCon |
Binary OverlapFlag |
Binary RecFlag |
Binary Boxity |
Binary FixityDirection |
Binary Fixity |
Binary WarningTxt |
Binary FunctionOrData |
Binary Fingerprint |
Binary Name |
Binary NameSpace |
Binary CCallConv |
Binary CCallTarget |
Binary CCallSpec |
Binary CExportSpec |
Binary Safety |
Binary ForeignCall |
Binary Serialized |
Binary StrictSig |
Binary DmdResult |
Binary DmdType |
Binary Demands |
Binary Demand |
Binary Literal |
Binary IsCafCC |
Binary IsDupdCC |
Binary CostCentre |
Binary IfaceTyCon |
Binary IfacePredType |
Binary IfaceType |
Binary IfaceBndr |
Binary IfaceLetBndr |
Binary IfaceBinding |
Binary IfaceConAlt |
Binary IfaceNote |
Binary IfaceExpr |
Binary IfaceUnfolding |
Binary IfaceInfoItem |
Binary IfaceIdInfo |
Binary IfaceIdDetails |
Binary IfaceAnnotation |
Binary IfaceRule |
Binary IfaceFamInst |
Binary IfaceInst |
Binary IfaceConDecl |
Binary IfaceConDecls |
Binary IfaceClassOp |
Binary IfaceDecl |
Binary IfaceVectInfo |
Binary Usage |
Binary Dependencies |
Binary Warnings |
Binary ModIface |
Binary IfaceDeclExtras |
Binary a => Binary [a] |
(Integral a, Binary a) => Binary (Ratio a) |
Binary a => Binary (Maybe a) |
Binary name => Binary (IPName name) |
Binary (Bin a) |
Binary name => Binary (AnnTarget name) |
Binary (DFunArg IfaceExpr) |
Binary name => Binary (GenAvailInfo 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) |

data BinHandle Source

openBinIO :: Handle -> IO BinHandle Source

openBinIO_ :: Handle -> IO BinHandle Source

openBinMem :: Int -> IO BinHandle Source

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

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

tellBin :: BinHandle -> IO (Bin a)Source

castBin :: Bin a -> Bin bSource

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

readBinMem :: FilePath -> IO BinHandle Source

fingerprintBinMem :: BinHandle -> IO Fingerprint Source

isEOFBin :: BinHandle -> IO Bool Source

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

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

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

getByte :: BinHandle -> IO Word8 Source

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

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

data ByteArray Source

Constructors

BA ByteArray# |

getByteArray :: BinHandle -> Int -> IO ByteArray Source

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

data UserData Source

Constructors

UserData |

Fields

ud_dict :: Dictionary
ud_symtab :: SymbolTable
ud_put_name :: BinHandle -> Name -> IO ()
ud_put_fs :: BinHandle -> FastString -> IO ()

getUserData :: BinHandle -> UserData Source

setUserData :: BinHandle -> UserData -> BinHandle Source

newReadState :: Dictionary -> IO UserData Source

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

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

getDictionary :: BinHandle -> IO DictionarySource

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