aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2016-03-19 11:58:38 +0100
committerJoris2016-03-19 17:24:13 +0100
commit4c67e2c9dc817fb9d63b0951fbdc59252e6b8941 (patch)
tree726025169e3c78fa670f03bb17281866332d2190
parent3e5d3d47c90194403967e11994ea559b00b0f8ef (diff)
downloadconfig-manager-4c67e2c9dc817fb9d63b0951fbdc59252e6b8941.tar.gz
config-manager-4c67e2c9dc817fb9d63b0951fbdc59252e6b8941.tar.bz2
config-manager-4c67e2c9dc817fb9d63b0951fbdc59252e6b8941.zip
Update documentation
-rw-r--r--Data/ConfigManager.hs6
-rw-r--r--config-manager.cabal2
2 files changed, 5 insertions, 3 deletions
diff --git a/Data/ConfigManager.hs b/Data/ConfigManager.hs
index 00968f5..edc2e93 100644
--- a/Data/ConfigManager.hs
+++ b/Data/ConfigManager.hs
@@ -39,18 +39,18 @@ import qualified Data.HashMap.Strict as M
import qualified Data.ConfigManager.Reader as R
import Data.ConfigManager.Types
--- | Load a 'Config' from a given 'FilePath'
+-- | Load a 'Config' from a given 'FilePath'.
readConfig :: FilePath -> IO (Either Text Config)
readConfig = R.readConfig Required
--- | Lookup for the value associated to a name
+-- | Lookup for the value associated to a name.
lookup :: Read a => Name -> Config -> Maybe a
lookup name config = join . fmap (readMaybe . T.unpack) $ M.lookup name (hashMap config)
-- | Lookup for the value associated to a name and return the default value if
--- no binding exists with the given name
+-- no binding exists with the given name.
lookupDefault :: Value -> Name -> Config -> Value
lookupDefault defaultValue name config = M.lookupDefault defaultValue name (hashMap config)
diff --git a/config-manager.cabal b/config-manager.cabal
index 13d66e3..6ea7573 100644
--- a/config-manager.cabal
+++ b/config-manager.cabal
@@ -5,7 +5,9 @@ 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