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