ghc-lib-parser-9.12.2.20250421: 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 -> (ReadBinHandle -> IO a) -> ExtensibleFields -> IO (Maybe a)
- writeField :: Binary a => FieldName -> a -> ExtensibleFields -> IO ExtensibleFields
- writeFieldWith :: FieldName -> (WriteBinHandle -> IO ()) -> ExtensibleFields -> IO ExtensibleFields
- deleteField :: FieldName -> ExtensibleFields -> ExtensibleFields

# Documentation

newtype ExtensibleFields Source #

Constructors

ExtensibleFields |

Fields

- getExtensibleFields :: Map FieldName BinData

#### Instances

Instances details

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

type FieldName = String Source #

emptyExtensibleFields :: ExtensibleFields Source #

# Reading

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

Reading

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

# Writing

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

Writing

writeFieldWith :: FieldName -> (WriteBinHandle -> IO ()) -> ExtensibleFields -> IO ExtensibleFields Source #

# Deletion

deleteField :: FieldName -> ExtensibleFields -> ExtensibleFields Source #