BinIface

ghc-8.6.3: The GHC API

Safe Haskell | None
Language | Haskell2010

BinIface

Description

Binary interface file support.

Synopsis

- writeBinIface :: DynFlags -> FilePath -> ModIface -> IO ()
- readBinIface :: CheckHiWay -> TraceBinIFaceReading -> FilePath -> TcRnIf a b ModIface
- getSymtabName :: NameCacheUpdater -> Dictionary -> SymbolTable -> BinHandle -> IO Name
- getDictFastString :: Dictionary -> BinHandle -> IO FastString
- data CheckHiWay
  - = CheckHiWay
  - | IgnoreHiWay
- data TraceBinIFaceReading
  - = TraceBinIFaceReading
  - | QuietBinIFaceReading
- getWithUserData :: Binary a => NameCacheUpdater -> BinHandle -> IO a
- putWithUserData :: Binary a => (SDoc -> IO ()) -> BinHandle -> a -> IO ()

# Documentation

writeBinIface :: DynFlags -> FilePath -> ModIface -> IO () #

Write an interface file

readBinIface :: CheckHiWay -> TraceBinIFaceReading -> FilePath -> TcRnIf a b ModIface #

Read an interface file

getSymtabName :: NameCacheUpdater -> Dictionary -> SymbolTable -> BinHandle -> IO Name #

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

data CheckHiWay #

Constructors

CheckHiWay |
IgnoreHiWay |

Instances

Eq CheckHiWay # |
Instance details Defined in BinIface Methods (==) :: CheckHiWay -> CheckHiWay -> Bool # (/=) :: CheckHiWay -> CheckHiWay -> Bool #

data TraceBinIFaceReading #

Constructors

TraceBinIFaceReading |
QuietBinIFaceReading |

Instances

Eq TraceBinIFaceReading # |
Instance details Defined in BinIface Methods (==) :: TraceBinIFaceReading -> TraceBinIFaceReading -> Bool # (/=) :: TraceBinIFaceReading -> TraceBinIFaceReading -> Bool #

getWithUserData :: Binary a => NameCacheUpdater -> BinHandle -> IO a #

This performs a get action after reading the dictionary and symbol table. It is necessary to run this before trying to deserialise any Names or FastStrings.

putWithUserData :: Binary a => (SDoc -> IO ()) -> BinHandle -> a -> IO () #

Put a piece of data with an initialised `UserData` field. This is necessary if you want to serialise Names or FastStrings. It also writes a symbol table and the dictionary. This segment should be read using `getWithUserData`.