summaryrefslogtreecommitdiff
path: root/Command/Migrate.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-08-25 00:28:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-08-25 01:27:19 -0400
commit678726c10c13481c082743808a5188d28567e2b3 (patch)
treea5052eb5b20444e10d3f5d467281ef4c0f5975d1 /Command/Migrate.hs
parent20259c2955e408a72e0960207fc8be4cbeec2e21 (diff)
code simplification thanks to applicative functors
Diffstat (limited to 'Command/Migrate.hs')
-rw-r--r--Command/Migrate.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/Migrate.hs b/Command/Migrate.hs
index 25227ae16..6ad7e239c 100644
--- a/Command/Migrate.hs
+++ b/Command/Migrate.hs
@@ -8,6 +8,7 @@
module Command.Migrate where
import Control.Monad.State (liftIO)
+import Control.Applicative
import System.Posix.Files
import System.Directory
import System.FilePath
@@ -39,7 +40,7 @@ start (file, b) = isAnnexed file $ \(key, oldbackend) -> do
next $ perform file key newbackend
else stop
where
- choosebackend Nothing = return . head =<< Backend.orderedList
+ choosebackend Nothing = head <$> Backend.orderedList
choosebackend (Just backend) = return backend
{- Checks if a key is upgradable to a newer representation. -}