Commit 2f70955b authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Refactor folder structure.

parent 3461e46c
......@@ -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
......
......@@ -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
......
{-# 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
......
......@@ -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
......
......@@ -7,7 +7,6 @@ import Oracles.Builder
import Ways
import Targets
import Expression
import Expression.Settings
-- No user-specific settings by default
userSettings :: Settings
......
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