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

Clean up.

parent cdf208c3
This folder serves two purposes:
* Tracking argument lists produced by rules
* Documentation
......@@ -36,14 +36,14 @@ builderKey builder = case builder of
Ar -> "ar"
Gcc Stage0 -> "system-gcc"
Gcc _ -> "gcc"
GccM stage -> builderKey $ Gcc stage -- Synonym for 'Gcc -MM'
GccM stage -> builderKey $ Gcc stage -- synonym for 'Gcc -MM'
Ghc Stage0 -> "system-ghc"
Ghc Stage1 -> "ghc-stage1"
Ghc Stage2 -> "ghc-stage2"
Ghc Stage3 -> "ghc-stage3"
GhcM stage -> builderKey $ Ghc stage -- Synonym for 'Ghc -M'
GhcM stage -> builderKey $ Ghc stage -- synonym for 'Ghc -M'
GhcCabal -> "ghc-cabal"
GhcCabalHsColour -> builderKey $ GhcCabal -- Synonym for 'GhcCabal hscolour'
GhcCabalHsColour -> builderKey $ GhcCabal -- synonym for 'GhcCabal hscolour'
GhcPkg Stage0 -> "system-ghc-pkg"
GhcPkg _ -> "ghc-pkg"
Happy -> "happy"
......@@ -72,9 +72,10 @@ needBuilder laxDependencies builder = do
else need [path]
where
allowOrderOnlyDependency :: Builder -> Bool
allowOrderOnlyDependency (Ghc _) = True
allowOrderOnlyDependency (GhcM _) = True
allowOrderOnlyDependency _ = False
allowOrderOnlyDependency b = case b of
Ghc _ -> True
GhcM _ -> True
_ -> False
-- On Windows: if the path starts with "/", prepend it with the correct path to
-- the root, e.g: "/usr/local/bin/ghc.exe" => "C:/msys/usr/local/bin/ghc.exe".
......
......@@ -7,8 +7,8 @@ module Oracles.Config.Setting (
) where
import Base
import Stage
import Oracles.Config
import Stage
-- Each Setting comes from the system.config file, e.g. 'target-os = mingw32'.
-- setting TargetOs looks up the config file and returns "mingw32".
......
......@@ -2,8 +2,8 @@
module Oracles.PackageDeps (packageDeps, packageDepsOracle) where
import Base
import Package
import qualified Data.HashMap.Strict as Map
import Package
newtype PackageDepsKey = PackageDepsKey PackageName
deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
......
module Rules.Cabal (cabalRules) where
import Expression
import Data.Version
import Distribution.Package
import Distribution.Verbosity
import Distribution.PackageDescription
import Distribution.PackageDescription.Parse
import Expression
import Distribution.Verbosity
import Package hiding (library)
import Settings
......
module Settings.Args (getArgs) where
import Expression
import Settings.User
import Settings.Builders.Ar
import Settings.Builders.Ld
import Settings.Builders.Ghc
import Settings.Builders.Gcc
import Settings.Builders.Ghc
import Settings.Builders.GhcCabal
import Settings.Builders.GhcPkg
import Settings.Builders.Haddock
import Settings.Builders.GhcCabal
import Settings.Builders.Ld
import Settings.User
getArgs :: Expr [String]
getArgs = fromDiffExpr $ defaultArgs <> userArgs
......
module Settings.Builders.Ar (arArgs, arPersistentArgsCount) where
import Builder
import Expression
import Predicates (builder)
......
module Settings.Builders.Haddock (haddockArgs) where
import Expression
import Predicates hiding (file)
import Oracles
import Predicates hiding (file)
import Settings
import Settings.Builders.Ghc
......
module Settings.Packages (
getPackages, knownPackages, findKnownPackage
) where
module Settings.Packages (getPackages, knownPackages, findKnownPackage) where
import Expression
import Predicates
......
......@@ -4,7 +4,7 @@ module Stage (Stage (..)) where
import Base
import GHC.Generics (Generic)
-- TODO: rename to something more meaningful, e.g. Stage0 -> Boot.
-- TODO: rename to something more meaningful, e.g. 'Stage0' -> 'Boot'.
data Stage = Stage0 | Stage1 | Stage2 | Stage3 deriving (Eq, Enum, Generic)
instance Show Stage where
......
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