Expand description
Compiler session state, options, and configuration for BHC.
This crate provides the central session management for the BHC compiler, including compilation options, diagnostic configuration, and global state that persists throughout a compilation unit.
§Overview
The Session type is the primary entry point, holding all state needed
for a single compilation. It includes:
- Compiler options and flags
- Target specification
- Diagnostic handler
- Search paths for modules and libraries
§Profiles
BHC supports multiple compilation profiles as specified in H26-SPEC:
- Default: Standard lazy Haskell semantics
- Server: Optimized for concurrent server workloads
- Numeric: Strict-by-default with fusion guarantees
- Edge: Minimal runtime for embedded/WASM targets
Structs§
- IrDump
Options - Options for dumping intermediate representations.
- Options
- Compiler options that can be set via CLI or configuration.
- Search
Paths - Search path configuration for finding modules and libraries.
- Session
- The compiler session holds all state for a compilation unit.
Enums§
- Debug
Info - Debug information level.
- OptLevel
- Optimization level for code generation.
- Output
Type - Output type for compilation.
- Profile
- The compilation profile determines evaluation semantics and optimization strategy.
- Session
Error - Errors that can occur during session operations.
Functions§
- create_
session - Create a shared session reference.
Type Aliases§
- Session
Ref - A shared, thread-safe reference to a session.