aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Data/ConfigManager.hs6
-rw-r--r--Data/ConfigManager/Types.hs2
-rw-r--r--Data/ConfigManager/Types/Internal.hs10
-rw-r--r--config-manager.cabal9
4 files changed, 15 insertions, 12 deletions
diff --git a/Data/ConfigManager.hs b/Data/ConfigManager.hs
index bd62f40..00968f5 100644
--- a/Data/ConfigManager.hs
+++ b/Data/ConfigManager.hs
@@ -65,7 +65,7 @@ lookupDefault defaultValue name config = M.lookupDefault defaultValue name (hash
-- $bindings
--
--- A binding associates a name to a value.
+-- A binding associates a name to a value:
--
-- > number = 1
-- > my-string = "Hello"
@@ -82,9 +82,9 @@ lookupDefault defaultValue name config = M.lookupDefault defaultValue name (hash
-- > import "database.conf"
-- > importMaybe "local.conf"
--- $comment
+-- $comments
--
--- A comment begins with '#' and continues to the end of the line.
+-- A comment begins with '#' and continues to the end of the line:
--
-- > # Comment
-- > x = 8 # Another comment
diff --git a/Data/ConfigManager/Types.hs b/Data/ConfigManager/Types.hs
index ddc578f..ea2691f 100644
--- a/Data/ConfigManager/Types.hs
+++ b/Data/ConfigManager/Types.hs
@@ -4,7 +4,7 @@
-- Maintainer: Joris Guyonvarch <joris@guyonvarch.me>
-- Stability: experimental
--
--- Types for working with configuration files.
+-- Configuration management types.
module Data.ConfigManager.Types
( Config(..)
diff --git a/Data/ConfigManager/Types/Internal.hs b/Data/ConfigManager/Types/Internal.hs
index 5b91802..c4d5d0e 100644
--- a/Data/ConfigManager/Types/Internal.hs
+++ b/Data/ConfigManager/Types/Internal.hs
@@ -10,28 +10,28 @@ import Data.Text (Text)
import Data.HashMap.Strict
--- | Configuration data
+-- | Configuration data.
data Config = Config
{ hashMap :: HashMap Name Value
} deriving (Eq, Read, Show)
--- | An expression is either a binding or an import
+-- | 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
+-- | A name is a text.
type Name = Text
--- | A value is a text
+-- | A value is a text.
type Value = Text
--- | A requirement is either required or optional
+-- | A requirement is either required or optional.
data Requirement =
Required
diff --git a/config-manager.cabal b/config-manager.cabal
index 6363865..13d66e3 100644
--- a/config-manager.cabal
+++ b/config-manager.cabal
@@ -1,7 +1,12 @@
name: config-manager
version: 0.0.0.1
synopsis: Configuration management
-description: A configuration management library
+description:
+ A configuration management library which supports:
+ .
+ * name-value bindings,
+ * required or optional imports,
+ * and comments.
homepage: https://gitlab.com/guyonvarch/config-manager
bug-reports: https://gitlab.com/guyonvarch/config-manager/issues
license: GPL-3
@@ -20,8 +25,6 @@ library
other-modules: Data.ConfigManager.Reader
Data.ConfigManager.Parser
Data.ConfigManager.Types.Internal
- -- LANGUAGE extensions used by modules in this package.
- -- other-extensions:
ghc-options: -Wall
build-depends: base < 5,
text,