• Matthew Pickering's avatar
    Multiple Home Units · fd42ab5f
    Matthew Pickering authored
    Multiple home units allows you to load different packages which may depend on
    each other into one GHC session. This will allow both GHCi and HLS to support
    multi component projects more naturally.
    Public Interface
    In order to specify multiple units, the -unit @⟨filename⟩ flag
    is given multiple times with a response file containing the arguments for each unit.
    The response file contains a newline separated list of arguments.
    ghc -unit @unitLibCore -unit @unitLib
    where the `unitLibCore` response file contains the normal arguments that cabal would pass to `--make` mode.
    -this-unit-id lib-core-
    The response file for lib, can specify a dependency on lib-core, so then modules in lib can use modules from lib-core.
    -this-unit-id lib-
    -package-id lib-core-
    Then when the compiler starts in --make mode it will compile both units lib and lib-core.
    There is a...
Code owners : Ben Gamari
Main.hs 2.86 KB