Write a ModuleByteCode to a file.
Moduleghc-10.0.0.20260917GHC2024
GHC.ByteCode.Serialize
This module implements the serialization of bytecode objects to and from disk.
- 6 types
- 8 values
- Packageghc-10.0.0.20260917
- Exports14
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceSerialize.hs
Read a ModuleByteCode from a file.
The in-memory representation of a bytecode object These are stored on-disk as .gbc files.
Constructors
ModuleByteCodegbc_module :: Modulegbc_compiled_byte_code :: CompiledByteCodegbc_foreign_files :: [FilePath]Path to object files
gbc_hash :: !Fingerprint
Instances1Outputable
Outputable ModuleByteCodeDefined in ghc-10.0.0.20260917 · GHC.Linker.Types
A bytecode library is a collection of CompiledByteCode objects and a .so file containing the combination of foreign stubs
Constructors
Instances2Binary, Outputable
Binary OnDiskBytecodeLibDefined in ghc-10.0.0.20260917 · GHC.ByteCode.BinaryOutputable a => Outputable (BytecodeLibX a)Defined in ghc-10.0.0.20260917 · GHC.ByteCode.Binary
Constructors
Instances1Outputable
Outputable InterpreterLibraryDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Binary
Instances2Binary
Binary InterpreterLibraryContentsDefined in ghc-10.0.0.20260917 · GHC.ByteCode.BinaryBinary OnDiskBytecodeLibDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Binary
Generate a Fingerprint for the ModuleByteCode contents.
Note, this will serialise the contents of the ModuleByteCode separately to writeBytecodeLib. This means, if the ModuleByteCode is written to disk, it will be serialised twice.
Convert an OnDiskModuleByteCode to an ModuleByteCode. OnDiskModuleByteCode is the representation which we read from a file, the ModuleByteCode is the representation which is manipulated by program logic.
This notably writes the object files to temporary files. They are written to temporary files so that the normal object file loading code paths (which expect object files to exist as on-disk files) can be used in the loader.