Skip to content
Snippets Groups Projects
Commit 37779f65 authored by sheaf's avatar sheaf Committed by Mikolaj
Browse files

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.
parent feb5a0b7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment