GHC.Utils.Binary

ghc-9.0.0.20200925: The GHC API

Safe Haskell | None
Language | Haskell2010

GHC.Utils.Binary

Contents

- For writing instances
- Variable length encodings
- Fixed length encoding
- Lazy Binary I/O
- User data

Synopsis

- data Bin a
- class Binary a where
  - put_ :: BinHandle -> a -> IO ()
  - put :: BinHandle -> a -> IO (Bin a)
  - get :: BinHandle -> IO a
- data BinHandle
- type SymbolTable = Array Int Name
- type Dictionary = Array Int FastString
- data BinData = BinData Int BinArray
- dataHandle :: BinData -> IO BinHandle
- handleData :: BinHandle -> IO BinData
- openBinMem :: Int -> IO BinHandle
- seekBin :: BinHandle -> Bin a -> IO ()
- tellBin :: BinHandle -> IO (Bin a)
- castBin :: Bin a -> Bin b
- withBinBuffer :: BinHandle -> (ByteString -> IO a) -> IO a
- writeBinMem :: BinHandle -> FilePath -> IO ()
- readBinMem :: FilePath -> IO BinHandle
- putAt :: Binary a => BinHandle -> Bin a -> a -> IO ()
- getAt :: Binary a => BinHandle -> Bin a -> IO a
- putByte :: BinHandle -> Word8 -> IO ()
- getByte :: BinHandle -> IO Word8
- putULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> a -> IO ()
- getULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> IO a
- putSLEB128 :: forall a. (Integral a, Bits a) => BinHandle -> a -> IO ()
- getSLEB128 :: forall a. (Show a, Integral a, FiniteBits a) => BinHandle -> IO a
- newtype FixedLengthEncoding a = FixedLengthEncoding {
  - unFixedLength :: a
  }
- lazyGet :: Binary a => BinHandle -> IO a
- lazyPut :: Binary a => BinHandle -> a -> IO ()
- data UserData = UserData {
  - ud_get_name :: BinHandle -> IO Name
  - ud_get_fs :: BinHandle -> IO FastString
  - ud_put_nonbinding_name :: BinHandle -> Name -> IO ()
  - ud_put_binding_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 -> Name -> IO ()) -> (BinHandle -> FastString -> IO ()) -> UserData
- putDictionary :: BinHandle -> Int -> UniqFM FastString (Int, FastString) -> IO ()
- getDictionary :: BinHandle -> IO Dictionary
- putFS :: BinHandle -> FastString -> IO ()

# Documentation

data Bin a Source #

#### Instances

Instances details

Bounded (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods minBound :: Bin a Source # maxBound :: Bin a Source #
Eq (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods (==) :: Bin a -> Bin a -> Bool # (/=) :: Bin a -> Bin a -> Bool #
Ord (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods compare :: Bin a -> Bin a -> Ordering # (<) :: Bin a -> Bin a -> Bool # (<=) :: Bin a -> Bin a -> Bool # (>) :: Bin a -> Bin a -> Bool # (>=) :: Bin a -> Bin a -> Bool # max :: Bin a -> Bin a -> Bin a # min :: Bin a -> Bin a -> Bin a #
Show (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods showsPrec :: Int -> Bin a -> ShowS Source # show :: Bin a -> String Source # showList :: [Bin a] -> ShowS Source #
Binary (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Bin a -> IO () Source # put :: BinHandle -> Bin a -> IO (Bin (Bin a)) Source # get :: BinHandle -> IO (Bin a) Source #

class Binary a where Source #

Do not rely on instance sizes for general types, we use variable length encoding for many of them.

Minimal complete definition

get

Methods

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

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

get :: BinHandle -> IO a Source #

#### Instances

Instances details

Binary Bool # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Bool -> IO () Source # put :: BinHandle -> Bool -> IO (Bin Bool) Source # get :: BinHandle -> IO Bool Source #
Binary Char # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Char -> IO () Source # put :: BinHandle -> Char -> IO (Bin Char) Source # get :: BinHandle -> IO Char Source #
Binary Int # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Int -> IO () Source # put :: BinHandle -> Int -> IO (Bin Int) Source # get :: BinHandle -> IO Int Source #
Binary Int8 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Int8 -> IO () Source # put :: BinHandle -> Int8 -> IO (Bin Int8) Source # get :: BinHandle -> IO Int8 Source #
Binary Int16 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Int16 -> IO () Source # put :: BinHandle -> Int16 -> IO (Bin Int16) Source # get :: BinHandle -> IO Int16 Source #
Binary Int32 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Int32 -> IO () Source # put :: BinHandle -> Int32 -> IO (Bin Int32) Source # get :: BinHandle -> IO Int32 Source #
Binary Int64 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Int64 -> IO () Source # put :: BinHandle -> Int64 -> IO (Bin Int64) Source # get :: BinHandle -> IO Int64 Source #
Binary Integer # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Integer -> IO () Source # put :: BinHandle -> Integer -> IO (Bin Integer) Source # get :: BinHandle -> IO Integer Source #
Binary Word8 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Word8 -> IO () Source # put :: BinHandle -> Word8 -> IO (Bin Word8) Source # get :: BinHandle -> IO Word8 Source #
Binary Word16 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Word16 -> IO () Source # put :: BinHandle -> Word16 -> IO (Bin Word16) Source # get :: BinHandle -> IO Word16 Source #
Binary Word32 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Word32 -> IO () Source # put :: BinHandle -> Word32 -> IO (Bin Word32) Source # get :: BinHandle -> IO Word32 Source #
Binary Word64 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Word64 -> IO () Source # put :: BinHandle -> Word64 -> IO (Bin Word64) Source # get :: BinHandle -> IO Word64 Source #
Binary RuntimeRep # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> RuntimeRep -> IO () Source # put :: BinHandle -> RuntimeRep -> IO (Bin RuntimeRep) Source # get :: BinHandle -> IO RuntimeRep Source #
Binary VecCount # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> VecCount -> IO () Source # put :: BinHandle -> VecCount -> IO (Bin VecCount) Source # get :: BinHandle -> IO VecCount Source #
Binary VecElem # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> VecElem -> IO () Source # put :: BinHandle -> VecElem -> IO (Bin VecElem) Source # get :: BinHandle -> IO VecElem Source #
Binary SomeTypeRep # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> SomeTypeRep -> IO () Source # put :: BinHandle -> SomeTypeRep -> IO (Bin SomeTypeRep) Source # get :: BinHandle -> IO SomeTypeRep Source #
Binary () # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> () -> IO () Source # put :: BinHandle -> () -> IO (Bin ()) Source # get :: BinHandle -> IO () Source #
Binary TyCon # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> TyCon -> IO () Source # put :: BinHandle -> TyCon -> IO (Bin TyCon) Source # get :: BinHandle -> IO TyCon Source #
Binary KindRep # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> KindRep -> IO () Source # put :: BinHandle -> KindRep -> IO (Bin KindRep) Source # get :: BinHandle -> IO KindRep Source #
Binary TypeLitSort # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> TypeLitSort -> IO () Source # put :: BinHandle -> TypeLitSort -> IO (Bin TypeLitSort) Source # get :: BinHandle -> IO TypeLitSort Source #
Binary Fingerprint # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Fingerprint -> IO () Source # put :: BinHandle -> Fingerprint -> IO (Bin Fingerprint) Source # get :: BinHandle -> IO Fingerprint Source #
Binary ByteString # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> ByteString -> IO () Source # put :: BinHandle -> ByteString -> IO (Bin ByteString) Source # get :: BinHandle -> IO ByteString Source #
Binary Serialized # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Serialized -> IO () Source # put :: BinHandle -> Serialized -> IO (Bin Serialized) Source # get :: BinHandle -> IO Serialized Source #
Binary UTCTime # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> UTCTime -> IO () Source # put :: BinHandle -> UTCTime -> IO (Bin UTCTime) Source # get :: BinHandle -> IO UTCTime Source #
Binary DiffTime # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> DiffTime -> IO () Source # put :: BinHandle -> DiffTime -> IO (Bin DiffTime) Source # get :: BinHandle -> IO DiffTime Source #
Binary Day # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Day -> IO () Source # put :: BinHandle -> Day -> IO (Bin Day) Source # get :: BinHandle -> IO Day Source #
Binary IfaceBndr # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceBndr -> IO () Source # put :: BinHandle -> IfaceBndr -> IO (Bin IfaceBndr) Source # get :: BinHandle -> IO IfaceBndr Source #
Binary IfaceCoercion # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceCoercion -> IO () Source # put :: BinHandle -> IfaceCoercion -> IO (Bin IfaceCoercion) Source # get :: BinHandle -> IO IfaceCoercion Source #
Binary IfaceTyLit # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceTyLit -> IO () Source # put :: BinHandle -> IfaceTyLit -> IO (Bin IfaceTyLit) Source # get :: BinHandle -> IO IfaceTyLit Source #
Binary IfaceTyCon # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceTyCon -> IO () Source # put :: BinHandle -> IfaceTyCon -> IO (Bin IfaceTyCon) Source # get :: BinHandle -> IO IfaceTyCon Source #
Binary IfaceType # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceType -> IO () Source # put :: BinHandle -> IfaceType -> IO (Bin IfaceType) Source # get :: BinHandle -> IO IfaceType Source #
Binary IfaceAppArgs # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceAppArgs -> IO () Source # put :: BinHandle -> IfaceAppArgs -> IO (Bin IfaceAppArgs) Source # get :: BinHandle -> IO IfaceAppArgs Source #
Binary Name # | Assumes that the `Name` is a non-binding one. See `putIfaceTopBndr` and `getIfaceTopBndr` for serializing binding `Name`s. See `UserData` for the rationale for this distinction.
Instance details Defined in GHC.Types.Name Methods put_ :: BinHandle -> Name -> IO () Source # put :: BinHandle -> Name -> IO (Bin Name) Source # get :: BinHandle -> IO Name Source #
Binary OccName # |
Instance details Defined in GHC.Types.Name.Occurrence Methods put_ :: BinHandle -> OccName -> IO () Source # put :: BinHandle -> OccName -> IO (Bin OccName) Source # get :: BinHandle -> IO OccName Source #
Binary AnonArgFlag # |
Instance details Defined in GHC.Types.Var Methods put_ :: BinHandle -> AnonArgFlag -> IO () Source # put :: BinHandle -> AnonArgFlag -> IO (Bin AnonArgFlag) Source # get :: BinHandle -> IO AnonArgFlag Source #
Binary ArgFlag # |
Instance details Defined in GHC.Types.Var Methods put_ :: BinHandle -> ArgFlag -> IO () Source # put :: BinHandle -> ArgFlag -> IO (Bin ArgFlag) Source # get :: BinHandle -> IO ArgFlag Source #
Binary ModuleName # |
Instance details Defined in GHC.Unit.Module.Name Methods put_ :: BinHandle -> ModuleName -> IO () Source # put :: BinHandle -> ModuleName -> IO (Bin ModuleName) Source # get :: BinHandle -> IO ModuleName Source #
Binary Unit # |
Instance details Defined in GHC.Unit.Types Methods put_ :: BinHandle -> Unit -> IO () Source # put :: BinHandle -> Unit -> IO (Bin Unit) Source # get :: BinHandle -> IO Unit Source #
Binary UnitId # |
Instance details Defined in GHC.Unit.Types Methods put_ :: BinHandle -> UnitId -> IO () Source # put :: BinHandle -> UnitId -> IO (Bin UnitId) Source # get :: BinHandle -> IO UnitId Source #
Binary FastString # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FastString -> IO () Source # put :: BinHandle -> FastString -> IO (Bin FastString) Source # get :: BinHandle -> IO FastString Source #
Binary UnhelpfulSpanReason # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> UnhelpfulSpanReason -> IO () Source # put :: BinHandle -> UnhelpfulSpanReason -> IO (Bin UnhelpfulSpanReason) Source # get :: BinHandle -> IO UnhelpfulSpanReason Source #
Binary SrcSpan # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> SrcSpan -> IO () Source # put :: BinHandle -> SrcSpan -> IO (Bin SrcSpan) Source # get :: BinHandle -> IO SrcSpan Source #
Binary BufSpan # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> BufSpan -> IO () Source # put :: BinHandle -> BufSpan -> IO (Bin BufSpan) Source # get :: BinHandle -> IO BufSpan Source #
Binary RealSrcSpan # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> RealSrcSpan -> IO () Source # put :: BinHandle -> RealSrcSpan -> IO (Bin RealSrcSpan) Source # get :: BinHandle -> IO RealSrcSpan Source #
Binary BufPos # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> BufPos -> IO () Source # put :: BinHandle -> BufPos -> IO (Bin BufPos) Source # get :: BinHandle -> IO BufPos Source #
Binary InlineSpec # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> InlineSpec -> IO () Source # put :: BinHandle -> InlineSpec -> IO (Bin InlineSpec) Source # get :: BinHandle -> IO InlineSpec Source #
Binary RuleMatchInfo # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> RuleMatchInfo -> IO () Source # put :: BinHandle -> RuleMatchInfo -> IO (Bin RuleMatchInfo) Source # get :: BinHandle -> IO RuleMatchInfo Source #
Binary InlinePragma # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> InlinePragma -> IO () Source # put :: BinHandle -> InlinePragma -> IO (Bin InlinePragma) Source # get :: BinHandle -> IO InlinePragma Source #
Binary Activation # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Activation -> IO () Source # put :: BinHandle -> Activation -> IO (Bin Activation) Source # get :: BinHandle -> IO Activation Source #
Binary SourceText # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> SourceText -> IO () Source # put :: BinHandle -> SourceText -> IO (Bin SourceText) Source # get :: BinHandle -> IO SourceText Source #
Binary TupleSort # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> TupleSort -> IO () Source # put :: BinHandle -> TupleSort -> IO (Bin TupleSort) Source # get :: BinHandle -> IO TupleSort Source #
Binary OverlapMode # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> OverlapMode -> IO () Source # put :: BinHandle -> OverlapMode -> IO (Bin OverlapMode) Source # get :: BinHandle -> IO OverlapMode Source #
Binary OverlapFlag # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> OverlapFlag -> IO () Source # put :: BinHandle -> OverlapFlag -> IO (Bin OverlapFlag) Source # get :: BinHandle -> IO OverlapFlag Source #
Binary RecFlag # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> RecFlag -> IO () Source # put :: BinHandle -> RecFlag -> IO (Bin RecFlag) Source # get :: BinHandle -> IO RecFlag Source #
Binary FixityDirection # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FixityDirection -> IO () Source # put :: BinHandle -> FixityDirection -> IO (Bin FixityDirection) Source # get :: BinHandle -> IO FixityDirection Source #
Binary Fixity # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Fixity -> IO () Source # put :: BinHandle -> Fixity -> IO (Bin Fixity) Source # get :: BinHandle -> IO Fixity Source #
Binary WarningTxt # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> WarningTxt -> IO () Source # put :: BinHandle -> WarningTxt -> IO (Bin WarningTxt) Source # get :: BinHandle -> IO WarningTxt Source #
Binary StringLiteral # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> StringLiteral -> IO () Source # put :: BinHandle -> StringLiteral -> IO (Bin StringLiteral) Source # get :: BinHandle -> IO StringLiteral Source #
Binary FunctionOrData # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FunctionOrData -> IO () Source # put :: BinHandle -> FunctionOrData -> IO (Bin FunctionOrData) Source # get :: BinHandle -> IO FunctionOrData Source #
Binary PromotionFlag # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> PromotionFlag -> IO () Source # put :: BinHandle -> PromotionFlag -> IO (Bin PromotionFlag) Source # get :: BinHandle -> IO PromotionFlag Source #
Binary LeftOrRight # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> LeftOrRight -> IO () Source # put :: BinHandle -> LeftOrRight -> IO (Bin LeftOrRight) Source # get :: BinHandle -> IO LeftOrRight Source #
Binary BinData # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> BinData -> IO () Source # put :: BinHandle -> BinData -> IO (Bin BinData) Source # get :: BinHandle -> IO BinData Source #
Binary IsBootInterface # |
Instance details Defined in GHC.Unit.Types Methods put_ :: BinHandle -> IsBootInterface -> IO () Source # put :: BinHandle -> IsBootInterface -> IO (Bin IsBootInterface) Source # get :: BinHandle -> IO IsBootInterface Source #
Binary InstantiatedUnit # |
Instance details Defined in GHC.Unit.Types Methods put_ :: BinHandle -> InstantiatedUnit -> IO () Source # put :: BinHandle -> InstantiatedUnit -> IO (Bin InstantiatedUnit) Source # get :: BinHandle -> IO InstantiatedUnit Source #
Binary CostCentreIndex # |
Instance details Defined in GHC.Types.CostCentre.State Methods put_ :: BinHandle -> CostCentreIndex -> IO () Source # put :: BinHandle -> CostCentreIndex -> IO (Bin CostCentreIndex) Source # get :: BinHandle -> IO CostCentreIndex Source #
Binary NameSpace # |
Instance details Defined in GHC.Types.Name.Occurrence Methods put_ :: BinHandle -> NameSpace -> IO () Source # put :: BinHandle -> NameSpace -> IO (Bin NameSpace) Source # get :: BinHandle -> IO NameSpace Source #
Binary CType # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: BinHandle -> CType -> IO () Source # put :: BinHandle -> CType -> IO (Bin CType) Source # get :: BinHandle -> IO CType Source #
Binary Header # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: BinHandle -> Header -> IO () Source # put :: BinHandle -> Header -> IO (Bin Header) Source # get :: BinHandle -> IO Header Source #
Binary CCallConv # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: BinHandle -> CCallConv -> IO () Source # put :: BinHandle -> CCallConv -> IO (Bin CCallConv) Source # get :: BinHandle -> IO CCallConv Source #
Binary CCallTarget # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: BinHandle -> CCallTarget -> IO () Source # put :: BinHandle -> CCallTarget -> IO (Bin CCallTarget) Source # get :: BinHandle -> IO CCallTarget Source #
Binary CCallSpec # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: BinHandle -> CCallSpec -> IO () Source # put :: BinHandle -> CCallSpec -> IO (Bin CCallSpec) Source # get :: BinHandle -> IO CCallSpec Source #
Binary CExportSpec # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: BinHandle -> CExportSpec -> IO () Source # put :: BinHandle -> CExportSpec -> IO (Bin CExportSpec) Source # get :: BinHandle -> IO CExportSpec Source #
Binary Safety # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: BinHandle -> Safety -> IO () Source # put :: BinHandle -> Safety -> IO (Bin Safety) Source # get :: BinHandle -> IO Safety Source #
Binary ForeignCall # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: BinHandle -> ForeignCall -> IO () Source # put :: BinHandle -> ForeignCall -> IO (Bin ForeignCall) Source # get :: BinHandle -> IO ForeignCall Source #
Binary CprSig # |
Instance details Defined in GHC.Types.Cpr Methods put_ :: BinHandle -> CprSig -> IO () Source # put :: BinHandle -> CprSig -> IO (Bin CprSig) Source # get :: BinHandle -> IO CprSig Source #
Binary CprType # |
Instance details Defined in GHC.Types.Cpr Methods put_ :: BinHandle -> CprType -> IO () Source # put :: BinHandle -> CprType -> IO (Bin CprType) Source # get :: BinHandle -> IO CprType Source #
Binary CprResult # |
Instance details Defined in GHC.Types.Cpr Methods put_ :: BinHandle -> CprResult -> IO () Source # put :: BinHandle -> CprResult -> IO (Bin CprResult) Source # get :: BinHandle -> IO CprResult Source #
Binary HscSource # |
Instance details Defined in GHC.Driver.Phases Methods put_ :: BinHandle -> HscSource -> IO () Source # put :: BinHandle -> HscSource -> IO (Bin HscSource) Source # get :: BinHandle -> IO HscSource Source #
Binary AvailInfo # |
Instance details Defined in GHC.Types.Avail Methods put_ :: BinHandle -> AvailInfo -> IO () Source # put :: BinHandle -> AvailInfo -> IO (Bin AvailInfo) Source # get :: BinHandle -> IO AvailInfo Source #
Binary ArgDocMap # |
Instance details Defined in GHC.Hs.Doc Methods put_ :: BinHandle -> ArgDocMap -> IO () Source # put :: BinHandle -> ArgDocMap -> IO (Bin ArgDocMap) Source # get :: BinHandle -> IO ArgDocMap Source #
Binary DeclDocMap # |
Instance details Defined in GHC.Hs.Doc Methods put_ :: BinHandle -> DeclDocMap -> IO () Source # put :: BinHandle -> DeclDocMap -> IO (Bin DeclDocMap) Source # get :: BinHandle -> IO DeclDocMap Source #
Binary HsDocString # |
Instance details Defined in GHC.Hs.Doc Methods put_ :: BinHandle -> HsDocString -> IO () Source # put :: BinHandle -> HsDocString -> IO (Bin HsDocString) Source # get :: BinHandle -> IO HsDocString Source #
Binary Specificity # |
Instance details Defined in GHC.Types.Var Methods put_ :: BinHandle -> Specificity -> IO () Source # put :: BinHandle -> Specificity -> IO (Bin Specificity) Source # get :: BinHandle -> IO Specificity Source #
Binary CCFlavour # |
Instance details Defined in GHC.Types.CostCentre Methods put_ :: BinHandle -> CCFlavour -> IO () Source # put :: BinHandle -> CCFlavour -> IO (Bin CCFlavour) Source # get :: BinHandle -> IO CCFlavour Source #
Binary CostCentre # |
Instance details Defined in GHC.Types.CostCentre Methods put_ :: BinHandle -> CostCentre -> IO () Source # put :: BinHandle -> CostCentre -> IO (Bin CostCentre) Source # get :: BinHandle -> IO CostCentre Source #
Binary Role # |
Instance details Defined in GHC.Core.Coercion.Axiom Methods put_ :: BinHandle -> Role -> IO () Source # put :: BinHandle -> Role -> IO (Bin Role) Source # get :: BinHandle -> IO Role Source #
Binary Injectivity # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: BinHandle -> Injectivity -> IO () Source # put :: BinHandle -> Injectivity -> IO (Bin Injectivity) Source # get :: BinHandle -> IO Injectivity Source #
Binary TyConBndrVis # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: BinHandle -> TyConBndrVis -> IO () Source # put :: BinHandle -> TyConBndrVis -> IO (Bin TyConBndrVis) Source # get :: BinHandle -> IO TyConBndrVis Source #
Binary IfaceUnivCoProv # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceUnivCoProv -> IO () Source # put :: BinHandle -> IfaceUnivCoProv -> IO (Bin IfaceUnivCoProv) Source # get :: BinHandle -> IO IfaceUnivCoProv Source #
Binary IfaceMCoercion # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceMCoercion -> IO () Source # put :: BinHandle -> IfaceMCoercion -> IO (Bin IfaceMCoercion) Source # get :: BinHandle -> IO IfaceMCoercion Source #
Binary IfaceTyConInfo # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceTyConInfo -> IO () Source # put :: BinHandle -> IfaceTyConInfo -> IO (Bin IfaceTyConInfo) Source # get :: BinHandle -> IO IfaceTyConInfo Source #
Binary IfaceTyConSort # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceTyConSort -> IO () Source # put :: BinHandle -> IfaceTyConSort -> IO (Bin IfaceTyConSort) Source # get :: BinHandle -> IO IfaceTyConSort Source #
Binary IfaceOneShot # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceOneShot -> IO () Source # put :: BinHandle -> IfaceOneShot -> IO (Bin IfaceOneShot) Source # get :: BinHandle -> IO IfaceOneShot Source #
Binary LitNumType # |
Instance details Defined in GHC.Types.Literal Methods put_ :: BinHandle -> LitNumType -> IO () Source # put :: BinHandle -> LitNumType -> IO (Bin LitNumType) Source # get :: BinHandle -> IO LitNumType Source #
Binary Literal # |
Instance details Defined in GHC.Types.Literal Methods put_ :: BinHandle -> Literal -> IO () Source # put :: BinHandle -> Literal -> IO (Bin Literal) Source # get :: BinHandle -> IO Literal Source #
Binary SrcUnpackedness # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: BinHandle -> SrcUnpackedness -> IO () Source # put :: BinHandle -> SrcUnpackedness -> IO (Bin SrcUnpackedness) Source # get :: BinHandle -> IO SrcUnpackedness Source #
Binary SrcStrictness # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: BinHandle -> SrcStrictness -> IO () Source # put :: BinHandle -> SrcStrictness -> IO (Bin SrcStrictness) Source # get :: BinHandle -> IO SrcStrictness Source #
Binary StrictSig # |
Instance details Defined in GHC.Types.Demand Methods put_ :: BinHandle -> StrictSig -> IO () Source # put :: BinHandle -> StrictSig -> IO (Bin StrictSig) Source # get :: BinHandle -> IO StrictSig Source #
Binary DmdType # |
Instance details Defined in GHC.Types.Demand Methods put_ :: BinHandle -> DmdType -> IO () Source # put :: BinHandle -> DmdType -> IO (Bin DmdType) Source # get :: BinHandle -> IO DmdType Source #
Binary Divergence # |
Instance details Defined in GHC.Types.Demand Methods put_ :: BinHandle -> Divergence -> IO () Source # put :: BinHandle -> Divergence -> IO (Bin Divergence) Source # get :: BinHandle -> IO Divergence Source #
Binary Count # |
Instance details Defined in GHC.Types.Demand Methods put_ :: BinHandle -> Count -> IO () Source # put :: BinHandle -> Count -> IO (Bin Count) Source # get :: BinHandle -> IO Count Source #
Binary UseDmd # |
Instance details Defined in GHC.Types.Demand Methods put_ :: BinHandle -> UseDmd -> IO () Source # put :: BinHandle -> UseDmd -> IO (Bin UseDmd) Source # get :: BinHandle -> IO UseDmd Source #
Binary StrDmd # |
Instance details Defined in GHC.Types.Demand Methods put_ :: BinHandle -> StrDmd -> IO () Source # put :: BinHandle -> StrDmd -> IO (Bin StrDmd) Source # get :: BinHandle -> IO StrDmd Source #
Binary IsOrphan # |
Instance details Defined in GHC.Core Methods put_ :: BinHandle -> IsOrphan -> IO () Source # put :: BinHandle -> IsOrphan -> IO (Bin IsOrphan) Source # get :: BinHandle -> IO IsOrphan Source #
Binary IfaceJoinInfo # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceJoinInfo -> IO () Source # put :: BinHandle -> IfaceJoinInfo -> IO (Bin IfaceJoinInfo) Source # get :: BinHandle -> IO IfaceJoinInfo Source #
Binary IfaceLetBndr # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceLetBndr -> IO () Source # put :: BinHandle -> IfaceLetBndr -> IO (Bin IfaceLetBndr) Source # get :: BinHandle -> IO IfaceLetBndr Source #
Binary IfaceBinding # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceBinding -> IO () Source # put :: BinHandle -> IfaceBinding -> IO (Bin IfaceBinding) Source # get :: BinHandle -> IO IfaceBinding Source #
Binary IfaceConAlt # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceConAlt -> IO () Source # put :: BinHandle -> IfaceConAlt -> IO (Bin IfaceConAlt) Source # get :: BinHandle -> IO IfaceConAlt Source #
Binary IfaceTickish # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceTickish -> IO () Source # put :: BinHandle -> IfaceTickish -> IO (Bin IfaceTickish) Source # get :: BinHandle -> IO IfaceTickish Source #
Binary IfaceExpr # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceExpr -> IO () Source # put :: BinHandle -> IfaceExpr -> IO (Bin IfaceExpr) Source # get :: BinHandle -> IO IfaceExpr Source #
Binary IfaceLFInfo # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceLFInfo -> IO () Source # put :: BinHandle -> IfaceLFInfo -> IO (Bin IfaceLFInfo) Source # get :: BinHandle -> IO IfaceLFInfo Source #
Binary IfaceIdDetails # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceIdDetails -> IO () Source # put :: BinHandle -> IfaceIdDetails -> IO (Bin IfaceIdDetails) Source # get :: BinHandle -> IO IfaceIdDetails Source #
Binary IfaceUnfolding # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceUnfolding -> IO () Source # put :: BinHandle -> IfaceUnfolding -> IO (Bin IfaceUnfolding) Source # get :: BinHandle -> IO IfaceUnfolding Source #
Binary IfaceInfoItem # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceInfoItem -> IO () Source # put :: BinHandle -> IfaceInfoItem -> IO (Bin IfaceInfoItem) Source # get :: BinHandle -> IO IfaceInfoItem Source #
Binary IfaceCompleteMatch # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceCompleteMatch -> IO () Source # put :: BinHandle -> IfaceCompleteMatch -> IO (Bin IfaceCompleteMatch) Source # get :: BinHandle -> IO IfaceCompleteMatch Source #
Binary IfaceAnnotation # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceAnnotation -> IO () Source # put :: BinHandle -> IfaceAnnotation -> IO (Bin IfaceAnnotation) Source # get :: BinHandle -> IO IfaceAnnotation Source #
Binary IfaceRule # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceRule -> IO () Source # put :: BinHandle -> IfaceRule -> IO (Bin IfaceRule) Source # get :: BinHandle -> IO IfaceRule Source #
Binary IfaceFamInst # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceFamInst -> IO () Source # put :: BinHandle -> IfaceFamInst -> IO (Bin IfaceFamInst) Source # get :: BinHandle -> IO IfaceFamInst Source #
Binary IfaceClsInst # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceClsInst -> IO () Source # put :: BinHandle -> IfaceClsInst -> IO (Bin IfaceClsInst) Source # get :: BinHandle -> IO IfaceClsInst Source #
Binary IfaceSrcBang # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceSrcBang -> IO () Source # put :: BinHandle -> IfaceSrcBang -> IO (Bin IfaceSrcBang) Source # get :: BinHandle -> IO IfaceSrcBang Source #
Binary IfaceBang # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceBang -> IO () Source # put :: BinHandle -> IfaceBang -> IO (Bin IfaceBang) Source # get :: BinHandle -> IO IfaceBang Source #
Binary IfaceConDecl # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceConDecl -> IO () Source # put :: BinHandle -> IfaceConDecl -> IO (Bin IfaceConDecl) Source # get :: BinHandle -> IO IfaceConDecl Source #
Binary IfaceConDecls # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceConDecls -> IO () Source # put :: BinHandle -> IfaceConDecls -> IO (Bin IfaceConDecls) Source # get :: BinHandle -> IO IfaceConDecls Source #
Binary IfaceAxBranch # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceAxBranch -> IO () Source # put :: BinHandle -> IfaceAxBranch -> IO (Bin IfaceAxBranch) Source # get :: BinHandle -> IO IfaceAxBranch Source #
Binary IfaceAT # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceAT -> IO () Source # put :: BinHandle -> IfaceAT -> IO (Bin IfaceAT) Source # get :: BinHandle -> IO IfaceAT Source #
Binary IfaceClassOp # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceClassOp -> IO () Source # put :: BinHandle -> IfaceClassOp -> IO (Bin IfaceClassOp) Source # get :: BinHandle -> IO IfaceClassOp Source #
Binary IfaceFamTyConFlav # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceFamTyConFlav -> IO () Source # put :: BinHandle -> IfaceFamTyConFlav -> IO (Bin IfaceFamTyConFlav) Source # get :: BinHandle -> IO IfaceFamTyConFlav Source #
Binary IfaceTyConParent # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceTyConParent -> IO () Source # put :: BinHandle -> IfaceTyConParent -> IO (Bin IfaceTyConParent) Source # get :: BinHandle -> IO IfaceTyConParent Source #
Binary IfaceDecl # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceDecl -> IO () Source # put :: BinHandle -> IfaceDecl -> IO (Bin IfaceDecl) Source # get :: BinHandle -> IO IfaceDecl Source #
Binary ExtensibleFields # |
Instance details Defined in GHC.Driver.Types Methods put_ :: BinHandle -> ExtensibleFields -> IO () Source # put :: BinHandle -> ExtensibleFields -> IO (Bin ExtensibleFields) Source # get :: BinHandle -> IO ExtensibleFields Source #
Binary IfaceTrustInfo # |
Instance details Defined in GHC.Driver.Types Methods put_ :: BinHandle -> IfaceTrustInfo -> IO () Source # put :: BinHandle -> IfaceTrustInfo -> IO (Bin IfaceTrustInfo) Source # get :: BinHandle -> IO IfaceTrustInfo Source #
Binary Usage # |
Instance details Defined in GHC.Driver.Types Methods put_ :: BinHandle -> Usage -> IO () Source # put :: BinHandle -> Usage -> IO (Bin Usage) Source # get :: BinHandle -> IO Usage Source #
Binary Dependencies # |
Instance details Defined in GHC.Driver.Types Methods put_ :: BinHandle -> Dependencies -> IO () Source # put :: BinHandle -> Dependencies -> IO (Bin Dependencies) Source # get :: BinHandle -> IO Dependencies Source #
Binary Warnings # |
Instance details Defined in GHC.Driver.Types Methods put_ :: BinHandle -> Warnings -> IO () Source # put :: BinHandle -> Warnings -> IO (Bin Warnings) Source # get :: BinHandle -> IO Warnings Source #
Binary ModIface # |
Instance details Defined in GHC.Driver.Types Methods put_ :: BinHandle -> ModIface -> IO () Source # put :: BinHandle -> ModIface -> IO (Bin ModIface) Source # get :: BinHandle -> IO ModIface Source #
Binary TyVarScope # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> TyVarScope -> IO () Source # put :: BinHandle -> TyVarScope -> IO (Bin TyVarScope) Source # get :: BinHandle -> IO TyVarScope Source #
Binary Scope # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> Scope -> IO () Source # put :: BinHandle -> Scope -> IO (Bin Scope) Source # get :: BinHandle -> IO Scope Source #
Binary DeclType # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> DeclType -> IO () Source # put :: BinHandle -> DeclType -> IO (Bin DeclType) Source # get :: BinHandle -> IO DeclType Source #
Binary BindType # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> BindType -> IO () Source # put :: BinHandle -> BindType -> IO (Bin BindType) Source # get :: BinHandle -> IO BindType Source #
Binary RecFieldContext # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> RecFieldContext -> IO () Source # put :: BinHandle -> RecFieldContext -> IO (Bin RecFieldContext) Source # get :: BinHandle -> IO RecFieldContext Source #
Binary IEType # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> IEType -> IO () Source # put :: BinHandle -> IEType -> IO (Bin IEType) Source # get :: BinHandle -> IO IEType Source #
Binary EvBindDeps # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> EvBindDeps -> IO () Source # put :: BinHandle -> EvBindDeps -> IO (Bin EvBindDeps) Source # get :: BinHandle -> IO EvBindDeps Source #
Binary EvVarSource # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> EvVarSource -> IO () Source # put :: BinHandle -> EvVarSource -> IO (Bin EvVarSource) Source # get :: BinHandle -> IO EvVarSource Source #
Binary ContextInfo # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> ContextInfo -> IO () Source # put :: BinHandle -> ContextInfo -> IO (Bin ContextInfo) Source # get :: BinHandle -> IO ContextInfo Source #
Binary NodeOrigin # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> NodeOrigin -> IO () Source # put :: BinHandle -> NodeOrigin -> IO (Bin NodeOrigin) Source # get :: BinHandle -> IO NodeOrigin Source #
Binary HieFile # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> HieFile -> IO () Source # put :: BinHandle -> HieFile -> IO (Bin HieFile) Source # get :: BinHandle -> IO HieFile Source #
Binary a => Binary [a] # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> [a] -> IO () Source # put :: BinHandle -> [a] -> IO (Bin [a]) Source # get :: BinHandle -> IO [a] Source #
Binary a => Binary (Maybe a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Maybe a -> IO () Source # put :: BinHandle -> Maybe a -> IO (Bin (Maybe a)) Source # get :: BinHandle -> IO (Maybe a) Source #
Binary a => Binary (Ratio a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Ratio a -> IO () Source # put :: BinHandle -> Ratio a -> IO (Bin (Ratio a)) Source # get :: BinHandle -> IO (Ratio a) Source #
Binary unit => Binary (Indefinite unit) # |
Instance details Defined in GHC.Unit.Types Methods put_ :: BinHandle -> Indefinite unit -> IO () Source # put :: BinHandle -> Indefinite unit -> IO (Bin (Indefinite unit)) Source # get :: BinHandle -> IO (Indefinite unit) Source #
Binary a => Binary (GenModule a) # |
Instance details Defined in GHC.Unit.Types Methods put_ :: BinHandle -> GenModule a -> IO () Source # put :: BinHandle -> GenModule a -> IO (Bin (GenModule a)) Source # get :: BinHandle -> IO (GenModule a) Source #
Binary a => Binary (Located a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Located a -> IO () Source # put :: BinHandle -> Located a -> IO (Bin (Located a)) Source # get :: BinHandle -> IO (Located a) Source #
Binary (DefMethSpec IfaceType) # |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> DefMethSpec IfaceType -> IO () Source # put :: BinHandle -> DefMethSpec IfaceType -> IO (Bin (DefMethSpec IfaceType)) Source # get :: BinHandle -> IO (DefMethSpec IfaceType) Source #
Binary (FixedLengthEncoding Word8) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FixedLengthEncoding Word8 -> IO () Source # put :: BinHandle -> FixedLengthEncoding Word8 -> IO (Bin (FixedLengthEncoding Word8)) Source # get :: BinHandle -> IO (FixedLengthEncoding Word8) Source #
Binary (FixedLengthEncoding Word16) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FixedLengthEncoding Word16 -> IO () Source # put :: BinHandle -> FixedLengthEncoding Word16 -> IO (Bin (FixedLengthEncoding Word16)) Source # get :: BinHandle -> IO (FixedLengthEncoding Word16) Source #
Binary (FixedLengthEncoding Word32) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FixedLengthEncoding Word32 -> IO () Source # put :: BinHandle -> FixedLengthEncoding Word32 -> IO (Bin (FixedLengthEncoding Word32)) Source # get :: BinHandle -> IO (FixedLengthEncoding Word32) Source #
Binary (FixedLengthEncoding Word64) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FixedLengthEncoding Word64 -> IO () Source # put :: BinHandle -> FixedLengthEncoding Word64 -> IO (Bin (FixedLengthEncoding Word64)) Source # get :: BinHandle -> IO (FixedLengthEncoding Word64) Source #
Binary a => Binary (GenWithIsBoot a) # |
Instance details Defined in GHC.Unit.Types Methods put_ :: BinHandle -> GenWithIsBoot a -> IO () Source # put :: BinHandle -> GenWithIsBoot a -> IO (Bin (GenWithIsBoot a)) Source # get :: BinHandle -> IO (GenWithIsBoot a) Source #
Binary unit => Binary (Definite unit) # |
Instance details Defined in GHC.Unit.Types Methods put_ :: BinHandle -> Definite unit -> IO () Source # put :: BinHandle -> Definite unit -> IO (Bin (Definite unit)) Source # get :: BinHandle -> IO (Definite unit) Source #
Binary a => Binary (BooleanFormula a) # |
Instance details Defined in GHC.Data.BooleanFormula Methods put_ :: BinHandle -> BooleanFormula a -> IO () Source # put :: BinHandle -> BooleanFormula a -> IO (Bin (BooleanFormula a)) Source # get :: BinHandle -> IO (BooleanFormula a) Source #
Binary a => Binary (FieldLbl a) # |
Instance details Defined in GHC.Types.FieldLabel Methods put_ :: BinHandle -> FieldLbl a -> IO () Source # put :: BinHandle -> FieldLbl a -> IO (Bin (FieldLbl a)) Source # get :: BinHandle -> IO (FieldLbl a) Source #
Binary name => Binary (AnnTarget name) # |
Instance details Defined in GHC.Types.Annotations Methods put_ :: BinHandle -> AnnTarget name -> IO () Source # put :: BinHandle -> AnnTarget name -> IO (Bin (AnnTarget name)) Source # get :: BinHandle -> IO (AnnTarget name) Source #
Binary (IdentifierDetails TypeIndex) # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> IdentifierDetails TypeIndex -> IO () Source # put :: BinHandle -> IdentifierDetails TypeIndex -> IO (Bin (IdentifierDetails TypeIndex)) Source # get :: BinHandle -> IO (IdentifierDetails TypeIndex) Source #
Binary (NodeInfo TypeIndex) # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> NodeInfo TypeIndex -> IO () Source # put :: BinHandle -> NodeInfo TypeIndex -> IO (Bin (NodeInfo TypeIndex)) Source # get :: BinHandle -> IO (NodeInfo TypeIndex) Source #
Binary (SourcedNodeInfo TypeIndex) # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> SourcedNodeInfo TypeIndex -> IO () Source # put :: BinHandle -> SourcedNodeInfo TypeIndex -> IO (Bin (SourcedNodeInfo TypeIndex)) Source # get :: BinHandle -> IO (SourcedNodeInfo TypeIndex) Source #
Binary (HieAST TypeIndex) # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> HieAST TypeIndex -> IO () Source # put :: BinHandle -> HieAST TypeIndex -> IO (Bin (HieAST TypeIndex)) Source # get :: BinHandle -> IO (HieAST TypeIndex) Source #
Binary (HieASTs TypeIndex) # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> HieASTs TypeIndex -> IO () Source # put :: BinHandle -> HieASTs TypeIndex -> IO (Bin (HieASTs TypeIndex)) Source # get :: BinHandle -> IO (HieASTs TypeIndex) Source #
Binary (HieArgs TypeIndex) # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> HieArgs TypeIndex -> IO () Source # put :: BinHandle -> HieArgs TypeIndex -> IO (Bin (HieArgs TypeIndex)) Source # get :: BinHandle -> IO (HieArgs TypeIndex) Source #
Binary (HieType TypeIndex) # |
Instance details Defined in GHC.Iface.Ext.Types Methods put_ :: BinHandle -> HieType TypeIndex -> IO () Source # put :: BinHandle -> HieType TypeIndex -> IO (Bin (HieType TypeIndex)) Source # get :: BinHandle -> IO (HieType TypeIndex) Source #
(Binary a, Binary b) => Binary (Either a b) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Either a b -> IO () Source # put :: BinHandle -> Either a b -> IO (Bin (Either a b)) Source # get :: BinHandle -> IO (Either a b) Source #
Typeable a => Binary (TypeRep a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> TypeRep a -> IO () Source # put :: BinHandle -> TypeRep a -> IO (Bin (TypeRep a)) Source # get :: BinHandle -> IO (TypeRep a) Source #
(Binary a, Binary b) => Binary (a, b) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> (a, b) -> IO () Source # put :: BinHandle -> (a, b) -> IO (Bin (a, b)) Source # get :: BinHandle -> IO (a, b) Source #
(Ix a, Binary a, Binary b) => Binary (Array a b) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Array a b -> IO () Source # put :: BinHandle -> Array a b -> IO (Bin (Array a b)) Source # get :: BinHandle -> IO (Array a b) Source #
Binary (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Bin a -> IO () Source # put :: BinHandle -> Bin a -> IO (Bin (Bin a)) Source # get :: BinHandle -> IO (Bin a) Source #
(Binary tv, Binary vis) => Binary (VarBndr tv vis) # |
Instance details Defined in GHC.Types.Var Methods put_ :: BinHandle -> VarBndr tv vis -> IO () Source # put :: BinHandle -> VarBndr tv vis -> IO (Bin (VarBndr tv vis)) Source # get :: BinHandle -> IO (VarBndr tv vis) Source #
(Binary a, Binary b, Binary c) => Binary (a, b, c) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> (a, b, c) -> IO () Source # put :: BinHandle -> (a, b, c) -> IO (Bin (a, b, c)) Source # get :: BinHandle -> IO (a, b, c) Source #
(Binary a, Binary b, Binary c, Binary d) => Binary (a, b, c, d) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> (a, b, c, d) -> IO () Source # put :: BinHandle -> (a, b, c, d) -> IO (Bin (a, b, c, d)) Source # get :: BinHandle -> IO (a, b, c, d) Source #
(Binary a, Binary b, Binary c, Binary d, Binary e) => Binary (a, b, c, d, e) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> (a, b, c, d, e) -> IO () Source # put :: BinHandle -> (a, b, c, d, e) -> IO (Bin (a, b, c, d, e)) Source # get :: BinHandle -> IO (a, b, c, d, e) Source #
(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f) => Binary (a, b, c, d, e, f) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> (a, b, c, d, e, f) -> IO () Source # put :: BinHandle -> (a, b, c, d, e, f) -> IO (Bin (a, b, c, d, e, f)) Source # get :: BinHandle -> IO (a, b, c, d, e, f) Source #
(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g) => Binary (a, b, c, d, e, f, g) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> (a, b, c, d, e, f, g) -> IO () Source # put :: BinHandle -> (a, b, c, d, e, f, g) -> IO (Bin (a, b, c, d, e, f, g)) Source # get :: BinHandle -> IO (a, b, c, d, e, f, g) Source #

data BinHandle Source #

type SymbolTable = Array Int Name Source #

type Dictionary = Array Int FastString Source #

data BinData Source #

Constructors

BinData Int BinArray |

#### Instances

Instances details

NFData BinData # |
Instance details Defined in GHC.Utils.Binary Methods rnf :: BinData -> () Source #
Binary BinData # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> BinData -> IO () Source # put :: BinHandle -> BinData -> IO (Bin BinData) Source # get :: BinHandle -> IO BinData Source #

dataHandle :: BinData -> IO BinHandle Source #

handleData :: BinHandle -> IO BinData Source #

openBinMem :: Int -> IO BinHandle Source #

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

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

castBin :: Bin a -> Bin b Source #

withBinBuffer :: BinHandle -> (ByteString -> IO a) -> IO a Source #

Get access to the underlying buffer.

It is quite important that no references to the `ByteString` leak out of the continuation lest terrible things happen.

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

readBinMem :: FilePath -> IO BinHandle Source #

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

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

# For writing instances

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

getByte :: BinHandle -> IO Word8 Source #

# Variable length encodings

putULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> a -> IO () Source #

getULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> IO a Source #

putSLEB128 :: forall a. (Integral a, Bits a) => BinHandle -> a -> IO () Source #

getSLEB128 :: forall a. (Show a, Integral a, FiniteBits a) => BinHandle -> IO a Source #

# Fixed length encoding

newtype FixedLengthEncoding a Source #

Encode the argument in it's full length. This is different from many default binary instances which make no guarantee about the actual encoding and might do things use variable length encoding.

Constructors

FixedLengthEncoding |
Fields unFixedLength :: a

#### Instances

Instances details

Binary (FixedLengthEncoding Word8) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FixedLengthEncoding Word8 -> IO () Source # put :: BinHandle -> FixedLengthEncoding Word8 -> IO (Bin (FixedLengthEncoding Word8)) Source # get :: BinHandle -> IO (FixedLengthEncoding Word8) Source #
Binary (FixedLengthEncoding Word16) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FixedLengthEncoding Word16 -> IO () Source # put :: BinHandle -> FixedLengthEncoding Word16 -> IO (Bin (FixedLengthEncoding Word16)) Source # get :: BinHandle -> IO (FixedLengthEncoding Word16) Source #
Binary (FixedLengthEncoding Word32) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FixedLengthEncoding Word32 -> IO () Source # put :: BinHandle -> FixedLengthEncoding Word32 -> IO (Bin (FixedLengthEncoding Word32)) Source # get :: BinHandle -> IO (FixedLengthEncoding Word32) Source #
Binary (FixedLengthEncoding Word64) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FixedLengthEncoding Word64 -> IO () Source # put :: BinHandle -> FixedLengthEncoding Word64 -> IO (Bin (FixedLengthEncoding Word64)) Source # get :: BinHandle -> IO (FixedLengthEncoding Word64) Source #

# Lazy Binary I/O

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

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

# User data

data UserData Source #

Information we keep around during interface file serialization/deserialization. Namely we keep the functions for serializing and deserializing `Name`s and `FastString`s. We do this because we actually use serialization in two distinct settings,

- When serializing interface files themselves
- When computing the fingerprint of an IfaceDecl (which we computing by hashing its Binary serialization)

These two settings have different needs while serializing Names:

- Names in interface files are serialized via a symbol table (see Note [Symbol table representation of names] in GHC.Iface.Binary).
- During fingerprinting a binding Name is serialized as the OccName and a non-binding Name is serialized as the fingerprint of the thing they represent. See Note [Fingerprinting IfaceDecls] for further discussion.

Constructors

UserData |
Fields ud_get_name :: BinHandle -> IO Name ud_get_fs :: BinHandle -> IO FastString ud_put_nonbinding_name :: BinHandle -> Name -> IO () serialize a non-binding `Name` (e.g. a reference to another binding). ud_put_binding_name :: BinHandle -> Name -> IO () serialize a binding `Name` (e.g. the name of an IfaceDecl) ud_put_fs :: BinHandle -> FastString -> IO ()

getUserData :: BinHandle -> UserData Source #

setUserData :: BinHandle -> UserData -> BinHandle Source #

newReadState Source #

Arguments

:: (BinHandle -> IO Name) | how to deserialize `Name`s
-> (BinHandle -> IO FastString) |
-> UserData |

newWriteState Source #

Arguments

:: (BinHandle -> Name -> IO ()) | how to serialize non-binding `Name`s
-> (BinHandle -> Name -> IO ()) | how to serialize binding `Name`s
-> (BinHandle -> FastString -> IO ()) |
-> UserData |

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

getDictionary :: BinHandle -> IO Dictionary Source #

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