ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Utils.Binary

Contents

- For writing instances
- Variable length encodings
- Fixed length encoding
- Lazy Binary I/O
- User data
- Binary Readers & Writers
- Tables
- String table ("dictionary")
- Generic deduplication table
- Newtype wrappers
- Newtypes for types that have canonically more than one valid encoding

Synopsis

- data Bin (a :: k)
- data RelBin (a :: k) = RelBin {
  - relBin_anchor :: !(Bin a)
  - relBin_offset :: !(RelBinPtr a)
  }
- getRelBin :: forall {k} (a :: k). ReadBinHandle -> IO (RelBin a)
- class Binary a where
  - put_ :: WriteBinHandle -> a -> IO ()
  - put :: WriteBinHandle -> a -> IO (Bin a)
  - get :: ReadBinHandle -> IO a
- data ReadBinHandle
- data WriteBinHandle
- type SymbolTable a = Array Int a
- type Dictionary = SymbolTable FastString
- data BinData = BinData Int BinArray
- dataHandle :: BinData -> IO ReadBinHandle
- handleData :: WriteBinHandle -> IO BinData
- unsafeUnpackBinBuffer :: ByteString -> IO ReadBinHandle
- openBinMem :: Int -> IO WriteBinHandle
- seekBinWriter :: forall {k} (a :: k). WriteBinHandle -> Bin a -> IO ()
- seekBinReader :: forall {k} (a :: k). ReadBinHandle -> Bin a -> IO ()
- seekBinReaderRel :: forall {k} (a :: k). ReadBinHandle -> RelBin a -> IO ()
- tellBinReader :: forall {k} (a :: k). ReadBinHandle -> IO (Bin a)
- tellBinWriter :: forall {k} (a :: k). WriteBinHandle -> IO (Bin a)
- castBin :: forall {k1} {k2} (a :: k1) (b :: k2). Bin a -> Bin b
- withBinBuffer :: WriteBinHandle -> (ByteString -> IO a) -> IO a
- freezeWriteHandle :: WriteBinHandle -> IO ReadBinHandle
- shrinkBinBuffer :: WriteBinHandle -> IO ReadBinHandle
- thawReadHandle :: ReadBinHandle -> IO WriteBinHandle
- foldGet :: Binary a => Word -> ReadBinHandle -> b -> (Word -> a -> b -> IO b) -> IO b
- foldGet' :: Binary a => Word -> ReadBinHandle -> b -> (Word -> a -> b -> IO b) -> IO b
- writeBinMem :: WriteBinHandle -> FilePath -> IO ()
- readBinMem :: FilePath -> IO ReadBinHandle
- readBinMemN :: Int -> FilePath -> IO (Maybe ReadBinHandle)
- putAt :: Binary a => WriteBinHandle -> Bin a -> a -> IO ()
- getAt :: Binary a => ReadBinHandle -> Bin a -> IO a
- putAtRel :: forall {k} (a :: k). WriteBinHandle -> Bin (RelBinPtr a) -> Bin a -> IO ()
- forwardPut :: WriteBinHandle -> (b -> IO a) -> IO b -> IO (a, b)
- forwardPut_ :: WriteBinHandle -> (b -> IO a) -> IO b -> IO ()
- forwardGet :: ReadBinHandle -> IO a -> IO a
- forwardPutRel :: WriteBinHandle -> (b -> IO a) -> IO b -> IO (a, b)
- forwardPutRel_ :: WriteBinHandle -> (b -> IO a) -> IO b -> IO ()
- forwardGetRel :: ReadBinHandle -> IO a -> IO a
- putByte :: WriteBinHandle -> Word8 -> IO ()
- getByte :: ReadBinHandle -> IO Word8
- putByteString :: WriteBinHandle -> ByteString -> IO ()
- getByteString :: ReadBinHandle -> Int -> IO ByteString
- putULEB128 :: (Integral a, FiniteBits a) => WriteBinHandle -> a -> IO ()
- getULEB128 :: (Integral a, FiniteBits a) => ReadBinHandle -> IO a
- putSLEB128 :: (Integral a, Bits a) => WriteBinHandle -> a -> IO ()
- getSLEB128 :: (Show a, Integral a, FiniteBits a) => ReadBinHandle -> IO a
- newtype FixedLengthEncoding a = FixedLengthEncoding {
  - unFixedLength :: a
  }
- lazyGet :: Binary a => ReadBinHandle -> IO a
- lazyPut :: Binary a => WriteBinHandle -> a -> IO ()
- lazyGet' :: (ReadBinHandle -> IO a) -> ReadBinHandle -> IO a
- lazyPut' :: (WriteBinHandle -> a -> IO ()) -> WriteBinHandle -> a -> IO ()
- lazyGetMaybe :: Binary a => ReadBinHandle -> IO (Maybe a)
- lazyPutMaybe :: Binary a => WriteBinHandle -> Maybe a -> IO ()
- data ReaderUserData
- getReaderUserData :: ReadBinHandle -> ReaderUserData
- setReaderUserData :: ReadBinHandle -> ReaderUserData -> ReadBinHandle
- noReaderUserData :: ReaderUserData
- data WriterUserData
- getWriterUserData :: WriteBinHandle -> WriterUserData
- setWriterUserData :: WriteBinHandle -> WriterUserData -> WriteBinHandle
- noWriterUserData :: WriterUserData
- mkWriterUserData :: [SomeBinaryWriter] -> WriterUserData
- mkReaderUserData :: [SomeBinaryReader] -> ReaderUserData
- newReadState :: (ReadBinHandle -> IO Name) -> (ReadBinHandle -> IO FastString) -> ReaderUserData
- newWriteState :: (WriteBinHandle -> Name -> IO ()) -> (WriteBinHandle -> Name -> IO ()) -> (WriteBinHandle -> FastString -> IO ()) -> WriterUserData
- addReaderToUserData :: Typeable a => BinaryReader a -> ReadBinHandle -> ReadBinHandle
- addWriterToUserData :: Typeable a => BinaryWriter a -> WriteBinHandle -> WriteBinHandle
- findUserDataReader :: Typeable a => Proxy a -> ReadBinHandle -> BinaryReader a
- findUserDataWriter :: Typeable a => Proxy a -> WriteBinHandle -> BinaryWriter a
- newtype BinaryReader s = BinaryReader {
  - getEntry :: ReadBinHandle -> IO s
  }
- newtype BinaryWriter s = BinaryWriter {
  - putEntry :: WriteBinHandle -> s -> IO ()
  }
- mkWriter :: (WriteBinHandle -> s -> IO ()) -> BinaryWriter s
- mkReader :: (ReadBinHandle -> IO s) -> BinaryReader s
- data SomeBinaryReader
- data SomeBinaryWriter
- mkSomeBinaryReader :: Typeable a => BinaryReader a -> SomeBinaryReader
- mkSomeBinaryWriter :: Typeable a => BinaryWriter a -> SomeBinaryWriter
- data ReaderTable a = ReaderTable {
  - getTable :: ReadBinHandle -> IO (SymbolTable a)
  - mkReaderFromTable :: SymbolTable a -> BinaryReader a
  }
- newtype WriterTable = WriterTable {
  - putTable :: WriteBinHandle -> IO Int
  }
- initFastStringReaderTable :: IO (ReaderTable FastString)
- initFastStringWriterTable :: IO (WriterTable, BinaryWriter FastString)
- putDictionary :: WriteBinHandle -> Int -> UniqFM FastString (Int, FastString) -> IO ()
- getDictionary :: ReadBinHandle -> IO Dictionary
- putFS :: WriteBinHandle -> FastString -> IO ()
- data FSTable = FSTable {
  - fs_tab_next :: !FastMutInt
  - fs_tab_map :: !(IORef (UniqFM FastString (Int, FastString)))
  }
- getDictFastString :: Dictionary -> ReadBinHandle -> IO FastString
- putDictFastString :: FSTable -> WriteBinHandle -> FastString -> IO ()
- data GenericSymbolTable (m :: Type -> Type) = GenericSymbolTable {
  - gen_symtab_next :: !FastMutInt
  - gen_symtab_map :: !(IORef (m Int))
  - gen_symtab_to_write :: !(IORef [Key m])
  }
- initGenericSymbolTable :: forall (m :: Type -> Type). TrieMap m => IO (GenericSymbolTable m)
- getGenericSymtab :: Binary a => SymbolTable a -> ReadBinHandle -> IO a
- putGenericSymTab :: forall (m :: Type -> Type). TrieMap m => GenericSymbolTable m -> WriteBinHandle -> Key m -> IO ()
- getGenericSymbolTable :: (ReadBinHandle -> IO a) -> ReadBinHandle -> IO (SymbolTable a)
- putGenericSymbolTable :: forall (m :: Type -> Type). TrieMap m => GenericSymbolTable m -> (WriteBinHandle -> Key m -> IO ()) -> WriteBinHandle -> IO Int
- newtype BinSpan = BinSpan {
  - unBinSpan :: RealSrcSpan
  }
- newtype BinSrcSpan = BinSrcSpan {
  - unBinSrcSpan :: SrcSpan
  }
- newtype BinLocated a = BinLocated {
  - unBinLocated :: Located a
  }
- newtype BindingName = BindingName {
  - getBindingName :: Name
  }
- simpleBindingNameWriter :: BinaryWriter Name -> BinaryWriter BindingName
- simpleBindingNameReader :: BinaryReader Name -> BinaryReader BindingName
- data FullBinData = FullBinData {
  - fbd_readerUserData :: ReaderUserData
  - fbd_off_s :: !Int
  - fbd_off_e :: !Int
  - fbd_size :: !Int
  - fbd_buffer :: !BinArray
  }
- freezeBinHandle :: forall {k} (a :: k). ReadBinHandle -> Bin a -> IO FullBinData
- thawBinHandle :: FullBinData -> IO ReadBinHandle
- putFullBinData :: WriteBinHandle -> FullBinData -> IO ()
- type BinArray = ForeignPtr Word8

# Documentation

data Bin (a :: k) Source #

#### Instances

Instances details

Bounded (Bin a) Source # |
Instance details Defined in GHC.Utils.Binary Methods minBound :: Bin a Source # maxBound :: Bin a Source #
Show (Bin a) Source # |
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) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Bin a -> IO () Source # put :: WriteBinHandle -> Bin a -> IO (Bin (Bin a)) Source # get :: ReadBinHandle -> IO (Bin a) Source #
Eq (Bin a) Source # |
Instance details Defined in GHC.Utils.Binary Methods (==) :: Bin a -> Bin a -> Bool Source # (/=) :: Bin a -> Bin a -> Bool Source #
Ord (Bin a) Source # |
Instance details Defined in GHC.Utils.Binary Methods compare :: Bin a -> Bin a -> Ordering Source # (<) :: Bin a -> Bin a -> Bool Source # (<=) :: Bin a -> Bin a -> Bool Source # (>) :: Bin a -> Bin a -> Bool Source # (>=) :: Bin a -> Bin a -> Bool Source # max :: Bin a -> Bin a -> Bin a Source # min :: Bin a -> Bin a -> Bin a Source #

data RelBin (a :: k) Source #

Like a `Bin` but is used to store relative offset pointers. Relative offset pointers store a relative location, but also contain an anchor that allow to obtain the absolute offset.

Constructors

RelBin |

Fields

- relBin_anchor :: !(Bin a)

  Absolute position from where we read `relBin_offset`.

- relBin_offset :: !(RelBinPtr a)

  Relative offset to `relBin_anchor`. The absolute position of the `RelBin` is `relBin_anchor + relBin_offset`

#### Instances

Instances details

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

getRelBin :: forall {k} (a :: k). ReadBinHandle -> IO (RelBin a) Source #

Read a relative offset location and wrap it in `RelBin`.

The resulting `RelBin` can be translated into an absolute offset location using `makeAbsoluteBin`

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_ :: WriteBinHandle -> a -> IO () Source #

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

get :: ReadBinHandle -> IO a Source #

#### Instances

Instances details

Binary ByteString Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> ByteString -> IO () Source # put :: WriteBinHandle -> ByteString -> IO (Bin ByteString) Source # get :: ReadBinHandle -> IO ByteString Source #
Binary SomeTypeRep Source # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> SomeTypeRep -> IO () Source # put :: WriteBinHandle -> SomeTypeRep -> IO (Bin SomeTypeRep) Source # get :: ReadBinHandle -> IO SomeTypeRep Source #
Binary Fingerprint Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Fingerprint -> IO () Source # put :: WriteBinHandle -> Fingerprint -> IO (Bin Fingerprint) Source # get :: ReadBinHandle -> IO Fingerprint Source #
Binary Int16 Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int16 -> IO () Source # put :: WriteBinHandle -> Int16 -> IO (Bin Int16) Source # get :: ReadBinHandle -> IO Int16 Source #
Binary Int32 Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int32 -> IO () Source # put :: WriteBinHandle -> Int32 -> IO (Bin Int32) Source # get :: ReadBinHandle -> IO Int32 Source #
Binary Int64 Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int64 -> IO () Source # put :: WriteBinHandle -> Int64 -> IO (Bin Int64) Source # get :: ReadBinHandle -> IO Int64 Source #
Binary Int8 Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int8 -> IO () Source # put :: WriteBinHandle -> Int8 -> IO (Bin Int8) Source # get :: ReadBinHandle -> IO Int8 Source #
Binary Word16 Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Word16 -> IO () Source # put :: WriteBinHandle -> Word16 -> IO (Bin Word16) Source # get :: ReadBinHandle -> IO Word16 Source #
Binary Word32 Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Word32 -> IO () Source # put :: WriteBinHandle -> Word32 -> IO (Bin Word32) Source # get :: ReadBinHandle -> IO Word32 Source #
Binary Word64 Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Word64 -> IO () Source # put :: WriteBinHandle -> Word64 -> IO (Bin Word64) Source # get :: ReadBinHandle -> IO Word64 Source #
Binary Word8 Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Word8 -> IO () Source # put :: WriteBinHandle -> Word8 -> IO (Bin Word8) Source # get :: ReadBinHandle -> IO Word8 Source #
Binary IsOrphan Source # |
Instance details Defined in GHC.Core Methods put_ :: WriteBinHandle -> IsOrphan -> IO () Source # put :: WriteBinHandle -> IsOrphan -> IO (Bin IsOrphan) Source # get :: ReadBinHandle -> IO IsOrphan Source #
Binary StrictnessMark Source # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: WriteBinHandle -> StrictnessMark -> IO () Source # put :: WriteBinHandle -> StrictnessMark -> IO (Bin StrictnessMark) Source # get :: ReadBinHandle -> IO StrictnessMark Source #
Binary CallerCcFilter Source # |
Instance details Defined in GHC.Core.Opt.CallerCC.Types Methods put_ :: WriteBinHandle -> CallerCcFilter -> IO () Source # put :: WriteBinHandle -> CallerCcFilter -> IO (Bin CallerCcFilter) Source # get :: ReadBinHandle -> IO CallerCcFilter Source #
Binary NamePattern Source # |
Instance details Defined in GHC.Core.Opt.CallerCC.Types Methods put_ :: WriteBinHandle -> NamePattern -> IO () Source # put :: WriteBinHandle -> NamePattern -> IO (Bin NamePattern) Source # get :: ReadBinHandle -> IO NamePattern Source #
Binary CoSel Source # |
Instance details Defined in GHC.Core.TyCo.Rep Methods put_ :: WriteBinHandle -> CoSel -> IO () Source # put :: WriteBinHandle -> CoSel -> IO (Bin CoSel) Source # get :: ReadBinHandle -> IO CoSel Source #
Binary UnivCoProvenance Source # |
Instance details Defined in GHC.Core.TyCo.Rep Methods put_ :: WriteBinHandle -> UnivCoProvenance -> IO () Source # put :: WriteBinHandle -> UnivCoProvenance -> IO (Bin UnivCoProvenance) Source # get :: ReadBinHandle -> IO UnivCoProvenance Source #
Binary Injectivity Source # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: WriteBinHandle -> Injectivity -> IO () Source # put :: WriteBinHandle -> Injectivity -> IO (Bin Injectivity) Source # get :: ReadBinHandle -> IO Injectivity Source #
Binary PrimElemRep Source # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: WriteBinHandle -> PrimElemRep -> IO () Source # put :: WriteBinHandle -> PrimElemRep -> IO (Bin PrimElemRep) Source # get :: ReadBinHandle -> IO PrimElemRep Source #
Binary PrimRep Source # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: WriteBinHandle -> PrimRep -> IO () Source # put :: WriteBinHandle -> PrimRep -> IO (Bin PrimRep) Source # get :: ReadBinHandle -> IO PrimRep Source #
Binary TyConBndrVis Source # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: WriteBinHandle -> TyConBndrVis -> IO () Source # put :: WriteBinHandle -> TyConBndrVis -> IO (Bin TyConBndrVis) Source # get :: ReadBinHandle -> IO TyConBndrVis Source #
Binary FastString Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FastString -> IO () Source # put :: WriteBinHandle -> FastString -> IO (Bin FastString) Source # get :: ReadBinHandle -> IO FastString Source #
Binary LexicalFastString Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> LexicalFastString -> IO () Source # put :: WriteBinHandle -> LexicalFastString -> IO (Bin LexicalFastString) Source # get :: ReadBinHandle -> IO LexicalFastString Source #
Binary NonDetFastString Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> NonDetFastString -> IO () Source # put :: WriteBinHandle -> NonDetFastString -> IO (Bin NonDetFastString) Source # get :: ReadBinHandle -> IO NonDetFastString Source #
Binary Language Source # |
Instance details Defined in GHC.Driver.Flags Methods put_ :: WriteBinHandle -> Language -> IO () Source # put :: WriteBinHandle -> Language -> IO (Bin Language) Source # get :: ReadBinHandle -> IO Language Source #
Binary DocStructureItem Source # |
Instance details Defined in GHC.Hs.Doc Methods put_ :: WriteBinHandle -> DocStructureItem -> IO () Source # put :: WriteBinHandle -> DocStructureItem -> IO (Bin DocStructureItem) Source # get :: ReadBinHandle -> IO DocStructureItem Source #
Binary Docs Source # |
Instance details Defined in GHC.Hs.Doc Methods put_ :: WriteBinHandle -> Docs -> IO () Source # put :: WriteBinHandle -> Docs -> IO (Bin Docs) Source # get :: ReadBinHandle -> IO Docs Source #
Binary HsDocString Source # |
Instance details Defined in GHC.Hs.DocString Methods put_ :: WriteBinHandle -> HsDocString -> IO () Source # put :: WriteBinHandle -> HsDocString -> IO (Bin HsDocString) Source # get :: ReadBinHandle -> IO HsDocString Source #
Binary HsDocStringChunk Source # |
Instance details Defined in GHC.Hs.DocString Methods put_ :: WriteBinHandle -> HsDocStringChunk -> IO () Source # put :: WriteBinHandle -> HsDocStringChunk -> IO (Bin HsDocStringChunk) Source # get :: ReadBinHandle -> IO HsDocStringChunk Source #
Binary HsDocStringDecorator Source # |
Instance details Defined in GHC.Hs.DocString Methods put_ :: WriteBinHandle -> HsDocStringDecorator -> IO () Source # put :: WriteBinHandle -> HsDocStringDecorator -> IO (Bin HsDocStringDecorator) Source # get :: ReadBinHandle -> IO HsDocStringDecorator Source #
Binary ExtensibleFields Source # |
Instance details Defined in GHC.Iface.Ext.Fields Methods put_ :: WriteBinHandle -> ExtensibleFields -> IO () Source # put :: WriteBinHandle -> ExtensibleFields -> IO (Bin ExtensibleFields) Source # get :: ReadBinHandle -> IO ExtensibleFields Source #
Binary IfGuidance Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfGuidance -> IO () Source # put :: WriteBinHandle -> IfGuidance -> IO (Bin IfGuidance) Source # get :: ReadBinHandle -> IO IfGuidance Source #
Binary IfaceAT Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceAT -> IO () Source # put :: WriteBinHandle -> IfaceAT -> IO (Bin IfaceAT) Source # get :: ReadBinHandle -> IO IfaceAT Source #
Binary IfaceAlt Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceAlt -> IO () Source # put :: WriteBinHandle -> IfaceAlt -> IO (Bin IfaceAlt) Source # get :: ReadBinHandle -> IO IfaceAlt Source #
Binary IfaceAnnotation Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceAnnotation -> IO () Source # put :: WriteBinHandle -> IfaceAnnotation -> IO (Bin IfaceAnnotation) Source # get :: ReadBinHandle -> IO IfaceAnnotation Source #
Binary IfaceAxBranch Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceAxBranch -> IO () Source # put :: WriteBinHandle -> IfaceAxBranch -> IO (Bin IfaceAxBranch) Source # get :: ReadBinHandle -> IO IfaceAxBranch Source #
Binary IfaceBang Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceBang -> IO () Source # put :: WriteBinHandle -> IfaceBang -> IO (Bin IfaceBang) Source # get :: ReadBinHandle -> IO IfaceBang Source #
Binary IfaceBooleanFormula Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceBooleanFormula -> IO () Source # put :: WriteBinHandle -> IfaceBooleanFormula -> IO (Bin IfaceBooleanFormula) Source # get :: ReadBinHandle -> IO IfaceBooleanFormula Source #
Binary IfaceClassOp Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceClassOp -> IO () Source # put :: WriteBinHandle -> IfaceClassOp -> IO (Bin IfaceClassOp) Source # get :: ReadBinHandle -> IO IfaceClassOp Source #
Binary IfaceClsInst Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceClsInst -> IO () Source # put :: WriteBinHandle -> IfaceClsInst -> IO (Bin IfaceClsInst) Source # get :: ReadBinHandle -> IO IfaceClsInst Source #
Binary IfaceCompleteMatch Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceCompleteMatch -> IO () Source # put :: WriteBinHandle -> IfaceCompleteMatch -> IO (Bin IfaceCompleteMatch) Source # get :: ReadBinHandle -> IO IfaceCompleteMatch Source #
Binary IfaceConAlt Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceConAlt -> IO () Source # put :: WriteBinHandle -> IfaceConAlt -> IO (Bin IfaceConAlt) Source # get :: ReadBinHandle -> IO IfaceConAlt Source #
Binary IfaceConDecl Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceConDecl -> IO () Source # put :: WriteBinHandle -> IfaceConDecl -> IO (Bin IfaceConDecl) Source # get :: ReadBinHandle -> IO IfaceConDecl Source #
Binary IfaceConDecls Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceConDecls -> IO () Source # put :: WriteBinHandle -> IfaceConDecls -> IO (Bin IfaceConDecls) Source # get :: ReadBinHandle -> IO IfaceConDecls Source #
Binary IfaceDecl Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceDecl -> IO () Source # put :: WriteBinHandle -> IfaceDecl -> IO (Bin IfaceDecl) Source # get :: ReadBinHandle -> IO IfaceDecl Source #
Binary IfaceDefault Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceDefault -> IO () Source # put :: WriteBinHandle -> IfaceDefault -> IO (Bin IfaceDefault) Source # get :: ReadBinHandle -> IO IfaceDefault Source #
Binary IfaceExpr Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceExpr -> IO () Source # put :: WriteBinHandle -> IfaceExpr -> IO (Bin IfaceExpr) Source # get :: ReadBinHandle -> IO IfaceExpr Source #
Binary IfaceFamInst Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceFamInst -> IO () Source # put :: WriteBinHandle -> IfaceFamInst -> IO (Bin IfaceFamInst) Source # get :: ReadBinHandle -> IO IfaceFamInst Source #
Binary IfaceFamTyConFlav Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceFamTyConFlav -> IO () Source # put :: WriteBinHandle -> IfaceFamTyConFlav -> IO (Bin IfaceFamTyConFlav) Source # get :: ReadBinHandle -> IO IfaceFamTyConFlav Source #
Binary IfaceIdDetails Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceIdDetails -> IO () Source # put :: WriteBinHandle -> IfaceIdDetails -> IO (Bin IfaceIdDetails) Source # get :: ReadBinHandle -> IO IfaceIdDetails Source #
Binary IfaceInfoItem Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceInfoItem -> IO () Source # put :: WriteBinHandle -> IfaceInfoItem -> IO (Bin IfaceInfoItem) Source # get :: ReadBinHandle -> IO IfaceInfoItem Source #
Binary IfaceLFInfo Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceLFInfo -> IO () Source # put :: WriteBinHandle -> IfaceLFInfo -> IO (Bin IfaceLFInfo) Source # get :: ReadBinHandle -> IO IfaceLFInfo Source #
Binary IfaceLetBndr Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceLetBndr -> IO () Source # put :: WriteBinHandle -> IfaceLetBndr -> IO (Bin IfaceLetBndr) Source # get :: ReadBinHandle -> IO IfaceLetBndr Source #
Binary IfaceMaybeRhs Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceMaybeRhs -> IO () Source # put :: WriteBinHandle -> IfaceMaybeRhs -> IO (Bin IfaceMaybeRhs) Source # get :: ReadBinHandle -> IO IfaceMaybeRhs Source #
Binary IfaceRule Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceRule -> IO () Source # put :: WriteBinHandle -> IfaceRule -> IO (Bin IfaceRule) Source # get :: ReadBinHandle -> IO IfaceRule Source #
Binary IfaceSrcBang Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceSrcBang -> IO () Source # put :: WriteBinHandle -> IfaceSrcBang -> IO (Bin IfaceSrcBang) Source # get :: ReadBinHandle -> IO IfaceSrcBang Source #
Binary IfaceStringLiteral Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceStringLiteral -> IO () Source # put :: WriteBinHandle -> IfaceStringLiteral -> IO (Bin IfaceStringLiteral) Source # get :: ReadBinHandle -> IO IfaceStringLiteral Source #
Binary IfaceTickish Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceTickish -> IO () Source # put :: WriteBinHandle -> IfaceTickish -> IO (Bin IfaceTickish) Source # get :: ReadBinHandle -> IO IfaceTickish Source #
Binary IfaceTopBndrInfo Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceTopBndrInfo -> IO () Source # put :: WriteBinHandle -> IfaceTopBndrInfo -> IO (Bin IfaceTopBndrInfo) Source # get :: ReadBinHandle -> IO IfaceTopBndrInfo Source #
Binary IfaceTyConParent Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceTyConParent -> IO () Source # put :: WriteBinHandle -> IfaceTyConParent -> IO (Bin IfaceTyConParent) Source # get :: ReadBinHandle -> IO IfaceTyConParent Source #
Binary IfaceUnfolding Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceUnfolding -> IO () Source # put :: WriteBinHandle -> IfaceUnfolding -> IO (Bin IfaceUnfolding) Source # get :: ReadBinHandle -> IO IfaceUnfolding Source #
Binary IfaceWarningTxt Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceWarningTxt -> IO () Source # put :: WriteBinHandle -> IfaceWarningTxt -> IO (Bin IfaceWarningTxt) Source # get :: ReadBinHandle -> IO IfaceWarningTxt Source #
Binary IfaceWarnings Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceWarnings -> IO () Source # put :: WriteBinHandle -> IfaceWarnings -> IO (Bin IfaceWarnings) Source # get :: ReadBinHandle -> IO IfaceWarnings Source #
Binary IfLclName Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfLclName -> IO () Source # put :: WriteBinHandle -> IfLclName -> IO (Bin IfLclName) Source # get :: ReadBinHandle -> IO IfLclName Source #
Binary IfaceAppArgs Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceAppArgs -> IO () Source # put :: WriteBinHandle -> IfaceAppArgs -> IO (Bin IfaceAppArgs) Source # get :: ReadBinHandle -> IO IfaceAppArgs Source #
Binary IfaceAxiomRule Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceAxiomRule -> IO () Source # put :: WriteBinHandle -> IfaceAxiomRule -> IO (Bin IfaceAxiomRule) Source # get :: ReadBinHandle -> IO IfaceAxiomRule Source #
Binary IfaceBndr Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceBndr -> IO () Source # put :: WriteBinHandle -> IfaceBndr -> IO (Bin IfaceBndr) Source # get :: ReadBinHandle -> IO IfaceBndr Source #
Binary IfaceCoercion Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceCoercion -> IO () Source # put :: WriteBinHandle -> IfaceCoercion -> IO (Bin IfaceCoercion) Source # get :: ReadBinHandle -> IO IfaceCoercion Source #
Binary IfaceMCoercion Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceMCoercion -> IO () Source # put :: WriteBinHandle -> IfaceMCoercion -> IO (Bin IfaceMCoercion) Source # get :: ReadBinHandle -> IO IfaceMCoercion Source #
Binary IfaceOneShot Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceOneShot -> IO () Source # put :: WriteBinHandle -> IfaceOneShot -> IO (Bin IfaceOneShot) Source # get :: ReadBinHandle -> IO IfaceOneShot Source #
Binary IfaceTyCon Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceTyCon -> IO () Source # put :: WriteBinHandle -> IfaceTyCon -> IO (Bin IfaceTyCon) Source # get :: ReadBinHandle -> IO IfaceTyCon Source #
Binary IfaceTyConInfo Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceTyConInfo -> IO () Source # put :: WriteBinHandle -> IfaceTyConInfo -> IO (Bin IfaceTyConInfo) Source # get :: ReadBinHandle -> IO IfaceTyConInfo Source #
Binary IfaceTyConSort Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceTyConSort -> IO () Source # put :: WriteBinHandle -> IfaceTyConSort -> IO (Bin IfaceTyConSort) Source # get :: ReadBinHandle -> IO IfaceTyConSort Source #
Binary IfaceTyLit Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceTyLit -> IO () Source # put :: WriteBinHandle -> IfaceTyLit -> IO (Bin IfaceTyLit) Source # get :: ReadBinHandle -> IO IfaceTyLit Source #
Binary IfaceType Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceType -> IO () Source # put :: WriteBinHandle -> IfaceType -> IO (Bin IfaceType) Source # get :: ReadBinHandle -> IO IfaceType Source #
Binary Ident Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> Ident -> IO () Source # put :: WriteBinHandle -> Ident -> IO (Bin Ident) Source # get :: ReadBinHandle -> IO Ident Source #
Binary AOp Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> AOp -> IO () Source # put :: WriteBinHandle -> AOp -> IO (Bin AOp) Source # get :: ReadBinHandle -> IO AOp Source #
Binary JExpr Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JExpr -> IO () Source # put :: WriteBinHandle -> JExpr -> IO (Bin JExpr) Source # get :: ReadBinHandle -> IO JExpr Source #
Binary JStat Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JStat -> IO () Source # put :: WriteBinHandle -> JStat -> IO (Bin JStat) Source # get :: ReadBinHandle -> IO JStat Source #
Binary JVal Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JVal -> IO () Source # put :: WriteBinHandle -> JVal -> IO (Bin JVal) Source # get :: ReadBinHandle -> IO JVal Source #
Binary Op Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> Op -> IO () Source # put :: WriteBinHandle -> Op -> IO (Bin Op) Source # get :: ReadBinHandle -> IO Op Source #
Binary UOp Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> UOp -> IO () Source # put :: WriteBinHandle -> UOp -> IO (Bin UOp) Source # get :: ReadBinHandle -> IO UOp Source #
Binary Serialized Source # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> Serialized -> IO () Source # put :: WriteBinHandle -> Serialized -> IO (Bin Serialized) Source # get :: ReadBinHandle -> IO Serialized Source #
Binary TagInfo Source # |
Instance details Defined in GHC.Stg.InferTags.TagSig Methods put_ :: WriteBinHandle -> TagInfo -> IO () Source # put :: WriteBinHandle -> TagInfo -> IO (Bin TagInfo) Source # get :: ReadBinHandle -> IO TagInfo Source #
Binary TagSig Source # |
Instance details Defined in GHC.Stg.InferTags.TagSig Methods put_ :: WriteBinHandle -> TagSig -> IO () Source # put :: WriteBinHandle -> TagSig -> IO (Bin TagSig) Source # get :: ReadBinHandle -> IO TagSig Source #
Binary BlockDeps Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> BlockDeps -> IO () Source # put :: WriteBinHandle -> BlockDeps -> IO (Bin BlockDeps) Source # get :: ReadBinHandle -> IO BlockDeps Source #
Binary BlockInfo Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> BlockInfo -> IO () Source # put :: WriteBinHandle -> BlockInfo -> IO (Bin BlockInfo) Source # get :: ReadBinHandle -> IO BlockInfo Source #
Binary ExportedFun Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> ExportedFun -> IO () Source # put :: WriteBinHandle -> ExportedFun -> IO (Bin ExportedFun) Source # get :: ReadBinHandle -> IO ExportedFun Source #
Binary IndexEntry Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> IndexEntry -> IO () Source # put :: WriteBinHandle -> IndexEntry -> IO (Bin IndexEntry) Source # get :: ReadBinHandle -> IO IndexEntry Source #
Binary JSOptions Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JSOptions -> IO () Source # put :: WriteBinHandle -> JSOptions -> IO (Bin JSOptions) Source # get :: ReadBinHandle -> IO JSOptions Source #
Binary CILayout Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> CILayout -> IO () Source # put :: WriteBinHandle -> CILayout -> IO (Bin CILayout) Source # get :: ReadBinHandle -> IO CILayout Source #
Binary CIRegs Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> CIRegs -> IO () Source # put :: WriteBinHandle -> CIRegs -> IO (Bin CIRegs) Source # get :: ReadBinHandle -> IO CIRegs Source #
Binary CIStatic Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> CIStatic -> IO () Source # put :: WriteBinHandle -> CIStatic -> IO (Bin CIStatic) Source # get :: ReadBinHandle -> IO CIStatic Source #
Binary CIType Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> CIType -> IO () Source # put :: WriteBinHandle -> CIType -> IO (Bin CIType) Source # get :: ReadBinHandle -> IO CIType Source #
Binary ClosureInfo Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> ClosureInfo -> IO () Source # put :: WriteBinHandle -> ClosureInfo -> IO (Bin ClosureInfo) Source # get :: ReadBinHandle -> IO ClosureInfo Source #
Binary ExpFun Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> ExpFun -> IO () Source # put :: WriteBinHandle -> ExpFun -> IO (Bin ExpFun) Source # get :: ReadBinHandle -> IO ExpFun Source #
Binary ForeignJSRef Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> ForeignJSRef -> IO () Source # put :: WriteBinHandle -> ForeignJSRef -> IO (Bin ForeignJSRef) Source # get :: ReadBinHandle -> IO ForeignJSRef Source #
Binary JSFFIType Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JSFFIType -> IO () Source # put :: WriteBinHandle -> JSFFIType -> IO (Bin JSFFIType) Source # get :: ReadBinHandle -> IO JSFFIType Source #
Binary JSRep Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JSRep -> IO () Source # put :: WriteBinHandle -> JSRep -> IO (Bin JSRep) Source # get :: ReadBinHandle -> IO JSRep Source #
Binary StaticArg Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticArg -> IO () Source # put :: WriteBinHandle -> StaticArg -> IO (Bin StaticArg) Source # get :: ReadBinHandle -> IO StaticArg Source #
Binary StaticInfo Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticInfo -> IO () Source # put :: WriteBinHandle -> StaticInfo -> IO (Bin StaticInfo) Source # get :: ReadBinHandle -> IO StaticInfo Source #
Binary StaticLit Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticLit -> IO () Source # put :: WriteBinHandle -> StaticLit -> IO (Bin StaticLit) Source # get :: ReadBinHandle -> IO StaticLit Source #
Binary StaticUnboxed Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticUnboxed -> IO () Source # put :: WriteBinHandle -> StaticUnboxed -> IO (Bin StaticUnboxed) Source # get :: ReadBinHandle -> IO StaticUnboxed Source #
Binary StaticVal Source # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticVal -> IO () Source # put :: WriteBinHandle -> StaticVal -> IO (Bin StaticVal) Source # get :: ReadBinHandle -> IO StaticVal Source #
Binary AvailInfo Source # |
Instance details Defined in GHC.Types.Avail Methods put_ :: WriteBinHandle -> AvailInfo -> IO () Source # put :: WriteBinHandle -> AvailInfo -> IO (Bin AvailInfo) Source # get :: ReadBinHandle -> IO AvailInfo Source #
Binary DetOrdAvails Source # |
Instance details Defined in GHC.Types.Avail Methods put_ :: WriteBinHandle -> DetOrdAvails -> IO () Source # put :: WriteBinHandle -> DetOrdAvails -> IO (Bin DetOrdAvails) Source # get :: ReadBinHandle -> IO DetOrdAvails Source #
Binary Activation Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> Activation -> IO () Source # put :: WriteBinHandle -> Activation -> IO (Bin Activation) Source # get :: ReadBinHandle -> IO Activation Source #
Binary CbvMark Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> CbvMark -> IO () Source # put :: WriteBinHandle -> CbvMark -> IO (Bin CbvMark) Source # get :: ReadBinHandle -> IO CbvMark Source #
Binary FunctionOrData Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> FunctionOrData -> IO () Source # put :: WriteBinHandle -> FunctionOrData -> IO (Bin FunctionOrData) Source # get :: ReadBinHandle -> IO FunctionOrData Source #
Binary InlinePragma Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> InlinePragma -> IO () Source # put :: WriteBinHandle -> InlinePragma -> IO (Bin InlinePragma) Source # get :: ReadBinHandle -> IO InlinePragma Source #
Binary InlineSpec Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> InlineSpec -> IO () Source # put :: WriteBinHandle -> InlineSpec -> IO (Bin InlineSpec) Source # get :: ReadBinHandle -> IO InlineSpec Source #
Binary LeftOrRight Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> LeftOrRight -> IO () Source # put :: WriteBinHandle -> LeftOrRight -> IO (Bin LeftOrRight) Source # get :: ReadBinHandle -> IO LeftOrRight Source #
Binary Levity Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> Levity -> IO () Source # put :: WriteBinHandle -> Levity -> IO (Bin Levity) Source # get :: ReadBinHandle -> IO Levity Source #
Binary OverlapFlag Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> OverlapFlag -> IO () Source # put :: WriteBinHandle -> OverlapFlag -> IO (Bin OverlapFlag) Source # get :: ReadBinHandle -> IO OverlapFlag Source #
Binary OverlapMode Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> OverlapMode -> IO () Source # put :: WriteBinHandle -> OverlapMode -> IO (Bin OverlapMode) Source # get :: ReadBinHandle -> IO OverlapMode Source #
Binary RecFlag Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> RecFlag -> IO () Source # put :: WriteBinHandle -> RecFlag -> IO (Bin RecFlag) Source # get :: ReadBinHandle -> IO RecFlag Source #
Binary RuleMatchInfo Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> RuleMatchInfo -> IO () Source # put :: WriteBinHandle -> RuleMatchInfo -> IO (Bin RuleMatchInfo) Source # get :: ReadBinHandle -> IO RuleMatchInfo Source #
Binary TupleSort Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> TupleSort -> IO () Source # put :: WriteBinHandle -> TupleSort -> IO (Bin TupleSort) Source # get :: ReadBinHandle -> IO TupleSort Source #
Binary UnfoldingSource Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> UnfoldingSource -> IO () Source # put :: WriteBinHandle -> UnfoldingSource -> IO (Bin UnfoldingSource) Source # get :: ReadBinHandle -> IO UnfoldingSource Source #
Binary CCFlavour Source # |
Instance details Defined in GHC.Types.CostCentre Methods put_ :: WriteBinHandle -> CCFlavour -> IO () Source # put :: WriteBinHandle -> CCFlavour -> IO (Bin CCFlavour) Source # get :: ReadBinHandle -> IO CCFlavour Source #
Binary CostCentre Source # |
Instance details Defined in GHC.Types.CostCentre Methods put_ :: WriteBinHandle -> CostCentre -> IO () Source # put :: WriteBinHandle -> CostCentre -> IO (Bin CostCentre) Source # get :: ReadBinHandle -> IO CostCentre Source #
Binary CostCentreIndex Source # |
Instance details Defined in GHC.Types.CostCentre.State Methods put_ :: WriteBinHandle -> CostCentreIndex -> IO () Source # put :: WriteBinHandle -> CostCentreIndex -> IO (Bin CostCentreIndex) Source # get :: ReadBinHandle -> IO CostCentreIndex Source #
Binary Cpr Source # |
Instance details Defined in GHC.Types.Cpr Methods put_ :: WriteBinHandle -> Cpr -> IO () Source # put :: WriteBinHandle -> Cpr -> IO (Bin Cpr) Source # get :: ReadBinHandle -> IO Cpr Source #
Binary CprSig Source # |
Instance details Defined in GHC.Types.Cpr Methods put_ :: WriteBinHandle -> CprSig -> IO () Source # put :: WriteBinHandle -> CprSig -> IO (Bin CprSig) Source # get :: ReadBinHandle -> IO CprSig Source #
Binary CprType Source # |
Instance details Defined in GHC.Types.Cpr Methods put_ :: WriteBinHandle -> CprType -> IO () Source # put :: WriteBinHandle -> CprType -> IO (Bin CprType) Source # get :: ReadBinHandle -> IO CprType Source #
Binary Card Source # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> Card -> IO () Source # put :: WriteBinHandle -> Card -> IO (Bin Card) Source # get :: ReadBinHandle -> IO Card Source #
Binary Demand Source # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> Demand -> IO () Source # put :: WriteBinHandle -> Demand -> IO (Bin Demand) Source # get :: ReadBinHandle -> IO Demand Source #
Binary Divergence Source # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> Divergence -> IO () Source # put :: WriteBinHandle -> Divergence -> IO (Bin Divergence) Source # get :: ReadBinHandle -> IO Divergence Source #
Binary DmdEnv Source # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> DmdEnv -> IO () Source # put :: WriteBinHandle -> DmdEnv -> IO (Bin DmdEnv) Source # get :: ReadBinHandle -> IO DmdEnv Source #
Binary DmdSig Source # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> DmdSig -> IO () Source # put :: WriteBinHandle -> DmdSig -> IO (Bin DmdSig) Source # get :: ReadBinHandle -> IO DmdSig Source #
Binary DmdType Source # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> DmdType -> IO () Source # put :: WriteBinHandle -> DmdType -> IO (Bin DmdType) Source # get :: ReadBinHandle -> IO DmdType Source #
Binary SubDemand Source # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> SubDemand -> IO () Source # put :: WriteBinHandle -> SubDemand -> IO (Bin SubDemand) Source # get :: ReadBinHandle -> IO SubDemand Source #
Binary DuplicateRecordFields Source # |
Instance details Defined in GHC.Types.FieldLabel Methods put_ :: WriteBinHandle -> DuplicateRecordFields -> IO () Source # put :: WriteBinHandle -> DuplicateRecordFields -> IO (Bin DuplicateRecordFields) Source # get :: ReadBinHandle -> IO DuplicateRecordFields Source #
Binary Name => Binary FieldLabel Source # | We need the `Binary Name` constraint here even though there is an instance defined in GHC.Types.Name, because the we have a SOURCE import, so the instance is not in scope. And the instance cannot be added to Name.hs-boot because GHC.Utils.Binary itself depends on GHC.Types.Name.
Instance details Defined in GHC.Types.FieldLabel Methods put_ :: WriteBinHandle -> FieldLabel -> IO () Source # put :: WriteBinHandle -> FieldLabel -> IO (Bin FieldLabel) Source # get :: ReadBinHandle -> IO FieldLabel Source #
Binary FieldSelectors Source # |
Instance details Defined in GHC.Types.FieldLabel Methods put_ :: WriteBinHandle -> FieldSelectors -> IO () Source # put :: WriteBinHandle -> FieldSelectors -> IO (Bin FieldSelectors) Source # get :: ReadBinHandle -> IO FieldSelectors Source #
Binary CCallConv Source # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CCallConv -> IO () Source # put :: WriteBinHandle -> CCallConv -> IO (Bin CCallConv) Source # get :: ReadBinHandle -> IO CCallConv Source #
Binary CCallSpec Source # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CCallSpec -> IO () Source # put :: WriteBinHandle -> CCallSpec -> IO (Bin CCallSpec) Source # get :: ReadBinHandle -> IO CCallSpec Source #
Binary CCallTarget Source # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CCallTarget -> IO () Source # put :: WriteBinHandle -> CCallTarget -> IO (Bin CCallTarget) Source # get :: ReadBinHandle -> IO CCallTarget Source #
Binary CExportSpec Source # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CExportSpec -> IO () Source # put :: WriteBinHandle -> CExportSpec -> IO (Bin CExportSpec) Source # get :: ReadBinHandle -> IO CExportSpec Source #
Binary CType Source # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CType -> IO () Source # put :: WriteBinHandle -> CType -> IO (Bin CType) Source # get :: ReadBinHandle -> IO CType Source #
Binary ForeignCall Source # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> ForeignCall -> IO () Source # put :: WriteBinHandle -> ForeignCall -> IO (Bin ForeignCall) Source # get :: ReadBinHandle -> IO ForeignCall Source #
Binary Header Source # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> Header -> IO () Source # put :: WriteBinHandle -> Header -> IO (Bin Header) Source # get :: ReadBinHandle -> IO Header Source #
Binary Safety Source # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> Safety -> IO () Source # put :: WriteBinHandle -> Safety -> IO (Bin Safety) Source # get :: ReadBinHandle -> IO Safety Source #
Binary LitNumType Source # |
Instance details Defined in GHC.Types.Literal Methods put_ :: WriteBinHandle -> LitNumType -> IO () Source # put :: WriteBinHandle -> LitNumType -> IO (Bin LitNumType) Source # get :: ReadBinHandle -> IO LitNumType Source #
Binary Literal Source # |
Instance details Defined in GHC.Types.Literal Methods put_ :: WriteBinHandle -> Literal -> IO () Source # put :: WriteBinHandle -> Literal -> IO (Bin Literal) Source # get :: ReadBinHandle -> IO Literal Source #
Binary Name Source # | 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_ :: WriteBinHandle -> Name -> IO () Source # put :: WriteBinHandle -> Name -> IO (Bin Name) Source # get :: ReadBinHandle -> IO Name Source #
Binary NameSpace Source # |
Instance details Defined in GHC.Types.Name.Occurrence Methods put_ :: WriteBinHandle -> NameSpace -> IO () Source # put :: WriteBinHandle -> NameSpace -> IO (Bin NameSpace) Source # get :: ReadBinHandle -> IO NameSpace Source #
Binary OccName Source # |
Instance details Defined in GHC.Types.Name.Occurrence Methods put_ :: WriteBinHandle -> OccName -> IO () Source # put :: WriteBinHandle -> OccName -> IO (Bin OccName) Source # get :: ReadBinHandle -> IO OccName Source #
Binary IfaceTrustInfo Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods put_ :: WriteBinHandle -> IfaceTrustInfo -> IO () Source # put :: WriteBinHandle -> IfaceTrustInfo -> IO (Bin IfaceTrustInfo) Source # get :: ReadBinHandle -> IO IfaceTrustInfo Source #
Binary SaneDouble Source # |
Instance details Defined in GHC.Types.SaneDouble Methods put_ :: WriteBinHandle -> SaneDouble -> IO () Source # put :: WriteBinHandle -> SaneDouble -> IO (Bin SaneDouble) Source # get :: ReadBinHandle -> IO SaneDouble Source #
Binary HscSource Source # |
Instance details Defined in GHC.Types.SourceFile Methods put_ :: WriteBinHandle -> HscSource -> IO () Source # put :: WriteBinHandle -> HscSource -> IO (Bin HscSource) Source # get :: ReadBinHandle -> IO HscSource Source #
Binary SourceText Source # |
Instance details Defined in GHC.Types.SourceText Methods put_ :: WriteBinHandle -> SourceText -> IO () Source # put :: WriteBinHandle -> SourceText -> IO (Bin SourceText) Source # get :: ReadBinHandle -> IO SourceText Source #
Binary UnhelpfulSpanReason Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> UnhelpfulSpanReason -> IO () Source # put :: WriteBinHandle -> UnhelpfulSpanReason -> IO (Bin UnhelpfulSpanReason) Source # get :: ReadBinHandle -> IO UnhelpfulSpanReason Source #
Binary FunTyFlag Source # |
Instance details Defined in GHC.Types.Var Methods put_ :: WriteBinHandle -> FunTyFlag -> IO () Source # put :: WriteBinHandle -> FunTyFlag -> IO (Bin FunTyFlag) Source # get :: ReadBinHandle -> IO FunTyFlag Source #
Binary Dependencies Source # |
Instance details Defined in GHC.Unit.Module.Deps Methods put_ :: WriteBinHandle -> Dependencies -> IO () Source # put :: WriteBinHandle -> Dependencies -> IO (Bin Dependencies) Source # get :: ReadBinHandle -> IO Dependencies Source #
Binary Usage Source # |
Instance details Defined in GHC.Unit.Module.Deps Methods put_ :: WriteBinHandle -> Usage -> IO () Source # put :: WriteBinHandle -> Usage -> IO (Bin Usage) Source # get :: ReadBinHandle -> IO Usage Source #
Binary ModIface Source # |
Instance details Defined in GHC.Unit.Module.ModIface Methods put_ :: WriteBinHandle -> ModIface -> IO () Source # put :: WriteBinHandle -> ModIface -> IO (Bin ModIface) Source # get :: ReadBinHandle -> IO ModIface Source #
Binary WarningCategory Source # |
Instance details Defined in GHC.Unit.Module.Warnings Methods put_ :: WriteBinHandle -> WarningCategory -> IO () Source # put :: WriteBinHandle -> WarningCategory -> IO (Bin WarningCategory) Source # get :: ReadBinHandle -> IO WarningCategory Source #
Binary IfaceCLabel Source # |
Instance details Defined in GHC.Unit.Module.WholeCoreBindings Methods put_ :: WriteBinHandle -> IfaceCLabel -> IO () Source # put :: WriteBinHandle -> IfaceCLabel -> IO (Bin IfaceCLabel) Source # get :: ReadBinHandle -> IO IfaceCLabel Source #
Binary IfaceCStubs Source # |
Instance details Defined in GHC.Unit.Module.WholeCoreBindings Methods put_ :: WriteBinHandle -> IfaceCStubs -> IO () Source # put :: WriteBinHandle -> IfaceCStubs -> IO (Bin IfaceCStubs) Source # get :: ReadBinHandle -> IO IfaceCStubs Source #
Binary IfaceForeign Source # |
Instance details Defined in GHC.Unit.Module.WholeCoreBindings Methods put_ :: WriteBinHandle -> IfaceForeign -> IO () Source # put :: WriteBinHandle -> IfaceForeign -> IO (Bin IfaceForeign) Source # get :: ReadBinHandle -> IO IfaceForeign Source #
Binary IfaceForeignFile Source # |
Instance details Defined in GHC.Unit.Module.WholeCoreBindings Methods put_ :: WriteBinHandle -> IfaceForeignFile -> IO () Source # put :: WriteBinHandle -> IfaceForeignFile -> IO (Bin IfaceForeignFile) Source # get :: ReadBinHandle -> IO IfaceForeignFile Source #
Binary InstantiatedUnit Source # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> InstantiatedUnit -> IO () Source # put :: WriteBinHandle -> InstantiatedUnit -> IO (Bin InstantiatedUnit) Source # get :: ReadBinHandle -> IO InstantiatedUnit Source #
Binary Unit Source # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> Unit -> IO () Source # put :: WriteBinHandle -> Unit -> IO (Bin Unit) Source # get :: ReadBinHandle -> IO Unit Source #
Binary UnitId Source # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> UnitId -> IO () Source # put :: WriteBinHandle -> UnitId -> IO (Bin UnitId) Source # get :: ReadBinHandle -> IO UnitId Source #
Binary BinData Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinData -> IO () Source # put :: WriteBinHandle -> BinData -> IO (Bin BinData) Source # get :: ReadBinHandle -> IO BinData Source #
Binary BinSpan Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinSpan -> IO () Source # put :: WriteBinHandle -> BinSpan -> IO (Bin BinSpan) Source # get :: ReadBinHandle -> IO BinSpan Source #
Binary BinSrcSpan Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinSrcSpan -> IO () Source # put :: WriteBinHandle -> BinSrcSpan -> IO (Bin BinSrcSpan) Source # get :: ReadBinHandle -> IO BinSrcSpan Source #
Binary JoinPointHood Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> JoinPointHood -> IO () Source # put :: WriteBinHandle -> JoinPointHood -> IO (Bin JoinPointHood) Source # get :: ReadBinHandle -> IO JoinPointHood Source #
Binary Boxity Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> Boxity -> IO () Source # put :: WriteBinHandle -> Boxity -> IO (Bin Boxity) Source # get :: ReadBinHandle -> IO Boxity Source #
Binary Fixity Source # |
Instance details Defined in GHC.Hs.Basic Methods put_ :: WriteBinHandle -> Fixity -> IO () Source # put :: WriteBinHandle -> Fixity -> IO (Bin Fixity) Source # get :: ReadBinHandle -> IO Fixity Source #
Binary FixityDirection Source # |
Instance details Defined in GHC.Hs.Basic Methods put_ :: WriteBinHandle -> FixityDirection -> IO () Source # put :: WriteBinHandle -> FixityDirection -> IO (Bin FixityDirection) Source # get :: ReadBinHandle -> IO FixityDirection Source #
Binary Role Source # |
Instance details Defined in GHC.Core.Coercion.Axiom Methods put_ :: WriteBinHandle -> Role -> IO () Source # put :: WriteBinHandle -> Role -> IO (Bin Role) Source # get :: ReadBinHandle -> IO Role Source #
Binary SrcStrictness Source # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: WriteBinHandle -> SrcStrictness -> IO () Source # put :: WriteBinHandle -> SrcStrictness -> IO (Bin SrcStrictness) Source # get :: ReadBinHandle -> IO SrcStrictness Source #
Binary SrcUnpackedness Source # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: WriteBinHandle -> SrcUnpackedness -> IO () Source # put :: WriteBinHandle -> SrcUnpackedness -> IO (Bin SrcUnpackedness) Source # get :: ReadBinHandle -> IO SrcUnpackedness Source #
Binary IsBootInterface Source # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> IsBootInterface -> IO () Source # put :: WriteBinHandle -> IsBootInterface -> IO (Bin IsBootInterface) Source # get :: ReadBinHandle -> IO IsBootInterface Source #
Binary ModuleName Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> ModuleName -> IO () Source # put :: WriteBinHandle -> ModuleName -> IO (Bin ModuleName) Source # get :: ReadBinHandle -> IO ModuleName Source #
Binary ForAllTyFlag Source # |
Instance details Defined in GHC.Hs.Specificity Methods put_ :: WriteBinHandle -> ForAllTyFlag -> IO () Source # put :: WriteBinHandle -> ForAllTyFlag -> IO (Bin ForAllTyFlag) Source # get :: ReadBinHandle -> IO ForAllTyFlag Source #
Binary Specificity Source # |
Instance details Defined in GHC.Hs.Specificity Methods put_ :: WriteBinHandle -> Specificity -> IO () Source # put :: WriteBinHandle -> Specificity -> IO (Bin Specificity) Source # get :: ReadBinHandle -> IO Specificity Source #
Binary PromotionFlag Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> PromotionFlag -> IO () Source # put :: WriteBinHandle -> PromotionFlag -> IO (Bin PromotionFlag) Source # get :: ReadBinHandle -> IO PromotionFlag Source #
Binary KindRep Source # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> KindRep -> IO () Source # put :: WriteBinHandle -> KindRep -> IO (Bin KindRep) Source # get :: ReadBinHandle -> IO KindRep Source #
Binary TyCon Source # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> TyCon -> IO () Source # put :: WriteBinHandle -> TyCon -> IO (Bin TyCon) Source # get :: ReadBinHandle -> IO TyCon Source #
Binary TypeLitSort Source # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> TypeLitSort -> IO () Source # put :: WriteBinHandle -> TypeLitSort -> IO (Bin TypeLitSort) Source # get :: ReadBinHandle -> IO TypeLitSort Source #
Binary Day Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Day -> IO () Source # put :: WriteBinHandle -> Day -> IO (Bin Day) Source # get :: ReadBinHandle -> IO Day Source #
Binary DiffTime Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> DiffTime -> IO () Source # put :: WriteBinHandle -> DiffTime -> IO (Bin DiffTime) Source # get :: ReadBinHandle -> IO DiffTime Source #
Binary UTCTime Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> UTCTime -> IO () Source # put :: WriteBinHandle -> UTCTime -> IO (Bin UTCTime) Source # get :: ReadBinHandle -> IO UTCTime Source #
Binary Integer Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Integer -> IO () Source # put :: WriteBinHandle -> Integer -> IO (Bin Integer) Source # get :: ReadBinHandle -> IO Integer Source #
Binary () Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> () -> IO () Source # put :: WriteBinHandle -> () -> IO (Bin ()) Source # get :: ReadBinHandle -> IO () Source #
Binary Bool Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Bool -> IO () Source # put :: WriteBinHandle -> Bool -> IO (Bin Bool) Source # get :: ReadBinHandle -> IO Bool Source #
Binary Char Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Char -> IO () Source # put :: WriteBinHandle -> Char -> IO (Bin Char) Source # get :: ReadBinHandle -> IO Char Source #
Binary Int Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int -> IO () Source # put :: WriteBinHandle -> Int -> IO (Bin Int) Source # get :: ReadBinHandle -> IO Int Source #
Binary RuntimeRep Source # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> RuntimeRep -> IO () Source # put :: WriteBinHandle -> RuntimeRep -> IO (Bin RuntimeRep) Source # get :: ReadBinHandle -> IO RuntimeRep Source #
Binary VecCount Source # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> VecCount -> IO () Source # put :: WriteBinHandle -> VecCount -> IO (Bin VecCount) Source # get :: ReadBinHandle -> IO VecCount Source #
Binary VecElem Source # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> VecElem -> IO () Source # put :: WriteBinHandle -> VecElem -> IO (Bin VecElem) Source # get :: ReadBinHandle -> IO VecElem Source #
Binary v => Binary (IntMap v) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> IntMap v -> IO () Source # put :: WriteBinHandle -> IntMap v -> IO (Bin (IntMap v)) Source # get :: ReadBinHandle -> IO (IntMap v) Source #
(Binary a, Ord a) => Binary (Set a) Source # | This instance doesn't rely on the determinism of the keys' `Ord` instance, so it works e.g. for `Name`s too.
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Set a -> IO () Source # put :: WriteBinHandle -> Set a -> IO (Bin (Set a)) Source # get :: ReadBinHandle -> IO (Set a) Source #
Binary a => Binary (NonEmpty a) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> NonEmpty a -> IO () Source # put :: WriteBinHandle -> NonEmpty a -> IO (Bin (NonEmpty a)) Source # get :: ReadBinHandle -> IO (NonEmpty a) Source #
Binary a => Binary (Ratio a) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Ratio a -> IO () Source # put :: WriteBinHandle -> Ratio a -> IO (Bin (Ratio a)) Source # get :: ReadBinHandle -> IO (Ratio a) Source #
Binary a => Binary (Maybe a) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Maybe a -> IO () Source # put :: WriteBinHandle -> Maybe a -> IO (Bin (Maybe a)) Source # get :: ReadBinHandle -> IO (Maybe a) Source #
Binary name => Binary (AnnTarget name) Source # |
Instance details Defined in GHC.Types.Annotations Methods put_ :: WriteBinHandle -> AnnTarget name -> IO () Source # put :: WriteBinHandle -> AnnTarget name -> IO (Bin (AnnTarget name)) Source # get :: ReadBinHandle -> IO (AnnTarget name) Source #
Binary (DefMethSpec IfaceType) Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> DefMethSpec IfaceType -> IO () Source # put :: WriteBinHandle -> DefMethSpec IfaceType -> IO (Bin (DefMethSpec IfaceType)) Source # get :: ReadBinHandle -> IO (DefMethSpec IfaceType) Source #
Binary unit => Binary (Definite unit) Source # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> Definite unit -> IO () Source # put :: WriteBinHandle -> Definite unit -> IO (Bin (Definite unit)) Source # get :: ReadBinHandle -> IO (Definite unit) Source #
Binary a => Binary (GenModule a) Source # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> GenModule a -> IO () Source # put :: WriteBinHandle -> GenModule a -> IO (Bin (GenModule a)) Source # get :: ReadBinHandle -> IO (GenModule a) Source #
Binary a => Binary (GenWithIsBoot a) Source # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> GenWithIsBoot a -> IO () Source # put :: WriteBinHandle -> GenWithIsBoot a -> IO (Bin (GenWithIsBoot a)) Source # get :: ReadBinHandle -> IO (GenWithIsBoot a) Source #
Binary a => Binary (BinLocated a) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinLocated a -> IO () Source # put :: WriteBinHandle -> BinLocated a -> IO (Bin (BinLocated a)) Source # get :: ReadBinHandle -> IO (BinLocated a) Source #
Binary (FixedLengthEncoding Word16) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word16 -> IO () Source # put :: WriteBinHandle -> FixedLengthEncoding Word16 -> IO (Bin (FixedLengthEncoding Word16)) Source # get :: ReadBinHandle -> IO (FixedLengthEncoding Word16) Source #
Binary (FixedLengthEncoding Word32) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word32 -> IO () Source # put :: WriteBinHandle -> FixedLengthEncoding Word32 -> IO (Bin (FixedLengthEncoding Word32)) Source # get :: ReadBinHandle -> IO (FixedLengthEncoding Word32) Source #
Binary (FixedLengthEncoding Word64) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word64 -> IO () Source # put :: WriteBinHandle -> FixedLengthEncoding Word64 -> IO (Bin (FixedLengthEncoding Word64)) Source # get :: ReadBinHandle -> IO (FixedLengthEncoding Word64) Source #
Binary (FixedLengthEncoding Word8) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word8 -> IO () Source # put :: WriteBinHandle -> FixedLengthEncoding Word8 -> IO (Bin (FixedLengthEncoding Word8)) Source # get :: ReadBinHandle -> IO (FixedLengthEncoding Word8) Source #
Binary a => Binary (Maybe a) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Maybe a -> IO () Source # put :: WriteBinHandle -> Maybe a -> IO (Bin (Maybe a)) Source # get :: ReadBinHandle -> IO (Maybe a) Source #
Binary a => Binary [a] Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> [a] -> IO () Source # put :: WriteBinHandle -> [a] -> IO (Bin [a]) Source # get :: ReadBinHandle -> IO [a] Source #
(Ix a, Binary a, Binary b) => Binary (Array a b) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Array a b -> IO () Source # put :: WriteBinHandle -> Array a b -> IO (Bin (Array a b)) Source # get :: ReadBinHandle -> IO (Array a b) Source #
(Binary a, Binary b) => Binary (Either a b) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Either a b -> IO () Source # put :: WriteBinHandle -> Either a b -> IO (Bin (Either a b)) Source # get :: ReadBinHandle -> IO (Either a b) Source #
Typeable a => Binary (TypeRep a) Source # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> TypeRep a -> IO () Source # put :: WriteBinHandle -> TypeRep a -> IO (Bin (TypeRep a)) Source # get :: ReadBinHandle -> IO (TypeRep a) Source #
Binary (EnumSet a) Source # | Represents the `EnumSet` as a bit set. Assumes that all elements are non-negative. This is only efficient for values that are sufficiently small, for example in the lower hundreds.
Instance details Defined in GHC.Data.EnumSet Methods put_ :: WriteBinHandle -> EnumSet a -> IO () Source # put :: WriteBinHandle -> EnumSet a -> IO (Bin (EnumSet a)) Source # get :: ReadBinHandle -> IO (EnumSet a) Source #
Binary a => Binary (WithHsDocIdentifiers a GhcRn) Source # |
Instance details Defined in GHC.Hs.Doc Methods put_ :: WriteBinHandle -> WithHsDocIdentifiers a GhcRn -> IO () Source # put :: WriteBinHandle -> WithHsDocIdentifiers a GhcRn -> IO (Bin (WithHsDocIdentifiers a GhcRn)) Source # get :: ReadBinHandle -> IO (WithHsDocIdentifiers a GhcRn) Source #
(Binary r, Binary b) => Binary (IfaceBindingX b r) Source # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceBindingX b r -> IO () Source # put :: WriteBinHandle -> IfaceBindingX b r -> IO (Bin (IfaceBindingX b r)) Source # get :: ReadBinHandle -> IO (IfaceBindingX b r) Source #
(Binary tv, Binary vis) => Binary (VarBndr tv vis) Source # |
Instance details Defined in GHC.Types.Var Methods put_ :: WriteBinHandle -> VarBndr tv vis -> IO () Source # put :: WriteBinHandle -> VarBndr tv vis -> IO (Bin (VarBndr tv vis)) Source # get :: ReadBinHandle -> IO (VarBndr tv vis) Source #
Binary (Bin a) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Bin a -> IO () Source # put :: WriteBinHandle -> Bin a -> IO (Bin (Bin a)) Source # get :: ReadBinHandle -> IO (Bin a) Source #
(Binary a, Binary b) => Binary (a, b) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> (a, b) -> IO () Source # put :: WriteBinHandle -> (a, b) -> IO (Bin (a, b)) Source # get :: ReadBinHandle -> IO (a, b) Source #
(Binary a, Binary b, Binary c) => Binary (a, b, c) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> (a, b, c) -> IO () Source # put :: WriteBinHandle -> (a, b, c) -> IO (Bin (a, b, c)) Source # get :: ReadBinHandle -> IO (a, b, c) Source #
(Binary a, Binary b, Binary c, Binary d) => Binary (a, b, c, d) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> (a, b, c, d) -> IO () Source # put :: WriteBinHandle -> (a, b, c, d) -> IO (Bin (a, b, c, d)) Source # get :: ReadBinHandle -> IO (a, b, c, d) Source #
(Binary a, Binary b, Binary c, Binary d, Binary e) => Binary (a, b, c, d, e) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> (a, b, c, d, e) -> IO () Source # put :: WriteBinHandle -> (a, b, c, d, e) -> IO (Bin (a, b, c, d, e)) Source # get :: ReadBinHandle -> 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) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> (a, b, c, d, e, f) -> IO () Source # put :: WriteBinHandle -> (a, b, c, d, e, f) -> IO (Bin (a, b, c, d, e, f)) Source # get :: ReadBinHandle -> 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) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> (a, b, c, d, e, f, g) -> IO () Source # put :: WriteBinHandle -> (a, b, c, d, e, f, g) -> IO (Bin (a, b, c, d, e, f, g)) Source # get :: ReadBinHandle -> IO (a, b, c, d, e, f, g) Source #

data ReadBinHandle Source #

A read-only handle that can be used to deserialise binary data from a buffer.

The buffer is an unboxed binary array.

data WriteBinHandle Source #

A write-only handle that can be used to serialise binary data into a buffer.

The buffer is an unboxed binary array.

type SymbolTable a = Array Int a Source #

Symbols that are read from disk. The `SymbolTable` index starts on '0'.

type Dictionary = SymbolTable FastString Source #

A `SymbolTable` of `FastString`s.

data BinData Source #

Constructors

BinData Int BinArray |

#### Instances

Instances details

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

dataHandle :: BinData -> IO ReadBinHandle Source #

handleData :: WriteBinHandle -> IO BinData Source #

unsafeUnpackBinBuffer :: ByteString -> IO ReadBinHandle Source #

openBinMem :: Int -> IO WriteBinHandle Source #

seekBinWriter :: forall {k} (a :: k). WriteBinHandle -> Bin a -> IO () Source #

seekBinReader :: forall {k} (a :: k). ReadBinHandle -> Bin a -> IO () Source #

SeekBin but without calling expandBin

seekBinReaderRel :: forall {k} (a :: k). ReadBinHandle -> RelBin a -> IO () Source #

tellBinReader :: forall {k} (a :: k). ReadBinHandle -> IO (Bin a) Source #

tellBinWriter :: forall {k} (a :: k). WriteBinHandle -> IO (Bin a) Source #

castBin :: forall {k1} {k2} (a :: k1) (b :: k2). Bin a -> Bin b Source #

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

Get access to the underlying buffer.

freezeWriteHandle :: WriteBinHandle -> IO ReadBinHandle Source #

Freeze the given `WriteBinHandle` and turn it into an equivalent `ReadBinHandle`.

The current offset of the `WriteBinHandle` is maintained in the new `ReadBinHandle`.

shrinkBinBuffer :: WriteBinHandle -> IO ReadBinHandle Source #

Copy the BinBuffer to a new BinBuffer which is exactly the right size. This performs a copy of the underlying buffer. The buffer may be truncated if the offset is not at the end of the written output.

UserData is also discarded during the copy You should just use this when translating a Put handle into a Get handle.

thawReadHandle :: ReadBinHandle -> IO WriteBinHandle Source #

foldGet :: Binary a => Word -> ReadBinHandle -> b -> (Word -> a -> b -> IO b) -> IO b Source #

foldGet' :: Binary a => Word -> ReadBinHandle -> b -> (Word -> a -> b -> IO b) -> IO b Source #

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

readBinMem :: FilePath -> IO ReadBinHandle Source #

readBinMemN :: Int -> FilePath -> IO (Maybe ReadBinHandle) Source #

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

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

putAtRel :: forall {k} (a :: k). WriteBinHandle -> Bin (RelBinPtr a) -> Bin a -> IO () Source #

forwardPut :: WriteBinHandle -> (b -> IO a) -> IO b -> IO (a, b) Source #

``forwardPut` put_A put_B` outputs A after B but allows A to be read before B by using a forward reference.

forwardPut_ :: WriteBinHandle -> (b -> IO a) -> IO b -> IO () Source #

forwardGet :: ReadBinHandle -> IO a -> IO a Source #

Read a value stored using a forward reference

The forward reference is expected to be an absolute offset.

forwardPutRel :: WriteBinHandle -> (b -> IO a) -> IO b -> IO (a, b) Source #

``forwardPutRel` put_A put_B` outputs A after B but allows A to be read before B by using a forward reference.

This forward reference is a relative offset that allows us to skip over the result of `put_A`.

forwardPutRel_ :: WriteBinHandle -> (b -> IO a) -> IO b -> IO () Source #

Like `forwardGetRel`, but discard the result.

forwardGetRel :: ReadBinHandle -> IO a -> IO a Source #

Read a value stored using a forward reference.

The forward reference is expected to be a relative offset.

# For writing instances

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

getByte :: ReadBinHandle -> IO Word8 Source #

putByteString :: WriteBinHandle -> ByteString -> IO () Source #

Put a ByteString without its length (can't be read back without knowing the length!)

getByteString :: ReadBinHandle -> Int -> IO ByteString Source #

Get a ByteString whose length is known

# Variable length encodings

putULEB128 :: (Integral a, FiniteBits a) => WriteBinHandle -> a -> IO () Source #

getULEB128 :: (Integral a, FiniteBits a) => ReadBinHandle -> IO a Source #

putSLEB128 :: (Integral a, Bits a) => WriteBinHandle -> a -> IO () Source #

getSLEB128 :: (Show a, Integral a, FiniteBits a) => ReadBinHandle -> IO a Source #

# Fixed length encoding

newtype FixedLengthEncoding a Source #

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

Constructors

FixedLengthEncoding |

Fields

- unFixedLength :: a

#### Instances

Instances details

Show a => Show (FixedLengthEncoding a) Source # |
Instance details Defined in GHC.Utils.Binary Methods showsPrec :: Int -> FixedLengthEncoding a -> ShowS Source # show :: FixedLengthEncoding a -> String Source # showList :: [FixedLengthEncoding a] -> ShowS Source #
Binary (FixedLengthEncoding Word16) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word16 -> IO () Source # put :: WriteBinHandle -> FixedLengthEncoding Word16 -> IO (Bin (FixedLengthEncoding Word16)) Source # get :: ReadBinHandle -> IO (FixedLengthEncoding Word16) Source #
Binary (FixedLengthEncoding Word32) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word32 -> IO () Source # put :: WriteBinHandle -> FixedLengthEncoding Word32 -> IO (Bin (FixedLengthEncoding Word32)) Source # get :: ReadBinHandle -> IO (FixedLengthEncoding Word32) Source #
Binary (FixedLengthEncoding Word64) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word64 -> IO () Source # put :: WriteBinHandle -> FixedLengthEncoding Word64 -> IO (Bin (FixedLengthEncoding Word64)) Source # get :: ReadBinHandle -> IO (FixedLengthEncoding Word64) Source #
Binary (FixedLengthEncoding Word8) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word8 -> IO () Source # put :: WriteBinHandle -> FixedLengthEncoding Word8 -> IO (Bin (FixedLengthEncoding Word8)) Source # get :: ReadBinHandle -> IO (FixedLengthEncoding Word8) Source #
Eq a => Eq (FixedLengthEncoding a) Source # |
Instance details Defined in GHC.Utils.Binary Methods (==) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool Source # (/=) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool Source #
Ord a => Ord (FixedLengthEncoding a) Source # |

Instance details

Defined in GHC.Utils.Binary

Methods

compare :: FixedLengthEncoding a -> FixedLengthEncoding a -> Ordering Source #

(<) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool Source #

(<=) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool Source #

(>) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool Source #

(>=) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool Source #

max :: FixedLengthEncoding a -> FixedLengthEncoding a -> FixedLengthEncoding a Source #

min :: FixedLengthEncoding a -> FixedLengthEncoding a -> FixedLengthEncoding a Source #

# Lazy Binary I/O

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

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

lazyGet' :: (ReadBinHandle -> IO a) -> ReadBinHandle -> IO a Source #

lazyPut' :: (WriteBinHandle -> a -> IO ()) -> WriteBinHandle -> a -> IO () Source #

lazyGetMaybe :: Binary a => ReadBinHandle -> IO (Maybe a) Source #

Deserialize a value serialized by `lazyPutMaybe`.

lazyPutMaybe :: Binary a => WriteBinHandle -> Maybe a -> IO () Source #

Serialize the constructor strictly but lazily serialize a value inside a `Just`.

This way we can check for the presence of a value without deserializing the value itself.

# User data

data ReaderUserData Source #

UserData required to deserialise symbols for interface files.

See Note [Binary UserData]

getReaderUserData :: ReadBinHandle -> ReaderUserData Source #

setReaderUserData :: ReadBinHandle -> ReaderUserData -> ReadBinHandle Source #

noReaderUserData :: ReaderUserData Source #

data WriterUserData Source #

UserData required to serialise symbols for interface files.

See Note [Binary UserData]

getWriterUserData :: WriteBinHandle -> WriterUserData Source #

setWriterUserData :: WriteBinHandle -> WriterUserData -> WriteBinHandle Source #

noWriterUserData :: WriterUserData Source #

mkWriterUserData :: [SomeBinaryWriter] -> WriterUserData Source #

mkReaderUserData :: [SomeBinaryReader] -> ReaderUserData Source #

newReadState Source #

Arguments

:: (ReadBinHandle -> IO Name) | how to deserialize `Name`s
-> (ReadBinHandle -> IO FastString) |
-> ReaderUserData |

newWriteState Source #

Arguments

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

addReaderToUserData :: Typeable a => BinaryReader a -> ReadBinHandle -> ReadBinHandle Source #

Add `SomeBinaryReader` as a known binary decoder. If a `BinaryReader` for the associated type already exists in `ReaderUserData`, it is overwritten.

addWriterToUserData :: Typeable a => BinaryWriter a -> WriteBinHandle -> WriteBinHandle Source #

Add `SomeBinaryWriter` as a known binary encoder. If a `BinaryWriter` for the associated type already exists in `WriterUserData`, it is overwritten.

findUserDataReader :: Typeable a => Proxy a -> ReadBinHandle -> BinaryReader a Source #

Find the `BinaryReader` for the `Binary` instance for the type identified by 'Proxy a'.

If no `BinaryReader` has been configured before, this function will panic.

findUserDataWriter :: Typeable a => Proxy a -> WriteBinHandle -> BinaryWriter a Source #

Find the `BinaryWriter` for the `Binary` instance for the type identified by 'Proxy a'.

If no `BinaryWriter` has been configured before, this function will panic.

# Binary Readers & Writers

newtype BinaryReader s Source #

Constructors

BinaryReader |

Fields

- getEntry :: ReadBinHandle -> IO s

#### Instances

Instances details

Functor BinaryReader Source # |
Instance details Defined in GHC.Utils.Binary Methods fmap :: (a -> b) -> BinaryReader a -> BinaryReader b Source # (<$) :: a -> BinaryReader b -> BinaryReader a Source #

newtype BinaryWriter s Source #

Constructors

BinaryWriter |

Fields

- putEntry :: WriteBinHandle -> s -> IO ()

mkWriter :: (WriteBinHandle -> s -> IO ()) -> BinaryWriter s Source #

mkReader :: (ReadBinHandle -> IO s) -> BinaryReader s Source #

data SomeBinaryReader Source #

Existential for `BinaryReader` with a type witness.

data SomeBinaryWriter Source #

Existential for `BinaryWriter` with a type witness.

mkSomeBinaryReader :: Typeable a => BinaryReader a -> SomeBinaryReader Source #

mkSomeBinaryWriter :: Typeable a => BinaryWriter a -> SomeBinaryWriter Source #

# Tables

data ReaderTable a Source #

A `ReaderTable` describes how to deserialise a table from disk, and how to create a `BinaryReader` that looks up values in the deduplication table.

Constructors

ReaderTable |

Fields

- getTable :: ReadBinHandle -> IO (SymbolTable a)

  Deserialise a list of elements into a `SymbolTable`.

- mkReaderFromTable :: SymbolTable a -> BinaryReader a

  Given the table from `getTable`, create a `BinaryReader` that reads values only from the `SymbolTable`.

newtype WriterTable Source #

A `WriterTable` is an interface any deduplication table can implement to describe how the table can be written to disk.

Constructors

WriterTable |

Fields

- putTable :: WriteBinHandle -> IO Int

  Serialise a table to disk. Returns the number of written elements.

# String table ("dictionary")

initFastStringReaderTable :: IO (ReaderTable FastString) Source #

initFastStringWriterTable :: IO (WriterTable, BinaryWriter FastString) Source #

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

getDictionary :: ReadBinHandle -> IO Dictionary Source #

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

data FSTable Source #

Constructors

FSTable |

Fields

- fs_tab_next :: !FastMutInt
- fs_tab_map :: !(IORef (UniqFM FastString (Int, FastString)))

getDictFastString :: Dictionary -> ReadBinHandle -> IO FastString Source #

putDictFastString :: FSTable -> WriteBinHandle -> FastString -> IO () Source #

# Generic deduplication table

data GenericSymbolTable (m :: Type -> Type) Source #

The `GenericSymbolTable` stores a mapping from already seen elements to an index. If an element wasn't seen before, it is added to the mapping together with a fresh index.

`GenericSymbolTable` is a variant of a `BinSymbolTable` that is polymorphic in the table implementation. As such it can be used with any container that implements the `TrieMap` type class.

While `GenericSymbolTable` is similar to the `BinSymbolTable`, it supports storing tree-like structures such as `Type` and `IfaceType` more efficiently.

Constructors

GenericSymbolTable |

Fields

- gen_symtab_next :: !FastMutInt

  The next index to use.

- gen_symtab_map :: !(IORef (m Int))

  Given a symbol, find the symbol and return its index.

- gen_symtab_to_write :: !(IORef [Key m])

  Reversed list of values to write into the buffer. This is an optimisation, as it allows us to write out quickly all newly discovered values that are discovered when serialising 'Key m' to disk.

initGenericSymbolTable :: forall (m :: Type -> Type). TrieMap m => IO (GenericSymbolTable m) Source #

Initialise a `GenericSymbolTable`, initialising the index to '0'.

getGenericSymtab :: Binary a => SymbolTable a -> ReadBinHandle -> IO a Source #

Read a value from a `SymbolTable`.

putGenericSymTab :: forall (m :: Type -> Type). TrieMap m => GenericSymbolTable m -> WriteBinHandle -> Key m -> IO () Source #

Write an element 'Key m' to the given `WriteBinHandle`.

If the element was seen before, we simply write the index of that element to the `WriteBinHandle`. If we haven't seen it before, we add the element to the `GenericSymbolTable`, increment the index, and return this new index.

getGenericSymbolTable :: (ReadBinHandle -> IO a) -> ReadBinHandle -> IO (SymbolTable a) Source #

Read the elements of a `GenericSymbolTable` from disk into a `SymbolTable`.

putGenericSymbolTable :: forall (m :: Type -> Type). TrieMap m => GenericSymbolTable m -> (WriteBinHandle -> Key m -> IO ()) -> WriteBinHandle -> IO Int Source #

Serialise the `GenericSymbolTable` to disk.

Since `GenericSymbolTable` stores tree-like structures, such as `IfaceType`, serialising an element can add new elements to the mapping. Thus, `putGenericSymbolTable` first serialises all values, and then checks whether any new elements have been discovered. If so, repeat the loop.

# Newtype wrappers

newtype BinSpan Source #

Constructors

BinSpan |

Fields

- unBinSpan :: RealSrcSpan

#### Instances

Instances details

Binary BinSpan Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinSpan -> IO () Source # put :: WriteBinHandle -> BinSpan -> IO (Bin BinSpan) Source # get :: ReadBinHandle -> IO BinSpan Source #

newtype BinSrcSpan Source #

Constructors

BinSrcSpan |

Fields

- unBinSrcSpan :: SrcSpan

#### Instances

Instances details

Binary BinSrcSpan Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinSrcSpan -> IO () Source # put :: WriteBinHandle -> BinSrcSpan -> IO (Bin BinSrcSpan) Source # get :: ReadBinHandle -> IO BinSrcSpan Source #

newtype BinLocated a Source #

Constructors

BinLocated |

Fields

- unBinLocated :: Located a

#### Instances

Instances details

Binary a => Binary (BinLocated a) Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinLocated a -> IO () Source # put :: WriteBinHandle -> BinLocated a -> IO (Bin (BinLocated a)) Source # get :: ReadBinHandle -> IO (BinLocated a) Source #

# Newtypes for types that have canonically more than one valid encoding

newtype BindingName Source #

Newtype to serialise binding names differently to non-binding `Name`. See Note [Binary UserData]

Constructors

BindingName |

Fields

- getBindingName :: Name

#### Instances

Instances details

Eq BindingName Source # |
Instance details Defined in GHC.Utils.Binary Methods (==) :: BindingName -> BindingName -> Bool Source # (/=) :: BindingName -> BindingName -> Bool Source #

simpleBindingNameWriter :: BinaryWriter Name -> BinaryWriter BindingName Source #

simpleBindingNameReader :: BinaryReader Name -> BinaryReader BindingName Source #

data FullBinData Source #

`FullBinData` stores a slice to a `BinArray`.

It requires less memory than `ReadBinHandle`, and can be constructed from a `ReadBinHandle` via `freezeBinHandle` and turned back into a `ReadBinHandle` using `thawBinHandle`. Additionally, the byte array slice can be put into a `WriteBinHandle` without extra conversions via `putFullBinData`.

Constructors

FullBinData |

Fields

- fbd_readerUserData :: ReaderUserData

  `ReaderUserData` that can be used to resume reading.

- fbd_off_s :: !Int

  start offset

- fbd_off_e :: !Int

  end offset

- fbd_size :: !Int

  total buffer size

- fbd_buffer :: !BinArray

#### Instances

Instances details

Eq FullBinData Source # |
Instance details Defined in GHC.Utils.Binary Methods (==) :: FullBinData -> FullBinData -> Bool Source # (/=) :: FullBinData -> FullBinData -> Bool Source #
Ord FullBinData Source # |

Instance details

Defined in GHC.Utils.Binary

Methods

compare :: FullBinData -> FullBinData -> Ordering Source #

(<) :: FullBinData -> FullBinData -> Bool Source #

(<=) :: FullBinData -> FullBinData -> Bool Source #

(>) :: FullBinData -> FullBinData -> Bool Source #

(>=) :: FullBinData -> FullBinData -> Bool Source #

max :: FullBinData -> FullBinData -> FullBinData Source #

min :: FullBinData -> FullBinData -> FullBinData Source #

freezeBinHandle :: forall {k} (a :: k). ReadBinHandle -> Bin a -> IO FullBinData Source #

Freeze a `ReadBinHandle` and a start index into a `FullBinData`.

`FullBinData` stores a slice starting from the 'Bin a' location to the current offset of the `ReadBinHandle`.

thawBinHandle :: FullBinData -> IO ReadBinHandle Source #

Turn the `FullBinData` into a `ReadBinHandle`, setting the `ReadBinHandle` offset to the start of the `FullBinData` and restore the `ReaderUserData` that was obtained from `freezeBinHandle`.

putFullBinData :: WriteBinHandle -> FullBinData -> IO () Source #

Write the `FullBinData` slice into the `WriteBinHandle`.

type BinArray = ForeignPtr Word8 Source #