Commit fb30a88d authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Rename src/Rules/Actions.hs -> src/Util.hs

parent e31cb513
......@@ -38,7 +38,6 @@ executable hadrian
, Package
, Predicate
, Rules
, Rules.Actions
, Rules.Cabal
, Rules.Clean
, Rules.Compile
......@@ -106,6 +105,7 @@ executable hadrian
, Stage
, Target
, UserSettings
, Util
, Way
default-language: Haskell2010
......
......@@ -2,11 +2,11 @@ module Rules.Clean (cleanRules) where
import Base
import Package
import Rules.Actions
import Settings
import Settings.Path
import Stage
import UserSettings
import Util
cleanRules :: Rules ()
cleanRules = do
......
......@@ -6,10 +6,10 @@ import Base
import Context
import Expression
import Oracles.Dependencies
import Rules.Actions
import Rules.Generate
import Settings.Path
import Target
import Util
compilePackage :: [(Resource, Int)] -> Context -> Rules ()
compilePackage rs context@Context {..} = do
......
......@@ -7,11 +7,11 @@ import Builder
import CmdLineFlag
import Context
import GHC
import Rules.Actions
import Rules.Generators.GhcAutoconfH
import Stage
import Target
import UserSettings
import Util
configureRules :: Rules ()
configureRules = do
......
......@@ -6,12 +6,12 @@ import Expression
import GHC
import Oracles.Config.Setting
import Oracles.Dependencies
import Rules.Actions
import Rules.Generate
import Rules.Libffi
import Settings.Path
import Target
import UserSettings
import Util
-- | Build @package-data.mk@ by using ghc-cabal utility to process .cabal files.
buildPackageData :: Context -> Rules ()
......
......@@ -6,9 +6,9 @@ import Base
import Context
import Expression
import Oracles.ModuleFiles
import Rules.Actions
import Settings.Path
import Target
import Util
buildPackageDependencies :: [(Resource, Int)] -> Context -> Rules ()
buildPackageDependencies rs context@Context {..} =
......
......@@ -7,10 +7,10 @@ import Flavour
import GHC
import Oracles.ModuleFiles
import Oracles.PackageData
import Rules.Actions
import Settings
import Settings.Path
import Target
import Util
haddockHtmlLib :: FilePath
haddockHtmlLib = "inplace/lib/html/haddock-util.js"
......
......@@ -11,7 +11,6 @@ import Expression
import GHC
import Oracles.ModuleFiles
import Predicate
import Rules.Actions
import Rules.Generators.ConfigHs
import Rules.Generators.GhcAutoconfH
import Rules.Generators.GhcBootPlatformH
......@@ -24,6 +23,7 @@ import Settings.Packages.Rts
import Settings.Path
import Target
import UserSettings
import Util
installTargets :: [FilePath]
installTargets = [ "inplace/lib/ghc-usage.txt"
......
......@@ -5,11 +5,11 @@ import Builder
import Expression
import GHC
import Oracles.Config.Setting
import Rules.Actions
import Settings.Packages.IntegerGmp
import Settings.Path
import Target
import UserSettings
import Util
gmpBase :: FilePath
gmpBase = pkgPath integerGmp -/- "gmp"
......
module Rules.Libffi (rtsBuildPath, libffiRules, libffiDependencies) where
import Rules.Actions
import Settings.Builders.Common
import Settings.Packages.Rts
import Target
import Util
-- TODO: this should be moved elsewhere
rtsBuildPath :: FilePath
......
......@@ -10,11 +10,11 @@ import Flavour
import GHC
import Oracles.ModuleFiles
import Oracles.PackageData
import Rules.Actions
import Settings
import Settings.Path
import Target
import UserSettings
import Util
buildPackageLibrary :: Context -> Rules ()
buildPackageLibrary context@Context {..} = do
......
......@@ -2,7 +2,7 @@ module Rules.Perl (perlScriptRules) where
import Base
import Expression
import Rules.Actions
import Util
-- | Build Perl scripts, such as @ghc-split@, from their literate Perl sources.
perlScriptRules :: Rules ()
......
......@@ -10,13 +10,13 @@ import Oracles.Config.Setting
import Oracles.Dependencies
import Oracles.ModuleFiles
import Oracles.PackageData
import Rules.Actions
import Rules.Wrappers.Ghc
import Rules.Wrappers.GhcPkg
import Settings
import Settings.Path
import Target
import UserSettings
import Util
-- | Wrapper is an expression depending on the 'FilePath' to the wrapped binary.
type Wrapper = FilePath -> Expr String
......
......@@ -4,12 +4,12 @@ import Base
import Context
import Expression
import GHC
import Rules.Actions
import Rules.Libffi
import Settings.Packages.Rts
import Settings.Path
import Target
import UserSettings
import Util
-- | Build rules for registering packages and initialising package databases
-- by running the @ghc-pkg@ utility.
......
......@@ -4,8 +4,8 @@ import Base
import Builder
import Oracles.Config.Setting
import Oracles.DirectoryContent
import Rules.Actions
import UserSettings
import Util
sourceDistRules :: Rules ()
sourceDistRules = do
......
......@@ -8,10 +8,10 @@ import GHC
import Oracles.Config.Flag
import Oracles.Config.Setting
import Oracles.Path
import Rules.Actions
import Settings
import Settings.Path
import Target
import Util
-- TODO: clean up after testing
testRules :: Rules ()
......
......@@ -4,8 +4,8 @@ module Settings.Builders.GhcCabal (
import Context
import Flavour
import Rules.Actions
import Settings.Builders.Common
import Util
ghcCabalBuilderArgs :: Args
ghcCabalBuilderArgs = builder GhcCabal ? do
......
module Rules.Actions (
module Util (
build, buildWithCmdOptions, buildWithResources, copyFile, fixFile, moveFile,
removeFile, copyDirectory, copyDirectoryContent, createDirectory,
moveDirectory, removeDirectory, applyPatch, runBuilder, runBuilderWith,
......
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