From 82161654830b0dc4187e9928555c9321ef61bb89 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Jan 2015 16:11:28 -0400 Subject: import Data.Default in Common --- Config.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs index 57ced7821..29135ed96 100644 --- a/Config.hs +++ b/Config.hs @@ -23,7 +23,7 @@ instance Show ConfigKey where {- Looks up a setting in git config. -} getConfig :: ConfigKey -> String -> Annex String -getConfig (ConfigKey key) def = fromRepo $ Git.Config.get key def +getConfig (ConfigKey key) d = fromRepo $ Git.Config.get key d getConfigMaybe :: ConfigKey -> Annex (Maybe String) getConfigMaybe (ConfigKey key) = fromRepo $ Git.Config.getMaybe key @@ -58,7 +58,7 @@ annexConfig key = ConfigKey $ "annex." ++ key - by remote..annex-cost, or if remote..annex-cost-command - is set and prints a number, that is used. -} remoteCost :: RemoteGitConfig -> Cost -> Annex Cost -remoteCost c def = fromMaybe def <$> remoteCost' c +remoteCost c d = fromMaybe d <$> remoteCost' c remoteCost' :: RemoteGitConfig -> Annex (Maybe Cost) remoteCost' c = case remoteAnnexCostCommand c of -- cgit v1.2.3