Split up LocalBuildInfo
The aim of this commit is to modularise LocalBuildInfo to better
reflect implicit invariants.
The top-level split
data LocalBuildInfo =
NewLocalBuildInfo
{ localBuildDescr :: LocalBuildDescr
, localBuildConfig :: LocalBuildConfig
}
reflects which part of a LocalBuildInfo are set in stone by Cabal
(the LocalBuildDescr), while LocalBuildConfig contains options that
can be controlled/modified by the user in some way.
The split
data LocalBuildDescr =
LocalBuildDescr
{ packageBuildDescr :: PackageBuildDescr
, componentBuildDescr :: ComponentBuildDescr
}
reflects that some parts of the information determined at configuration
time resides at the package level, while other pieces of information
are pertinent to individual components.
Finally the structure of LocalBuildConfig is aimed to reduce code
duplication between the Cabal library and cabal-install.