aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2016-04-08 10:14:33 +0200
committerJoris2016-04-08 10:14:33 +0200
commit2b3e1fc86585df732266771ddaa5c3b11f3fa914 (patch)
treeaef62cbd852dcecd436d570af303c8d14cceeeaa
parent1e7312c50471863e584979e535a3bc2131b7c76a (diff)
Use Configured typeclass for lookupDefault instead of Read typeclass
-rw-r--r--Data/ConfigManager.hs4
-rw-r--r--config-manager.cabal2
2 files changed, 3 insertions, 3 deletions
diff --git a/Data/ConfigManager.hs b/Data/ConfigManager.hs
index 1afe1fb..d597149 100644
--- a/Data/ConfigManager.hs
+++ b/Data/ConfigManager.hs
@@ -63,7 +63,7 @@ lookup name config =
-- | Lookup for the value associated to a name and return the default value if
-- no binding exists with the given name.
-lookupDefault :: Read a => a -> Name -> Config -> a
+lookupDefault :: Configured a => a -> Name -> Config -> a
lookupDefault defaultValue name config = foldl (flip const) defaultValue $ lookup name config
-- $format
@@ -122,7 +122,7 @@ lookupDefault defaultValue name config = foldl (flip const) defaultValue $ looku
-- > , mailFrom :: String
-- > , currency :: String
-- > , expiration :: DiffTime
--- > } deriving (Read, Eq, Show)
+-- > } deriving (Eq, Show)
-- >
-- > getConfig :: IO (Either Text Conf)
-- > getConfig =
diff --git a/config-manager.cabal b/config-manager.cabal
index 0541f83..4874772 100644
--- a/config-manager.cabal
+++ b/config-manager.cabal
@@ -1,5 +1,5 @@
name: config-manager
-version: 0.2.0.0
+version: 0.3.0.0
synopsis: Configuration management
description:
A configuration management library which supports: