Commit 241cefff authored by Andrey Mokhov's avatar Andrey Mokhov

Minor refactoring: re-export Context and GHC from Expression

parent cbc2f63d
...@@ -12,16 +12,15 @@ module Expression ( ...@@ -12,16 +12,15 @@ module Expression (
-- ** Evaluation -- ** Evaluation
interpret, interpretInContext, interpret, interpretInContext,
-- ** Context and Target
Context, vanillaContext, stageContext, Target,
-- * Convenient accessors -- * Convenient accessors
getBuildRoot, getBuildPath, getContext, getPkgData, getPkgDataList, getStage, getBuildRoot, getContext, getPkgData, getPkgDataList, getOutputs, getInputs,
getPackage, getBuilder, getOutputs, getInputs, getWay, getInput, getOutput, getInput, getOutput,
-- * Re-exports -- * Re-exports
module Base, module Base,
module Builder module Builder,
module Context,
module GHC
) where ) where
import qualified Hadrian.Expression as H import qualified Hadrian.Expression as H
...@@ -29,9 +28,9 @@ import Hadrian.Expression hiding (Expr, Predicate, Args) ...@@ -29,9 +28,9 @@ import Hadrian.Expression hiding (Expr, Predicate, Args)
import Base import Base
import Builder import Builder
import Context (Context, vanillaContext, stageContext, getBuildPath, getStage, getPackage, getWay) import GHC
import Context hiding (stage, package, way)
import Oracles.PackageData import Oracles.PackageData
import Target hiding (builder, inputs, outputs)
-- | @Expr a@ is a computation that produces a value of type @Action a@ and can -- | @Expr a@ is a computation that produces a value of type @Action a@ and can
-- read parameters of the current build 'Target'. -- read parameters of the current build 'Target'.
......
...@@ -5,10 +5,8 @@ import qualified Hadrian.Oracles.DirectoryContents ...@@ -5,10 +5,8 @@ import qualified Hadrian.Oracles.DirectoryContents
import qualified Hadrian.Oracles.Path import qualified Hadrian.Oracles.Path
import qualified Hadrian.Oracles.TextFile import qualified Hadrian.Oracles.TextFile
import Context
import Expression import Expression
import Flavour import Flavour
import GHC
import qualified Oracles.ModuleFiles import qualified Oracles.ModuleFiles
import qualified Rules.Compile import qualified Rules.Compile
import qualified Rules.Data import qualified Rules.Data
......
...@@ -3,7 +3,6 @@ module Rules.Data (buildPackageData) where ...@@ -3,7 +3,6 @@ module Rules.Data (buildPackageData) where
import Base import Base
import Context import Context
import Expression import Expression
import GHC
import Oracles.Setting import Oracles.Setting
import Rules.Generate import Rules.Generate
import Settings.Packages.Rts import Settings.Packages.Rts
......
...@@ -4,10 +4,8 @@ module Rules.Generate ( ...@@ -4,10 +4,8 @@ module Rules.Generate (
) where ) where
import Base import Base
import Context hiding (package)
import Expression import Expression
import Flavour import Flavour
import GHC
import Oracles.Flag import Oracles.Flag
import Oracles.ModuleFiles import Oracles.ModuleFiles
import Oracles.Setting import Oracles.Setting
......
...@@ -4,9 +4,7 @@ import Hadrian.Oracles.DirectoryContents ...@@ -4,9 +4,7 @@ import Hadrian.Oracles.DirectoryContents
import qualified System.Directory as IO import qualified System.Directory as IO
import Base import Base
import Context
import Expression import Expression
import GHC
import Oracles.Setting import Oracles.Setting
import Rules import Rules
import Rules.Generate import Rules.Generate
......
...@@ -9,7 +9,6 @@ import Base ...@@ -9,7 +9,6 @@ import Base
import Context import Context
import Expression hiding (way, package) import Expression hiding (way, package)
import Flavour import Flavour
import GHC
import Oracles.ModuleFiles import Oracles.ModuleFiles
import Oracles.PackageData import Oracles.PackageData
import Oracles.Setting import Oracles.Setting
......
...@@ -5,7 +5,6 @@ import Hadrian.Haskell.Cabal ...@@ -5,7 +5,6 @@ import Hadrian.Haskell.Cabal
import Base import Base
import Context import Context
import Expression hiding (stage, way) import Expression hiding (stage, way)
import GHC
import Oracles.ModuleFiles import Oracles.ModuleFiles
import Oracles.PackageData import Oracles.PackageData
import Oracles.Setting import Oracles.Setting
......
...@@ -3,7 +3,6 @@ module Rules.Test (testRules) where ...@@ -3,7 +3,6 @@ module Rules.Test (testRules) where
import Base import Base
import Expression import Expression
import Flavour import Flavour
import GHC
import Oracles.Flag import Oracles.Flag
import Oracles.Setting import Oracles.Setting
import Settings import Settings
......
...@@ -5,9 +5,7 @@ module Rules.Wrappers ( ...@@ -5,9 +5,7 @@ module Rules.Wrappers (
import Hadrian.Oracles.Path import Hadrian.Oracles.Path
import Base import Base
import Context
import Expression import Expression
import GHC
import Oracles.Setting import Oracles.Setting
import Settings import Settings
......
...@@ -4,11 +4,9 @@ module Settings ( ...@@ -4,11 +4,9 @@ module Settings (
latestBuildStage, programContext, integerLibraryName, getDestDir latestBuildStage, programContext, integerLibraryName, getDestDir
) where ) where
import Context
import CommandLine import CommandLine
import Expression import Expression
import Flavour import Flavour
import GHC
import {-# SOURCE #-} Settings.Default import {-# SOURCE #-} Settings.Default
import Settings.Flavours.Development import Settings.Flavours.Development
import Settings.Flavours.Performance import Settings.Flavours.Performance
......
module Settings.Builders.Common ( module Settings.Builders.Common (
module Base, module Base,
module Context,
module Expression, module Expression,
module GHC,
module Oracles.Flag, module Oracles.Flag,
module Oracles.PackageData, module Oracles.PackageData,
module Oracles.Setting, module Oracles.Setting,
...@@ -12,9 +10,7 @@ module Settings.Builders.Common ( ...@@ -12,9 +10,7 @@ module Settings.Builders.Common (
) where ) where
import Base import Base
import Context hiding (stage, package, way)
import Expression import Expression
import GHC
import Oracles.Flag import Oracles.Flag
import Oracles.PackageData import Oracles.PackageData
import Oracles.Setting import Oracles.Setting
......
...@@ -7,7 +7,6 @@ module Settings.Default ( ...@@ -7,7 +7,6 @@ module Settings.Default (
import CommandLine import CommandLine
import Expression import Expression
import Flavour import Flavour
import GHC
import Oracles.Flag import Oracles.Flag
import Oracles.PackageData import Oracles.PackageData
import Oracles.Setting import Oracles.Setting
......
module Settings.Packages.Base (basePackageArgs) where module Settings.Packages.Base (basePackageArgs) where
import Expression import Expression
import GHC
import Settings import Settings
basePackageArgs :: Args basePackageArgs :: Args
......
module Settings.Packages.Cabal where module Settings.Packages.Cabal where
import GHC
import Expression import Expression
cabalPackageArgs :: Args cabalPackageArgs :: Args
......
...@@ -3,7 +3,6 @@ module Settings.Packages.Compiler (compilerPackageArgs) where ...@@ -3,7 +3,6 @@ module Settings.Packages.Compiler (compilerPackageArgs) where
import Base import Base
import Expression import Expression
import Flavour import Flavour
import GHC
import Oracles.Flag import Oracles.Flag
import Oracles.Setting import Oracles.Setting
import Settings import Settings
......
module Settings.Packages.Ghc (ghcPackageArgs) where module Settings.Packages.Ghc (ghcPackageArgs) where
import Context (buildPath)
import GHC
import Expression import Expression
import Oracles.Setting import Oracles.Setting
import UserSettings (crossCompiling) import UserSettings (crossCompiling)
......
...@@ -4,7 +4,6 @@ import Hadrian.Haskell.Cabal ...@@ -4,7 +4,6 @@ import Hadrian.Haskell.Cabal
import Base import Base
import Expression import Expression
import GHC
import Utilities import Utilities
ghcCabalPackageArgs :: Args ghcCabalPackageArgs :: Args
......
module Settings.Packages.GhcPkg (ghcPkgPackageArgs) where module Settings.Packages.GhcPkg (ghcPkgPackageArgs) where
import GHC
import Expression import Expression
import UserSettings (crossCompiling) import UserSettings (crossCompiling)
......
module Settings.Packages.GhcPrim (ghcPrimPackageArgs) where module Settings.Packages.GhcPrim (ghcPrimPackageArgs) where
import GHC
import Oracles.Flag import Oracles.Flag
import Expression import Expression
......
module Settings.Packages.Ghci (ghciPackageArgs) where module Settings.Packages.Ghci (ghciPackageArgs) where
import GHC
import Expression import Expression
ghciPackageArgs :: Args ghciPackageArgs :: Args
......
module Settings.Packages.Haddock (haddockPackageArgs) where module Settings.Packages.Haddock (haddockPackageArgs) where
import GHC
import Expression import Expression
haddockPackageArgs :: Args haddockPackageArgs :: Args
......
module Settings.Packages.Haskeline (haskelinePackageArgs) where module Settings.Packages.Haskeline (haskelinePackageArgs) where
import Base
import Expression import Expression
import GHC
import UserSettings (crossCompiling) import UserSettings (crossCompiling)
haskelinePackageArgs :: Args haskelinePackageArgs :: Args
......
...@@ -2,7 +2,6 @@ module Settings.Packages.IntegerGmp (integerGmpPackageArgs) where ...@@ -2,7 +2,6 @@ module Settings.Packages.IntegerGmp (integerGmpPackageArgs) where
import Base import Base
import Expression import Expression
import GHC
import Oracles.Setting import Oracles.Setting
import Rules.Gmp import Rules.Gmp
......
...@@ -3,9 +3,7 @@ module Settings.Packages.Rts ( ...@@ -3,9 +3,7 @@ module Settings.Packages.Rts (
) where ) where
import Base import Base
import Context (buildPath)
import Expression import Expression
import GHC
import Oracles.Flag import Oracles.Flag
import Oracles.Setting import Oracles.Setting
import Settings import Settings
......
module Settings.Packages.RunGhc (runGhcPackageArgs) where module Settings.Packages.RunGhc (runGhcPackageArgs) where
import GHC
import Oracles.Setting import Oracles.Setting
import Expression import Expression
......
...@@ -15,7 +15,6 @@ import Hadrian.Utilities ...@@ -15,7 +15,6 @@ import Hadrian.Utilities
import CommandLine import CommandLine
import Context import Context
import Expression hiding (builder, inputs, outputs, way, stage, package) import Expression hiding (builder, inputs, outputs, way, stage, package)
import GHC
import Oracles.Setting import Oracles.Setting
import Oracles.PackageData import Oracles.PackageData
import Settings import Settings
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment