aboutsummaryrefslogtreecommitdiff
path: root/Data/ConfigManager/Types/Internal.hs
blob: 5b91802cd19207edddfb9a765d316dbdde32a9f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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)