GHC.Iface.Ext.Fields

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

Safe Haskell | Ignore
Language | GHC2021

GHC.Iface.Ext.Fields

Contents

- Reading
- Writing
- Deletion

Synopsis

- newtype ExtensibleFields = ExtensibleFields {
  - getExtensibleFields :: Map FieldName BinData
  }
- type FieldName = String
- emptyExtensibleFields :: ExtensibleFields
- readField :: Binary a => FieldName -> ExtensibleFields -> IO (Maybe a)
- readFieldWith :: FieldName -> (BinHandle -> IO a) -> ExtensibleFields -> IO (Maybe a)
- writeField :: Binary a => FieldName -> a -> ExtensibleFields -> IO ExtensibleFields
- writeFieldWith :: FieldName -> (BinHandle -> IO ()) -> ExtensibleFields -> IO ExtensibleFields
- deleteField :: FieldName -> ExtensibleFields -> ExtensibleFields

# Documentation

newtype ExtensibleFields #

Constructors

ExtensibleFields |
Fields getExtensibleFields :: Map FieldName BinData

#### Instances

Instances details

NFData ExtensibleFields # |
Instance details Defined in GHC.Iface.Ext.Fields Methods rnf :: ExtensibleFields -> () #
Binary ExtensibleFields # |
Instance details Defined in GHC.Iface.Ext.Fields Methods put_ :: BinHandle -> ExtensibleFields -> IO () # put :: BinHandle -> ExtensibleFields -> IO (Bin ExtensibleFields) # get :: BinHandle -> IO ExtensibleFields #

type FieldName = String #

emptyExtensibleFields :: ExtensibleFields #

# Reading

readField :: Binary a => FieldName -> ExtensibleFields -> IO (Maybe a) #

Reading

readFieldWith :: FieldName -> (BinHandle -> IO a) -> ExtensibleFields -> IO (Maybe a) #

# Writing

writeField :: Binary a => FieldName -> a -> ExtensibleFields -> IO ExtensibleFields #

Writing

writeFieldWith :: FieldName -> (BinHandle -> IO ()) -> ExtensibleFields -> IO ExtensibleFields #

# Deletion

deleteField :: FieldName -> ExtensibleFields -> ExtensibleFields #