aboutsummaryrefslogtreecommitdiff
path: root/Config.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-01-23 17:00:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-01-23 17:00:10 -0400
commitba6088b249902d456177af3c14f20f43b6def1fd (patch)
tree43bd6cf141c63693732d4066c0d9590c0c077822 /Config.hs
parent5e172b43c4dc5d779e4f1af5c1376c9a8ebc60a4 (diff)
rename readMaybe to readish
a stricter (but also partial) readMaybe is getting added to base
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Config.hs b/Config.hs
index 83a84a1fe..349ddf67f 100644
--- a/Config.hs
+++ b/Config.hs
@@ -40,7 +40,7 @@ remoteConfig r key = "remote." ++ fromMaybe "" (Git.remoteName r) ++ ".annex-" +
remoteCost :: Git.Repo -> Int -> Annex Int
remoteCost r def = do
cmd <- getConfig r "cost-command" ""
- (fromMaybe def . readMaybe) <$>
+ (fromMaybe def . readish) <$>
if not $ null cmd
then liftIO $ snd <$> pipeFrom "sh" ["-c", cmd]
else getConfig r "cost" ""
@@ -78,7 +78,7 @@ getNumCopies v = perhaps (use v) =<< Annex.getState Annex.forcenumcopies
where
use (Just n) = return n
use Nothing = perhaps (return 1) =<<
- readMaybe <$> fromRepo (Git.Config.get config "1")
+ readish <$> fromRepo (Git.Config.get config "1")
perhaps fallback = maybe fallback (return . id)
config = "annex.numcopies"