[commit: ghc] wip/nfs-locking: Move Condition to Base.hs. (4166bc7)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:01:30 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/4166bc732f9f62a34e0e5597686024e995d98691/ghc

>---------------------------------------------------------------

commit 4166bc732f9f62a34e0e5597686024e995d98691
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu Jan 1 23:13:50 2015 +0000

    Move Condition to Base.hs.


>---------------------------------------------------------------

4166bc732f9f62a34e0e5597686024e995d98691
 src/Base.hs         | 3 +++
 src/Oracles/Base.hs | 5 +----
 src/Oracles/Flag.hs | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Base.hs b/src/Base.hs
index b95cf14..0a88146 100644
--- a/src/Base.hs
+++ b/src/Base.hs
@@ -6,6 +6,7 @@ module Base (
     module Data.List,
     Stage (..),
     Args, arg,
+    Condition (..),
     joinArgs, joinArgsWithSpaces, splitArgs,
     filterOut
     ) where
@@ -20,6 +21,8 @@ data Stage = Stage0 | Stage1 | Stage2 | Stage3 deriving (Eq, Enum)
 
 type Args = Action [String]
 
+type Condition = Action Bool
+
 instance Monoid a => Monoid (Action a) where
     mempty = return mempty
     mappend p q = mappend <$> p <*> q
diff --git a/src/Oracles/Base.hs b/src/Oracles/Base.hs
index 1a9cf3e..f9e5c73 100644
--- a/src/Oracles/Base.hs
+++ b/src/Oracles/Base.hs
@@ -2,15 +2,12 @@
 
 module Oracles.Base (
     ConfigKey (..),
-    askConfigWithDefault, askConfig,
-    Condition (..)
+    askConfigWithDefault, askConfig
     ) where
 
 import Base
 import Development.Shake.Classes
 
-type Condition = Action Bool
-
 newtype ConfigKey = ConfigKey String deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
 
 askConfigWithDefault :: String -> Action String -> Action String
diff --git a/src/Oracles/Flag.hs b/src/Oracles/Flag.hs
index c8ddc8e..1958c07 100644
--- a/src/Oracles/Flag.hs
+++ b/src/Oracles/Flag.hs
@@ -4,7 +4,7 @@ module Oracles.Flag (
     module Control.Monad,
     module Prelude,
     Flag (..), 
-    Condition, test, when, unless, not, (&&), (||)
+    test, when, unless, not, (&&), (||)
     ) where
 
 import Control.Monad hiding (when, unless)



More information about the ghc-commits mailing list