Commit 4166bc73 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Move Condition to Base.hs.

parent a7cc4731
......@@ -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
......
......@@ -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
......
......@@ -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)
......
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