From 4c67e2c9dc817fb9d63b0951fbdc59252e6b8941 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 19 Mar 2016 11:58:38 +0100 Subject: Update documentation --- Data/ConfigManager.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Data') 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) -- cgit v1.2.3