GHC.Utils.Binary

ghc-lib-parser-9.14.1.20251220: 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
- EnumBinary
- 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
- FingerprintWithValue

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 ()
- newtype EnumBinary a = EnumBinary {
  - unEnumBinary :: a
  }
- 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
- data FingerprintWithValue a = FingerprintWithValue !Fingerprint (Maybe a)

# Documentation

data Bin (a :: k) #

#### Instances

Instances details

Bounded (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods minBound :: Bin a # maxBound :: Bin a #
Show (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods showsPrec :: Int -> Bin a -> ShowS # show :: Bin a -> String # showList :: [Bin a] -> ShowS #
Binary (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Bin a -> IO () # put :: WriteBinHandle -> Bin a -> IO (Bin (Bin a)) # get :: ReadBinHandle -> IO (Bin a) #
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 #

data RelBin (a :: k) #

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

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

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 #

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 () #

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

get :: ReadBinHandle -> IO a #

#### Instances

Instances details

Binary ByteString # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> ByteString -> IO () # put :: WriteBinHandle -> ByteString -> IO (Bin ByteString) # get :: ReadBinHandle -> IO ByteString #
Binary ShortByteString # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> ShortByteString -> IO () # put :: WriteBinHandle -> ShortByteString -> IO (Bin ShortByteString) # get :: ReadBinHandle -> IO ShortByteString #
Binary SomeTypeRep # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> SomeTypeRep -> IO () # put :: WriteBinHandle -> SomeTypeRep -> IO (Bin SomeTypeRep) # get :: ReadBinHandle -> IO SomeTypeRep #
Binary Fingerprint # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Fingerprint -> IO () # put :: WriteBinHandle -> Fingerprint -> IO (Bin Fingerprint) # get :: ReadBinHandle -> IO Fingerprint #
Binary Int16 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int16 -> IO () # put :: WriteBinHandle -> Int16 -> IO (Bin Int16) # get :: ReadBinHandle -> IO Int16 #
Binary Int32 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int32 -> IO () # put :: WriteBinHandle -> Int32 -> IO (Bin Int32) # get :: ReadBinHandle -> IO Int32 #
Binary Int64 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int64 -> IO () # put :: WriteBinHandle -> Int64 -> IO (Bin Int64) # get :: ReadBinHandle -> IO Int64 #
Binary Int8 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int8 -> IO () # put :: WriteBinHandle -> Int8 -> IO (Bin Int8) # get :: ReadBinHandle -> IO Int8 #
Binary Word16 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Word16 -> IO () # put :: WriteBinHandle -> Word16 -> IO (Bin Word16) # get :: ReadBinHandle -> IO Word16 #
Binary Word32 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Word32 -> IO () # put :: WriteBinHandle -> Word32 -> IO (Bin Word32) # get :: ReadBinHandle -> IO Word32 #
Binary Word64 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Word64 -> IO () # put :: WriteBinHandle -> Word64 -> IO (Bin Word64) # get :: ReadBinHandle -> IO Word64 #
Binary Word8 # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Word8 -> IO () # put :: WriteBinHandle -> Word8 -> IO (Bin Word8) # get :: ReadBinHandle -> IO Word8 #
Binary IsOrphan # |
Instance details Defined in GHC.Core Methods put_ :: WriteBinHandle -> IsOrphan -> IO () # put :: WriteBinHandle -> IsOrphan -> IO (Bin IsOrphan) # get :: ReadBinHandle -> IO IsOrphan #
Binary StrictnessMark # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: WriteBinHandle -> StrictnessMark -> IO () # put :: WriteBinHandle -> StrictnessMark -> IO (Bin StrictnessMark) # get :: ReadBinHandle -> IO StrictnessMark #
Binary CallerCcFilter # |
Instance details Defined in GHC.Core.Opt.CallerCC.Types Methods put_ :: WriteBinHandle -> CallerCcFilter -> IO () # put :: WriteBinHandle -> CallerCcFilter -> IO (Bin CallerCcFilter) # get :: ReadBinHandle -> IO CallerCcFilter #
Binary NamePattern # |
Instance details Defined in GHC.Core.Opt.CallerCC.Types Methods put_ :: WriteBinHandle -> NamePattern -> IO () # put :: WriteBinHandle -> NamePattern -> IO (Bin NamePattern) # get :: ReadBinHandle -> IO NamePattern #
Binary CoSel # |
Instance details Defined in GHC.Core.TyCo.Rep Methods put_ :: WriteBinHandle -> CoSel -> IO () # put :: WriteBinHandle -> CoSel -> IO (Bin CoSel) # get :: ReadBinHandle -> IO CoSel #
Binary UnivCoProvenance # |
Instance details Defined in GHC.Core.TyCo.Rep Methods put_ :: WriteBinHandle -> UnivCoProvenance -> IO () # put :: WriteBinHandle -> UnivCoProvenance -> IO (Bin UnivCoProvenance) # get :: ReadBinHandle -> IO UnivCoProvenance #
Binary Injectivity # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: WriteBinHandle -> Injectivity -> IO () # put :: WriteBinHandle -> Injectivity -> IO (Bin Injectivity) # get :: ReadBinHandle -> IO Injectivity #
Binary PrimElemRep # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: WriteBinHandle -> PrimElemRep -> IO () # put :: WriteBinHandle -> PrimElemRep -> IO (Bin PrimElemRep) # get :: ReadBinHandle -> IO PrimElemRep #
Binary PrimRep # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: WriteBinHandle -> PrimRep -> IO () # put :: WriteBinHandle -> PrimRep -> IO (Bin PrimRep) # get :: ReadBinHandle -> IO PrimRep #
Binary TyConBndrVis # |
Instance details Defined in GHC.Core.TyCon Methods put_ :: WriteBinHandle -> TyConBndrVis -> IO () # put :: WriteBinHandle -> TyConBndrVis -> IO (Bin TyConBndrVis) # get :: ReadBinHandle -> IO TyConBndrVis #
Binary FastString # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FastString -> IO () # put :: WriteBinHandle -> FastString -> IO (Bin FastString) # get :: ReadBinHandle -> IO FastString #
Binary LexicalFastString # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> LexicalFastString -> IO () # put :: WriteBinHandle -> LexicalFastString -> IO (Bin LexicalFastString) # get :: ReadBinHandle -> IO LexicalFastString #
Binary NonDetFastString # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> NonDetFastString -> IO () # put :: WriteBinHandle -> NonDetFastString -> IO (Bin NonDetFastString) # get :: ReadBinHandle -> IO NonDetFastString #
Binary Language # |
Instance details Defined in GHC.Driver.Flags Methods put_ :: WriteBinHandle -> Language -> IO () # put :: WriteBinHandle -> Language -> IO (Bin Language) # get :: ReadBinHandle -> IO Language #
Binary DocStructureItem # |
Instance details Defined in GHC.Hs.Doc Methods put_ :: WriteBinHandle -> DocStructureItem -> IO () # put :: WriteBinHandle -> DocStructureItem -> IO (Bin DocStructureItem) # get :: ReadBinHandle -> IO DocStructureItem #
Binary Docs # |
Instance details Defined in GHC.Hs.Doc Methods put_ :: WriteBinHandle -> Docs -> IO () # put :: WriteBinHandle -> Docs -> IO (Bin Docs) # get :: ReadBinHandle -> IO Docs #
Binary HsDocString # |
Instance details Defined in GHC.Hs.DocString Methods put_ :: WriteBinHandle -> HsDocString -> IO () # put :: WriteBinHandle -> HsDocString -> IO (Bin HsDocString) # get :: ReadBinHandle -> IO HsDocString #
Binary HsDocStringChunk # |
Instance details Defined in GHC.Hs.DocString Methods put_ :: WriteBinHandle -> HsDocStringChunk -> IO () # put :: WriteBinHandle -> HsDocStringChunk -> IO (Bin HsDocStringChunk) # get :: ReadBinHandle -> IO HsDocStringChunk #
Binary HsDocStringDecorator # |
Instance details Defined in GHC.Hs.DocString Methods put_ :: WriteBinHandle -> HsDocStringDecorator -> IO () # put :: WriteBinHandle -> HsDocStringDecorator -> IO (Bin HsDocStringDecorator) # get :: ReadBinHandle -> IO HsDocStringDecorator #
Binary ExtensibleFields # |
Instance details Defined in GHC.Iface.Ext.Fields Methods put_ :: WriteBinHandle -> ExtensibleFields -> IO () # put :: WriteBinHandle -> ExtensibleFields -> IO (Bin ExtensibleFields) # get :: ReadBinHandle -> IO ExtensibleFields #
Binary IfaceCppOptions # |
Instance details Defined in GHC.Iface.Flags Methods put_ :: WriteBinHandle -> IfaceCppOptions -> IO () # put :: WriteBinHandle -> IfaceCppOptions -> IO (Bin IfaceCppOptions) # get :: ReadBinHandle -> IO IfaceCppOptions #
Binary IfaceDynFlags # |
Instance details Defined in GHC.Iface.Flags Methods put_ :: WriteBinHandle -> IfaceDynFlags -> IO () # put :: WriteBinHandle -> IfaceDynFlags -> IO (Bin IfaceDynFlags) # get :: ReadBinHandle -> IO IfaceDynFlags #
Binary IfaceExtension # |
Instance details Defined in GHC.Iface.Flags Methods put_ :: WriteBinHandle -> IfaceExtension -> IO () # put :: WriteBinHandle -> IfaceExtension -> IO (Bin IfaceExtension) # get :: ReadBinHandle -> IO IfaceExtension #
Binary IfaceGeneralFlag # |
Instance details Defined in GHC.Iface.Flags Methods put_ :: WriteBinHandle -> IfaceGeneralFlag -> IO () # put :: WriteBinHandle -> IfaceGeneralFlag -> IO (Bin IfaceGeneralFlag) # get :: ReadBinHandle -> IO IfaceGeneralFlag #
Binary IfaceLanguage # |
Instance details Defined in GHC.Iface.Flags Methods put_ :: WriteBinHandle -> IfaceLanguage -> IO () # put :: WriteBinHandle -> IfaceLanguage -> IO (Bin IfaceLanguage) # get :: ReadBinHandle -> IO IfaceLanguage #
Binary IfaceProfAuto # |
Instance details Defined in GHC.Iface.Flags Methods put_ :: WriteBinHandle -> IfaceProfAuto -> IO () # put :: WriteBinHandle -> IfaceProfAuto -> IO (Bin IfaceProfAuto) # get :: ReadBinHandle -> IO IfaceProfAuto #
Binary IfaceSelfRecomp # |
Instance details Defined in GHC.Iface.Recomp.Types Methods put_ :: WriteBinHandle -> IfaceSelfRecomp -> IO () # put :: WriteBinHandle -> IfaceSelfRecomp -> IO (Bin IfaceSelfRecomp) # get :: ReadBinHandle -> IO IfaceSelfRecomp #
Binary IfGuidance # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfGuidance -> IO () # put :: WriteBinHandle -> IfGuidance -> IO (Bin IfGuidance) # get :: ReadBinHandle -> IO IfGuidance #
Binary IfaceAT # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceAT -> IO () # put :: WriteBinHandle -> IfaceAT -> IO (Bin IfaceAT) # get :: ReadBinHandle -> IO IfaceAT #
Binary IfaceAlt # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceAlt -> IO () # put :: WriteBinHandle -> IfaceAlt -> IO (Bin IfaceAlt) # get :: ReadBinHandle -> IO IfaceAlt #
Binary IfaceAnnotation # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceAnnotation -> IO () # put :: WriteBinHandle -> IfaceAnnotation -> IO (Bin IfaceAnnotation) # get :: ReadBinHandle -> IO IfaceAnnotation #
Binary IfaceAxBranch # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceAxBranch -> IO () # put :: WriteBinHandle -> IfaceAxBranch -> IO (Bin IfaceAxBranch) # get :: ReadBinHandle -> IO IfaceAxBranch #
Binary IfaceBang # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceBang -> IO () # put :: WriteBinHandle -> IfaceBang -> IO (Bin IfaceBang) # get :: ReadBinHandle -> IO IfaceBang #
Binary IfaceBooleanFormula # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceBooleanFormula -> IO () # put :: WriteBinHandle -> IfaceBooleanFormula -> IO (Bin IfaceBooleanFormula) # get :: ReadBinHandle -> IO IfaceBooleanFormula #
Binary IfaceClassOp # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceClassOp -> IO () # put :: WriteBinHandle -> IfaceClassOp -> IO (Bin IfaceClassOp) # get :: ReadBinHandle -> IO IfaceClassOp #
Binary IfaceClsInst # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceClsInst -> IO () # put :: WriteBinHandle -> IfaceClsInst -> IO (Bin IfaceClsInst) # get :: ReadBinHandle -> IO IfaceClsInst #
Binary IfaceCompleteMatch # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceCompleteMatch -> IO () # put :: WriteBinHandle -> IfaceCompleteMatch -> IO (Bin IfaceCompleteMatch) # get :: ReadBinHandle -> IO IfaceCompleteMatch #
Binary IfaceConAlt # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceConAlt -> IO () # put :: WriteBinHandle -> IfaceConAlt -> IO (Bin IfaceConAlt) # get :: ReadBinHandle -> IO IfaceConAlt #
Binary IfaceConDecl # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceConDecl -> IO () # put :: WriteBinHandle -> IfaceConDecl -> IO (Bin IfaceConDecl) # get :: ReadBinHandle -> IO IfaceConDecl #
Binary IfaceConDecls # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceConDecls -> IO () # put :: WriteBinHandle -> IfaceConDecls -> IO (Bin IfaceConDecls) # get :: ReadBinHandle -> IO IfaceConDecls #
Binary IfaceDecl # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceDecl -> IO () # put :: WriteBinHandle -> IfaceDecl -> IO (Bin IfaceDecl) # get :: ReadBinHandle -> IO IfaceDecl #
Binary IfaceDefault # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceDefault -> IO () # put :: WriteBinHandle -> IfaceDefault -> IO (Bin IfaceDefault) # get :: ReadBinHandle -> IO IfaceDefault #
Binary IfaceExpr # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceExpr -> IO () # put :: WriteBinHandle -> IfaceExpr -> IO (Bin IfaceExpr) # get :: ReadBinHandle -> IO IfaceExpr #
Binary IfaceFamInst # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceFamInst -> IO () # put :: WriteBinHandle -> IfaceFamInst -> IO (Bin IfaceFamInst) # get :: ReadBinHandle -> IO IfaceFamInst #
Binary IfaceFamTyConFlav # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceFamTyConFlav -> IO () # put :: WriteBinHandle -> IfaceFamTyConFlav -> IO (Bin IfaceFamTyConFlav) # get :: ReadBinHandle -> IO IfaceFamTyConFlav #
Binary IfaceIdDetails # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceIdDetails -> IO () # put :: WriteBinHandle -> IfaceIdDetails -> IO (Bin IfaceIdDetails) # get :: ReadBinHandle -> IO IfaceIdDetails #
Binary IfaceImport # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceImport -> IO () # put :: WriteBinHandle -> IfaceImport -> IO (Bin IfaceImport) # get :: ReadBinHandle -> IO IfaceImport #
Binary IfaceInfoItem # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceInfoItem -> IO () # put :: WriteBinHandle -> IfaceInfoItem -> IO (Bin IfaceInfoItem) # get :: ReadBinHandle -> IO IfaceInfoItem #
Binary IfaceLFInfo # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceLFInfo -> IO () # put :: WriteBinHandle -> IfaceLFInfo -> IO (Bin IfaceLFInfo) # get :: ReadBinHandle -> IO IfaceLFInfo #
Binary IfaceLetBndr # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceLetBndr -> IO () # put :: WriteBinHandle -> IfaceLetBndr -> IO (Bin IfaceLetBndr) # get :: ReadBinHandle -> IO IfaceLetBndr #
Binary IfaceMaybeRhs # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceMaybeRhs -> IO () # put :: WriteBinHandle -> IfaceMaybeRhs -> IO (Bin IfaceMaybeRhs) # get :: ReadBinHandle -> IO IfaceMaybeRhs #
Binary IfaceRule # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceRule -> IO () # put :: WriteBinHandle -> IfaceRule -> IO (Bin IfaceRule) # get :: ReadBinHandle -> IO IfaceRule #
Binary IfaceSrcBang # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceSrcBang -> IO () # put :: WriteBinHandle -> IfaceSrcBang -> IO (Bin IfaceSrcBang) # get :: ReadBinHandle -> IO IfaceSrcBang #
Binary IfaceStringLiteral # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceStringLiteral -> IO () # put :: WriteBinHandle -> IfaceStringLiteral -> IO (Bin IfaceStringLiteral) # get :: ReadBinHandle -> IO IfaceStringLiteral #
Binary IfaceTickish # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceTickish -> IO () # put :: WriteBinHandle -> IfaceTickish -> IO (Bin IfaceTickish) # get :: ReadBinHandle -> IO IfaceTickish #
Binary IfaceTopBndrInfo # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceTopBndrInfo -> IO () # put :: WriteBinHandle -> IfaceTopBndrInfo -> IO (Bin IfaceTopBndrInfo) # get :: ReadBinHandle -> IO IfaceTopBndrInfo #
Binary IfaceTyConParent # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceTyConParent -> IO () # put :: WriteBinHandle -> IfaceTyConParent -> IO (Bin IfaceTyConParent) # get :: ReadBinHandle -> IO IfaceTyConParent #
Binary IfaceUnfolding # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceUnfolding -> IO () # put :: WriteBinHandle -> IfaceUnfolding -> IO (Bin IfaceUnfolding) # get :: ReadBinHandle -> IO IfaceUnfolding #
Binary IfaceWarningTxt # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceWarningTxt -> IO () # put :: WriteBinHandle -> IfaceWarningTxt -> IO (Bin IfaceWarningTxt) # get :: ReadBinHandle -> IO IfaceWarningTxt #
Binary IfaceWarnings # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceWarnings -> IO () # put :: WriteBinHandle -> IfaceWarnings -> IO (Bin IfaceWarnings) # get :: ReadBinHandle -> IO IfaceWarnings #
Binary ImpIfaceList # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> ImpIfaceList -> IO () # put :: WriteBinHandle -> ImpIfaceList -> IO (Bin ImpIfaceList) # get :: ReadBinHandle -> IO ImpIfaceList #
Binary IfLclName # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfLclName -> IO () # put :: WriteBinHandle -> IfLclName -> IO (Bin IfLclName) # get :: ReadBinHandle -> IO IfLclName #
Binary IfaceAppArgs # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceAppArgs -> IO () # put :: WriteBinHandle -> IfaceAppArgs -> IO (Bin IfaceAppArgs) # get :: ReadBinHandle -> IO IfaceAppArgs #
Binary IfaceAxiomRule # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceAxiomRule -> IO () # put :: WriteBinHandle -> IfaceAxiomRule -> IO (Bin IfaceAxiomRule) # get :: ReadBinHandle -> IO IfaceAxiomRule #
Binary IfaceBndr # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceBndr -> IO () # put :: WriteBinHandle -> IfaceBndr -> IO (Bin IfaceBndr) # get :: ReadBinHandle -> IO IfaceBndr #
Binary IfaceCoercion # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceCoercion -> IO () # put :: WriteBinHandle -> IfaceCoercion -> IO (Bin IfaceCoercion) # get :: ReadBinHandle -> IO IfaceCoercion #
Binary IfaceMCoercion # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceMCoercion -> IO () # put :: WriteBinHandle -> IfaceMCoercion -> IO (Bin IfaceMCoercion) # get :: ReadBinHandle -> IO IfaceMCoercion #
Binary IfaceOneShot # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceOneShot -> IO () # put :: WriteBinHandle -> IfaceOneShot -> IO (Bin IfaceOneShot) # get :: ReadBinHandle -> IO IfaceOneShot #
Binary IfaceTyCon # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceTyCon -> IO () # put :: WriteBinHandle -> IfaceTyCon -> IO (Bin IfaceTyCon) # get :: ReadBinHandle -> IO IfaceTyCon #
Binary IfaceTyConInfo # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceTyConInfo -> IO () # put :: WriteBinHandle -> IfaceTyConInfo -> IO (Bin IfaceTyConInfo) # get :: ReadBinHandle -> IO IfaceTyConInfo #
Binary IfaceTyConSort # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceTyConSort -> IO () # put :: WriteBinHandle -> IfaceTyConSort -> IO (Bin IfaceTyConSort) # get :: ReadBinHandle -> IO IfaceTyConSort #
Binary IfaceTyLit # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceTyLit -> IO () # put :: WriteBinHandle -> IfaceTyLit -> IO (Bin IfaceTyLit) # get :: ReadBinHandle -> IO IfaceTyLit #
Binary IfaceType # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> IfaceType -> IO () # put :: WriteBinHandle -> IfaceType -> IO (Bin IfaceType) # get :: ReadBinHandle -> IO IfaceType #
Binary Ident # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> Ident -> IO () # put :: WriteBinHandle -> Ident -> IO (Bin Ident) # get :: ReadBinHandle -> IO Ident #
Binary AOp # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> AOp -> IO () # put :: WriteBinHandle -> AOp -> IO (Bin AOp) # get :: ReadBinHandle -> IO AOp #
Binary JExpr # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JExpr -> IO () # put :: WriteBinHandle -> JExpr -> IO (Bin JExpr) # get :: ReadBinHandle -> IO JExpr #
Binary JStat # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JStat -> IO () # put :: WriteBinHandle -> JStat -> IO (Bin JStat) # get :: ReadBinHandle -> IO JStat #
Binary JVal # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JVal -> IO () # put :: WriteBinHandle -> JVal -> IO (Bin JVal) # get :: ReadBinHandle -> IO JVal #
Binary Op # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> Op -> IO () # put :: WriteBinHandle -> Op -> IO (Bin Op) # get :: ReadBinHandle -> IO Op #
Binary UOp # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> UOp -> IO () # put :: WriteBinHandle -> UOp -> IO (Bin UOp) # get :: ReadBinHandle -> IO UOp #
Binary Serialized # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> Serialized -> IO () # put :: WriteBinHandle -> Serialized -> IO (Bin Serialized) # get :: ReadBinHandle -> IO Serialized #
Binary TagInfo # |
Instance details Defined in GHC.Stg.EnforceEpt.TagSig Methods put_ :: WriteBinHandle -> TagInfo -> IO () # put :: WriteBinHandle -> TagInfo -> IO (Bin TagInfo) # get :: ReadBinHandle -> IO TagInfo #
Binary TagSig # |
Instance details Defined in GHC.Stg.EnforceEpt.TagSig Methods put_ :: WriteBinHandle -> TagSig -> IO () # put :: WriteBinHandle -> TagSig -> IO (Bin TagSig) # get :: ReadBinHandle -> IO TagSig #
Binary BlockDeps # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> BlockDeps -> IO () # put :: WriteBinHandle -> BlockDeps -> IO (Bin BlockDeps) # get :: ReadBinHandle -> IO BlockDeps #
Binary BlockInfo # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> BlockInfo -> IO () # put :: WriteBinHandle -> BlockInfo -> IO (Bin BlockInfo) # get :: ReadBinHandle -> IO BlockInfo #
Binary ExportedFun # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> ExportedFun -> IO () # put :: WriteBinHandle -> ExportedFun -> IO (Bin ExportedFun) # get :: ReadBinHandle -> IO ExportedFun #
Binary IndexEntry # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> IndexEntry -> IO () # put :: WriteBinHandle -> IndexEntry -> IO (Bin IndexEntry) # get :: ReadBinHandle -> IO IndexEntry #
Binary JSOptions # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JSOptions -> IO () # put :: WriteBinHandle -> JSOptions -> IO (Bin JSOptions) # get :: ReadBinHandle -> IO JSOptions #
Binary CILayout # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> CILayout -> IO () # put :: WriteBinHandle -> CILayout -> IO (Bin CILayout) # get :: ReadBinHandle -> IO CILayout #
Binary CIRegs # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> CIRegs -> IO () # put :: WriteBinHandle -> CIRegs -> IO (Bin CIRegs) # get :: ReadBinHandle -> IO CIRegs #
Binary CIStatic # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> CIStatic -> IO () # put :: WriteBinHandle -> CIStatic -> IO (Bin CIStatic) # get :: ReadBinHandle -> IO CIStatic #
Binary CIType # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> CIType -> IO () # put :: WriteBinHandle -> CIType -> IO (Bin CIType) # get :: ReadBinHandle -> IO CIType #
Binary ClosureInfo # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> ClosureInfo -> IO () # put :: WriteBinHandle -> ClosureInfo -> IO (Bin ClosureInfo) # get :: ReadBinHandle -> IO ClosureInfo #
Binary ExpFun # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> ExpFun -> IO () # put :: WriteBinHandle -> ExpFun -> IO (Bin ExpFun) # get :: ReadBinHandle -> IO ExpFun #
Binary ForeignJSRef # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> ForeignJSRef -> IO () # put :: WriteBinHandle -> ForeignJSRef -> IO (Bin ForeignJSRef) # get :: ReadBinHandle -> IO ForeignJSRef #
Binary JSFFIType # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JSFFIType -> IO () # put :: WriteBinHandle -> JSFFIType -> IO (Bin JSFFIType) # get :: ReadBinHandle -> IO JSFFIType #
Binary JSRep # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> JSRep -> IO () # put :: WriteBinHandle -> JSRep -> IO (Bin JSRep) # get :: ReadBinHandle -> IO JSRep #
Binary StaticArg # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticArg -> IO () # put :: WriteBinHandle -> StaticArg -> IO (Bin StaticArg) # get :: ReadBinHandle -> IO StaticArg #
Binary StaticInfo # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticInfo -> IO () # put :: WriteBinHandle -> StaticInfo -> IO (Bin StaticInfo) # get :: ReadBinHandle -> IO StaticInfo #
Binary StaticLit # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticLit -> IO () # put :: WriteBinHandle -> StaticLit -> IO (Bin StaticLit) # get :: ReadBinHandle -> IO StaticLit #
Binary StaticUnboxed # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticUnboxed -> IO () # put :: WriteBinHandle -> StaticUnboxed -> IO (Bin StaticUnboxed) # get :: ReadBinHandle -> IO StaticUnboxed #
Binary StaticVal # |
Instance details Defined in GHC.StgToJS.Object Methods put_ :: WriteBinHandle -> StaticVal -> IO () # put :: WriteBinHandle -> StaticVal -> IO (Bin StaticVal) # get :: ReadBinHandle -> IO StaticVal #
Binary AvailInfo # |
Instance details Defined in GHC.Types.Avail Methods put_ :: WriteBinHandle -> AvailInfo -> IO () # put :: WriteBinHandle -> AvailInfo -> IO (Bin AvailInfo) # get :: ReadBinHandle -> IO AvailInfo #
Binary DetOrdAvails # |
Instance details Defined in GHC.Types.Avail Methods put_ :: WriteBinHandle -> DetOrdAvails -> IO () # put :: WriteBinHandle -> DetOrdAvails -> IO (Bin DetOrdAvails) # get :: ReadBinHandle -> IO DetOrdAvails #
Binary Activation # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> Activation -> IO () # put :: WriteBinHandle -> Activation -> IO (Bin Activation) # get :: ReadBinHandle -> IO Activation #
Binary CbvMark # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> CbvMark -> IO () # put :: WriteBinHandle -> CbvMark -> IO (Bin CbvMark) # get :: ReadBinHandle -> IO CbvMark #
Binary FunctionOrData # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> FunctionOrData -> IO () # put :: WriteBinHandle -> FunctionOrData -> IO (Bin FunctionOrData) # get :: ReadBinHandle -> IO FunctionOrData #
Binary ImportLevel # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> ImportLevel -> IO () # put :: WriteBinHandle -> ImportLevel -> IO (Bin ImportLevel) # get :: ReadBinHandle -> IO ImportLevel #
Binary InlinePragma # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> InlinePragma -> IO () # put :: WriteBinHandle -> InlinePragma -> IO (Bin InlinePragma) # get :: ReadBinHandle -> IO InlinePragma #
Binary InlineSpec # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> InlineSpec -> IO () # put :: WriteBinHandle -> InlineSpec -> IO (Bin InlineSpec) # get :: ReadBinHandle -> IO InlineSpec #
Binary LeftOrRight # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> LeftOrRight -> IO () # put :: WriteBinHandle -> LeftOrRight -> IO (Bin LeftOrRight) # get :: ReadBinHandle -> IO LeftOrRight #
Binary Levity # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> Levity -> IO () # put :: WriteBinHandle -> Levity -> IO (Bin Levity) # get :: ReadBinHandle -> IO Levity #
Binary OverlapFlag # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> OverlapFlag -> IO () # put :: WriteBinHandle -> OverlapFlag -> IO (Bin OverlapFlag) # get :: ReadBinHandle -> IO OverlapFlag #
Binary OverlapMode # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> OverlapMode -> IO () # put :: WriteBinHandle -> OverlapMode -> IO (Bin OverlapMode) # get :: ReadBinHandle -> IO OverlapMode #
Binary RecFlag # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> RecFlag -> IO () # put :: WriteBinHandle -> RecFlag -> IO (Bin RecFlag) # get :: ReadBinHandle -> IO RecFlag #
Binary RuleMatchInfo # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> RuleMatchInfo -> IO () # put :: WriteBinHandle -> RuleMatchInfo -> IO (Bin RuleMatchInfo) # get :: ReadBinHandle -> IO RuleMatchInfo #
Binary TupleSort # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> TupleSort -> IO () # put :: WriteBinHandle -> TupleSort -> IO (Bin TupleSort) # get :: ReadBinHandle -> IO TupleSort #
Binary TypeOrConstraint # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> TypeOrConstraint -> IO () # put :: WriteBinHandle -> TypeOrConstraint -> IO (Bin TypeOrConstraint) # get :: ReadBinHandle -> IO TypeOrConstraint #
Binary UnfoldingSource # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> UnfoldingSource -> IO () # put :: WriteBinHandle -> UnfoldingSource -> IO (Bin UnfoldingSource) # get :: ReadBinHandle -> IO UnfoldingSource #
Binary CCFlavour # |
Instance details Defined in GHC.Types.CostCentre Methods put_ :: WriteBinHandle -> CCFlavour -> IO () # put :: WriteBinHandle -> CCFlavour -> IO (Bin CCFlavour) # get :: ReadBinHandle -> IO CCFlavour #
Binary CostCentre # |
Instance details Defined in GHC.Types.CostCentre Methods put_ :: WriteBinHandle -> CostCentre -> IO () # put :: WriteBinHandle -> CostCentre -> IO (Bin CostCentre) # get :: ReadBinHandle -> IO CostCentre #
Binary CostCentreIndex # |
Instance details Defined in GHC.Types.CostCentre.State Methods put_ :: WriteBinHandle -> CostCentreIndex -> IO () # put :: WriteBinHandle -> CostCentreIndex -> IO (Bin CostCentreIndex) # get :: ReadBinHandle -> IO CostCentreIndex #
Binary Cpr # |
Instance details Defined in GHC.Types.Cpr Methods put_ :: WriteBinHandle -> Cpr -> IO () # put :: WriteBinHandle -> Cpr -> IO (Bin Cpr) # get :: ReadBinHandle -> IO Cpr #
Binary CprSig # |
Instance details Defined in GHC.Types.Cpr Methods put_ :: WriteBinHandle -> CprSig -> IO () # put :: WriteBinHandle -> CprSig -> IO (Bin CprSig) # get :: ReadBinHandle -> IO CprSig #
Binary CprType # |
Instance details Defined in GHC.Types.Cpr Methods put_ :: WriteBinHandle -> CprType -> IO () # put :: WriteBinHandle -> CprType -> IO (Bin CprType) # get :: ReadBinHandle -> IO CprType #
Binary Card # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> Card -> IO () # put :: WriteBinHandle -> Card -> IO (Bin Card) # get :: ReadBinHandle -> IO Card #
Binary Demand # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> Demand -> IO () # put :: WriteBinHandle -> Demand -> IO (Bin Demand) # get :: ReadBinHandle -> IO Demand #
Binary Divergence # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> Divergence -> IO () # put :: WriteBinHandle -> Divergence -> IO (Bin Divergence) # get :: ReadBinHandle -> IO Divergence #
Binary DmdEnv # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> DmdEnv -> IO () # put :: WriteBinHandle -> DmdEnv -> IO (Bin DmdEnv) # get :: ReadBinHandle -> IO DmdEnv #
Binary DmdSig # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> DmdSig -> IO () # put :: WriteBinHandle -> DmdSig -> IO (Bin DmdSig) # get :: ReadBinHandle -> IO DmdSig #
Binary DmdType # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> DmdType -> IO () # put :: WriteBinHandle -> DmdType -> IO (Bin DmdType) # get :: ReadBinHandle -> IO DmdType #
Binary SubDemand # |
Instance details Defined in GHC.Types.Demand Methods put_ :: WriteBinHandle -> SubDemand -> IO () # put :: WriteBinHandle -> SubDemand -> IO (Bin SubDemand) # get :: ReadBinHandle -> IO SubDemand #
Binary DuplicateRecordFields # |
Instance details Defined in GHC.Types.FieldLabel Methods put_ :: WriteBinHandle -> DuplicateRecordFields -> IO () # put :: WriteBinHandle -> DuplicateRecordFields -> IO (Bin DuplicateRecordFields) # get :: ReadBinHandle -> IO DuplicateRecordFields #
Binary Name => Binary FieldLabel # | 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 () # put :: WriteBinHandle -> FieldLabel -> IO (Bin FieldLabel) # get :: ReadBinHandle -> IO FieldLabel #
Binary FieldSelectors # |
Instance details Defined in GHC.Types.FieldLabel Methods put_ :: WriteBinHandle -> FieldSelectors -> IO () # put :: WriteBinHandle -> FieldSelectors -> IO (Bin FieldSelectors) # get :: ReadBinHandle -> IO FieldSelectors #
Binary CCallConv # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CCallConv -> IO () # put :: WriteBinHandle -> CCallConv -> IO (Bin CCallConv) # get :: ReadBinHandle -> IO CCallConv #
Binary CCallSpec # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CCallSpec -> IO () # put :: WriteBinHandle -> CCallSpec -> IO (Bin CCallSpec) # get :: ReadBinHandle -> IO CCallSpec #
Binary CCallTarget # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CCallTarget -> IO () # put :: WriteBinHandle -> CCallTarget -> IO (Bin CCallTarget) # get :: ReadBinHandle -> IO CCallTarget #
Binary CExportSpec # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CExportSpec -> IO () # put :: WriteBinHandle -> CExportSpec -> IO (Bin CExportSpec) # get :: ReadBinHandle -> IO CExportSpec #
Binary CType # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CType -> IO () # put :: WriteBinHandle -> CType -> IO (Bin CType) # get :: ReadBinHandle -> IO CType #
Binary ForeignCall # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> ForeignCall -> IO () # put :: WriteBinHandle -> ForeignCall -> IO (Bin ForeignCall) # get :: ReadBinHandle -> IO ForeignCall #
Binary Header # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> Header -> IO () # put :: WriteBinHandle -> Header -> IO (Bin Header) # get :: ReadBinHandle -> IO Header #
Binary Safety # |
Instance details Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> Safety -> IO () # put :: WriteBinHandle -> Safety -> IO (Bin Safety) # get :: ReadBinHandle -> IO Safety #
Binary LitNumType # |
Instance details Defined in GHC.Types.Literal Methods put_ :: WriteBinHandle -> LitNumType -> IO () # put :: WriteBinHandle -> LitNumType -> IO (Bin LitNumType) # get :: ReadBinHandle -> IO LitNumType #
Binary Literal # |
Instance details Defined in GHC.Types.Literal Methods put_ :: WriteBinHandle -> Literal -> IO () # put :: WriteBinHandle -> Literal -> IO (Bin Literal) # get :: ReadBinHandle -> IO Literal #
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_ :: WriteBinHandle -> Name -> IO () # put :: WriteBinHandle -> Name -> IO (Bin Name) # get :: ReadBinHandle -> IO Name #
Binary NameSpace # |
Instance details Defined in GHC.Types.Name.Occurrence Methods put_ :: WriteBinHandle -> NameSpace -> IO () # put :: WriteBinHandle -> NameSpace -> IO (Bin NameSpace) # get :: ReadBinHandle -> IO NameSpace #
Binary OccName # |
Instance details Defined in GHC.Types.Name.Occurrence Methods put_ :: WriteBinHandle -> OccName -> IO () # put :: WriteBinHandle -> OccName -> IO (Bin OccName) # get :: ReadBinHandle -> IO OccName #
Binary ImpDeclSpec # |
Instance details Defined in GHC.Types.Name.Reader Methods put_ :: WriteBinHandle -> ImpDeclSpec -> IO () # put :: WriteBinHandle -> ImpDeclSpec -> IO (Bin ImpDeclSpec) # get :: ReadBinHandle -> IO ImpDeclSpec #
Binary PkgQual # |
Instance details Defined in GHC.Types.PkgQual Methods put_ :: WriteBinHandle -> PkgQual -> IO () # put :: WriteBinHandle -> PkgQual -> IO (Bin PkgQual) # get :: ReadBinHandle -> IO PkgQual #
Binary IfaceTrustInfo # |
Instance details Defined in GHC.Types.SafeHaskell Methods put_ :: WriteBinHandle -> IfaceTrustInfo -> IO () # put :: WriteBinHandle -> IfaceTrustInfo -> IO (Bin IfaceTrustInfo) # get :: ReadBinHandle -> IO IfaceTrustInfo #
Binary SaneDouble # |
Instance details Defined in GHC.Types.SaneDouble Methods put_ :: WriteBinHandle -> SaneDouble -> IO () # put :: WriteBinHandle -> SaneDouble -> IO (Bin SaneDouble) # get :: ReadBinHandle -> IO SaneDouble #
Binary HscSource # |
Instance details Defined in GHC.Types.SourceFile Methods put_ :: WriteBinHandle -> HscSource -> IO () # put :: WriteBinHandle -> HscSource -> IO (Bin HscSource) # get :: ReadBinHandle -> IO HscSource #
Binary SourceText # |
Instance details Defined in GHC.Types.SourceText Methods put_ :: WriteBinHandle -> SourceText -> IO () # put :: WriteBinHandle -> SourceText -> IO (Bin SourceText) # get :: ReadBinHandle -> IO SourceText #
Binary UnhelpfulSpanReason # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> UnhelpfulSpanReason -> IO () # put :: WriteBinHandle -> UnhelpfulSpanReason -> IO (Bin UnhelpfulSpanReason) # get :: ReadBinHandle -> IO UnhelpfulSpanReason #
Binary FunTyFlag # |
Instance details Defined in GHC.Types.Var Methods put_ :: WriteBinHandle -> FunTyFlag -> IO () # put :: WriteBinHandle -> FunTyFlag -> IO (Bin FunTyFlag) # get :: ReadBinHandle -> IO FunTyFlag #
Binary Dependencies # |
Instance details Defined in GHC.Unit.Module.Deps Methods put_ :: WriteBinHandle -> Dependencies -> IO () # put :: WriteBinHandle -> Dependencies -> IO (Bin Dependencies) # get :: ReadBinHandle -> IO Dependencies #
Binary HomeModImport # |
Instance details Defined in GHC.Unit.Module.Deps Methods put_ :: WriteBinHandle -> HomeModImport -> IO () # put :: WriteBinHandle -> HomeModImport -> IO (Bin HomeModImport) # get :: ReadBinHandle -> IO HomeModImport #
Binary HomeModImportedAvails # |
Instance details Defined in GHC.Unit.Module.Deps Methods put_ :: WriteBinHandle -> HomeModImportedAvails -> IO () # put :: WriteBinHandle -> HomeModImportedAvails -> IO (Bin HomeModImportedAvails) # get :: ReadBinHandle -> IO HomeModImportedAvails #
Binary IfaceImportLevel # |
Instance details Defined in GHC.Unit.Module.Deps Methods put_ :: WriteBinHandle -> IfaceImportLevel -> IO () # put :: WriteBinHandle -> IfaceImportLevel -> IO (Bin IfaceImportLevel) # get :: ReadBinHandle -> IO IfaceImportLevel #
Binary Usage # |
Instance details Defined in GHC.Unit.Module.Deps Methods put_ :: WriteBinHandle -> Usage -> IO () # put :: WriteBinHandle -> Usage -> IO (Bin Usage) # get :: ReadBinHandle -> IO Usage #
Binary IfaceAbiHashes # |
Instance details Defined in GHC.Unit.Module.ModIface Methods put_ :: WriteBinHandle -> IfaceAbiHashes -> IO () # put :: WriteBinHandle -> IfaceAbiHashes -> IO (Bin IfaceAbiHashes) # get :: ReadBinHandle -> IO IfaceAbiHashes #
Binary IfaceModInfo # |
Instance details Defined in GHC.Unit.Module.ModIface Methods put_ :: WriteBinHandle -> IfaceModInfo -> IO () # put :: WriteBinHandle -> IfaceModInfo -> IO (Bin IfaceModInfo) # get :: ReadBinHandle -> IO IfaceModInfo #
Binary IfaceSimplifiedCore # |
Instance details Defined in GHC.Unit.Module.ModIface Methods put_ :: WriteBinHandle -> IfaceSimplifiedCore -> IO () # put :: WriteBinHandle -> IfaceSimplifiedCore -> IO (Bin IfaceSimplifiedCore) # get :: ReadBinHandle -> IO IfaceSimplifiedCore #
Binary IfaceTopEnv # |
Instance details Defined in GHC.Unit.Module.ModIface Methods put_ :: WriteBinHandle -> IfaceTopEnv -> IO () # put :: WriteBinHandle -> IfaceTopEnv -> IO (Bin IfaceTopEnv) # get :: ReadBinHandle -> IO IfaceTopEnv #
Binary ModIface # |
Instance details Defined in GHC.Unit.Module.ModIface Methods put_ :: WriteBinHandle -> ModIface -> IO () # put :: WriteBinHandle -> ModIface -> IO (Bin ModIface) # get :: ReadBinHandle -> IO ModIface #
Binary WarningCategory # |
Instance details Defined in GHC.Unit.Module.Warnings Methods put_ :: WriteBinHandle -> WarningCategory -> IO () # put :: WriteBinHandle -> WarningCategory -> IO (Bin WarningCategory) # get :: ReadBinHandle -> IO WarningCategory #
Binary IfaceCLabel # |
Instance details Defined in GHC.Unit.Module.WholeCoreBindings Methods put_ :: WriteBinHandle -> IfaceCLabel -> IO () # put :: WriteBinHandle -> IfaceCLabel -> IO (Bin IfaceCLabel) # get :: ReadBinHandle -> IO IfaceCLabel #
Binary IfaceCStubs # |
Instance details Defined in GHC.Unit.Module.WholeCoreBindings Methods put_ :: WriteBinHandle -> IfaceCStubs -> IO () # put :: WriteBinHandle -> IfaceCStubs -> IO (Bin IfaceCStubs) # get :: ReadBinHandle -> IO IfaceCStubs #
Binary IfaceForeign # |
Instance details Defined in GHC.Unit.Module.WholeCoreBindings Methods put_ :: WriteBinHandle -> IfaceForeign -> IO () # put :: WriteBinHandle -> IfaceForeign -> IO (Bin IfaceForeign) # get :: ReadBinHandle -> IO IfaceForeign #
Binary IfaceForeignFile # |
Instance details Defined in GHC.Unit.Module.WholeCoreBindings Methods put_ :: WriteBinHandle -> IfaceForeignFile -> IO () # put :: WriteBinHandle -> IfaceForeignFile -> IO (Bin IfaceForeignFile) # get :: ReadBinHandle -> IO IfaceForeignFile #
Binary InstantiatedUnit # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> InstantiatedUnit -> IO () # put :: WriteBinHandle -> InstantiatedUnit -> IO (Bin InstantiatedUnit) # get :: ReadBinHandle -> IO InstantiatedUnit #
Binary Unit # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> Unit -> IO () # put :: WriteBinHandle -> Unit -> IO (Bin Unit) # get :: ReadBinHandle -> IO Unit #
Binary UnitId # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> UnitId -> IO () # put :: WriteBinHandle -> UnitId -> IO (Bin UnitId) # get :: ReadBinHandle -> IO UnitId #
Binary BinData # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinData -> IO () # put :: WriteBinHandle -> BinData -> IO (Bin BinData) # get :: ReadBinHandle -> IO BinData #
Binary BinSpan # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinSpan -> IO () # put :: WriteBinHandle -> BinSpan -> IO (Bin BinSpan) # get :: ReadBinHandle -> IO BinSpan #
Binary BinSrcSpan # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinSrcSpan -> IO () # put :: WriteBinHandle -> BinSrcSpan -> IO (Bin BinSrcSpan) # get :: ReadBinHandle -> IO BinSrcSpan #
Binary JoinPointHood # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> JoinPointHood -> IO () # put :: WriteBinHandle -> JoinPointHood -> IO (Bin JoinPointHood) # get :: ReadBinHandle -> IO JoinPointHood #
Binary Boxity # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> Boxity -> IO () # put :: WriteBinHandle -> Boxity -> IO (Bin Boxity) # get :: ReadBinHandle -> IO Boxity #
Binary Fixity # |
Instance details Defined in GHC.Hs.Basic Methods put_ :: WriteBinHandle -> Fixity -> IO () # put :: WriteBinHandle -> Fixity -> IO (Bin Fixity) # get :: ReadBinHandle -> IO Fixity #
Binary FixityDirection # |
Instance details Defined in GHC.Hs.Basic Methods put_ :: WriteBinHandle -> FixityDirection -> IO () # put :: WriteBinHandle -> FixityDirection -> IO (Bin FixityDirection) # get :: ReadBinHandle -> IO FixityDirection #
Binary Role # |
Instance details Defined in GHC.Core.Coercion.Axiom Methods put_ :: WriteBinHandle -> Role -> IO () # put :: WriteBinHandle -> Role -> IO (Bin Role) # get :: ReadBinHandle -> IO Role #
Binary SrcStrictness # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: WriteBinHandle -> SrcStrictness -> IO () # put :: WriteBinHandle -> SrcStrictness -> IO (Bin SrcStrictness) # get :: ReadBinHandle -> IO SrcStrictness #
Binary SrcUnpackedness # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: WriteBinHandle -> SrcUnpackedness -> IO () # put :: WriteBinHandle -> SrcUnpackedness -> IO (Bin SrcUnpackedness) # get :: ReadBinHandle -> IO SrcUnpackedness #
Binary IsBootInterface # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> IsBootInterface -> IO () # put :: WriteBinHandle -> IsBootInterface -> IO (Bin IsBootInterface) # get :: ReadBinHandle -> IO IsBootInterface #
Binary ModuleName # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> ModuleName -> IO () # put :: WriteBinHandle -> ModuleName -> IO (Bin ModuleName) # get :: ReadBinHandle -> IO ModuleName #
Binary ForAllTyFlag # |
Instance details Defined in GHC.Hs.Specificity Methods put_ :: WriteBinHandle -> ForAllTyFlag -> IO () # put :: WriteBinHandle -> ForAllTyFlag -> IO (Bin ForAllTyFlag) # get :: ReadBinHandle -> IO ForAllTyFlag #
Binary Specificity # |
Instance details Defined in GHC.Hs.Specificity Methods put_ :: WriteBinHandle -> Specificity -> IO () # put :: WriteBinHandle -> Specificity -> IO (Bin Specificity) # get :: ReadBinHandle -> IO Specificity #
Binary PromotionFlag # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> PromotionFlag -> IO () # put :: WriteBinHandle -> PromotionFlag -> IO (Bin PromotionFlag) # get :: ReadBinHandle -> IO PromotionFlag #
Binary KindRep # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> KindRep -> IO () # put :: WriteBinHandle -> KindRep -> IO (Bin KindRep) # get :: ReadBinHandle -> IO KindRep #
Binary TyCon # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> TyCon -> IO () # put :: WriteBinHandle -> TyCon -> IO (Bin TyCon) # get :: ReadBinHandle -> IO TyCon #
Binary TypeLitSort # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> TypeLitSort -> IO () # put :: WriteBinHandle -> TypeLitSort -> IO (Bin TypeLitSort) # get :: ReadBinHandle -> IO TypeLitSort #
Binary Day # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Day -> IO () # put :: WriteBinHandle -> Day -> IO (Bin Day) # get :: ReadBinHandle -> IO Day #
Binary DiffTime # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> DiffTime -> IO () # put :: WriteBinHandle -> DiffTime -> IO (Bin DiffTime) # get :: ReadBinHandle -> IO DiffTime #
Binary UTCTime # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> UTCTime -> IO () # put :: WriteBinHandle -> UTCTime -> IO (Bin UTCTime) # get :: ReadBinHandle -> IO UTCTime #
Binary Integer # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Integer -> IO () # put :: WriteBinHandle -> Integer -> IO (Bin Integer) # get :: ReadBinHandle -> IO Integer #
Binary () # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> () -> IO () # put :: WriteBinHandle -> () -> IO (Bin ()) # get :: ReadBinHandle -> IO () #
Binary Bool # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Bool -> IO () # put :: WriteBinHandle -> Bool -> IO (Bin Bool) # get :: ReadBinHandle -> IO Bool #
Binary Char # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Char -> IO () # put :: WriteBinHandle -> Char -> IO (Bin Char) # get :: ReadBinHandle -> IO Char #
Binary Int # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Int -> IO () # put :: WriteBinHandle -> Int -> IO (Bin Int) # get :: ReadBinHandle -> IO Int #
Binary RuntimeRep # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> RuntimeRep -> IO () # put :: WriteBinHandle -> RuntimeRep -> IO (Bin RuntimeRep) # get :: ReadBinHandle -> IO RuntimeRep #
Binary VecCount # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> VecCount -> IO () # put :: WriteBinHandle -> VecCount -> IO (Bin VecCount) # get :: ReadBinHandle -> IO VecCount #
Binary VecElem # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> VecElem -> IO () # put :: WriteBinHandle -> VecElem -> IO (Bin VecElem) # get :: ReadBinHandle -> IO VecElem #
Binary v => Binary (IntMap v) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> IntMap v -> IO () # put :: WriteBinHandle -> IntMap v -> IO (Bin (IntMap v)) # get :: ReadBinHandle -> IO (IntMap v) #
(Binary a, Ord a) => Binary (Set a) # | 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 () # put :: WriteBinHandle -> Set a -> IO (Bin (Set a)) # get :: ReadBinHandle -> IO (Set a) #
Binary a => Binary (NonEmpty a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> NonEmpty a -> IO () # put :: WriteBinHandle -> NonEmpty a -> IO (Bin (NonEmpty a)) # get :: ReadBinHandle -> IO (NonEmpty a) #
Binary a => Binary (Ratio a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Ratio a -> IO () # put :: WriteBinHandle -> Ratio a -> IO (Bin (Ratio a)) # get :: ReadBinHandle -> IO (Ratio a) #
Binary a => Binary (Maybe a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Maybe a -> IO () # put :: WriteBinHandle -> Maybe a -> IO (Bin (Maybe a)) # get :: ReadBinHandle -> IO (Maybe a) #
Binary name => Binary (AnnTarget name) # |
Instance details Defined in GHC.Types.Annotations Methods put_ :: WriteBinHandle -> AnnTarget name -> IO () # put :: WriteBinHandle -> AnnTarget name -> IO (Bin (AnnTarget name)) # get :: ReadBinHandle -> IO (AnnTarget name) #
Binary (DefMethSpec IfaceType) # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> DefMethSpec IfaceType -> IO () # put :: WriteBinHandle -> DefMethSpec IfaceType -> IO (Bin (DefMethSpec IfaceType)) # get :: ReadBinHandle -> IO (DefMethSpec IfaceType) #
Binary unit => Binary (Definite unit) # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> Definite unit -> IO () # put :: WriteBinHandle -> Definite unit -> IO (Bin (Definite unit)) # get :: ReadBinHandle -> IO (Definite unit) #
Binary a => Binary (GenModule a) # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> GenModule a -> IO () # put :: WriteBinHandle -> GenModule a -> IO (Bin (GenModule a)) # get :: ReadBinHandle -> IO (GenModule a) #
Binary a => Binary (GenWithIsBoot a) # |
Instance details Defined in GHC.Unit.Types Methods put_ :: WriteBinHandle -> GenWithIsBoot a -> IO () # put :: WriteBinHandle -> GenWithIsBoot a -> IO (Bin (GenWithIsBoot a)) # get :: ReadBinHandle -> IO (GenWithIsBoot a) #
Binary a => Binary (BinLocated a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> BinLocated a -> IO () # put :: WriteBinHandle -> BinLocated a -> IO (Bin (BinLocated a)) # get :: ReadBinHandle -> IO (BinLocated a) #
Enum a => Binary (EnumBinary a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> EnumBinary a -> IO () # put :: WriteBinHandle -> EnumBinary a -> IO (Bin (EnumBinary a)) # get :: ReadBinHandle -> IO (EnumBinary a) #
Binary a => Binary (FingerprintWithValue a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FingerprintWithValue a -> IO () # put :: WriteBinHandle -> FingerprintWithValue a -> IO (Bin (FingerprintWithValue a)) # get :: ReadBinHandle -> IO (FingerprintWithValue a) #
Binary (FixedLengthEncoding Word16) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word16 -> IO () # put :: WriteBinHandle -> FixedLengthEncoding Word16 -> IO (Bin (FixedLengthEncoding Word16)) # get :: ReadBinHandle -> IO (FixedLengthEncoding Word16) #
Binary (FixedLengthEncoding Word32) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word32 -> IO () # put :: WriteBinHandle -> FixedLengthEncoding Word32 -> IO (Bin (FixedLengthEncoding Word32)) # get :: ReadBinHandle -> IO (FixedLengthEncoding Word32) #
Binary (FixedLengthEncoding Word64) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word64 -> IO () # put :: WriteBinHandle -> FixedLengthEncoding Word64 -> IO (Bin (FixedLengthEncoding Word64)) # get :: ReadBinHandle -> IO (FixedLengthEncoding Word64) #
Binary (FixedLengthEncoding Word8) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word8 -> IO () # put :: WriteBinHandle -> FixedLengthEncoding Word8 -> IO (Bin (FixedLengthEncoding Word8)) # get :: ReadBinHandle -> IO (FixedLengthEncoding Word8) #
Binary a => Binary (Maybe a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Maybe a -> IO () # put :: WriteBinHandle -> Maybe a -> IO (Bin (Maybe a)) # get :: ReadBinHandle -> IO (Maybe a) #
Binary a => Binary [a] # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> [a] -> IO () # put :: WriteBinHandle -> [a] -> IO (Bin [a]) # get :: ReadBinHandle -> IO [a] #
(Ix a, Binary a, Binary b) => Binary (Array a b) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Array a b -> IO () # put :: WriteBinHandle -> Array a b -> IO (Bin (Array a b)) # get :: ReadBinHandle -> IO (Array a b) #
(Binary a, Binary b) => Binary (Either a b) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Either a b -> IO () # put :: WriteBinHandle -> Either a b -> IO (Bin (Either a b)) # get :: ReadBinHandle -> IO (Either a b) #
Typeable a => Binary (TypeRep a) # |
Instance details Defined in GHC.Utils.Binary.Typeable Methods put_ :: WriteBinHandle -> TypeRep a -> IO () # put :: WriteBinHandle -> TypeRep a -> IO (Bin (TypeRep a)) # get :: ReadBinHandle -> IO (TypeRep a) #
Binary (EnumSet a) # | 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 () # put :: WriteBinHandle -> EnumSet a -> IO (Bin (EnumSet a)) # get :: ReadBinHandle -> IO (EnumSet a) #
Binary a => Binary (WithHsDocIdentifiers a GhcRn) # |
Instance details Defined in GHC.Hs.Doc Methods put_ :: WriteBinHandle -> WithHsDocIdentifiers a GhcRn -> IO () # put :: WriteBinHandle -> WithHsDocIdentifiers a GhcRn -> IO (Bin (WithHsDocIdentifiers a GhcRn)) # get :: ReadBinHandle -> IO (WithHsDocIdentifiers a GhcRn) #
(Binary r, Binary b) => Binary (IfaceBindingX b r) # |
Instance details Defined in GHC.Iface.Syntax Methods put_ :: WriteBinHandle -> IfaceBindingX b r -> IO () # put :: WriteBinHandle -> IfaceBindingX b r -> IO (Bin (IfaceBindingX b r)) # get :: ReadBinHandle -> IO (IfaceBindingX b r) #
(Binary tv, Binary vis) => Binary (VarBndr tv vis) # |
Instance details Defined in GHC.Types.Var Methods put_ :: WriteBinHandle -> VarBndr tv vis -> IO () # put :: WriteBinHandle -> VarBndr tv vis -> IO (Bin (VarBndr tv vis)) # get :: ReadBinHandle -> IO (VarBndr tv vis) #
Binary (Bin a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Bin a -> IO () # put :: WriteBinHandle -> Bin a -> IO (Bin (Bin a)) # get :: ReadBinHandle -> IO (Bin a) #
(Binary a, Binary b) => Binary (a, b) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> (a, b) -> IO () # put :: WriteBinHandle -> (a, b) -> IO (Bin (a, b)) # get :: ReadBinHandle -> IO (a, b) #
(Binary a, Binary b, Binary c) => Binary (a, b, c) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> (a, b, c) -> IO () # put :: WriteBinHandle -> (a, b, c) -> IO (Bin (a, b, c)) # get :: ReadBinHandle -> IO (a, b, c) #
(Binary a, Binary b, Binary c, Binary d) => Binary (a, b, c, d) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> (a, b, c, d) -> IO () # put :: WriteBinHandle -> (a, b, c, d) -> IO (Bin (a, b, c, d)) # get :: ReadBinHandle -> IO (a, b, c, d) #
(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_ :: WriteBinHandle -> (a, b, c, d, e) -> IO () # put :: WriteBinHandle -> (a, b, c, d, e) -> IO (Bin (a, b, c, d, e)) # get :: ReadBinHandle -> IO (a, b, c, d, e) #
(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_ :: WriteBinHandle -> (a, b, c, d, e, f) -> IO () # put :: WriteBinHandle -> (a, b, c, d, e, f) -> IO (Bin (a, b, c, d, e, f)) # get :: ReadBinHandle -> IO (a, b, c, d, e, f) #
(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_ :: WriteBinHandle -> (a, b, c, d, e, f, g) -> IO () # put :: WriteBinHandle -> (a, b, c, d, e, f, g) -> IO (Bin (a, b, c, d, e, f, g)) # get :: ReadBinHandle -> IO (a, b, c, d, e, f, g) #

data ReadBinHandle #

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

The buffer is an unboxed binary array.

data WriteBinHandle #

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 #

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

type Dictionary = SymbolTable FastString #

A `SymbolTable` of `FastString`s.

data BinData #

Constructors

BinData Int BinArray |

#### Instances

Instances details

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

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 () #

SeekBin but without calling expandBin

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 #

Get access to the underlying buffer.

freezeWriteHandle :: WriteBinHandle -> IO ReadBinHandle #

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 #

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 #

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` 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 () #

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

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) #

``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 () #

Like `forwardGetRel`, but discard the result.

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

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 () #

getByte :: ReadBinHandle -> IO Word8 #

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

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

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

Get a ByteString whose length is known

# Variable length encodings

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 #

# Fixed length encoding

newtype FixedLengthEncoding a #

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) # |
Instance details Defined in GHC.Utils.Binary Methods showsPrec :: Int -> FixedLengthEncoding a -> ShowS # show :: FixedLengthEncoding a -> String # showList :: [FixedLengthEncoding a] -> ShowS #
Binary (FixedLengthEncoding Word16) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word16 -> IO () # put :: WriteBinHandle -> FixedLengthEncoding Word16 -> IO (Bin (FixedLengthEncoding Word16)) # get :: ReadBinHandle -> IO (FixedLengthEncoding Word16) #
Binary (FixedLengthEncoding Word32) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word32 -> IO () # put :: WriteBinHandle -> FixedLengthEncoding Word32 -> IO (Bin (FixedLengthEncoding Word32)) # get :: ReadBinHandle -> IO (FixedLengthEncoding Word32) #
Binary (FixedLengthEncoding Word64) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word64 -> IO () # put :: WriteBinHandle -> FixedLengthEncoding Word64 -> IO (Bin (FixedLengthEncoding Word64)) # get :: ReadBinHandle -> IO (FixedLengthEncoding Word64) #
Binary (FixedLengthEncoding Word8) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FixedLengthEncoding Word8 -> IO () # put :: WriteBinHandle -> FixedLengthEncoding Word8 -> IO (Bin (FixedLengthEncoding Word8)) # get :: ReadBinHandle -> IO (FixedLengthEncoding Word8) #
Eq a => Eq (FixedLengthEncoding a) # |
Instance details Defined in GHC.Utils.Binary Methods (==) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool # (/=) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool #
Ord a => Ord (FixedLengthEncoding a) # |
Instance details Defined in GHC.Utils.Binary Methods compare :: FixedLengthEncoding a -> FixedLengthEncoding a -> Ordering # (<) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool # (<=) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool # (>) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool # (>=) :: FixedLengthEncoding a -> FixedLengthEncoding a -> Bool # max :: FixedLengthEncoding a -> FixedLengthEncoding a -> FixedLengthEncoding a # min :: FixedLengthEncoding a -> FixedLengthEncoding a -> FixedLengthEncoding a #

# Lazy Binary I/O

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) #

Deserialize a value serialized by `lazyPutMaybe`.

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

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.

# EnumBinary

newtype EnumBinary a #

Constructors

EnumBinary |
Fields unEnumBinary :: a

#### Instances

Instances details

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

# User data

data ReaderUserData #

UserData required to deserialise symbols for interface files.

See Note [Binary UserData]

getReaderUserData :: ReadBinHandle -> ReaderUserData #

setReaderUserData :: ReadBinHandle -> ReaderUserData -> ReadBinHandle #

noReaderUserData :: ReaderUserData #

data WriterUserData #

UserData required to serialise symbols for interface files.

See Note [Binary UserData]

getWriterUserData :: WriteBinHandle -> WriterUserData #

setWriterUserData :: WriteBinHandle -> WriterUserData -> WriteBinHandle #

noWriterUserData :: WriterUserData #

mkWriterUserData :: [SomeBinaryWriter] -> WriterUserData #

mkReaderUserData :: [SomeBinaryReader] -> ReaderUserData #

newReadState #

Arguments

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

newWriteState #

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 #

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 #

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 #

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 #

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 #

Constructors

BinaryReader |
Fields getEntry :: ReadBinHandle -> IO s

#### Instances

Instances details

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

newtype BinaryWriter s #

Constructors

BinaryWriter |
Fields putEntry :: WriteBinHandle -> s -> IO ()

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

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

data SomeBinaryReader #

Existential for `BinaryReader` with a type witness.

data SomeBinaryWriter #

Existential for `BinaryWriter` with a type witness.

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

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

# Tables

data ReaderTable a #

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 #

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) #

initFastStringWriterTable :: IO (WriterTable, BinaryWriter FastString) #

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

getDictionary :: ReadBinHandle -> IO Dictionary #

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

data FSTable #

Constructors

FSTable |
Fields fs_tab_next :: !FastMutInt fs_tab_map :: !(IORef (UniqFM FastString (Int, FastString)))

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

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

# Generic deduplication table

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

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) #

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

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

Read a value from a `SymbolTable`.

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

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) #

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 #

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 #

Constructors

BinSpan |
Fields unBinSpan :: RealSrcSpan

#### Instances

Instances details

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

newtype BinSrcSpan #

Constructors

BinSrcSpan |
Fields unBinSrcSpan :: SrcSpan

#### Instances

Instances details

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

newtype BinLocated a #

Constructors

BinLocated |
Fields unBinLocated :: Located a

#### Instances

Instances details

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

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

newtype BindingName #

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

Constructors

BindingName |
Fields getBindingName :: Name

#### Instances

Instances details

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

simpleBindingNameWriter :: BinaryWriter Name -> BinaryWriter BindingName #

simpleBindingNameReader :: BinaryReader Name -> BinaryReader BindingName #

data FullBinData #

`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 # |
Instance details Defined in GHC.Utils.Binary Methods (==) :: FullBinData -> FullBinData -> Bool # (/=) :: FullBinData -> FullBinData -> Bool #
Ord FullBinData # |
Instance details Defined in GHC.Utils.Binary Methods compare :: FullBinData -> FullBinData -> Ordering # (<) :: FullBinData -> FullBinData -> Bool # (<=) :: FullBinData -> FullBinData -> Bool # (>) :: FullBinData -> FullBinData -> Bool # (>=) :: FullBinData -> FullBinData -> Bool # max :: FullBinData -> FullBinData -> FullBinData # min :: FullBinData -> FullBinData -> FullBinData #

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

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 #

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 () #

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

type BinArray = ForeignPtr Word8 #

# FingerprintWithValue

data FingerprintWithValue a #

A wrapper which allows us to store a fingerprint and optionally the value which was used to create the fingerprint.

Constructors

FingerprintWithValue !Fingerprint (Maybe a) |

#### Instances

Instances details

Functor FingerprintWithValue # |
Instance details Defined in GHC.Utils.Binary Methods fmap :: (a -> b) -> FingerprintWithValue a -> FingerprintWithValue b # (<$) :: a -> FingerprintWithValue b -> FingerprintWithValue a #
NFData a => NFData (FingerprintWithValue a) # |
Instance details Defined in GHC.Utils.Binary Methods rnf :: FingerprintWithValue a -> () #
Binary a => Binary (FingerprintWithValue a) # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> FingerprintWithValue a -> IO () # put :: WriteBinHandle -> FingerprintWithValue a -> IO (Bin (FingerprintWithValue a)) # get :: ReadBinHandle -> IO (FingerprintWithValue a) #