aboutsummaryrefslogtreecommitdiff
path: root/Data/ConfigManager/Types/Internal.hs
diff options
context:
space:
mode:
authorJoris2016-03-18 09:50:39 +0100
committerJoris2016-03-18 09:50:39 +0100
commitbf804f73ce3494be430054499c5ce18f232f68ca (patch)
tree6b89c204b9f997d6f6d4134cfaa72ecc6f2234f6 /Data/ConfigManager/Types/Internal.hs
parent9c3c43835addc950c3af7fab8fd53e24e7e29ad9 (diff)
Add optional imports
Diffstat (limited to 'Data/ConfigManager/Types/Internal.hs')
-rw-r--r--Data/ConfigManager/Types/Internal.hs39
1 files changed, 39 insertions, 0 deletions
diff --git a/Data/ConfigManager/Types/Internal.hs b/Data/ConfigManager/Types/Internal.hs
new file mode 100644
index 0000000..5b91802
--- /dev/null
+++ b/Data/ConfigManager/Types/Internal.hs
@@ -0,0 +1,39 @@
+module Data.ConfigManager.Types.Internal
+ ( Config(..)
+ , Expr(..)
+ , Name
+ , Value
+ , Requirement(..)
+ ) where
+
+import Data.Text (Text)
+
+import Data.HashMap.Strict
+
+-- | Configuration data
+
+data Config = Config
+ { hashMap :: HashMap Name Value
+ } deriving (Eq, Read, Show)
+
+-- | An expression is either a binding or an import
+
+data Expr =
+ Binding Name Value
+ | Import Requirement FilePath
+ deriving (Eq, Read, Show)
+
+-- | A name is a text
+
+type Name = Text
+
+-- | A value is a text
+
+type Value = Text
+
+-- | A requirement is either required or optional
+
+data Requirement =
+ Required
+ | Optional
+ deriving (Eq, Read, Show)