aboutsummaryrefslogtreecommitdiff
path: root/Backend.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-28 16:43:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-28 16:43:10 -0400
commit297bc648b9a3c1b950e65f23a0e974b7934dc4dd (patch)
tree829ba7455be689c6e389d06420b24e0fe9c74bc6 /Backend.hs
parent5ae270001c978b306419e6799e67e5f14a1765a2 (diff)
make unused check branches and tags too
needs time and space optimisation
Diffstat (limited to 'Backend.hs')
-rw-r--r--Backend.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Backend.hs b/Backend.hs
index d12913985..ca822de5c 100644
--- a/Backend.hs
+++ b/Backend.hs
@@ -17,6 +17,7 @@ module Backend (
) where
import Control.Monad.State (liftIO, when)
+import Control.Applicative
import System.IO.Error (try)
import System.FilePath
import System.Posix.Files
@@ -86,9 +87,7 @@ lookupFile file = do
Left _ -> return Nothing
Right l -> makekey l
where
- getsymlink = do
- l <- readSymbolicLink file
- return $ takeFileName l
+ getsymlink = takeFileName <$> readSymbolicLink file
makekey l = maybe (return Nothing) (makeret l) (fileKey l)
makeret l k =
case maybeLookupBackendName bname of