driver: Add support for "Fixed" nodes in the ModuleGraph
A fixed node in the module graph is one which we presume is already built. It's therefore up to the user to make sure that the interface file and any relevant artifacts are available for a fixed node.
Fixed/Compile nodes are represented by the ModuleNodeInfo type, which
abstracts the common parts of Fixed/Compile nodes with accessor
functions of type ModuleNodeInfo -> ...
.
Fixed nodes can only depend on other fixed nodes. This invariant can be
checked by the function checkModuleGraph
.
--make mode is modified to work with fixed mode. In order to "compile" a fixed node, the artifacts are just loaded into the HomePackageTable. Currently nothing in the compiler will produce Fixed nodes but this is tested with the FixedNodes GHC API test.
In subsequent patches we are going to remove the ExternalModuleGraph and use Fixed nodes for modules in the module graph in oneshot mode.
Fixes #25920 (closed)