Commit 03f90e74 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Remove Base.hs, move Stage definition to Stage.hs.

parent 272f1005
......@@ -3,12 +3,12 @@ module Settings.GhcCabal (
) where
import Way
import Base
import Stage
import Builder
import Package
import Util
import Expression
import Switches
import Expression
import Oracles.Base
import Settings.User
import Settings.Ways
......@@ -16,6 +16,9 @@ import Settings.Util
import Settings.Packages
import Settings.TargetDirectory
import Data.List
import Control.Applicative
import Development.Shake
import Development.Shake.FilePath
cabalArgs :: Args
cabalArgs = builder GhcCabal ? do
......
......@@ -2,13 +2,13 @@ module Settings.GhcPkg (
ghcPkgArgs
) where
import Base
import Builder
import Switches
import Expression
import Settings.Util
import Settings.GhcCabal
import Settings.TargetDirectory
import Development.Shake.FilePath
ghcPkgArgs :: Args
ghcPkgArgs = do
......
......@@ -3,12 +3,11 @@ module Settings.Packages (
packages, knownPackages
) where
import Base
import Package
import Switches
import Expression
import Settings.Default
import Settings.User
import Settings.Default
-- Combining default list of packages with user modifications
packages :: Packages
......
......@@ -2,9 +2,10 @@ module Settings.TargetDirectory (
targetDirectory, targetPath
) where
import Base
import Stage
import Package
import Settings.User
import Development.Shake.FilePath
-- User can override the default target directory settings given below
targetDirectory :: Stage -> Package -> FilePath
......
......@@ -5,10 +5,10 @@ module Settings.User (
buildHaddock, validating
) where
import Base hiding (Args)
import Stage
import Package
import Settings.Default
import Expression
import Settings.Default
-- No user-specific settings by default
-- TODO: rename to userArgs
......
......@@ -11,11 +11,12 @@ module Settings.Util (
-- argPackageConstraints,
) where
import Base
import Util
import Stage
import Builder
import Oracles.Base
import Expression
import Development.Shake
-- A single argument.
arg :: String -> Args
......
......@@ -3,7 +3,7 @@ module Settings.Ways (
) where
import Way
import Base
import Stage
import Switches
import Expression
import Settings.User
......
{-# LANGUAGE DeriveGeneric, FlexibleInstances #-}
module Stage (
Stage (..)
) where
import GHC.Generics
import Development.Shake.Classes
data Stage = Stage0 | Stage1 | Stage2 | Stage3 deriving (Eq, Enum, Generic)
instance Show Stage where
show = show . fromEnum
-- Instances for storing in the Shake database
instance Binary Stage
instance Hashable Stage
......@@ -9,7 +9,7 @@ module Switches (
registerPackage
) where
import Base
import Stage
import Expression
-- Derived predicates
......
......@@ -5,7 +5,7 @@ module Target (
) where
import Way
import Base
import Stage
import Package
import Builder
import GHC.Generics
......
......@@ -7,11 +7,12 @@ module Util (
putColoured, redError, redError_
) where
import Base
import Data.Char
import System.Console.ANSI
import System.IO
import Control.Monad
import System.IO
import System.Console.ANSI
import Development.Shake
import Development.Shake.FilePath
replaceIf :: (a -> Bool) -> a -> [a] -> [a]
replaceIf p to = map (\from -> if p from then to else from)
......
......@@ -13,9 +13,10 @@ module Way ( -- TODO: rename to "Way"?
detectWay
) where
import Base
import Util
import Oracles.Setting
import Control.Applicative
import Development.Shake
import Development.Shake.Classes
import Data.List hiding (delete)
import Data.IntSet (IntSet, elems, member, delete, fromList)
......
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