[commit: ghc] wip/nfs-locking: Refactor folder structure. (2f70955)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:57:36 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/2f70955b45d2c0e4dad2fd8a606caca094bd7c5c/ghc
>---------------------------------------------------------------
commit 2f70955b45d2c0e4dad2fd8a606caca094bd7c5c
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sun Jun 14 16:10:48 2015 +0100
Refactor folder structure.
>---------------------------------------------------------------
2f70955b45d2c0e4dad2fd8a606caca094bd7c5c
src/Expression.hs | 8 +++++---
src/Settings.hs | 2 +-
src/{Expression/Settings.hs => Settings/Util.hs} | 6 +-----
src/Targets.hs | 1 -
src/UserSettings.hs | 1 -
5 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/Expression.hs b/src/Expression.hs
index 8ae285d..7adbce0 100644
--- a/src/Expression.hs
+++ b/src/Expression.hs
@@ -3,7 +3,7 @@ module Expression (
module Control.Monad.Reader,
Expr, DiffExpr, fromDiff,
Predicate,
- Ways, Packages,
+ Settings, Ways, Packages,
Environment (..), defaultEnvironment,
append, appendM, remove, appendSub, appendSubD, filterSub, removeSub,
interpret, interpretDiff,
@@ -37,8 +37,10 @@ type Expr a = ReaderT Environment Action a
type DiffExpr a = Expr (Endo a)
type Predicate = Expr Bool
-type Ways = DiffExpr [Way]
-type Packages = DiffExpr [Package]
+
+type Settings = DiffExpr [String]
+type Ways = DiffExpr [Way]
+type Packages = DiffExpr [Package]
instance Monoid a => Monoid (Expr a) where
mempty = return mempty
diff --git a/src/Settings.hs b/src/Settings.hs
index ebafbc2..95b88b5 100644
--- a/src/Settings.hs
+++ b/src/Settings.hs
@@ -14,9 +14,9 @@ import Targets
import Package
import Switches
import Oracles.Base
+import Settings.Util
import UserSettings
import Expression hiding (when, liftIO)
-import Expression.Settings
settings :: Settings
settings = defaultSettings <> userSettings
diff --git a/src/Expression/Settings.hs b/src/Settings/Util.hs
similarity index 97%
rename from src/Expression/Settings.hs
rename to src/Settings/Util.hs
index 5bc185b..dbd07c0 100644
--- a/src/Expression/Settings.hs
+++ b/src/Settings/Util.hs
@@ -1,8 +1,6 @@
{-# LANGUAGE NoImplicitPrelude #-}
-module Expression.Settings (
- Settings,
-
+module Settings.Util (
-- Primitive settings elements
arg, argM, args,
argConfig, argStagedConfig, argConfigList, argStagedConfigList,
@@ -18,8 +16,6 @@ import Base hiding (Args, arg, args)
import Oracles hiding (not)
import Expression
-type Settings = DiffExpr [String]
-
-- A single argument
arg :: String -> Settings
arg = append . return
diff --git a/src/Targets.hs b/src/Targets.hs
index b2b52d3..4d3c613 100644
--- a/src/Targets.hs
+++ b/src/Targets.hs
@@ -13,7 +13,6 @@ import Base hiding (arg, args, Args, TargetDir)
import Package
import Switches
import Expression
-import Expression.Settings
-- These are the packages we build
targetPackages :: Packages
diff --git a/src/UserSettings.hs b/src/UserSettings.hs
index ccc03f5..4928661 100644
--- a/src/UserSettings.hs
+++ b/src/UserSettings.hs
@@ -7,7 +7,6 @@ import Oracles.Builder
import Ways
import Targets
import Expression
-import Expression.Settings
-- No user-specific settings by default
userSettings :: Settings
More information about the ghc-commits
mailing list