From 2b3e1fc86585df732266771ddaa5c3b11f3fa914 Mon Sep 17 00:00:00 2001 From: Joris Date: Fri, 8 Apr 2016 10:14:33 +0200 Subject: Use Configured typeclass for lookupDefault instead of Read typeclass --- Data/ConfigManager.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Data') 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 = -- cgit v1.2.3