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

GHC.Utils.Binary

Synopsis

Documentation

data Bin a Source #

Instances

Instances details
Bounded (Bin a) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

minBound :: Bin a #

maxBound :: Bin a #

Eq (Bin a) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

(==) :: Bin a -> Bin a -> Bool #

(/=) :: Bin a -> Bin a -> Bool #

Ord (Bin a) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

compare :: Bin a -> Bin a -> Ordering #

(<) :: Bin a -> Bin a -> Bool #

(<=) :: Bin a -> Bin a -> Bool #

(>) :: Bin a -> Bin a -> Bool #

(>=) :: Bin a -> Bin a -> Bool #

max :: Bin a -> Bin a -> Bin a #

min :: Bin a -> Bin a -> Bin a #

Show (Bin a) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

showsPrec :: Int -> Bin a -> ShowS #

show :: Bin a -> String #

showList :: [Bin a] -> ShowS #

Binary (Bin a) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

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

class Binary a where Source #

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

Minimal complete definition

get

Methods

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

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

get :: BinHandle -> IO a Source #

Instances

Instances details
Binary Bool Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Char Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Int Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO Int Source #

Binary Int8 Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Int16 Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Int32 Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Int64 Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Integer Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Word8 Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Word16 Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Word32 Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Word64 Source # 
Instance details

Defined in GHC.Utils.Binary

Binary RuntimeRep Source # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary VecCount Source # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary VecElem Source # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary SomeTypeRep Source # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary () Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO () Source #

Binary TyCon Source # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary KindRep Source # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary TypeLitSort Source # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary Fingerprint Source # 
Instance details

Defined in GHC.Utils.Binary

Binary ByteString Source # 
Instance details

Defined in GHC.Utils.Binary

Binary UTCTime Source # 
Instance details

Defined in GHC.Utils.Binary

Binary DiffTime Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Day Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO Day Source #

Binary IfaceBndr Source # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceCoercion Source # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceTyLit Source # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceTyCon Source # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceType Source # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceAppArgs Source # 
Instance details

Defined in GHC.Iface.Type

Binary CallerCcFilter Source # 
Instance details

Defined in GHC.Core.Opt.CallerCC

Binary Serialized Source # 
Instance details

Defined in GHC.Utils.Binary.Typeable

Binary ModuleName Source # 
Instance details

Defined in GHC.Unit.Module.Name

Binary Unit Source # 
Instance details

Defined in GHC.Unit.Types

Binary UnitId Source # 
Instance details

Defined in GHC.Unit.Types

Binary LexicalFastString Source # 
Instance details

Defined in GHC.Utils.Binary

Binary NonDetFastString Source # 
Instance details

Defined in GHC.Utils.Binary

Binary FastString Source # 
Instance details

Defined in GHC.Utils.Binary

Binary OccName Source # 
Instance details

Defined in GHC.Types.Name.Occurrence

Binary UnhelpfulSpanReason Source # 
Instance details

Defined in GHC.Utils.Binary

Binary SrcSpan Source # 
Instance details

Defined in GHC.Utils.Binary

Binary BufSpan Source # 
Instance details

Defined in GHC.Utils.Binary

Binary RealSrcSpan Source # 
Instance details

Defined in GHC.Utils.Binary

Binary BufPos Source # 
Instance details

Defined in GHC.Utils.Binary

Binary Name Source #

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

Binary BinData Source # 
Instance details

Defined in GHC.Utils.Binary

Binary IsBootInterface Source # 
Instance details

Defined in GHC.Unit.Types

Binary InstantiatedUnit Source # 
Instance details

Defined in GHC.Unit.Types

Binary StringLiteral Source # 
Instance details

Defined in GHC.Types.SourceText

Binary SourceText Source # 
Instance details

Defined in GHC.Types.SourceText

Binary HscSource Source # 
Instance details

Defined in GHC.Types.SourceFile

Binary IfaceTrustInfo Source # 
Instance details

Defined in GHC.Types.SafeHaskell

Binary FixityDirection Source # 
Instance details

Defined in GHC.Types.Fixity

Binary Fixity Source # 
Instance details

Defined in GHC.Types.Fixity

Binary ExtensibleFields Source # 
Instance details

Defined in GHC.Iface.Ext.Fields

Binary Specificity Source # 
Instance details

Defined in GHC.Types.Var

Binary AnonArgFlag Source # 
Instance details

Defined in GHC.Types.Var

Binary ArgFlag Source # 
Instance details

Defined in GHC.Types.Var

Binary CType Source # 
Instance details

Defined in GHC.Types.ForeignCall

Binary Header Source # 
Instance details

Defined in GHC.Types.ForeignCall

Binary CCallConv Source # 
Instance details

Defined in GHC.Types.ForeignCall

Binary CCallTarget Source # 
Instance details

Defined in GHC.Types.ForeignCall

Binary CCallSpec Source # 
Instance details

Defined in GHC.Types.ForeignCall

Binary CExportSpec Source # 
Instance details

Defined in GHC.Types.ForeignCall

Binary Safety Source # 
Instance details

Defined in GHC.Types.ForeignCall

Binary ForeignCall Source # 
Instance details

Defined in GHC.Types.ForeignCall

Binary InlineSpec Source # 
Instance details

Defined in GHC.Types.Basic

Binary RuleMatchInfo Source # 
Instance details

Defined in GHC.Types.Basic

Binary InlinePragma Source # 
Instance details

Defined in GHC.Types.Basic

Binary Activation Source # 
Instance details

Defined in GHC.Types.Basic

Binary TupleSort Source # 
Instance details

Defined in GHC.Types.Basic

Binary OverlapMode Source # 
Instance details

Defined in GHC.Types.Basic

Binary OverlapFlag Source # 
Instance details

Defined in GHC.Types.Basic

Binary RecFlag Source # 
Instance details

Defined in GHC.Types.Basic

Binary Boxity Source # 
Instance details

Defined in GHC.Types.Basic

Binary FunctionOrData Source # 
Instance details

Defined in GHC.Types.Basic

Binary PromotionFlag Source # 
Instance details

Defined in GHC.Types.Basic

Binary LeftOrRight Source # 
Instance details

Defined in GHC.Types.Basic

Binary FieldSelectors Source # 
Instance details

Defined in GHC.Types.FieldLabel

Binary DuplicateRecordFields Source # 
Instance details

Defined in GHC.Types.FieldLabel

Binary Name => Binary FieldLabel Source #

We need the Binary Name constraint here even though there is an instance defined in GHC.Types.Name, because the we have a SOURCE import, so the instance is not in scope. And the instance cannot be added to Name.hs-boot because GHC.Utils.Binary itself depends on GHC.Types.Name.

Instance details

Defined in GHC.Types.FieldLabel

Binary CostCentreIndex Source # 
Instance details

Defined in GHC.Types.CostCentre.State

Binary NameSpace Source # 
Instance details

Defined in GHC.Types.Name.Occurrence

Binary Warnings Source # 
Instance details

Defined in GHC.Unit.Module.Warnings

Binary WarningTxt Source # 
Instance details

Defined in GHC.Unit.Module.Warnings

Binary CCFlavour Source # 
Instance details

Defined in GHC.Types.CostCentre

Binary CostCentre Source # 
Instance details

Defined in GHC.Types.CostCentre

Binary GreName Source # 
Instance details

Defined in GHC.Types.Avail

Binary AvailInfo Source # 
Instance details

Defined in GHC.Types.Avail

Binary ArgDocMap Source # 
Instance details

Defined in GHC.Hs.Doc

Binary DeclDocMap Source # 
Instance details

Defined in GHC.Hs.Doc

Binary HsDocString Source # 
Instance details

Defined in GHC.Hs.Doc

Binary Role Source # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Binary PrimElemRep Source # 
Instance details

Defined in GHC.Core.TyCon

Binary PrimRep Source # 
Instance details

Defined in GHC.Core.TyCon

Binary Injectivity Source # 
Instance details

Defined in GHC.Core.TyCon

Binary TyConBndrVis Source # 
Instance details

Defined in GHC.Core.TyCon

Binary IfaceUnivCoProv Source # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceMCoercion Source # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceTyConInfo Source # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceTyConSort Source # 
Instance details

Defined in GHC.Iface.Type

Binary IfaceOneShot Source # 
Instance details

Defined in GHC.Iface.Type

Binary LitNumType Source # 
Instance details

Defined in GHC.Types.Literal

Binary Literal Source # 
Instance details

Defined in GHC.Types.Literal

Binary SrcUnpackedness Source # 
Instance details

Defined in GHC.Core.DataCon

Binary SrcStrictness Source # 
Instance details

Defined in GHC.Core.DataCon

Binary DmdSig Source # 
Instance details

Defined in GHC.Types.Demand

Binary DmdType Source # 
Instance details

Defined in GHC.Types.Demand

Binary Divergence Source # 
Instance details

Defined in GHC.Types.Demand

Binary SubDemand Source # 
Instance details

Defined in GHC.Types.Demand

Binary Demand Source # 
Instance details

Defined in GHC.Types.Demand

Binary Card Source # 
Instance details

Defined in GHC.Types.Demand

Binary CprSig Source # 
Instance details

Defined in GHC.Types.Cpr

Binary CprType Source # 
Instance details

Defined in GHC.Types.Cpr

Binary Cpr Source # 
Instance details

Defined in GHC.Types.Cpr

Methods

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

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

get :: BinHandle -> IO Cpr Source #

Binary IsOrphan Source # 
Instance details

Defined in GHC.Core

Binary IfaceJoinInfo Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceLetBndr Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceBinding Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceConAlt Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceAlt Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceTickish Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceExpr Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceLFInfo Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceIdDetails Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceUnfolding Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceInfoItem Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceCompleteMatch Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceAnnotation Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceRule Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceFamInst Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceClsInst Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceSrcBang Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceBang Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceConDecl Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceConDecls Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceAxBranch Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceAT Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceClassOp Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceFamTyConFlav Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceTyConParent Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary IfaceDecl Source # 
Instance details

Defined in GHC.Iface.Syntax

Binary Usage Source # 
Instance details

Defined in GHC.Unit.Module.Deps

Binary Dependencies Source # 
Instance details

Defined in GHC.Unit.Module.Deps

Binary ModIface Source # 
Instance details

Defined in GHC.Unit.Module.ModIface

Binary a => Binary [a] Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO [a] Source #

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

Defined in GHC.Utils.Binary

Methods

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

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

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

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

Defined in GHC.Utils.Binary

Methods

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

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

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

Binary a => Binary (Set a) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (Set a) Source #

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

Defined in GHC.Utils.Binary

Methods

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

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

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

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

Defined in GHC.Unit.Types

Binary a => Binary (Located a) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

get :: BinHandle -> IO (Located a) Source #

Binary (FixedLengthEncoding Word8) Source # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word16) Source # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word32) Source # 
Instance details

Defined in GHC.Utils.Binary

Binary (FixedLengthEncoding Word64) Source # 
Instance details

Defined in GHC.Utils.Binary

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

Defined in GHC.Unit.Types

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

Defined in GHC.Unit.Types

Methods

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

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

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

Binary (DefMethSpec IfaceType) Source # 
Instance details

Defined in GHC.Iface.Type

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

Defined in GHC.Types.Annotations

Methods

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

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

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

Binary a => Binary (LocatedL a) Source # 
Instance details

Defined in GHC.Parser.Annotation

Binary a => Binary (BooleanFormula a) Source # 
Instance details

Defined in GHC.Data.BooleanFormula

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

Defined in GHC.Utils.Binary

Methods

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

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

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

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

Defined in GHC.Utils.Binary.Typeable

Methods

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

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

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

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

Defined in GHC.Utils.Binary

Methods

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

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

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

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

Defined in GHC.Utils.Binary

Methods

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

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

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

Binary (Bin a) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

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

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

Defined in GHC.Types.Var

Methods

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

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

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

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

Defined in GHC.Utils.Binary

Methods

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

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

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

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

Defined in GHC.Utils.Binary

Methods

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

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

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

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

Defined in GHC.Utils.Binary

Methods

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

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

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

(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f) => Binary (a, b, c, d, e, f) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

put_ :: BinHandle -> (a, b, c, d, e, f) -> IO () Source #

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

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

(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g) => Binary (a, b, c, d, e, f, g) Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

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

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

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

data BinData Source #

Constructors

BinData Int BinArray 

Instances

Instances details
NFData BinData Source # 
Instance details

Defined in GHC.Utils.Binary

Methods

rnf :: BinData -> () #

Binary BinData Source # 
Instance details

Defined in GHC.Utils.Binary

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

castBin :: Bin a -> Bin b Source #

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

Get access to the underlying buffer.

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

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

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

For writing instances

Variable length encodings

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

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

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

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

Fixed length encoding

newtype FixedLengthEncoding a Source #

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

Constructors

FixedLengthEncoding 

Fields

Lazy Binary I/O

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

User data

data UserData Source #

Information we keep around during interface file serialization/deserialization. Namely we keep the functions for serializing and deserializing 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 Source #

Arguments

:: (BinHandle -> IO Name)

how to deserialize Names

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

newWriteState Source #

Arguments

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

how to serialize non-binding Names

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

how to serialize binding Names

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