Proposal
GHC as a Stateless Black Box: Ideally, GHC should have no built-in knowledge of the user's environment.
Build Tools as Context Providers: The build tool (Cabal) acts as the sole source of truth, fully defining the dependency graph via explicit CLI arguments, effectively overriding any implicit GHC defaults.
Isolation as a Build Guarantee: Any attempt by GHC to resolve dependencies outside of the provided flags is technically a violation of the build's isolation.
Motivation
Current GHC architecture relies on "implicit discovery" of the system toolchain (C compiler, linker, etc.). When GHC compiles to machine code, it often relies on hardcoded paths from the settings file or looks up the toolchain in the host's $PATH. This makes GHC a "host-dependent" tool rather than a truly "stateless" one. This leads to non-deterministic behavior where the same build can produce different binaries depending on which version of gcc or ld is present on the host system, completely bypassing the isolation provided by build tools.
Plan (.cabal, cabal.project and cabal ***** --[flags])
The list will be expanded
Proposal
GHC as a Stateless Black Box: Ideally, GHC should have no built-in knowledge of the user's environment.
Build Tools as Context Providers: The build tool (Cabal) acts as the sole source of truth, fully defining the dependency graph via explicit CLI arguments, effectively overriding any implicit GHC defaults.
Isolation as a Build Guarantee: Any attempt by GHC to resolve dependencies outside of the provided flags is technically a violation of the build's isolation.
Motivation
Current GHC architecture relies on "implicit discovery" of the system toolchain (C compiler, linker, etc.). When GHC compiles to machine code, it often relies on hardcoded paths from the settings file or looks up the toolchain in the host's $PATH. This makes GHC a "host-dependent" tool rather than a truly "stateless" one. This leads to non-deterministic behavior where the same build can produce different binaries depending on which version of gcc or ld is present on the host system, completely bypassing the isolation provided by build tools.
Plan (.cabal, cabal.project and cabal ***** --[flags])
The list will be expanded