ghc-lib-parser-9.8.2.20240223: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.Utils.Binary

Synopsis

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_ :: BinHandle -> Bin a -> IO () #

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

get :: BinHandle -> 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 #

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

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

get :: BinHandle -> IO a #

Instances

Instances details
Binary SomeTypeRep # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary Fingerprint # 
Instance details

Defined in GHC.Utils.Binary

Binary Int16 # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Int16 -> IO () #

put :: BinHandle -> Int16 -> IO (Bin Int16) #

get :: BinHandle -> IO Int16 #

Binary Int32 # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Int32 -> IO () #

put :: BinHandle -> Int32 -> IO (Bin Int32) #

get :: BinHandle -> IO Int32 #

Binary Int64 # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Int64 -> IO () #

put :: BinHandle -> Int64 -> IO (Bin Int64) #

get :: BinHandle -> IO Int64 #

Binary Int8 # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Int8 -> IO () #

put :: BinHandle -> Int8 -> IO (Bin Int8) #

get :: BinHandle -> IO Int8 #

Binary Word16 # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Word16 -> IO () #

put :: BinHandle -> Word16 -> IO (Bin Word16) #

get :: BinHandle -> IO Word16 #

Binary Word32 # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Word32 -> IO () #

put :: BinHandle -> Word32 -> IO (Bin Word32) #

get :: BinHandle -> IO Word32 #

Binary Word64 # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Word64 -> IO () #

put :: BinHandle -> Word64 -> IO (Bin Word64) #

get :: BinHandle -> IO Word64 #

Binary Word8 # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Word8 -> IO () #

put :: BinHandle -> Word8 -> IO (Bin Word8) #

get :: BinHandle -> IO Word8 #

Binary ByteString # 
Instance details

Defined in GHC.Utils.Binary

Binary IsOrphan # 
Instance details

Defined in GHC.Core

Binary StrictnessMark # 
Instance details

Defined in GHC.Core.DataCon

Binary CallerCcFilter # 
Instance details

Defined in GHC.Core.Opt.CallerCC.Types

Binary NamePattern # 
Instance details

Defined in GHC.Core.Opt.CallerCC.Types

Binary CoSel # 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

put_ :: BinHandle -> CoSel -> IO () #

put :: BinHandle -> CoSel -> IO (Bin CoSel) #

get :: BinHandle -> IO CoSel #

Binary Injectivity # 
Instance details

Defined in GHC.Core.TyCon

Binary PrimElemRep # 
Instance details

Defined in GHC.Core.TyCon

Binary PrimRep # 
Instance details

Defined in GHC.Core.TyCon

Binary TyConBndrVis # 
Instance details

Defined in GHC.Core.TyCon

Binary FastString # 
Instance details

Defined in GHC.Utils.Binary

Binary LexicalFastString # 
Instance details

Defined in GHC.Utils.Binary

Binary NonDetFastString # 
Instance details

Defined in GHC.Utils.Binary

Binary Language # 
Instance details

Defined in GHC.Driver.Flags

Binary DocStructureItem # 
Instance details

Defined in GHC.Hs.Doc

Binary Docs # 
Instance details

Defined in GHC.Hs.Doc

Methods

put_ :: BinHandle -> Docs -> IO () #

put :: BinHandle -> Docs -> IO (Bin Docs) #

get :: BinHandle -> IO Docs #

Binary HsDocString # 
Instance details

Defined in GHC.Hs.DocString

Binary HsDocStringChunk # 
Instance details

Defined in GHC.Hs.DocString

Binary HsDocStringDecorator # 
Instance details

Defined in GHC.Hs.DocString

Binary ExtensibleFields # 
Instance details

Defined in GHC.Iface.Ext.Fields

Binary IfGuidance # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceAT # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceAlt # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceAnnotation # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceAxBranch # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceBang # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceBooleanFormula # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceClassOp # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceClsInst # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceCompleteMatch # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceConAlt # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceConDecl # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceConDecls # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceDecl # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceExpr # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceFamInst # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceFamTyConFlav # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceIdDetails # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceInfoItem # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceJoinInfo # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceLFInfo # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceLetBndr # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceMaybeRhs # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceRule # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceSrcBang # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceStringLiteral # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceTickish # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceTopBndrInfo # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceTyConParent # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceUnfolding # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceWarningTxt # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceWarnings # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceAppArgs # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceBndr # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceCoercion # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceMCoercion # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceOneShot # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceTyCon # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceTyConInfo # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceTyConSort # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceTyLit # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceType # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceUnivCoProv # 
Instance details

Defined in GHC.Iface.Type

Binary AOp # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> AOp -> IO () #

put :: BinHandle -> AOp -> IO (Bin AOp) #

get :: BinHandle -> IO AOp #

Binary JExpr # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> JExpr -> IO () #

put :: BinHandle -> JExpr -> IO (Bin JExpr) #

get :: BinHandle -> IO JExpr #

Binary JStat # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> JStat -> IO () #

put :: BinHandle -> JStat -> IO (Bin JStat) #

get :: BinHandle -> IO JStat #

Binary JVal # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> JVal -> IO () #

put :: BinHandle -> JVal -> IO (Bin JVal) #

get :: BinHandle -> IO JVal #

Binary Op # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> Op -> IO () #

put :: BinHandle -> Op -> IO (Bin Op) #

get :: BinHandle -> IO Op #

Binary UOp # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> UOp -> IO () #

put :: BinHandle -> UOp -> IO (Bin UOp) #

get :: BinHandle -> IO UOp #

Binary Ident # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> Ident -> IO () #

put :: BinHandle -> Ident -> IO (Bin Ident) #

get :: BinHandle -> IO Ident #

Binary Serialized # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary TagInfo # 
Instance details

Defined in GHC.Stg.InferTags.TagSig

Binary TagSig # 
Instance details

Defined in GHC.Stg.InferTags.TagSig

Methods

put_ :: BinHandle -> TagSig -> IO () #

put :: BinHandle -> TagSig -> IO (Bin TagSig) #

get :: BinHandle -> IO TagSig #

Binary BlockDeps # 
Instance details

Defined in GHC.StgToJS.Object

Binary BlockInfo # 
Instance details

Defined in GHC.StgToJS.Object

Binary ExportedFun # 
Instance details

Defined in GHC.StgToJS.Object

Binary IndexEntry # 
Instance details

Defined in GHC.StgToJS.Object

Binary CILayout # 
Instance details

Defined in GHC.StgToJS.Object

Binary CIRegs # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> CIRegs -> IO () #

put :: BinHandle -> CIRegs -> IO (Bin CIRegs) #

get :: BinHandle -> IO CIRegs #

Binary CIStatic # 
Instance details

Defined in GHC.StgToJS.Object

Binary CIType # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> CIType -> IO () #

put :: BinHandle -> CIType -> IO (Bin CIType) #

get :: BinHandle -> IO CIType #

Binary ClosureInfo # 
Instance details

Defined in GHC.StgToJS.Object

Binary ExpFun # 
Instance details

Defined in GHC.StgToJS.Object

Methods

put_ :: BinHandle -> ExpFun -> IO () #

put :: BinHandle -> ExpFun -> IO (Bin ExpFun) #

get :: BinHandle -> IO ExpFun #

Binary ForeignJSRef # 
Instance details

Defined in GHC.StgToJS.Object

Binary JSFFIType # 
Instance details

Defined in GHC.StgToJS.Object

Binary StaticArg # 
Instance details

Defined in GHC.StgToJS.Object

Binary StaticInfo # 
Instance details

Defined in GHC.StgToJS.Object

Binary StaticLit # 
Instance details

Defined in GHC.StgToJS.Object

Binary StaticUnboxed # 
Instance details

Defined in GHC.StgToJS.Object

Binary StaticVal # 
Instance details

Defined in GHC.StgToJS.Object

Binary VarType # 
Instance details

Defined in GHC.StgToJS.Object

Binary AvailInfo # 
Instance details

Defined in GHC.Types.Avail

Binary Activation # 
Instance details

Defined in GHC.Types.Basic

Binary CbvMark # 
Instance details

Defined in GHC.Types.Basic

Binary FunctionOrData # 
Instance details

Defined in GHC.Types.Basic

Binary InlinePragma # 
Instance details

Defined in GHC.Types.Basic

Binary InlineSpec # 
Instance details

Defined in GHC.Types.Basic

Binary LeftOrRight # 
Instance details

Defined in GHC.Types.Basic

Binary Levity # 
Instance details

Defined in GHC.Types.Basic

Methods

put_ :: BinHandle -> Levity -> IO () #

put :: BinHandle -> Levity -> IO (Bin Levity) #

get :: BinHandle -> IO Levity #

Binary OverlapFlag # 
Instance details

Defined in GHC.Types.Basic

Binary OverlapMode # 
Instance details

Defined in GHC.Types.Basic

Binary RecFlag # 
Instance details

Defined in GHC.Types.Basic

Binary RuleMatchInfo # 
Instance details

Defined in GHC.Types.Basic

Binary TupleSort # 
Instance details

Defined in GHC.Types.Basic

Binary UnfoldingSource # 
Instance details

Defined in GHC.Types.Basic

Binary CCFlavour # 
Instance details

Defined in GHC.Types.CostCentre

Binary CostCentre # 
Instance details

Defined in GHC.Types.CostCentre

Binary CostCentreIndex # 
Instance details

Defined in GHC.Types.CostCentre.State

Binary Cpr # 
Instance details

Defined in GHC.Types.Cpr

Methods

put_ :: BinHandle -> Cpr -> IO () #

put :: BinHandle -> Cpr -> IO (Bin Cpr) #

get :: BinHandle -> IO Cpr #

Binary CprSig # 
Instance details

Defined in GHC.Types.Cpr

Methods

put_ :: BinHandle -> CprSig -> IO () #

put :: BinHandle -> CprSig -> IO (Bin CprSig) #

get :: BinHandle -> IO CprSig #

Binary CprType # 
Instance details

Defined in GHC.Types.Cpr

Binary Card # 
Instance details

Defined in GHC.Types.Demand

Methods

put_ :: BinHandle -> Card -> IO () #

put :: BinHandle -> Card -> IO (Bin Card) #

get :: BinHandle -> IO Card #

Binary Demand # 
Instance details

Defined in GHC.Types.Demand

Methods

put_ :: BinHandle -> Demand -> IO () #

put :: BinHandle -> Demand -> IO (Bin Demand) #

get :: BinHandle -> IO Demand #

Binary Divergence # 
Instance details

Defined in GHC.Types.Demand

Binary DmdEnv # 
Instance details

Defined in GHC.Types.Demand

Methods

put_ :: BinHandle -> DmdEnv -> IO () #

put :: BinHandle -> DmdEnv -> IO (Bin DmdEnv) #

get :: BinHandle -> IO DmdEnv #

Binary DmdSig # 
Instance details

Defined in GHC.Types.Demand

Methods

put_ :: BinHandle -> DmdSig -> IO () #

put :: BinHandle -> DmdSig -> IO (Bin DmdSig) #

get :: BinHandle -> IO DmdSig #

Binary DmdType # 
Instance details

Defined in GHC.Types.Demand

Binary SubDemand # 
Instance details

Defined in GHC.Types.Demand

Binary DuplicateRecordFields # 
Instance details

Defined in GHC.Types.FieldLabel

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

Binary FieldSelectors # 
Instance details

Defined in GHC.Types.FieldLabel

Binary Fixity # 
Instance details

Defined in GHC.Types.Fixity

Methods

put_ :: BinHandle -> Fixity -> IO () #

put :: BinHandle -> Fixity -> IO (Bin Fixity) #

get :: BinHandle -> IO Fixity #

Binary FixityDirection # 
Instance details

Defined in GHC.Types.Fixity

Binary CCallConv # 
Instance details

Defined in GHC.Types.ForeignCall

Binary CCallSpec # 
Instance details

Defined in GHC.Types.ForeignCall

Binary CCallTarget # 
Instance details

Defined in GHC.Types.ForeignCall

Binary CExportSpec # 
Instance details

Defined in GHC.Types.ForeignCall

Binary CType # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

put_ :: BinHandle -> CType -> IO () #

put :: BinHandle -> CType -> IO (Bin CType) #

get :: BinHandle -> IO CType #

Binary ForeignCall # 
Instance details

Defined in GHC.Types.ForeignCall

Binary Header # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

put_ :: BinHandle -> Header -> IO () #

put :: BinHandle -> Header -> IO (Bin Header) #

get :: BinHandle -> IO Header #

Binary Safety # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

put_ :: BinHandle -> Safety -> IO () #

put :: BinHandle -> Safety -> IO (Bin Safety) #

get :: BinHandle -> IO Safety #

Binary LitNumType # 
Instance details

Defined in GHC.Types.Literal

Binary Literal # 
Instance details

Defined in GHC.Types.Literal

Binary Name #

Assumes that the Name is a non-binding one. See putIfaceTopBndr and getIfaceTopBndr for serializing binding Names. See UserData for the rationale for this distinction.

Instance details

Defined in GHC.Types.Name

Methods

put_ :: BinHandle -> Name -> IO () #

put :: BinHandle -> Name -> IO (Bin Name) #

get :: BinHandle -> IO Name #

Binary NameSpace # 
Instance details

Defined in GHC.Types.Name.Occurrence

Binary OccName # 
Instance details

Defined in GHC.Types.Name.Occurrence

Binary IfaceTrustInfo # 
Instance details

Defined in GHC.Types.SafeHaskell

Binary SaneDouble # 
Instance details

Defined in GHC.Types.SaneDouble

Binary HscSource # 
Instance details

Defined in GHC.Types.SourceFile

Binary SourceText # 
Instance details

Defined in GHC.Types.SourceText

Binary UnhelpfulSpanReason # 
Instance details

Defined in GHC.Utils.Binary

Binary ForAllTyFlag # 
Instance details

Defined in GHC.Types.Var

Binary FunTyFlag # 
Instance details

Defined in GHC.Types.Var

Binary Specificity # 
Instance details

Defined in GHC.Types.Var

Binary Dependencies # 
Instance details

Defined in GHC.Unit.Module.Deps

Binary Usage # 
Instance details

Defined in GHC.Unit.Module.Deps

Methods

put_ :: BinHandle -> Usage -> IO () #

put :: BinHandle -> Usage -> IO (Bin Usage) #

get :: BinHandle -> IO Usage #

Binary ModIface # 
Instance details

Defined in GHC.Unit.Module.ModIface

Binary WarningCategory # 
Instance details

Defined in GHC.Unit.Module.Warnings

Binary InstantiatedUnit # 
Instance details

Defined in GHC.Unit.Types

Binary Unit # 
Instance details

Defined in GHC.Unit.Types

Methods

put_ :: BinHandle -> Unit -> IO () #

put :: BinHandle -> Unit -> IO (Bin Unit) #

get :: BinHandle -> IO Unit #

Binary UnitId # 
Instance details

Defined in GHC.Unit.Types

Methods

put_ :: BinHandle -> UnitId -> IO () #

put :: BinHandle -> UnitId -> IO (Bin UnitId) #

get :: BinHandle -> IO UnitId #

Binary BinData # 
Instance details

Defined in GHC.Utils.Binary

Binary BinSpan # 
Instance details

Defined in GHC.Utils.Binary

Binary BinSrcSpan # 
Instance details

Defined in GHC.Utils.Binary

Binary Boxity # 
Instance details

Defined in GHC.Types.Basic

Methods

put_ :: BinHandle -> Boxity -> IO () #

put :: BinHandle -> Boxity -> IO (Bin Boxity) #

get :: BinHandle -> IO Boxity #

Binary Role # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

put_ :: BinHandle -> Role -> IO () #

put :: BinHandle -> Role -> IO (Bin Role) #

get :: BinHandle -> IO Role #

Binary SrcStrictness # 
Instance details

Defined in GHC.Core.DataCon

Binary SrcUnpackedness # 
Instance details

Defined in GHC.Core.DataCon

Binary IsBootInterface # 
Instance details

Defined in GHC.Unit.Types

Binary ModuleName # 
Instance details

Defined in GHC.Utils.Binary

Binary PromotionFlag # 
Instance details

Defined in GHC.Types.Basic

Binary KindRep # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary TyCon # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Methods

put_ :: BinHandle -> TyCon -> IO () #

put :: BinHandle -> TyCon -> IO (Bin TyCon) #

get :: BinHandle -> IO TyCon #

Binary TypeLitSort # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary Day # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Day -> IO () #

put :: BinHandle -> Day -> IO (Bin Day) #

get :: BinHandle -> IO Day #

Binary DiffTime # 
Instance details

Defined in GHC.Utils.Binary

Binary UTCTime # 
Instance details

Defined in GHC.Utils.Binary

Binary Integer # 
Instance details

Defined in GHC.Utils.Binary

Binary () # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO () #

Binary Bool # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Bool -> IO () #

put :: BinHandle -> Bool -> IO (Bin Bool) #

get :: BinHandle -> IO Bool #

Binary Char # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Char -> IO () #

put :: BinHandle -> Char -> IO (Bin Char) #

get :: BinHandle -> IO Char #

Binary Int # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Int -> IO () #

put :: BinHandle -> Int -> IO (Bin Int) #

get :: BinHandle -> IO Int #

Binary RuntimeRep # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary VecCount # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary VecElem # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary a => Binary (NonEmpty a) # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (NonEmpty a) #

Binary a => Binary (Ratio a) # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (Ratio a) #

Binary v => Binary (IntMap v) # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> IntMap v -> IO () #

put :: BinHandle -> IntMap v -> IO (Bin (IntMap v)) #

get :: BinHandle -> 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 Names too.

Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (Set 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_ :: BinHandle -> EnumSet a -> IO () #

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

get :: BinHandle -> IO (EnumSet a) #

Binary a => Binary (Maybe a) # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (Maybe a) #

Binary name => Binary (AnnTarget name) # 
Instance details

Defined in GHC.Types.Annotations

Methods

put_ :: BinHandle -> AnnTarget name -> IO () #

put :: BinHandle -> AnnTarget name -> IO (Bin (AnnTarget name)) #

get :: BinHandle -> IO (AnnTarget name) #

Binary (DefMethSpec IfaceType) # 
Instance details

Defined in GHC.Iface.Type

Binary unit => Binary (Definite unit) # 
Instance details

Defined in GHC.Unit.Types

Methods

put_ :: BinHandle -> Definite unit -> IO () #

put :: BinHandle -> Definite unit -> IO (Bin (Definite unit)) #

get :: BinHandle -> IO (Definite unit) #

Binary a => Binary (GenModule a) # 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

get :: BinHandle -> IO (GenModule a) #

Binary a => Binary (GenWithIsBoot a) # 
Instance details

Defined in GHC.Unit.Types

Binary a => Binary (BinLocated a) # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (BinLocated a) #

Binary (FixedLengthEncoding Word16) # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word32) # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word64) # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word8) # 
Instance details

Defined in GHC.Utils.Binary

Binary a => Binary (Maybe a) # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (Maybe a) #

Binary a => Binary [a] # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> [a] -> IO () #

put :: BinHandle -> [a] -> IO (Bin [a]) #

get :: BinHandle -> IO [a] #

(Binary a, Binary b) => Binary (Either a b) # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Either a b -> IO () #

put :: BinHandle -> Either a b -> IO (Bin (Either a b)) #

get :: BinHandle -> IO (Either a b) #

Typeable a => Binary (TypeRep a) # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Methods

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

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

get :: BinHandle -> IO (TypeRep a) #

(Ix a, Binary a, Binary b) => Binary (Array a b) # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> Array a b -> IO () #

put :: BinHandle -> Array a b -> IO (Bin (Array a b)) #

get :: BinHandle -> IO (Array a b) #

Binary a => Binary (WithHsDocIdentifiers a GhcRn) # 
Instance details

Defined in GHC.Hs.Doc

(Binary r, Binary b) => Binary (IfaceBindingX b r) # 
Instance details

Defined in GHC.Iface.Syntax

Methods

put_ :: BinHandle -> IfaceBindingX b r -> IO () #

put :: BinHandle -> IfaceBindingX b r -> IO (Bin (IfaceBindingX b r)) #

get :: BinHandle -> IO (IfaceBindingX b r) #

(Binary tv, Binary vis) => Binary (VarBndr tv vis) # 
Instance details

Defined in GHC.Types.Var

Methods

put_ :: BinHandle -> VarBndr tv vis -> IO () #

put :: BinHandle -> VarBndr tv vis -> IO (Bin (VarBndr tv vis)) #

get :: BinHandle -> IO (VarBndr tv vis) #

Binary (Bin a) # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (Bin a) #

(Binary a, Binary b) => Binary (a, b) # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> (a, b) -> IO () #

put :: BinHandle -> (a, b) -> IO (Bin (a, b)) #

get :: BinHandle -> IO (a, b) #

(Binary a, Binary b, Binary c) => Binary (a, b, c) # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> (a, b, c) -> IO () #

put :: BinHandle -> (a, b, c) -> IO (Bin (a, b, c)) #

get :: BinHandle -> 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_ :: BinHandle -> (a, b, c, d) -> IO () #

put :: BinHandle -> (a, b, c, d) -> IO (Bin (a, b, c, d)) #

get :: BinHandle -> 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_ :: BinHandle -> (a, b, c, d, e) -> IO () #

put :: BinHandle -> (a, b, c, d, e) -> IO (Bin (a, b, c, d, e)) #

get :: BinHandle -> 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_ :: BinHandle -> (a, b, c, d, e, f) -> IO () #

put :: BinHandle -> (a, b, c, d, e, f) -> IO (Bin (a, b, c, d, e, f)) #

get :: BinHandle -> 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_ :: BinHandle -> (a, b, c, d, e, f, g) -> IO () #

put :: BinHandle -> (a, b, c, d, e, f, g) -> IO (Bin (a, b, c, d, e, f, g)) #

get :: BinHandle -> IO (a, b, c, d, e, f, g) #

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

seekBin :: forall {k} (a :: k). BinHandle -> Bin a -> IO () #

tellBin :: forall {k} (a :: k). BinHandle -> IO (Bin a) #

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

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

Get access to the underlying buffer.

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

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

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

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

forwardPut :: BinHandle -> (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_ :: BinHandle -> (b -> IO a) -> IO b -> IO () #

forwardGet :: BinHandle -> IO a -> IO a #

Read a value stored using a forward reference

For writing instances

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

Variable length encodings

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

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

Fixed length encoding

newtype FixedLengthEncoding a #

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

Constructors

FixedLengthEncoding 

Fields

Instances

Instances details
Show a => Show (FixedLengthEncoding a) # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word16) # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word32) # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word64) # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word8) # 
Instance details

Defined in GHC.Utils.Binary

Eq a => Eq (FixedLengthEncoding a) # 
Instance details

Defined in GHC.Utils.Binary

Ord a => Ord (FixedLengthEncoding a) # 
Instance details

Defined in GHC.Utils.Binary

Lazy Binary I/O

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

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

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

Deserialize a value serialized by lazyPutMaybe.

lazyPutMaybe :: Binary a => BinHandle -> 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.

User data

data UserData #

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

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

These two settings have different needs while serializing Names:

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

Constructors

UserData 

Fields

newReadState #

Arguments

:: (BinHandle -> IO Name)

how to deserialize Names

-> (BinHandle -> IO FastString) 
-> UserData 

newWriteState #

Arguments

:: (BinHandle -> Name -> IO ())

how to serialize non-binding Names

-> (BinHandle -> Name -> IO ())

how to serialize binding Names

-> (BinHandle -> FastString -> IO ()) 
-> UserData 

String table ("dictionary")

data FSTable #

Newtype wrappers

newtype BinSpan #

Constructors

BinSpan 

Instances

Instances details
Binary BinSpan # 
Instance details

Defined in GHC.Utils.Binary

newtype BinSrcSpan #

Constructors

BinSrcSpan 

Instances

Instances details
Binary BinSrcSpan # 
Instance details

Defined in GHC.Utils.Binary

newtype BinLocated a #

Constructors

BinLocated 

Fields

Instances

Instances details
Binary a => Binary (BinLocated a) # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (BinLocated a) #