diff options
author | Joey Hess <joey@kitenet.net> | 2011-08-25 00:28:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-08-25 01:27:19 -0400 |
commit | 678726c10c13481c082743808a5188d28567e2b3 (patch) | |
tree | a5052eb5b20444e10d3f5d467281ef4c0f5975d1 /LocationLog.hs | |
parent | 20259c2955e408a72e0960207fc8be4cbeec2e21 (diff) |
code simplification thanks to applicative functors
Diffstat (limited to 'LocationLog.hs')
-rw-r--r-- | LocationLog.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/LocationLog.hs b/LocationLog.hs index 768483fa1..fa660c8b6 100644 --- a/LocationLog.hs +++ b/LocationLog.hs @@ -24,6 +24,7 @@ module LocationLog ( import System.FilePath import Control.Monad (when) +import Control.Applicative import Data.Maybe import qualified Git @@ -49,7 +50,7 @@ keyLocations key = currentLog $ logFile key {- Finds all keys that have location log information. - (There may be duplicate keys in the list.) -} loggedKeys :: Annex [Key] -loggedKeys = return . mapMaybe (logFileKey . takeFileName) =<< Branch.files +loggedKeys = mapMaybe (logFileKey . takeFileName) <$> Branch.files {- The filename of the log file for a given key. -} logFile :: Key -> String |