summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-10-09 14:53:13 -0400
committerJoey Hess <joey@kitenet.net>2014-10-09 15:09:11 -0400
commit7b50b3c057068e177d097f56dcbb03d3e2267e50 (patch)
treebfc57c1afbd1e1b5b87737ecac60203fa88042bd
parent8f69d55f03f1317c74ff70940df72bbb8c7266cf (diff)
fix some mixed space+tab indentation
This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
-rw-r--r--Annex/Branch.hs6
-rw-r--r--Annex/CatFile.hs6
-rw-r--r--Annex/CheckIgnore.hs2
-rw-r--r--Annex/Content.hs4
-rw-r--r--Annex/Direct.hs2
-rw-r--r--Annex/Environment.hs4
-rw-r--r--Annex/FileMatcher.hs2
-rw-r--r--Annex/ReplaceFile.hs2
-rw-r--r--Annex/Ssh.hs4
-rw-r--r--Annex/Transfer.hs2
-rw-r--r--Annex/View.hs8
-rw-r--r--Annex/View/ViewedFile.hs2
-rw-r--r--Assistant.hs2
-rw-r--r--Assistant/Alert.hs2
-rw-r--r--Assistant/Alert/Utility.hs2
-rw-r--r--Assistant/DaemonStatus.hs2
-rw-r--r--Assistant/DeleteRemote.hs2
-rw-r--r--Assistant/Gpg.hs2
-rw-r--r--Assistant/MakeRemote.hs2
-rw-r--r--Assistant/NetMessager.hs4
-rw-r--r--Assistant/Repair.hs6
-rw-r--r--Assistant/Ssh.hs6
-rw-r--r--Assistant/Threads/Committer.hs6
-rw-r--r--Assistant/Threads/Cronner.hs8
-rw-r--r--Assistant/Threads/SanityChecker.hs2
-rw-r--r--Assistant/Threads/UpgradeWatcher.hs4
-rw-r--r--Assistant/Threads/Upgrader.hs2
-rw-r--r--Assistant/Threads/Watcher.hs6
-rw-r--r--Assistant/Threads/WebApp.hs2
-rw-r--r--Assistant/Threads/XMPPClient.hs2
-rw-r--r--Assistant/Threads/XMPPPusher.hs4
-rw-r--r--Assistant/TransferQueue.hs2
-rw-r--r--Assistant/Types/NetMessager.hs2
-rw-r--r--Assistant/Upgrade.hs2
-rw-r--r--Assistant/WebApp/Configurators/AWS.hs2
-rw-r--r--Assistant/WebApp/Configurators/Delete.hs2
-rw-r--r--Assistant/WebApp/Configurators/Edit.hs6
-rw-r--r--Assistant/WebApp/Configurators/Fsck.hs2
-rw-r--r--Assistant/WebApp/Configurators/IA.hs2
-rw-r--r--Assistant/WebApp/Configurators/Local.hs8
-rw-r--r--Assistant/WebApp/Configurators/Pairing.hs2
-rw-r--r--Assistant/WebApp/Configurators/Ssh.hs12
-rw-r--r--Assistant/WebApp/Configurators/XMPP.hs6
-rw-r--r--Assistant/WebApp/Form.hs2
-rw-r--r--Assistant/WebApp/RepoList.hs6
-rw-r--r--Assistant/XMPP.hs2
-rw-r--r--Assistant/XMPP/Git.hs10
-rw-r--r--Backend/Hash.hs2
-rw-r--r--Build/EvilLinker.hs10
-rw-r--r--Build/EvilSplicer.hs22
-rw-r--r--Build/NullSoftInstaller.hs2
-rw-r--r--Build/OSXMkLibs.hs2
-rw-r--r--Checks.hs2
-rw-r--r--CmdLine.hs2
-rw-r--r--CmdLine/GitAnnexShell.hs2
-rw-r--r--CmdLine/Seek.hs4
-rw-r--r--Command/Add.hs6
-rw-r--r--Command/AddUrl.hs8
-rw-r--r--Command/ConfigList.hs2
-rw-r--r--Command/Copy.hs2
-rw-r--r--Command/EnableRemote.hs2
-rw-r--r--Command/Fsck.hs2
-rw-r--r--Command/FuzzTest.hs6
-rw-r--r--Command/Get.hs2
-rw-r--r--Command/Import.hs4
-rw-r--r--Command/ImportFeed.hs4
-rw-r--r--Command/Indirect.hs2
-rw-r--r--Command/Info.hs2
-rw-r--r--Command/Migrate.hs2
-rw-r--r--Command/RecvKey.hs4
-rw-r--r--Command/Schedule.hs2
-rw-r--r--Command/Sync.hs2
-rw-r--r--Command/TransferKeys.hs2
-rw-r--r--Command/Uninit.hs2
-rw-r--r--Command/Vicfg.hs4
-rw-r--r--Command/Wanted.hs2
-rw-r--r--Config/Cost.hs2
-rw-r--r--Config/Files.hs2
-rw-r--r--Git/CatFile.hs2
-rw-r--r--Git/Command.hs4
-rw-r--r--Git/Config.hs2
-rw-r--r--Git/GCrypt.hs6
-rw-r--r--Git/LsTree.hs2
-rw-r--r--Git/Remote.hs2
-rw-r--r--Git/Repair.hs4
-rw-r--r--Git/Version.hs2
-rw-r--r--Limit.hs4
-rw-r--r--Locations.hs4
-rw-r--r--Logs.hs8
-rw-r--r--Logs/FsckResults.hs2
-rw-r--r--Logs/MetaData.hs2
-rw-r--r--Logs/Schedule.hs2
-rw-r--r--Logs/Transitions.hs6
-rw-r--r--Logs/Web.hs2
-rw-r--r--Remote.hs2
-rw-r--r--Remote/External.hs2
-rw-r--r--Remote/GCrypt.hs10
-rw-r--r--Remote/Git.hs2
-rw-r--r--Remote/Helper/Chunked.hs6
-rw-r--r--Remote/Helper/Special.hs4
-rw-r--r--Remote/Hook.hs2
-rw-r--r--Remote/Rsync.hs2
-rw-r--r--Remote/Tahoe.hs4
-rw-r--r--Remote/Web.hs2
-rw-r--r--RemoteDaemon/Transport/Ssh.hs2
-rw-r--r--Test.hs6
-rw-r--r--Types/Key.hs2
-rw-r--r--Types/MetaData.hs2
-rw-r--r--Types/StandardGroups.hs2
-rw-r--r--Utility/Batch.hs2
-rw-r--r--Utility/CoProcess.hs4
-rw-r--r--Utility/CopyFile.hs4
-rw-r--r--Utility/Daemon.hs2
-rw-r--r--Utility/DataUnits.hs2
-rw-r--r--Utility/Directory.hs4
-rw-r--r--Utility/ExternalSHA.hs2
-rw-r--r--Utility/FileSystemEncoding.hs2
-rw-r--r--Utility/Format.hs2
-rw-r--r--Utility/Gpg.hs6
-rw-r--r--Utility/HumanTime.hs4
-rw-r--r--Utility/InodeCache.hs2
-rw-r--r--Utility/Matcher.hs4
-rw-r--r--Utility/Path.hs8
-rw-r--r--Utility/Quvi.hs2
-rw-r--r--Utility/Rsync.hs2
-rw-r--r--Utility/SRV.hs2
-rw-r--r--Utility/Scheduled.hs18
-rw-r--r--Utility/SshConfig.hs6
-rw-r--r--Utility/TList.hs2
-rw-r--r--Utility/WebApp.hs2
-rw-r--r--doc/design/requests_routing/simroutes.hs6
131 files changed, 242 insertions, 242 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs
index a03d6ddf39..c567db5540 100644
--- a/Annex/Branch.hs
+++ b/Annex/Branch.hs
@@ -454,7 +454,7 @@ handleTransitions jl localts refs = do
ignoreRefs untransitionedrefs
return True
where
- getreftransition ref = do
+ getreftransition ref = do
ts <- parseTransitionsStrictly "remote" . decodeBS
<$> catFile ref transitionsLog
return (ref, ts)
@@ -470,7 +470,7 @@ ignoreRefs rs = do
getIgnoredRefs :: Annex (S.Set Git.Ref)
getIgnoredRefs = S.fromList . mapMaybe Git.Sha.extractSha . lines <$> content
where
- content = do
+ content = do
f <- fromRepo gitAnnexIgnoredRefs
liftIO $ catchDefaultIO "" $ readFile f
@@ -498,7 +498,7 @@ performTransitionsLocked jl ts neednewlocalbranch transitionedrefs = do
ref <- getBranch
commitIndex jl ref message (nub $ fullname:transitionedrefs)
where
- message
+ message
| neednewlocalbranch && null transitionedrefs = "new branch for transition " ++ tdesc
| otherwise = "continuing transition " ++ tdesc
tdesc = show $ map describeTransition $ transitionList ts
diff --git a/Annex/CatFile.hs b/Annex/CatFile.hs
index 8b4d746e15..8a6f10def1 100644
--- a/Annex/CatFile.hs
+++ b/Annex/CatFile.hs
@@ -100,10 +100,10 @@ catKey' modeguaranteed sha mode
catLink :: Bool -> Sha -> Annex String
catLink modeguaranteed sha = fromInternalGitPath . decodeBS <$> get
where
- -- If the mode is not guaranteed to be correct, avoid
+ -- If the mode is not guaranteed to be correct, avoid
-- buffering the whole file content, which might be large.
-- 8192 is enough if it really is a symlink.
- get
+ get
| modeguaranteed = catObject sha
| otherwise = L.take 8192 <$> catObject sha
@@ -120,7 +120,7 @@ catKeyChecked :: Bool -> Ref -> Annex (Maybe Key)
catKeyChecked needhead ref@(Ref r) =
catKey' False ref =<< findmode <$> catTree treeref
where
- pathparts = split "/" r
+ pathparts = split "/" r
dir = intercalate "/" $ take (length pathparts - 1) pathparts
file = fromMaybe "" $ lastMaybe pathparts
treeref = Ref $ if needhead then "HEAD" ++ dir ++ "/" else dir ++ "/"
diff --git a/Annex/CheckIgnore.hs b/Annex/CheckIgnore.hs
index d45e652bcb..f2ed93543e 100644
--- a/Annex/CheckIgnore.hs
+++ b/Annex/CheckIgnore.hs
@@ -18,7 +18,7 @@ import qualified Annex
checkIgnored :: FilePath -> Annex Bool
checkIgnored file = go =<< checkIgnoreHandle
where
- go Nothing = return False
+ go Nothing = return False
go (Just h) = liftIO $ Git.checkIgnored h file
checkIgnoreHandle :: Annex (Maybe Git.CheckIgnoreHandle)
diff --git a/Annex/Content.hs b/Annex/Content.hs
index c0c79ae565..37090d3bb3 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -456,7 +456,7 @@ removeAnnex (ContentLock key) = withObjectLoc key remove removedirect
secureErase :: FilePath -> Annex ()
secureErase file = maybe noop go =<< annexSecureEraseCommand <$> Annex.getGitConfig
where
- go basecmd = void $ liftIO $
+ go basecmd = void $ liftIO $
boolSystem "sh" [Param "-c", Param $ gencmd basecmd]
gencmd = massReplace [ ("%file", shellEscape file) ]
@@ -555,7 +555,7 @@ saveState nocommit = doSideAction $ do
downloadUrl :: [Url.URLString] -> FilePath -> Annex Bool
downloadUrl urls file = go =<< annexWebDownloadCommand <$> Annex.getGitConfig
where
- go Nothing = Url.withUrlOptions $ \uo ->
+ go Nothing = Url.withUrlOptions $ \uo ->
anyM (\u -> Url.download u file uo) urls
go (Just basecmd) = liftIO $ anyM (downloadcmd basecmd) urls
downloadcmd basecmd url =
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index 76a6f27dca..9489b74f27 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -347,7 +347,7 @@ toDirectGen k f = do
(dloc:_) -> return $ Just $ fromdirect dloc
)
where
- fromindirect loc = do
+ fromindirect loc = do
{- Move content from annex to direct file. -}
updateInodeCache k loc
void $ addAssociatedFile k f
diff --git a/Annex/Environment.hs b/Annex/Environment.hs
index bc97c17b70..b1b5e96e9e 100644
--- a/Annex/Environment.hs
+++ b/Annex/Environment.hs
@@ -45,7 +45,7 @@ checkEnvironmentIO =
ensureEnv "GIT_COMMITTER_NAME" username
where
#ifndef __ANDROID__
- -- existing environment is not overwritten
+ -- existing environment is not overwritten
ensureEnv var val = void $ setEnv var val False
#else
-- Environment setting is broken on Android, so this is dealt with
@@ -59,7 +59,7 @@ checkEnvironmentIO =
ensureCommit :: Annex a -> Annex a
ensureCommit a = either retry return =<< tryNonAsync a
where
- retry _ = do
+ retry _ = do
name <- liftIO myUserName
setConfig (ConfigKey "user.name") name
setConfig (ConfigKey "user.email") name
diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs
index da6a5e0e93..856c681220 100644
--- a/Annex/FileMatcher.hs
+++ b/Annex/FileMatcher.hs
@@ -106,7 +106,7 @@ tokenizeMatcher = filter (not . null ) . concatMap splitparens . words
largeFilesMatcher :: Annex (FileMatcher Annex)
largeFilesMatcher = go =<< annexLargeFiles <$> Annex.getGitConfig
where
- go Nothing = return matchAll
+ go Nothing = return matchAll
go (Just expr) = do
gm <- groupMap
rc <- readRemoteLog
diff --git a/Annex/ReplaceFile.hs b/Annex/ReplaceFile.hs
index 9700d4b60c..0355ddd51e 100644
--- a/Annex/ReplaceFile.hs
+++ b/Annex/ReplaceFile.hs
@@ -33,7 +33,7 @@ replaceFileOr file action rollback = do
tmpfile <- liftIO $ setup tmpdir
go tmpfile `catchNonAsync` (const $ rollback tmpfile)
where
- setup tmpdir = do
+ setup tmpdir = do
(tmpfile, h) <- openTempFileWithDefaultPermissions tmpdir "tmp"
hClose h
return tmpfile
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index ad636b4aac..3b7bd7d692 100644
--- a/Annex/Ssh.hs
+++ b/Annex/Ssh.hs
@@ -78,10 +78,10 @@ bestSocketPath abssocketfile = do
then Just socketfile
else Nothing
where
- -- ssh appends a 16 char extension to the socket when setting it
+ -- ssh appends a 16 char extension to the socket when setting it
-- up, which needs to be taken into account when checking
-- that a valid socket was constructed.
- sshgarbage = replicate (1+16) 'X'
+ sshgarbage = replicate (1+16) 'X'
sshConnectionCachingParams :: FilePath -> [CommandParam]
sshConnectionCachingParams socketfile =
diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs
index d33d3073b6..fb89869f88 100644
--- a/Annex/Transfer.hs
+++ b/Annex/Transfer.hs
@@ -69,7 +69,7 @@ runTransfer' ignorelock t file shouldretry a = do
return False
else do
ok <- retry info metervar $
- bracketIO (return fd) (cleanup tfile) (const $ a meter)
+ bracketIO (return fd) (cleanup tfile) (const $ a meter)
unless ok $ recordFailedTransfer t info
return ok
where
diff --git a/Annex/View.hs b/Annex/View.hs
index a1d873f500..4cbf274aa0 100644
--- a/Annex/View.hs
+++ b/Annex/View.hs
@@ -102,7 +102,7 @@ refineView origview = checksize . calc Unchanged origview
let (components', viewchanges) = runWriter $
mapM (\c -> updateViewComponent c field vf) (viewComponents view)
viewchange = if field `elem` map viewField (viewComponents origview)
- then maximum viewchanges
+ then maximum viewchanges
else Narrowing
in (view { viewComponents = components' }, viewchange)
| otherwise =
@@ -207,7 +207,7 @@ viewComponentMatcher :: ViewComponent -> (MetaData -> Maybe [MetaValue])
viewComponentMatcher viewcomponent = \metadata ->
matcher (currentMetaDataValues metafield metadata)
where
- metafield = viewField viewcomponent
+ metafield = viewField viewcomponent
matcher = case viewFilter viewcomponent of
FilterValues s -> \values -> setmatches $
S.intersection s values
@@ -236,8 +236,8 @@ toViewPath = concatMap escapeslash . fromMetaValue
fromViewPath :: FilePath -> MetaValue
fromViewPath = toMetaValue . deescapeslash []
where
- deescapeslash s [] = reverse s
- deescapeslash s (c:cs)
+ deescapeslash s [] = reverse s
+ deescapeslash s (c:cs)
| c == pseudoSlash = case cs of
(c':cs')
| c' == pseudoSlash -> deescapeslash (pseudoSlash:s) cs'
diff --git a/Annex/View/ViewedFile.hs b/Annex/View/ViewedFile.hs
index 25ac16a346..ef901f7004 100644
--- a/Annex/View/ViewedFile.hs
+++ b/Annex/View/ViewedFile.hs
@@ -58,7 +58,7 @@ viewedFileReuse = takeFileName
dirFromViewedFile :: ViewedFile -> FilePath
dirFromViewedFile = joinPath . drop 1 . sep [] ""
where
- sep l _ [] = reverse l
+ sep l _ [] = reverse l
sep l curr (c:cs)
| c == '%' = sep (reverse curr:l) "" cs
| c == '\\' = case cs of
diff --git a/Assistant.hs b/Assistant.hs
index 82f1572414..b7e2463fa0 100644
--- a/Assistant.hs
+++ b/Assistant.hs
@@ -119,7 +119,7 @@ startDaemon assistant foreground startdelay cannotrun listenhost startbrowser =
)
#endif
where
- desc
+ desc
| assistant = "assistant"
| otherwise = "watch"
start daemonize webappwaiter = withThreadState $ \st -> do
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs
index 745694f59a..a41baa85f1 100644
--- a/Assistant/Alert.hs
+++ b/Assistant/Alert.hs
@@ -145,7 +145,7 @@ syncResultAlert' succeeded failed = makeAlertFiller (not $ null succeeded) $
, alertHeader = Just $ tenseWords msg
}
where
- msg
+ msg
| null succeeded = ["Failed to sync with", showRemotes failed]
| null failed = ["Synced with", showRemotes succeeded]
| otherwise =
diff --git a/Assistant/Alert/Utility.hs b/Assistant/Alert/Utility.hs
index be631e9991..ea1280dac9 100644
--- a/Assistant/Alert/Utility.hs
+++ b/Assistant/Alert/Utility.hs
@@ -119,7 +119,7 @@ mergeAlert i al m = maybe updatePrune updateCombine (alertCombiner al)
where
bloat = M.size m' - maxAlerts
pruneold l =
- let (f, rest) = partition (\(_, a) -> isFiller a) l
+ let (f, rest) = partition (\(_, a) -> isFiller a) l
in drop bloat f ++ rest
updatePrune = pruneBloat $ M.filterWithKey pruneSame $
M.insertWith' const i al m
diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs
index 35f8fc8564..3edc2c1744 100644
--- a/Assistant/DaemonStatus.hs
+++ b/Assistant/DaemonStatus.hs
@@ -65,7 +65,7 @@ calcSyncRemotes = do
, syncingToCloudRemote = any iscloud syncdata
}
where
- iscloud r = not (Remote.readonly r) && Remote.availability r == Remote.GloballyAvailable
+ iscloud r = not (Remote.readonly r) && Remote.availability r == Remote.GloballyAvailable
{- Updates the syncRemotes list from the list of all remotes in Annex state. -}
updateSyncRemotes :: Assistant ()
diff --git a/Assistant/DeleteRemote.hs b/Assistant/DeleteRemote.hs
index cc05786e40..a900753a79 100644
--- a/Assistant/DeleteRemote.hs
+++ b/Assistant/DeleteRemote.hs
@@ -62,7 +62,7 @@ removableRemote urlrenderer uuid = do
<$> liftAnnex (Remote.remoteFromUUID uuid)
mapM_ (queueremaining r) keys
where
- queueremaining r k =
+ queueremaining r k =
queueTransferWhenSmall "remaining object in unwanted remote"
Nothing (Transfer Download uuid k) r
{- Scanning for keys can take a long time; do not tie up
diff --git a/Assistant/Gpg.hs b/Assistant/Gpg.hs
index a55a0cab73..8ae4418f44 100644
--- a/Assistant/Gpg.hs
+++ b/Assistant/Gpg.hs
@@ -20,7 +20,7 @@ newUserId :: IO UserId
newUserId = do
oldkeys <- secretKeys
username <- myUserName
- let basekeyname = username ++ "'s git-annex encryption key"
+ let basekeyname = username ++ "'s git-annex encryption key"
return $ Prelude.head $ filter (\n -> M.null $ M.filter (== n) oldkeys)
( basekeyname
: map (\n -> basekeyname ++ show n) ([2..] :: [Int])
diff --git a/Assistant/MakeRemote.hs b/Assistant/MakeRemote.hs
index 967a4d41d2..d244a7729b 100644
--- a/Assistant/MakeRemote.hs
+++ b/Assistant/MakeRemote.hs
@@ -48,7 +48,7 @@ makeRsyncRemote :: RemoteName -> String -> Annex String
makeRsyncRemote name location = makeRemote name location $ const $ void $
go =<< Command.InitRemote.findExisting name
where
- go Nothing = setupSpecialRemote name Rsync.remote config Nothing
+ go Nothing = setupSpecialRemote name Rsync.remote config Nothing
(Nothing, Command.InitRemote.newConfig name)
go (Just (u, c)) = setupSpecialRemote name Rsync.remote config Nothing
(Just u, c)
diff --git a/Assistant/NetMessager.hs b/Assistant/NetMessager.hs
index acb18b6484..f042b4e4e8 100644
--- a/Assistant/NetMessager.hs
+++ b/Assistant/NetMessager.hs
@@ -80,7 +80,7 @@ checkImportantNetMessages (storedclient, sentclient) = go <<~ netMessager
queuePushInitiation :: NetMessage -> Assistant ()
queuePushInitiation msg@(Pushing clientid stage) = do
tv <- getPushInitiationQueue side
- liftIO $ atomically $ do
+ liftIO $ atomically $ do
r <- tryTakeTMVar tv
case r of
Nothing -> putTMVar tv [msg]
@@ -88,7 +88,7 @@ queuePushInitiation msg@(Pushing clientid stage) = do
let !l' = msg : filter differentclient l
putTMVar tv l'
where
- side = pushDestinationSide stage
+ side = pushDestinationSide stage
differentclient (Pushing cid _) = cid /= clientid
differentclient _ = True
queuePushInitiation _ = noop
diff --git a/Assistant/Repair.hs b/Assistant/Repair.hs
index 5e5a28dcec..50442fe3bb 100644
--- a/Assistant/Repair.hs
+++ b/Assistant/Repair.hs
@@ -63,7 +63,7 @@ runRepair u mrmt destructiverepair = do
return ok
where
- localrepair fsckresults = do
+ localrepair fsckresults = do
-- Stop the watcher from running while running repairs.
changeSyncable Nothing False
@@ -140,9 +140,9 @@ repairStaleGitLocks r = do
repairStaleLocks :: [FilePath] -> Assistant ()
repairStaleLocks lockfiles = go =<< getsizes
where
- getsize lf = catchMaybeIO $
+ getsize lf = catchMaybeIO $
(\s -> (lf, fileSize s)) <$> getFileStatus lf
- getsizes = liftIO $ catMaybes <$> mapM getsize lockfiles
+ getsizes = liftIO $ catMaybes <$> mapM getsize lockfiles
go [] = return ()
go l = ifM (liftIO $ null <$> Lsof.query ("--" : map fst l))
( do
diff --git a/Assistant/Ssh.hs b/Assistant/Ssh.hs
index e1a78cd00e..7b82f46242 100644
--- a/Assistant/Ssh.hs
+++ b/Assistant/Ssh.hs
@@ -92,7 +92,7 @@ parseSshUrl u
, sshCapabilities = []
}
where
- (user, host) = if '@' `elem` userhost
+ (user, host) = if '@' `elem` userhost
then separate (== '@') userhost
else ("", userhost)
fromrsync s
@@ -260,7 +260,7 @@ setupSshKeyPair sshkeypair sshdata = do
fixSshKeyPairIdentitiesOnly :: IO ()
fixSshKeyPairIdentitiesOnly = changeUserSshConfig $ unlines . go [] . lines
where
- go c [] = reverse c
+ go c [] = reverse c
go c (l:[])
| all (`isInfixOf` l) indicators = go (fixedline l:l:c) []
| otherwise = go (l:c) []
@@ -268,7 +268,7 @@ fixSshKeyPairIdentitiesOnly = changeUserSshConfig $ unlines . go [] . lines
| all (`isInfixOf` l) indicators && not ("IdentitiesOnly" `isInfixOf` next) =
go (fixedline l:l:c) (next:rest)
| otherwise = go (l:c) (next:rest)
- indicators = ["IdentityFile", "key.git-annex"]
+ indicators = ["IdentityFile", "key.git-annex"]
fixedline tmpl = takeWhile isSpace tmpl ++ "IdentitiesOnly yes"
{- Add StrictHostKeyChecking to any ssh config stanzas that were written
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs
index 4a47a9e2c9..47c2aa4aae 100644
--- a/Assistant/Threads/Committer.hs
+++ b/Assistant/Threads/Committer.hs
@@ -164,8 +164,8 @@ waitChangeTime a = waitchanges 0
-}
aftermaxcommit oldchanges = loop (30 :: Int)
where
- loop 0 = continue oldchanges
- loop n = do
+ loop 0 = continue oldchanges
+ loop n = do
liftAnnex noop -- ensure Annex state is free
liftIO $ threadDelaySeconds (Seconds 1)
changes <- getAnyChanges
@@ -301,7 +301,7 @@ handleAdds havelsof delayadd cs = returnWhen (null incomplete) $ do
add change@(InProcessAddChange { keySource = ks }) =
catchDefaultIO Nothing <~> doadd
where
- doadd = sanitycheck ks $ do
+ doadd = sanitycheck ks $ do
(mkey, mcache) <- liftAnnex $ do
showStart "add" $ keyFilename ks
Command.Add.ingest $ Just ks
diff --git a/Assistant/Threads/Cronner.hs b/Assistant/Threads/Cronner.hs
index 0fe7f58f4c..6dc6f4c6b1 100644
--- a/Assistant/Threads/Cronner.hs
+++ b/Assistant/Threads/Cronner.hs
@@ -87,7 +87,7 @@ cronnerThread urlrenderer = namedThreadUnchecked "Cronner" $ do
liftIO $ waitNotification h
debug ["reloading changed activities"]
go h amap' nmap'
- startactivities as lastruntimes = forM as $ \activity ->
+ startactivities as lastruntimes = forM as $ \activity ->
case connectActivityUUID activity of
Nothing -> do
runner <- asIO2 (sleepingActivityThread urlrenderer)
@@ -108,8 +108,8 @@ cronnerThread urlrenderer = namedThreadUnchecked "Cronner" $ do
sleepingActivityThread :: UrlRenderer -> ScheduledActivity -> Maybe LocalTime -> Assistant ()
sleepingActivityThread urlrenderer activity lasttime = go lasttime =<< getnexttime lasttime
where
- getnexttime = liftIO . nextTime schedule
- go _ Nothing = debug ["no scheduled events left for", desc]
+ getnexttime = liftIO . nextTime schedule
+ go _ Nothing = debug ["no scheduled events left for", desc]
go l (Just (NextTimeExactly t)) = waitrun l t Nothing
go l (Just (NextTimeWindow windowstart windowend)) =
waitrun l windowstart (Just windowend)
@@ -129,7 +129,7 @@ sleepingActivityThread urlrenderer activity lasttime = go lasttime =<< getnextti
go l =<< getnexttime l
else run nowt
where
- tolate nowt tz = case mmaxt of
+ tolate nowt tz = case mmaxt of
Just maxt -> nowt > maxt
-- allow the job to start 10 minutes late
Nothing ->diffUTCTime
diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs
index 3371f212fc..9fd963a69b 100644
--- a/Assistant/Threads/SanityChecker.hs
+++ b/Assistant/Threads/SanityChecker.hs
@@ -258,7 +258,7 @@ checkOldUnused :: UrlRenderer -> Assistant ()
checkOldUnused urlrenderer = go =<< annexExpireUnused <$> liftAnnex Annex.getGitConfig
where
go (Just Nothing) = noop
- go (Just (Just expireunused)) = expireUnused (Just expireunused)
+ go (Just (Just expireunused)) = expireUnused (Just expireunused)
go Nothing = maybe noop prompt =<< describeUnusedWhenBig
prompt msg =
diff --git a/Assistant/Threads/UpgradeWatcher.hs b/Assistant/Threads/UpgradeWatcher.hs
index ffad09d3dd..431e6f339e 100644
--- a/Assistant/Threads/UpgradeWatcher.hs
+++ b/Assistant/Threads/UpgradeWatcher.hs
@@ -51,9 +51,9 @@ upgradeWatcherThread urlrenderer = namedThread "UpgradeWatcher" $ do
let depth = length (splitPath dir) + 1
let nosubdirs f = length (splitPath f) == depth
void $ liftIO $ watchDir dir nosubdirs False hooks (startup mvar)
- -- Ignore bogus events generated during the startup scan.
+ -- Ignore bogus events generated during the startup scan.
-- We ask the watcher to not generate them, but just to be safe..
- startup mvar scanner = do
+ startup mvar scanner = do
r <- scanner
void $ swapMVar mvar Started
return r
diff --git a/Assistant/Threads/Upgrader.hs b/Assistant/Threads/Upgrader.hs
index 637c82a7d9..100c15414d 100644
--- a/Assistant/Threads/Upgrader.hs
+++ b/Assistant/Threads/Upgrader.hs
@@ -39,7 +39,7 @@ upgraderThread urlrenderer = namedThread "Upgrader" $
h <- liftIO . newNotificationHandle False . networkConnectedNotifier =<< getDaemonStatus
go h =<< liftIO getCurrentTime
where
- {- Wait for a network connection event. Then see if it's been
+ {- Wait for a network connection event. Then see if it's been
- half a day since the last upgrade check. If so, proceed with
- check. -}
go h lastchecked = do
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs
index fe9a95471b..8482de8957 100644
--- a/Assistant/Threads/Watcher.hs
+++ b/Assistant/Threads/Watcher.hs
@@ -192,7 +192,7 @@ runHandler handler file filestatus = void $ do
liftAnnex Annex.Queue.flushWhenFull
recordChange change
where
- normalize f
+ normalize f
| "./" `isPrefixOf` file = drop 2 f
| otherwise = f
@@ -246,7 +246,7 @@ onAddDirect symlinkssupported matcher file fs = do
debug ["add direct", file]
add matcher file
where
- {- On a filesystem without symlinks, we'll get changes for regular
+ {- On a filesystem without symlinks, we'll get changes for regular
- files that git uses to stand-in for symlinks. Detect when
- this happens, and stage the symlink, rather than annexing the
- file. -}
@@ -276,7 +276,7 @@ onAddSymlink isdirect file filestatus = unlessIgnored file $ do
onAddSymlink' :: Maybe String -> Maybe Key -> Bool -> Handler
onAddSymlink' linktarget mk isdirect file filestatus = go mk
where
- go (Just key) = do
+ go (Just key) = do
when isdirect $
liftAnnex $ void $ addAssociatedFile key file
link <- liftAnnex $ inRepo $ gitAnnexLink file key
diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs
index 416c078741..b22b54a8d8 100644
--- a/Assistant/Threads/WebApp.hs
+++ b/Assistant/Threads/WebApp.hs
@@ -97,7 +97,7 @@ webAppThread assistantdata urlrenderer noannex cannotrun postfirstrun listenhost
urlfile <- getAnnex' $ fromRepo gitAnnexUrlFile
go tlssettings addr webapp htmlshim (Just urlfile)
where
- -- The webapp thread does not wait for the startupSanityCheckThread
+ -- The webapp thread does not wait for the startupSanityCheckThread
-- to finish, so that the user interface remains responsive while
-- that's going on.
thread = namedThreadUnchecked "WebApp"
diff --git a/Assistant/Threads/XMPPClient.hs b/Assistant/Threads/XMPPClient.hs
index 2f70b508f6..8ce99eac64 100644
--- a/Assistant/Threads/XMPPClient.hs
+++ b/Assistant/Threads/XMPPClient.hs
@@ -131,7 +131,7 @@ xmppClient urlrenderer d creds xmppuuid =
{- XEP-0199 says that the server will respond with either
- a ping response or an error message. Either will
- cause traffic, so good enough. -}
- pingstanza = xmppPing selfjid
+ pingstanza = xmppPing selfjid
handlemsg selfjid (PresenceMessage p) = do
void $ inAssistant $
diff --git a/Assistant/Threads/XMPPPusher.hs b/Assistant/Threads/XMPPPusher.hs
index 30c91c7f09..35c76ebf1a 100644
--- a/Assistant/Threads/XMPPPusher.hs
+++ b/Assistant/Threads/XMPPPusher.hs
@@ -34,7 +34,7 @@ xmppReceivePackThread = pusherThread "XMPPReceivePack" ReceivePack
pusherThread :: String -> PushSide -> UrlRenderer -> NamedThread
pusherThread threadname side urlrenderer = namedThread threadname $ go Nothing
where
- go lastpushedto = do
+ go lastpushedto = do
msg <- waitPushInitiation side $ selectNextPush lastpushedto
debug ["started running push", logNetMessage msg]
@@ -78,4 +78,4 @@ selectNextPush lastpushedto l = go [] l
(Pushing clientid _)
| Just clientid /= lastpushedto -> (m, rejected ++ ms)
_ -> go (m:rejected) ms
- go [] [] = undefined
+ go [] [] = undefined
diff --git a/Assistant/TransferQueue.hs b/Assistant/TransferQueue.hs
index 93c982224b..d138e16efd 100644
--- a/Assistant/TransferQueue.hs
+++ b/Assistant/TransferQueue.hs
@@ -92,7 +92,7 @@ queueTransfersMatching matching reason schedule k f direction
filterM (wantSend True (Just k) f . Remote.uuid) $
filter (\r -> not (inset s r || Remote.readonly r)) rs
where
- locs = S.fromList <$> Remote.keyLocations k
+ locs = S.fromList <$> Remote.keyLocations k
inset s r = S.member (Remote.uuid r) s
gentransfer r = Transfer
{ transferDirection = direction
diff --git a/Assistant/Types/NetMessager.hs b/Assistant/Types/NetMessager.hs
index 5ae987a616..f5ad85b4a4 100644
--- a/Assistant/Types/NetMessager.hs
+++ b/Assistant/Types/NetMessager.hs
@@ -85,7 +85,7 @@ logNetMessage (Pushing c stage) = show $ Pushing (logClientID c) $
SendPackOutput n _ -> SendPackOutput n elided
s -> s
where
- elided = T.encodeUtf8 $ T.pack "<elided>"
+ elided = T.encodeUtf8 $ T.pack "<elided>"
logNetMessage (PairingNotification stage c uuid) =
show $ PairingNotification stage (logClientID c) uuid
logNetMessage m = show m
diff --git a/Assistant/Upgrade.hs b/Assistant/Upgrade.hs
index b847068c29..8ea69dd04a 100644
--- a/Assistant/Upgrade.hs
+++ b/Assistant/Upgrade.hs
@@ -78,7 +78,7 @@ upgradedEnv = "GIT_ANNEX_UPGRADED"
startDistributionDownload :: GitAnnexDistribution -> Assistant ()
startDistributionDownload d = go =<< liftIO . newVersionLocation d =<< liftIO oldVersionLocation
where
- go Nothing = debug ["Skipping redundant upgrade"]
+ go Nothing = debug ["Skipping redundant upgrade"]
go (Just dest) = do
liftAnnex $ setUrlPresent k u
hook <- asIO1 $ distributionDownloadComplete d dest cleanup
diff --git a/Assistant/WebApp/Configurators/AWS.hs b/Assistant/WebApp/Configurators/AWS.hs
index 9a6be38814..76055b75ac 100644
--- a/Assistant/WebApp/Configurators/AWS.hs
+++ b/Assistant/WebApp/Configurators/AWS.hs
@@ -207,7 +207,7 @@ makeAWSRemote maker remotetype defaultgroup (AWSCreds ak sk) name config =
setupCloudRemote defaultgroup Nothing $
maker hostname remotetype (Just creds) config
where
- creds = (T.unpack ak, T.unpack sk)
+ creds = (T.unpack ak, T.unpack sk)
{- AWS services use the remote name as the basis for a host
- name, so filter it to contain valid characters. -}
hostname = case filter isAlphaNum name of
diff --git a/Assistant/WebApp/Configurators/Delete.hs b/Assistant/WebApp/Configurators/Delete.hs
index 168f5edd12..c9686ecbc8 100644
--- a/Assistant/WebApp/Configurators/Delete.hs
+++ b/Assistant/WebApp/Configurators/Delete.hs
@@ -36,7 +36,7 @@ notCurrentRepo uuid a = do
then redirect DeleteCurrentRepositoryR
else go =<< liftAnnex (Remote.remoteFromUUID uuid)
where
- go Nothing = error "Unknown UUID"
+ go Nothing = error "Unknown UUID"
go (Just _) = a
handleXMPPRemoval :: UUID -> Handler Html -> Handler Html
diff --git a/Assistant/WebApp/Configurators/Edit.hs b/Assistant/WebApp/Configurators/Edit.hs
index 9268038f64..2f21925fcb 100644
--- a/Assistant/WebApp/Configurators/Edit.hs
+++ b/Assistant/WebApp/Configurators/Edit.hs
@@ -136,7 +136,7 @@ setRepoConfig uuid mremote oldc newc = do
when syncableChanged $
liftAssistant $ changeSyncable mremote (repoSyncable newc)
where
- syncableChanged = repoSyncable oldc /= repoSyncable newc
+ syncableChanged = repoSyncable oldc /= repoSyncable newc
associatedDirectoryChanged = repoAssociatedDirectory oldc /= repoAssociatedDirectory newc
groupChanged = repoGroup oldc /= repoGroup newc
nameChanged = isJust mremote && legalName oldc /= legalName newc
@@ -255,7 +255,7 @@ getGitRepoInfo r = do
getRepoEncryption :: Maybe Remote.Remote -> Maybe Remote.RemoteConfig -> Widget
getRepoEncryption (Just _) (Just c) = case extractCipher c of
- Nothing ->
+ Nothing ->
[whamlet|not encrypted|]
(Just (SharedCipher _)) ->
[whamlet|encrypted: encryption key stored in git repository|]
@@ -274,7 +274,7 @@ getUpgradeRepositoryR :: RepoId -> Handler ()
getUpgradeRepositoryR (RepoUUID _) = redirect DashboardR
getUpgradeRepositoryR r = go =<< liftAnnex (repoIdRemote r)
where
- go Nothing = redirect DashboardR
+ go Nothing = redirect DashboardR
go (Just rmt) = do
liftIO fixSshKeyPairIdentitiesOnly
liftAnnex $ setConfig
diff --git a/Assistant/WebApp/Configurators/Fsck.hs b/Assistant/WebApp/Configurators/Fsck.hs
index 84764f17bf..6a11e9ed30 100644
--- a/Assistant/WebApp/Configurators/Fsck.hs
+++ b/Assistant/WebApp/Configurators/Fsck.hs
@@ -60,7 +60,7 @@ runFsckForm new activity = case activity of
ScheduledSelfFsck s d -> go s d =<< liftAnnex getUUID
ScheduledRemoteFsck ru s d -> go s d ru
where
- go (Schedule r t) d ru = do
+ go (Schedule r t) d ru = do
u <- liftAnnex getUUID
repolist <- liftAssistant (getrepolist ru)
runFormPostNoToken $ \msg -> do
diff --git a/Assistant/WebApp/Configurators/IA.hs b/Assistant/WebApp/Configurators/IA.hs
index 90d27c4f92..7a4acd2dac 100644
--- a/Assistant/WebApp/Configurators/IA.hs
+++ b/Assistant/WebApp/Configurators/IA.hs
@@ -201,7 +201,7 @@ $if (not exists)
have been uploaded, and the Internet Archive has processed them.
|]
where
- bucket = fromMaybe "" $ M.lookup "bucket" c
+ bucket = fromMaybe "" $ M.lookup "bucket" c
#ifdef WITH_S3
url = S3.iaItemUrl bucket
#else
diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs
index fb16e7dd3c..9e35643f2c 100644
--- a/Assistant/WebApp/Configurators/Local.hs
+++ b/Assistant/WebApp/Configurators/Local.hs
@@ -175,7 +175,7 @@ getAndroidCameraRepositoryR :: Handler ()
getAndroidCameraRepositoryR =
startFullAssistant "/sdcard/DCIM" SourceGroup $ Just addignore
where
- addignore = do
+ addignore = do
liftIO $ unlessM (doesFileExist ".gitignore") $
writeFile ".gitignore" ".thumbnails"
void $ inRepo $
@@ -274,8 +274,8 @@ getConfirmAddDriveR drive = ifM (liftIO $ probeRepoExists dir)
, newrepo
)
where
- dir = removableDriveRepository drive
- newrepo = do
+ dir = removableDriveRepository drive
+ newrepo = do
secretkeys <- sortBy (comparing snd) . M.toList
<$> liftIO secretKeys
page "Encrypt repository?" (Just Configuration) $
@@ -338,7 +338,7 @@ getFinishAddDriveR drive = go
liftAnnex $ defaultStandardGroup u TransferGroup
liftAssistant $ immediateSyncRemote r
redirect $ EditNewRepositoryR u
- mountpoint = T.unpack (mountPoint drive)
+ mountpoint = T.unpack (mountPoint drive)
dir = removableDriveRepository drive
remotename = takeFileName mountpoint
diff --git a/Assistant/WebApp/Configurators/Pairing.hs b/Assistant/WebApp/Configurators/Pairing.hs
index 899af579e5..82b1939326 100644
--- a/Assistant/WebApp/Configurators/Pairing.hs
+++ b/Assistant/WebApp/Configurators/Pairing.hs
@@ -72,7 +72,7 @@ getStartXMPPPairSelfR :: Handler Html
#ifdef WITH_XMPP
getStartXMPPPairSelfR = go =<< liftAnnex getXMPPCreds
where
- go Nothing = do
+ go Nothing = do
-- go get XMPP configured, then come back
redirect XMPPConfigForPairSelfR
go (Just creds) = do
diff --git a/Assistant/WebApp/Configurators/Ssh.hs b/Assistant/WebApp/Configurators/Ssh.hs
index 4824c3d4a6..2400a85c9c 100644
--- a/Assistant/WebApp/Configurators/Ssh.hs
+++ b/Assistant/WebApp/Configurators/Ssh.hs
@@ -193,7 +193,7 @@ postEnableSshGCryptR :: UUID -> Handler Html
postEnableSshGCryptR u = whenGcryptInstalled $
enableSshRemote getsshinput enableRsyncNetGCrypt enablegcrypt u
where
- enablegcrypt sshdata _ = prepSsh False sshdata $ \sshdata' ->
+ enablegcrypt sshdata _ = prepSsh False sshdata $ \sshdata' ->
sshConfigurator $
checkExistingGCrypt sshdata' $
error "Expected to find an encrypted git repository, but did not."
@@ -232,7 +232,7 @@ enableSshRemote getsshinput rsyncnetsetup genericsetup u = do
_ -> showform form enctype UntestedServer
_ -> redirect AddSshR
where
- unmangle sshdata = sshdata
+ unmangle sshdata = sshdata
{ sshHostName = T.pack $ unMangleSshHostName $
T.unpack $ sshHostName sshdata
}
@@ -423,7 +423,7 @@ getConfirmSshR sshdata u
secretkeys <- sortBy (comparing snd) . M.toList
<$> liftIO secretKeys
$(widgetFile "configurators/ssh/confirm")
- handleexisting Nothing = sshConfigurator $
+ handleexisting Nothing = sshConfigurator $
-- Not a UUID we know, so prompt about combining.
$(widgetFile "configurators/ssh/combine")
handleexisting (Just _) = prepSsh False sshdata $ \sshdata' -> do
@@ -471,7 +471,7 @@ checkExistingGCrypt sshdata nope = checkGCryptRepoEncryption repourl nope nope $
combineExistingGCrypt sshdata u
Nothing -> error "The location contains a gcrypt repository that is not a git-annex special remote. This is not supported."
where
- repourl = genSshUrl sshdata
+ repourl = genSshUrl sshdata
{- Enables an existing gcrypt special remote. -}
enableGCrypt :: SshData -> RemoteName -> Handler Html
@@ -488,7 +488,7 @@ combineExistingGCrypt sshdata u = do
reponame <- liftAnnex $ getGCryptRemoteName u repourl
enableGCrypt sshdata reponame
where
- repourl = genSshUrl sshdata
+ repourl = genSshUrl sshdata
{- Sets up remote repository for ssh, or directory for rsync. -}
prepSsh :: Bool -> SshData -> (SshData -> Handler Html) -> Handler Html
@@ -579,7 +579,7 @@ postAddRsyncNetR = do
"That is not a rsync.net host name."
_ -> showform UntestedServer
where
- inpage = page "Add a Rsync.net repository" (Just Configuration)
+ inpage = page "Add a Rsync.net repository" (Just Configuration)
hostnamefield = textField `withExpandableNote` ("Help", help)
help = [whamlet|
<div>
diff --git a/Assistant/WebApp/Configurators/XMPP.hs b/Assistant/WebApp/Configurators/XMPP.hs
index 1c40af08bc..5d03c65998 100644
--- a/Assistant/WebApp/Configurators/XMPP.hs
+++ b/Assistant/WebApp/Configurators/XMPP.hs
@@ -150,7 +150,7 @@ getXMPPRemotes :: Assistant [(JID, Remote)]
getXMPPRemotes = catMaybes . map pair . filter Remote.isXMPPRemote . syncGitRemotes
<$> getDaemonStatus
where
- pair r = maybe Nothing (\jid -> Just (jid, r)) $
+ pair r = maybe Nothing (\jid -> Just (jid, r)) $
parseJID $ getXMPPClientID r
data XMPPForm = XMPPForm
@@ -197,8 +197,8 @@ testXMPP creds = do
}
_ -> return $ Left $ intercalate "; " $ map formatlog bad
where
- formatlog ((h, p), Left e) = "host " ++ h ++ ":" ++ showport p ++ " failed: " ++ show e
- formatlog _ = ""
+ formatlog ((h, p), Left e) = "host " ++ h ++ ":" ++ showport p ++ " failed: " ++ show e
+ formatlog _ = ""
showport (PortNumber n) = show n
showport (Service s) = s
diff --git a/Assistant/WebApp/Form.hs b/Assistant/WebApp/Form.hs
index dfcaf3838c..05ecf87317 100644
--- a/Assistant/WebApp/Form.hs
+++ b/Assistant/WebApp/Form.hs
@@ -129,7 +129,7 @@ withExpandableNote field (toggle, note) = withNote field $ [whamlet|
^{note}
|]
where
- ident = "toggle_" ++ toggle
+ ident = "toggle_" ++ toggle
{- Adds a check box to an AForm to control encryption. -}
#if MIN_VERSION_yesod(1,2,0)
diff --git a/Assistant/WebApp/RepoList.hs b/Assistant/WebApp/RepoList.hs
index eabf4da89d..f3b6e8bcd1 100644
--- a/Assistant/WebApp/RepoList.hs
+++ b/Assistant/WebApp/RepoList.hs
@@ -196,7 +196,7 @@ repoList reposelector
_ -> Nothing
_ -> Nothing
where
- getconfig k = M.lookup k =<< M.lookup u m
+ getconfig k = M.lookup k =<< M.lookup u m
val iscloud r = Just (iscloud, (RepoUUID u, DisabledRepoActions $ r u))
list l = do
cc <- currentlyConnectedRemotes <$> liftAssistant getDaemonStatus
@@ -232,13 +232,13 @@ getRepositoriesReorderR = do
liftAssistant updateSyncRemotes
where
go _ Nothing = noop
- go list (Just remote) = do
+ go list (Just remote) = do
rs <- catMaybes <$> mapM repoIdRemote list
forM_ (reorderCosts remote rs) $ \(r, newcost) ->
when (Remote.cost r /= newcost) $
setRemoteCost (Remote.repo r) newcost
void remoteListRefresh
- fromjs = fromMaybe (RepoUUID NoUUID) . readish . T.unpack
+ fromjs = fromMaybe (RepoUUID NoUUID) . readish . T.unpack
reorderCosts :: Remote -> [Remote] -> [(Remote, Cost)]
reorderCosts remote rs = zip rs'' (insertCostAfter costs i)
diff --git a/Assistant/XMPP.hs b/Assistant/XMPP.hs
index e747050217..cc0343abfe 100644
--- a/Assistant/XMPP.hs
+++ b/Assistant/XMPP.hs
@@ -195,7 +195,7 @@ decodeMessage m = decode =<< gitAnnexTagInfo m
<*> a i
gen c i = c . toUUID <$> headMaybe (words (T.unpack (tagValue i)))
seqgen c i = do
- packet <- decodeTagContent $ tagElement i
+ packet <- decodeTagContent $ tagElement i
let seqnum = fromMaybe 0 $ readish $ T.unpack $ tagValue i
return $ c seqnum packet
shasgen c i = do
diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs
index 19050c7d01..868fe66099 100644
--- a/Assistant/XMPP/Git.hs
+++ b/Assistant/XMPP/Git.hs
@@ -152,7 +152,7 @@ xmppPush cid gitpush = do
fromxmpp outh controlh = withPushMessagesInSequence cid SendPack handlemsg
where
- handlemsg (Just (Pushing _ (ReceivePackOutput _ b))) =
+ handlemsg (Just (Pushing _ (ReceivePackOutput _ b))) =
liftIO $ writeChunk outh b
handlemsg (Just (Pushing _ (ReceivePackDone exitcode))) =
liftIO $ do
@@ -266,7 +266,7 @@ xmppReceivePack cid = do
relaytoxmpp seqnum' outh
relayfromxmpp inh = withPushMessagesInSequence cid ReceivePack handlemsg
where
- handlemsg (Just (Pushing _ (SendPackOutput _ b))) =
+ handlemsg (Just (Pushing _ (SendPackOutput _ b))) =
liftIO $ writeChunk inh b
handlemsg (Just _) = noop
handlemsg Nothing = do
@@ -337,7 +337,7 @@ handlePushNotice (Pushing cid (CanPush theiruuid shas)) =
, go
)
where
- go = do
+ go = do
u <- liftAnnex getUUID
sendNetMessage $ Pushing cid (PushRequest u)
haveall l = liftAnnex $ not <$> anyM donthave l
@@ -359,9 +359,9 @@ writeChunk h b = do
withPushMessagesInSequence :: ClientID -> PushSide -> (Maybe NetMessage -> Assistant ()) -> Assistant ()
withPushMessagesInSequence cid side a = loop 0
where
- loop seqnum = do
+ loop seqnum = do
m <- timeout xmppTimeout <~> waitInbox cid side
- let go s = a m >> loop s
+ let go s = a m >> loop s
let next = seqnum + 1
case extractSequence =<< m of
Just seqnum'
diff --git a/Backend/Hash.hs b/Backend/Hash.hs
index 62d0a0fca5..7c47a4abc5 100644
--- a/Backend/Hash.hs
+++ b/Backend/Hash.hs
@@ -144,7 +144,7 @@ trivialMigrate oldkey newbackend
hashFile :: Hash -> FilePath -> Integer -> Annex String
hashFile hash file filesize = liftIO $ go hash
where
- go (SHAHash hashsize) = case shaHasher hashsize filesize of
+ go (SHAHash hashsize) = case shaHasher hashsize filesize of
Left sha -> sha <$> L.readFile file
Right command ->
either error return
diff --git a/Build/EvilLinker.hs b/Build/EvilLinker.hs
index cf0f771e53..e2921cc8c7 100644
--- a/Build/EvilLinker.hs
+++ b/Build/EvilLinker.hs
@@ -58,13 +58,13 @@ parseGccLink = do
collect2params <- restOfLine
return $ CmdParams (path ++ collectcmd) (escapeDosPaths collect2params) cenv
where
- collectcmd = "collect2.exe"
- collectgccenv = "COLLECT_GCC"
+ collectcmd = "collect2.exe"
+ collectgccenv = "COLLECT_GCC"
collectltoenv = "COLLECT_LTO_WRAPPER"
pathenv = "COMPILER_PATH"
libpathenv = "LIBRARY_PATH"
- optenv = "COLLECT_GCC_OPTIONS"
- collectenv = do
+ optenv = "COLLECT_GCC_OPTIONS"
+ collectenv = do
void $ many1 $ do
notFollowedBy $ string collectgccenv
restOfLine
@@ -148,7 +148,7 @@ runAtFile p s f extraparams = do
removeFile f
return out
where
- c = case parse p "" s of
+ c = case parse p "" s of
Left e -> error $
(show e) ++
"\n<<<\n" ++ s ++ "\n>>>"
diff --git a/Build/EvilSplicer.hs b/Build/EvilSplicer.hs
index 648d631b5b..fc41c624f3 100644
--- a/Build/EvilSplicer.hs
+++ b/Build/EvilSplicer.hs
@@ -86,7 +86,7 @@ number = read <$> many1 digit
coordsParser :: Parser (Coord, Coord)
coordsParser = (try singleline <|> try weird <|> multiline) <?> "Coords"
where
- singleline = do
+ singleline = do
line <- number
void $ char ':'
startcol <- number
@@ -151,7 +151,7 @@ spliceParser = do
(unlines codelines)
splicetype
where
- tosplicetype "declarations" = SpliceDeclaration
+ tosplicetype "declarations" = SpliceDeclaration
tosplicetype "expression" = SpliceExpression
tosplicetype s = error $ "unknown splice type: " ++ s
@@ -177,7 +177,7 @@ spliceParser = do
splicesExtractor :: Parser [Splice]
splicesExtractor = rights <$> many extract
where
- extract = try (Right <$> spliceParser) <|> (Left <$> compilerJunkLine)
+ extract = try (Right <$> spliceParser) <|> (Left <$> compilerJunkLine)
compilerJunkLine = restOfLine
{- Modifies the source file, expanding the splices, which all must
@@ -214,8 +214,8 @@ applySplices destdir imports splices@(first:_) = do
hPutStr h newcontent
hClose h
where
- expand lls [] = lls
- expand lls (s:rest)
+ expand lls [] = lls
+ expand lls (s:rest)
| isExpressionSplice s = expand (expandExpressionSplice s lls) rest
| otherwise = expand (expandDeclarationSplice s lls) rest
@@ -291,12 +291,12 @@ expandExpressionSplice sp lls = concat [before, spliced:padding, end]
-- ie: bar $(splice)
| otherwise = s ++ " $ "
where
- s' = filter (not . isSpace) s
+ s' = filter (not . isSpace) s
findindent = length . takeWhile isSpace
addindent n = unlines . map (i ++) . lines
where
- i = take n $ repeat ' '
+ i = take n $ repeat ' '
{- Tweaks code output by GHC in splices to actually build. Yipes. -}
mangleCode :: String -> String
@@ -315,7 +315,7 @@ mangleCode = flip_colon
. remove_package_version
. emptylambda
where
- {- Lambdas are often output without parens around them.
+ {- Lambdas are often output without parens around them.
- This breaks when the lambda is immediately applied to a
- parameter.
-
@@ -409,7 +409,7 @@ mangleCode = flip_colon
restofline = manyTill (noneOf "\n") newline
- {- For some reason, GHC sometimes doesn't like the multiline
+ {- For some reason, GHC sometimes doesn't like the multiline
- strings it creates. It seems to get hung up on \{ at the
- start of a new line sometimes, wanting it to not be escaped.
-
@@ -646,7 +646,7 @@ parsecAndReplace p s = case parse find "" s of
Left _e -> s
Right l -> concatMap (either return id) l
where
- find :: Parser [Either Char String]
+ find :: Parser [Either Char String]
find = many $ try (Right <$> p) <|> (Left <$> anyChar)
main :: IO ()
@@ -654,7 +654,7 @@ main = go =<< getArgs
where
go (destdir:log:header:[]) = run destdir log (Just header)
go (destdir:log:[]) = run destdir log Nothing
- go _ = error "usage: EvilSplicer destdir logfile [headerfile]"
+ go _ = error "usage: EvilSplicer destdir logfile [headerfile]"
run destdir log mheader = do
r <- parseFromFile splicesExtractor log
diff --git a/Build/NullSoftInstaller.hs b/Build/NullSoftInstaller.hs
index b8fc826058..22d3caf36d 100644
--- a/Build/NullSoftInstaller.hs
+++ b/Build/NullSoftInstaller.hs
@@ -103,7 +103,7 @@ makeInstaller gitannex license extrabins launchers = nsis $ do
name "git-annex"
outFile $ str installer
{- Installing into the same directory as git avoids needing to modify
- - path myself, since the git installer already does it. -}
+ - path myself, since the git installer already does it. -}
installDir gitInstallDir
requestExecutionLevel Admin
diff --git a/Build/OSXMkLibs.hs b/Build/OSXMkLibs.hs
index 5640e4d36a..ef668bb4a7 100644
--- a/Build/OSXMkLibs.hs
+++ b/Build/OSXMkLibs.hs
@@ -112,7 +112,7 @@ expand_rpath libs replacement_libs cmd
return $ map (replacem m) libs
| otherwise = return libs
where
- probe c = "DYLD_PRINT_RPATHS=1 " ++ c ++ " --getting-rpath-dummy-option 2>&1 | grep RPATH"
+ probe c = "DYLD_PRINT_RPATHS=1 " ++ c ++ " --getting-rpath-dummy-option 2>&1 | grep RPATH"
parse s = case words s of
("RPATH":"successful":"expansion":"of":old:"to:":new:[]) ->
Just (old, new)
diff --git a/Checks.hs b/Checks.hs
index 7a9cd1e38f..831c0a009d 100644
--- a/Checks.hs
+++ b/Checks.hs
@@ -35,7 +35,7 @@ noDaemonRunning :: Command -> Command
noDaemonRunning = addCheck $ whenM (isJust <$> daemonpid) $
error "You cannot run this command while git-annex watch or git-annex assistant is running."
where
- daemonpid = liftIO . checkDaemon =<< fromRepo gitAnnexPidFile
+ daemonpid = liftIO . checkDaemon =<< fromRepo gitAnnexPidFile
dontCheck :: CommandCheck -> Command -> Command
dontCheck check cmd = mutateCheck cmd $ \c -> filter (/= check) c
diff --git a/CmdLine.hs b/CmdLine.hs
index 6063901309..7df310f696 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -58,7 +58,7 @@ dispatch fuzzyok allargs allcmds commonoptions fields header getgitrepo = do
shutdown $ cmdnocommit cmd
go _flags params (Left e) = do
when fuzzy $
- autocorrect =<< Git.Config.global
+ autocorrect =<< Git.Config.global
maybe (throw e) (\a -> a params) (cmdnorepo cmd)
err msg = msg ++ "\n\n" ++ usage header allcmds
cmd = Prelude.head cmds
diff --git a/CmdLine/GitAnnexShell.hs b/CmdLine/GitAnnexShell.hs
index 6c212b24d3..91cfd3ede6 100644
--- a/CmdLine/GitAnnexShell.hs
+++ b/CmdLine/GitAnnexShell.hs
@@ -66,7 +66,7 @@ options = commonOptions ++
check u = unexpectedUUID expected u
checkGCryptUUID expected = check =<< getGCryptUUID True =<< gitRepo
where
- check (Just u) | u == toUUID expected = noop
+ check (Just u) | u == toUUID expected = noop
check Nothing = unexpected expected "uninitialized repository"
check (Just u) = unexpectedUUID expected u
unexpectedUUID expected u = unexpected expected $ "UUID " ++ fromUUID u
diff --git a/CmdLine/Seek.hs b/CmdLine/Seek.hs
index 397a481185..238ed42915 100644
--- a/CmdLine/Seek.hs
+++ b/CmdLine/Seek.hs
@@ -107,7 +107,7 @@ withFilesUnlocked' :: ([FilePath] -> Git.Repo -> IO ([FilePath], IO Bool)) -> (F
withFilesUnlocked' typechanged a params = seekActions $
prepFiltered a unlockedfiles
where
- check f = liftIO (notSymlink f) <&&>
+ check f = liftIO (notSymlink f) <&&>
(isJust <$> catKeyFile f <||> isJust <$> catKeyFileHEAD f)
unlockedfiles = filterM check =<< seekHelper typechanged params
@@ -165,7 +165,7 @@ withKeyOptions keyop fallbackop params = do
Just k -> go auto $ return [k]
_ -> error "Can only specify one of file names, --all, --unused, or --key"
where
- go True _ = error "Cannot use --auto with --all or --unused or --key"
+ go True _ = error "Cannot use --auto with --all or --unused or --key"
go False a = do
matcher <- Limit.getMatcher
seekActions $ map (process matcher) <$> a
diff --git a/Command/Add.hs b/Command/Add.hs
index e2b6d04fe0..1bc20d8194 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -125,7 +125,7 @@ lockDown' file = ifM crippledFileSystem
- This is not done in direct mode, because files there need to
- remain writable at all times.
-}
- go tmp = do
+ go tmp = do
unlessM isDirect $
freezeContent file
withTSDelta $ \delta -> liftIO $ do
@@ -134,7 +134,7 @@ lockDown' file = ifM crippledFileSystem
hClose h
nukeFile tmpfile
withhardlink delta tmpfile `catchIO` const (nohardlink delta)
- nohardlink delta = do
+ nohardlink delta = do
cache <- genInodeCache file delta
return KeySource
{ keyFilename = file
@@ -207,7 +207,7 @@ finishIngestDirect key source = do
perform :: FilePath -> CommandPerform
perform file = lockDown file >>= ingest >>= go
where
- go (Just key, cache) = next $ cleanup file key cache True
+ go (Just key, cache) = next $ cleanup file key cache True
go (Nothing, _) = stop
{- On error, put the file back so it doesn't seem to have vanished.
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs
index c21ce928f5..87711663c2 100644
--- a/Command/AddUrl.hs
+++ b/Command/AddUrl.hs
@@ -56,7 +56,7 @@ seek ps = do
start :: Bool -> Maybe FilePath -> Maybe Int -> String -> CommandStart
start relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI s
where
- (s', downloader) = getDownloader s
+ (s', downloader) = getDownloader s
bad = fromMaybe (error $ "bad url " ++ s') $
parseURI $ escapeURIString isUnescapedInURI s'
choosefile = flip fromMaybe optfile
@@ -95,8 +95,8 @@ start relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI s
performQuvi :: Bool -> URLString -> URLString -> FilePath -> CommandPerform
performQuvi relaxed pageurl videourl file = ifAnnexed file addurl geturl
where
- quviurl = setDownloader pageurl QuviDownloader
- addurl key = next $ cleanup quviurl file key Nothing
+ quviurl = setDownloader pageurl QuviDownloader
+ addurl key = next $ cleanup quviurl file key Nothing
geturl = next $ isJust <$> addUrlFileQuvi relaxed quviurl videourl file
#endif
@@ -189,7 +189,7 @@ download url file = do
, return Nothing
)
where
- runtransfer dummykey tmp = Transfer.notifyTransfer Transfer.Download (Just file) $
+ runtransfer dummykey tmp = Transfer.notifyTransfer Transfer.Download (Just file) $
Transfer.download webUUID dummykey (Just file) Transfer.forwardRetry $ const $ do
liftIO $ createDirectoryIfMissing True (parentDir tmp)
downloadUrl [url] tmp
diff --git a/Command/ConfigList.hs b/Command/ConfigList.hs
index 219685c21c..2aea29b229 100644
--- a/Command/ConfigList.hs
+++ b/Command/ConfigList.hs
@@ -29,7 +29,7 @@ start = do
showConfig coreGCryptId =<< fromRepo (Git.Config.get coreGCryptId "")
stop
where
- showConfig k v = liftIO $ putStrLn $ k ++ "=" ++ v
+ showConfig k v = liftIO $ putStrLn $ k ++ "=" ++ v
{- The repository may not yet have a UUID; automatically initialize it
- when there's a git-annex branch available. -}
diff --git a/Command/Copy.hs b/Command/Copy.hs
index ae254aae21..5acb722dea 100644
--- a/Command/Copy.hs
+++ b/Command/Copy.hs
@@ -23,7 +23,7 @@ seek ps = do
to <- getOptionField toOption Remote.byNameWithUUID
from <- getOptionField fromOption Remote.byNameWithUUID
withKeyOptions
- (Command.Move.startKey to from False)
+ (Command.Move.startKey to from False)
(withFilesInGit $ whenAnnexed $ start to from)
ps
diff --git a/Command/EnableRemote.hs b/Command/EnableRemote.hs
index 42ab433740..5e21a9dbdf 100644
--- a/Command/EnableRemote.hs
+++ b/Command/EnableRemote.hs
@@ -29,7 +29,7 @@ start (name:ws) = go =<< InitRemote.findExisting name
where
config = Logs.Remote.keyValToConfig ws
- go Nothing = unknownNameError "Unknown special remote name."
+ go Nothing = unknownNameError "Unknown special remote name."
go (Just (u, c)) = do
let fullconfig = config `M.union` c
t <- InitRemote.findType fullconfig
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index a17662d62e..f27f18e572 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -329,7 +329,7 @@ checkKeySizeOr bad key file = case Types.Key.keySize key of
checkBackend :: Backend -> Key -> Maybe FilePath -> Annex Bool
checkBackend backend key mfile = go =<< isDirect
where
- go False = do
+ go False = do
content <- calcRepo $ gitAnnexLocation key
checkBackendOr badContent backend key content
go True = maybe nocheck checkdirect mfile
diff --git a/Command/FuzzTest.hs b/Command/FuzzTest.hs
index 7075aeddcc..31f31be321 100644
--- a/Command/FuzzTest.hs
+++ b/Command/FuzzTest.hs
@@ -47,7 +47,7 @@ guardTest = unlessM (fromMaybe False . Git.Config.isTrue <$> getConfig key "") $
, "Refusing to run fuzz tests, since " ++ keyname ++ " is not set!"
]
where
- key = annexConfig "eat-my-repository"
+ key = annexConfig "eat-my-repository"
(ConfigKey keyname) = key
@@ -257,7 +257,7 @@ existingDir = do
newFile :: IO (Maybe FuzzFile)
newFile = go (100 :: Int)
where
- go 0 = return Nothing
+ go 0 = return Nothing
go n = do
f <- genFuzzFile
ifM (doesnotexist (toFilePath f))
@@ -268,7 +268,7 @@ newFile = go (100 :: Int)
newDir :: FilePath -> IO (Maybe FuzzDir)
newDir parent = go (100 :: Int)
where
- go 0 = return Nothing
+ go 0 = return Nothing
go n = do
(FuzzDir d) <- genFuzzDir
ifM (doesnotexist (parent </> d))
diff --git a/Command/Get.hs b/Command/Get.hs
index d0be200185..a1db1f5152 100644
--- a/Command/Get.hs
+++ b/Command/Get.hs
@@ -48,7 +48,7 @@ start' expensivecheck from key afile = stopUnless (not <$> inAnnex key) $
stopUnless (Command.Move.fromOk src key) $
go $ Command.Move.fromPerform src False key afile
where
- go a = do
+ go a = do
showStart' "get" key afile
next a
diff --git a/Command/Import.hs b/Command/Import.hs
index 97e3f7652e..02f44a5989 100644
--- a/Command/Import.hs
+++ b/Command/Import.hs
@@ -50,8 +50,8 @@ getDuplicateMode = gen
<*> getflag cleanDuplicatesOption
<*> getflag skipDuplicatesOption
where
- getflag = Annex.getFlag . optionName
- gen False False False False = Default
+ getflag = Annex.getFlag . optionName
+ gen False False False False = Default
gen True False False False = Duplicate
gen False True False False = DeDuplicate
gen False False True False = CleanDuplicates
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs
index 1fdba46a1b..d11227cdf7 100644
--- a/Command/ImportFeed.hs
+++ b/Command/ImportFeed.hs
@@ -153,7 +153,7 @@ performDownload relaxed cache todownload = case location todownload of
rundownload videourl ("." ++ Quvi.linkSuffix link) $
addUrlFileQuvi relaxed quviurl videourl
where
- forced = Annex.getState Annex.force
+ forced = Annex.getState Annex.force
{- Avoids downloading any urls that are already known to be
- associated with a file in the annex, unless forced. -}
@@ -192,7 +192,7 @@ performDownload relaxed cache todownload = case location todownload of
, return $ Just f
)
where
- f = if n < 2
+ f = if n < 2
then file
else
let (d, base) = splitFileName file
diff --git a/Command/Indirect.hs b/Command/Indirect.hs
index e146f13b79..97e6f5951d 100644
--- a/Command/Indirect.hs
+++ b/Command/Indirect.hs
@@ -94,7 +94,7 @@ perform = do
warnlocked
showEndOk
- warnlocked :: SomeException -> Annex ()
+ warnlocked :: SomeException -> Annex ()
warnlocked e = do
warning $ show e
warning "leaving this file as-is; correct this problem and run git annex add on it"
diff --git a/Command/Info.hs b/Command/Info.hs
index 63bc92bbe1..1bea17ab44 100644
--- a/Command/Info.hs
+++ b/Command/Info.hs
@@ -100,7 +100,7 @@ localInfo dir = showCustom (unwords ["info", dir]) $ do
evalStateT (mapM_ showStat stats) =<< getLocalStatInfo dir
return True
where
- tostats = map (\s -> s dir)
+ tostats = map (\s -> s dir)
selStats :: [Stat] -> [Stat] -> Annex [Stat]
selStats fast_stats slow_stats = do
diff --git a/Command/Migrate.hs b/Command/Migrate.hs
index cea9e9426d..cab807d05f 100644
--- a/Command/Migrate.hs
+++ b/Command/Migrate.hs
@@ -65,7 +65,7 @@ upgradableKey backend key = isNothing (Types.Key.keySize key) || backendupgradab
perform :: FilePath -> Key -> Backend -> Backend -> CommandPerform
perform file oldkey oldbackend newbackend = go =<< genkey
where
- go Nothing = stop
+ go Nothing = stop
go (Just (newkey, knowngoodcontent))
| knowngoodcontent = finish newkey
| otherwise = stopUnless checkcontent $ finish newkey
diff --git a/Command/RecvKey.hs b/Command/RecvKey.hs
index d5971d6cf5..2ea03b055c 100644
--- a/Command/RecvKey.hs
+++ b/Command/RecvKey.hs
@@ -63,7 +63,7 @@ start key = fieldTransfer Download key $ \_p ->
Nothing -> return True
Just size -> do
size' <- fromIntegral . fileSize
- <$> liftIO (getFileStatus tmp)
+ <$> liftIO (getFileStatus tmp)
return $ size == size'
if oksize
then case Backend.maybeLookupBackendName (Types.Key.keyBackendName key) of
@@ -76,7 +76,7 @@ start key = fieldTransfer Download key $ \_p ->
warning "recvkey: received key with wrong size; discarding"
return False
where
- runfsck check = ifM (check key tmp)
+ runfsck check = ifM (check key tmp)
( return True
, do
warning "recvkey: received key from direct mode repository seems to have changed as it was transferred; discarding"
diff --git a/Command/Schedule.hs b/Command/Schedule.hs
index a088dbef8b..7b72990a79 100644
--- a/Command/Schedule.hs
+++ b/Command/Schedule.hs
@@ -27,7 +27,7 @@ seek = withWords start
start :: [String] -> CommandStart
start = parse
where
- parse (name:[]) = go name performGet
+ parse (name:[]) = go name performGet
parse (name:expr:[]) = go name $ \uuid -> do
showStart "schedile" name
performSet expr uuid
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 6a6a254b3c..6819d25a04 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -356,7 +356,7 @@ syncFile rs f k = do
handleDropsFrom locs' rs "unwanted" True k (Just f)
Nothing callCommandAction
where
- wantget have = allM id
+ wantget have = allM id
[ pure (not $ null have)
, not <$> inAnnex k
, wantGet True (Just k) (Just f)
diff --git a/Command/TransferKeys.hs b/Command/TransferKeys.hs
index fba0e6593e..b9a8bf3beb 100644
--- a/Command/TransferKeys.hs
+++ b/Command/TransferKeys.hs
@@ -57,7 +57,7 @@ runRequests readh writeh a = do
fileEncoding writeh
go =<< readrequests
where
- go (d:rn:k:f:rest) = do
+ go (d:rn:k:f:rest) = do
case (deserialize d, deserialize rn, deserialize k, deserialize f) of
(Just direction, Just remotename, Just key, Just file) -> do
mremote <- Remote.byName' remotename
diff --git a/Command/Uninit.hs b/Command/Uninit.hs
index 3f57782fce..89ccc2102f 100644
--- a/Command/Uninit.hs
+++ b/Command/Uninit.hs
@@ -100,7 +100,7 @@ prepareRemoveAnnexDir annexdir =
removeUnannexed :: [Key] -> Annex [Key]
removeUnannexed = go []
where
- go c [] = return c
+ go c [] = return c
go c (k:ks) = ifM (inAnnexCheck k $ liftIO . enoughlinks)
( do
lockContent k removeAnnex
diff --git a/Command/Vicfg.hs b/Command/Vicfg.hs
index 1f16955360..26a75dab22 100644
--- a/Command/Vicfg.hs
+++ b/Command/Vicfg.hs
@@ -136,7 +136,7 @@ genCfg cfg descs = unlines $ intercalate [""]
(\(s, u) -> line "group" u $ unwords $ S.toList s)
(\u -> lcom $ line "group" u "")
where
- grouplist = unwords $ map fromStandardGroup [minBound..]
+ grouplist = unwords $ map fromStandardGroup [minBound..]
preferredcontent = settings cfg descs cfgPreferredContentMap
[ com "Repository preferred contents"
@@ -157,7 +157,7 @@ genCfg cfg descs = unlines $ intercalate [""]
(\(s, g) -> gline g s)
(\g -> gline g "")
where
- gline g value = [ unwords ["groupwanted", g, "=", value] ]
+ gline g value = [ unwords ["groupwanted", g, "=", value] ]
allgroups = S.unions $ stdgroups : M.elems (cfgGroupMap cfg)
stdgroups = S.fromList $ map fromStandardGroup [minBound..maxBound]
diff --git a/Command/Wanted.hs b/Command/Wanted.hs
index bae450d265..9c3b0ff985 100644
--- a/Command/Wanted.hs
+++ b/Command/Wanted.hs
@@ -26,7 +26,7 @@ seek = withWords start
start :: [String] -> CommandStart
start = parse
where
- parse (name:[]) = go name performGet
+ parse (name:[]) = go name performGet
parse (name:expr:[]) = go name $ \uuid -> do
showStart "wanted" name
performSet expr uuid
diff --git a/Config/Cost.hs b/Config/Cost.hs
index 2d94a6b15b..44a26f0649 100644
--- a/Config/Cost.hs
+++ b/Config/Cost.hs
@@ -52,7 +52,7 @@ insertCostAfter l pos
| otherwise =
firstsegment ++ [costBetween item nextitem ] ++ lastsegment
where
- nextpos = pos + 1
+ nextpos = pos + 1
maxpos = length l - 1
item = l !! pos
diff --git a/Config/Files.hs b/Config/Files.hs
index 30ed0a3cf0..8d5c1fd124 100644
--- a/Config/Files.hs
+++ b/Config/Files.hs
@@ -66,4 +66,4 @@ readProgramFile = do
)
)
where
- cmd = "git-annex"
+ cmd = "git-annex"
diff --git a/Git/CatFile.hs b/Git/CatFile.hs
index 8e64fc5589..d0bcef4fbc 100644
--- a/Git/CatFile.hs
+++ b/Git/CatFile.hs
@@ -94,7 +94,7 @@ catTree :: CatFileHandle -> Ref -> IO [(FilePath, FileMode)]
catTree h treeref = go <$> catObjectDetails h treeref
where
go (Just (b, _, TreeObject)) = parsetree [] b
- go _ = []
+ go _ = []
parsetree c b = case L.break (== 0) b of
(modefile, rest)
diff --git a/Git/Command.hs b/Git/Command.hs
index 30d2dcbf90..c61cc9fe8d 100644
--- a/Git/Command.hs
+++ b/Git/Command.hs
@@ -79,7 +79,7 @@ pipeWriteRead params writer repo = assertLocal repo $
writeReadProcessEnv "git" (toCommand $ gitCommandLine params repo)
(gitEnv repo) writer (Just adjusthandle)
where
- adjusthandle h = do
+ adjusthandle h = do
fileEncoding h
hSetNewlineMode h noNewlineTranslation
@@ -117,7 +117,7 @@ gitCoProcessStart restartable params repo = CoProcess.start numrestarts "git"
(toCommand $ gitCommandLine params repo)
(gitEnv repo)
where
- {- If a long-running git command like cat-file --batch
+ {- If a long-running git command like cat-file --batch
- crashes, it will likely start up again ok. If it keeps crashing
- 10 times, something is badly wrong. -}
numrestarts = if restartable then 10 else 0
diff --git a/Git/Config.hs b/Git/Config.hs
index 171c3e6c65..32c0dd1ccb 100644
--- a/Git/Config.hs
+++ b/Git/Config.hs
@@ -167,7 +167,7 @@ coreBare = "core.bare"
fromPipe :: Repo -> String -> [CommandParam] -> IO (Either SomeException (Repo, String))
fromPipe r cmd params = try $
withHandle StdoutHandle createProcessSuccess p $ \h -> do
- fileEncoding h
+ fileEncoding h
val <- hGetContentsStrict h
r' <- store val r
return (r', val)
diff --git a/Git/GCrypt.hs b/Git/GCrypt.hs
index c2a5a98fe2..db067e25c3 100644
--- a/Git/GCrypt.hs
+++ b/Git/GCrypt.hs
@@ -38,12 +38,12 @@ isEncrypted _ = False
encryptedRemote :: Repo -> Repo -> IO Repo
encryptedRemote baserepo = go
where
- go Repo { location = Url url }
+ go Repo { location = Url url }
| urlPrefix `isPrefixOf` u =
fromRemoteLocation (drop plen u) baserepo
| otherwise = notencrypted
where
- u = show url
+ u = show url
plen = length urlPrefix
go _ = notencrypted
notencrypted = error "not a gcrypt encrypted repository"
@@ -92,7 +92,7 @@ getParticiantList globalconfigrepo repo remotename = KeyIds $ parse $ firstJust
]
where
defaultkey = "gcrypt.participants"
- parse (Just "simple") = []
+ parse (Just "simple") = []
parse (Just l) = words l
parse Nothing = []
diff --git a/Git/LsTree.hs b/Git/LsTree.hs
index 6d3ca4813e..ca5e323e0a 100644
--- a/Git/LsTree.hs
+++ b/Git/LsTree.hs
@@ -44,7 +44,7 @@ lsTreeParams t = [ Params "ls-tree --full-tree -z -r --", File $ fromRef t ]
lsTreeFiles :: Ref -> [FilePath] -> Repo -> IO [TreeItem]
lsTreeFiles t fs repo = map parseLsTree <$> pipeNullSplitStrict ps repo
where
- ps = [Params "ls-tree --full-tree -z --", File $ fromRef t] ++ map File fs
+ ps = [Params "ls-tree --full-tree -z --", File $ fromRef t] ++ map File fs
{- Parses a line of ls-tree output.
- (The --long format is not currently supported.) -}
diff --git a/Git/Remote.hs b/Git/Remote.hs
index 7573c87ee8..7e8e5f8171 100644
--- a/Git/Remote.hs
+++ b/Git/Remote.hs
@@ -70,7 +70,7 @@ remoteLocationIsSshUrl _ = False
parseRemoteLocation :: String -> Repo -> RemoteLocation
parseRemoteLocation s repo = ret $ calcloc s
where
- ret v
+ ret v
#ifdef mingw32_HOST_OS
| dosstyle v = RemotePath (dospath v)
#endif
diff --git a/Git/Repair.hs b/Git/Repair.hs
index 43f0a56fa4..0769ecb30e 100644
--- a/Git/Repair.hs
+++ b/Git/Repair.hs
@@ -222,7 +222,7 @@ badBranches missing r = filterM isbad =<< getAllRefs r
getAllRefs :: Repo -> IO [Ref]
getAllRefs r = map toref <$> dirContentsRecursive refdir
where
- refdir = localGitDir r </> "refs"
+ refdir = localGitDir r </> "refs"
toref = Ref . relPathDirToFile (localGitDir r)
explodePackedRefsFile :: Repo -> IO ()
@@ -411,7 +411,7 @@ displayList items header
putStrLn header
putStr $ unlines $ map (\i -> "\t" ++ i) truncateditems
where
- numitems = length items
+ numitems = length items
truncateditems
| numitems > 10 = take 10 items ++ ["(and " ++ show (numitems - 10) ++ " more)"]
| otherwise = items
diff --git a/Git/Version.hs b/Git/Version.hs
index 5ad1d59592..5c61f859e0 100644
--- a/Git/Version.hs
+++ b/Git/Version.hs
@@ -21,7 +21,7 @@ instance Show GitVersion where
installed :: IO GitVersion
installed = normalize . extract <$> readProcess "git" ["--version"]
where
- extract s = case lines s of
+ extract s = case lines s of
[] -> ""
(l:_) -> unwords $ drop 2 $ words l
diff --git a/Limit.hs b/Limit.hs
index 89dd9d33e1..573bd57b64 100644
--- a/Limit.hs
+++ b/Limit.hs
@@ -234,7 +234,7 @@ limitSize vs s = case readSize dataUnits s of
Nothing -> Left "bad size"
Just sz -> Right $ go sz
where
- go sz _ (MatchingFile fi) = lookupFileKey fi >>= check fi sz
+ go sz _ (MatchingFile fi) = lookupFileKey fi >>= check fi sz
go sz _ (MatchingKey key) = checkkey sz key
checkkey sz key = return $ keySize key `vs` Just sz
check _ sz (Just key) = checkkey sz key
@@ -254,7 +254,7 @@ limitMetaData s = case parseMetaData s of
let cglob = compileGlob (fromMetaValue v) CaseInsensative
in Right $ const $ checkKey (check f cglob)
where
- check f cglob k = not . S.null
+ check f cglob k = not . S.null
. S.filter (matchGlob cglob . fromMetaValue)
. metaDataValues f <$> getCurrentMetaData k
diff --git a/Locations.hs b/Locations.hs
index 0369c7a1c3..bcf793bda6 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -148,7 +148,7 @@ gitAnnexLink file key r = do
loc <- gitAnnexLocation' key r False
return $ relPathDirToFile (parentDir absfile) loc
where
- whoops = error $ "unable to normalize " ++ file
+ whoops = error $ "unable to normalize " ++ file
{- File used to lock a key's content. -}
gitAnnexContentLock :: Key -> Git.Repo -> GitConfig -> IO FilePath
@@ -356,7 +356,7 @@ isLinkToAnnex s = (pathSeparator:objectDir) `isInfixOf` s
preSanitizeKeyName :: String -> String
preSanitizeKeyName = concatMap escape
where
- escape c
+ escape c
| isAsciiUpper c || isAsciiLower c || isDigit c = [c]
| c `elem` ".-_ " = [c] -- common, assumed safe
| c `elem` "/%:" = [c] -- handled by keyFile
diff --git a/Logs.hs b/Logs.hs
index ff7b7dcf06..1b7a61efef 100644
--- a/Logs.hs
+++ b/Logs.hs
@@ -117,7 +117,7 @@ urlLogFileKey path
| ext == urlLogExt = fileKey base
| otherwise = Nothing
where
- file = takeFileName path
+ file = takeFileName path
(base, ext) = splitAt (length file - extlen) file
extlen = length urlLogExt
@@ -144,7 +144,7 @@ chunkLogFileKey path
| ext == chunkLogExt = fileKey base
| otherwise = Nothing
where
- file = takeFileName path
+ file = takeFileName path
(base, ext) = splitAt (length file - extlen) file
extlen = length chunkLogExt
@@ -176,10 +176,10 @@ prop_logs_sane dummykey = and
, expect gotOtherLog (getLogVariety $ numcopiesLog)
]
where
- expect = maybe False
+ expect = maybe False
gotUUIDBasedLog UUIDBasedLog = True
gotUUIDBasedLog _ = False
- gotNewUUIDBasedLog NewUUIDBasedLog = True
+ gotNewUUIDBasedLog NewUUIDBasedLog = True
gotNewUUIDBasedLog _ = False
gotChunkLog (ChunkLog k) = k == dummykey
gotChunkLog _ = False
diff --git a/Logs/FsckResults.hs b/Logs/FsckResults.hs
index 619dd586c6..23367a3d31 100644
--- a/Logs/FsckResults.hs
+++ b/Logs/FsckResults.hs
@@ -28,7 +28,7 @@ writeFsckResults u fsckresults = do
| S.null s -> nukeFile logfile
| otherwise -> store s t logfile
where
- store s t logfile = do
+ store s t logfile = do
createDirectoryIfMissing True (parentDir logfile)
liftIO $ viaTmp writeFile logfile $ serialize s t
serialize s t =
diff --git a/Logs/MetaData.hs b/Logs/MetaData.hs
index 250317090f..d63a87470b 100644
--- a/Logs/MetaData.hs
+++ b/Logs/MetaData.hs
@@ -67,7 +67,7 @@ getCurrentMetaData k = do
return $ currentMetaData $ unionMetaData loggedmeta
(lastchanged ls loggedmeta)
where
- lastchanged [] _ = emptyMetaData
+ lastchanged [] _ = emptyMetaData
lastchanged ls (MetaData currentlyset) =
let m = foldl' (flip M.union) M.empty (map genlastchanged ls)
in MetaData $
diff --git a/Logs/Schedule.hs b/Logs/Schedule.hs
index 1d78467bba..5406670592 100644
--- a/Logs/Schedule.hs
+++ b/Logs/Schedule.hs
@@ -35,7 +35,7 @@ scheduleSet uuid@(UUID _) activities = do
Annex.Branch.change scheduleLog $
showLog id . changeLog ts uuid val . parseLog Just
where
- val = fromScheduledActivities activities
+ val = fromScheduledActivities activities
scheduleSet NoUUID _ = error "unknown UUID; cannot modify"
scheduleMap :: Annex (M.Map UUID [ScheduledActivity])
diff --git a/Logs/Transitions.hs b/Logs/Transitions.hs
index 64e9d3344c..15ea32401a 100644
--- a/Logs/Transitions.hs
+++ b/Logs/Transitions.hs
@@ -53,7 +53,7 @@ showTransitions = unlines . map showTransitionLine . S.elems
parseTransitions :: String -> Maybe Transitions
parseTransitions = check . map parseTransitionLine . lines
where
- check l
+ check l
| all isJust l = Just $ S.fromList $ catMaybes l
| otherwise = Nothing
@@ -68,8 +68,8 @@ showTransitionLine (TransitionLine ts t) = unwords [show t, show ts]
parseTransitionLine :: String -> Maybe TransitionLine
parseTransitionLine s = TransitionLine <$> pdate ds <*> readish ts
where
- ws = words s
- ts = Prelude.head ws
+ ws = words s
+ ts = Prelude.head ws
ds = unwords $ Prelude.tail ws
pdate = utcTimeToPOSIXSeconds <$$> parseTime defaultTimeLocale "%s%Qs"
diff --git a/Logs/Web.hs b/Logs/Web.hs
index ede600ec28..1d16e10b35 100644
--- a/Logs/Web.hs
+++ b/Logs/Web.hs
@@ -76,7 +76,7 @@ knownUrls = do
return $ concat r
where
geturls Nothing = return []
- geturls (Just logsha) = getLog . L.unpack <$> catObject logsha
+ geturls (Just logsha) = getLog . L.unpack <$> catObject logsha
data Downloader = DefaultDownloader | QuviDownloader
diff --git a/Remote.hs b/Remote.hs
index 8a8eb64df0..0e725c2154 100644
--- a/Remote.hs
+++ b/Remote.hs
@@ -101,7 +101,7 @@ byName (Just n) = either error Just <$> byName' n
byNameWithUUID :: Maybe RemoteName -> Annex (Maybe Remote)
byNameWithUUID = checkuuid <=< byName
where
- checkuuid Nothing = return Nothing
+ checkuuid Nothing = return Nothing
checkuuid (Just r)
| uuid r == NoUUID =
if remoteAnnexIgnore (gitconfig r)
diff --git a/Remote/External.hs b/Remote/External.hs
index c3ea7e1db9..d409724124 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -169,7 +169,7 @@ handleRequest' lck external req mp responsehandler
go
| otherwise = go
where
- go = do
+ go = do
sendMessage lck external req
loop
loop = receiveMessage lck external responsehandler
diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs
index f1d561d23c..fc7718a2a3 100644
--- a/Remote/GCrypt.hs
+++ b/Remote/GCrypt.hs
@@ -147,7 +147,7 @@ rsyncTransport r
| ":" `isInfixOf` loc = sshtransport $ separate (== ':') loc
| otherwise = othertransport
where
- loc = Git.repoLocation r
+ loc = Git.repoLocation r
sshtransport (host, path) = do
let rsyncpath = if "/~/" `isPrefixOf` path
then drop 3 path
@@ -166,7 +166,7 @@ gCryptSetup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConf
gCryptSetup mu _ c = go $ M.lookup "gitrepo" c
where
remotename = fromJust (M.lookup "name" c)
- go Nothing = error "Specify gitrepo="
+ go Nothing = error "Specify gitrepo="
go (Just gitrepo) = do
(c', _encsetup) <- encryptionSetup c
inRepo $ Git.Command.run
@@ -234,7 +234,7 @@ setupRepo gcryptid r
- create the objectDir on the remote,
- which is needed for direct rsync of objects to work.
-}
- rsyncsetup = Remote.Rsync.withRsyncScratchDir $ \tmp -> do
+ rsyncsetup = Remote.Rsync.withRsyncScratchDir $ \tmp -> do
liftIO $ createDirectoryIfMissing True $ tmp </> objectDir
(rsynctransport, rsyncurl, _) <- rsyncTransport r
let tmpconfig = tmp </> "config"
@@ -266,7 +266,7 @@ isShell r = case method of
AccessShell -> True
_ -> False
where
- method = toAccessMethod $ fromMaybe "" $
+ method = toAccessMethod $ fromMaybe "" $
remoteAnnexGCrypt $ gitconfig r
shellOrRsync :: Remote -> Annex a -> Annex a -> Annex a
@@ -352,7 +352,7 @@ checkKey r rsyncopts k
| Git.repoIsSsh (repo r) = shellOrRsync r checkshell checkrsync
| otherwise = unsupportedUrl
where
- checkrsync = Remote.Rsync.checkKey (repo r) rsyncopts k
+ checkrsync = Remote.Rsync.checkKey (repo r) rsyncopts k
checkshell = Ssh.inAnnex (repo r) k
{- Annexed objects are hashed using lower-case directories for max
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 6397c1a2e4..a249f43b2a 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -305,7 +305,7 @@ inAnnex rmt key
| Git.repoIsUrl r = checkremote
| otherwise = checklocal
where
- r = repo rmt
+ r = repo rmt
checkhttp = do
showChecking r
ifM (Url.withUrlOptions $ \uo -> anyM (\u -> Url.checkBoth u (keySize key) uo) (keyUrls rmt key))
diff --git a/Remote/Helper/Chunked.hs b/Remote/Helper/Chunked.hs
index 271978658b..eb5dbc7934 100644
--- a/Remote/Helper/Chunked.hs
+++ b/Remote/Helper/Chunked.hs
@@ -123,7 +123,7 @@ storeChunks u chunkconfig k f p storer checker =
loop bytesprocessed (chunk, bs) chunkkeys
| L.null chunk && numchunks > 0 = do
- -- Once all chunks are successfully
+ -- Once all chunks are successfully
-- stored, update the chunk log.
chunksStored u k (FixedSizeChunks chunksize) numchunks
return True
@@ -138,7 +138,7 @@ storeChunks u chunkconfig k f p storer checker =
)
where
numchunks = numChunks chunkkeys
- {- The MeterUpdate that is passed to the action
+ {- The MeterUpdate that is passed to the action
- storing a chunk is offset, so that it reflects
- the total bytes that have already been stored
- in previous chunks. -}
@@ -290,7 +290,7 @@ retrieveChunks retriever u chunkconfig encryptor basek dest basep sink
hSeek h AbsoluteSeek startpoint
return h
- {- Progress meter updating is a bit tricky: If the Retriever
+ {- Progress meter updating is a bit tricky: If the Retriever
- populates a file, it is responsible for updating progress
- as the file is being retrieved.
-
diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs
index ba9ff4fb40..5b9db9b08d 100644
--- a/Remote/Helper/Special.hs
+++ b/Remote/Helper/Special.hs
@@ -196,7 +196,7 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
retrieveKeyFileGen k dest p enc =
safely $ prepareretriever k $ safely . go
where
- go (Just retriever) = displayprogress p k $ \p' ->
+ go (Just retriever) = displayprogress p k $ \p' ->
retrieveChunks retriever (uuid baser) chunkconfig
enck k dest p' (sink dest enc)
go Nothing = return False
@@ -210,7 +210,7 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
checkPresentGen k enc = preparecheckpresent k go
where
- go (Just checker) = checkPresentChunks checker (uuid baser) chunkconfig enck k
+ go (Just checker) = checkPresentChunks checker (uuid baser) chunkconfig enck k
go Nothing = cantCheck baser
enck = maybe id snd enc
diff --git a/Remote/Hook.hs b/Remote/Hook.hs
index 45a0ae742c..707e2cb75e 100644
--- a/Remote/Hook.hs
+++ b/Remote/Hook.hs
@@ -138,7 +138,7 @@ checkKey r h k = do
v <- lookupHook h action
liftIO $ check v
where
- action = "checkpresent"
+ action = "checkpresent"
findkey s = key2file k `elem` lines s
check Nothing = error $ action ++ " hook misconfigured"
check (Just hook) = do
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 643411149d..7a965aa9d6 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -175,7 +175,7 @@ store o k src meterupdate = withRsyncScratchDir $ \tmp -> do
]
else return False
where
- {- If the key being sent is encrypted or chunked, the file
+ {- If the key being sent is encrypted or chunked, the file
- containing its content is a temp file, and so can be
- renamed into place. Otherwise, the file is the annexed
- object file, and has to be copied or hard linked into place. -}
diff --git a/Remote/Tahoe.hs b/Remote/Tahoe.hs
index bde8ee9d7b..5c1729448c 100644
--- a/Remote/Tahoe.hs
+++ b/Remote/Tahoe.hs
@@ -167,7 +167,7 @@ writeSharedConvergenceSecret configdir scs =
getSharedConvergenceSecret :: TahoeConfigDir -> IO SharedConvergenceSecret
getSharedConvergenceSecret configdir = go (60 :: Int)
where
- f = convergenceFile configdir
+ f = convergenceFile configdir
go n
| n == 0 = error $ "tahoe did not write " ++ f ++ " after 1 minute. Perhaps the daemon failed to start?"
| otherwise = do
@@ -190,7 +190,7 @@ startTahoeDaemon configdir = void $ boolTahoe configdir "start" []
withTahoeConfigDir :: TahoeHandle -> (TahoeConfigDir -> IO a) -> IO a
withTahoeConfigDir (TahoeHandle configdir v) a = go =<< atomically needsstart
where
- go True = do
+ go True = do
startTahoeDaemon configdir
a configdir
go False = a configdir
diff --git a/Remote/Web.hs b/Remote/Web.hs
index 04b4532772..ef7d2b39a7 100644
--- a/Remote/Web.hs
+++ b/Remote/Web.hs
@@ -120,7 +120,7 @@ checkKey' key us = firsthit us (Right False) $ \u -> do
Url.withUrlOptions $ catchMsgIO .
Url.checkBoth u' (keySize key)
where
- firsthit [] miss _ = return miss
+ firsthit [] miss _ = return miss
firsthit (u:rest) _ a = do
r <- a u
case r of
diff --git a/RemoteDaemon/Transport/Ssh.hs b/RemoteDaemon/Transport/Ssh.hs
index db6b6127cc..afedf559e4 100644
--- a/RemoteDaemon/Transport/Ssh.hs
+++ b/RemoteDaemon/Transport/Ssh.hs
@@ -119,5 +119,5 @@ robustly backoff a = caught =<< catchDefaultIO ConnectionClosed a
| b2 > maxbackoff = maxbackoff
| otherwise = b2
where
- b2 = backoff * 2
+ b2 = backoff * 2
maxbackoff = 3600 -- one hour
diff --git a/Test.hs b/Test.hs
index 6348b0d6d7..50d2f1d552 100644
--- a/Test.hs
+++ b/Test.hs
@@ -122,7 +122,7 @@ main ps = do
#else
handleParseResult $ execParserPure pprefs pinfo args
#endif
- progdesc = "git-annex test"
+ progdesc = "git-annex test"
ingredients :: [Ingredient]
ingredients =
@@ -822,7 +822,7 @@ test_conflict_resolution_movein_regression testenv = withtmpclonerepo testenv Fa
- be missing the content of the file that had
- been put in it. -}
forM_ [r1, r2] $ \r -> indir testenv r $ do
- git_annex testenv "get" [] @? "unable to get all files after merge conflict resolution in " ++ rname r
+ git_annex testenv "get" [] @? "unable to get all files after merge conflict resolution in " ++ rname r
{- Simple case of conflict resolution; 2 different versions of annexed
- file. -}
@@ -1404,7 +1404,7 @@ intmpclonerepoInDirect testenv a = intmpclonerepo testenv $
, a
)
where
- isdirect = annexeval $ do
+ isdirect = annexeval $ do
Annex.Init.initialize Nothing
Config.isDirect
diff --git a/Types/Key.hs b/Types/Key.hs
index 5bb41e15f5..da9ff494a9 100644
--- a/Types/Key.hs
+++ b/Types/Key.hs
@@ -133,7 +133,7 @@ prop_idempotent_key_decode f
| normalfieldorder = maybe True (\k -> key2file k == f) (file2key f)
| otherwise = True
where
- -- file2key will accept the fields in any order, so don't
+ -- file2key will accept the fields in any order, so don't
-- try the test unless the fields are in the normal order
normalfieldorder = fields `isPrefixOf` "smSC"
fields = map (f !!) $ filter (< length f) $ map succ $
diff --git a/Types/MetaData.hs b/Types/MetaData.hs
index 8df56734dd..f19e0b439a 100644
--- a/Types/MetaData.hs
+++ b/Types/MetaData.hs
@@ -290,4 +290,4 @@ prop_metadata_serialize f v m = and
, deserialize (serialize m') == Just m'
]
where
- m' = removeEmptyFields m
+ m' = removeEmptyFields m
diff --git a/Types/StandardGroups.hs b/Types/StandardGroups.hs
index 37ba6e9c64..66c1dd5ef4 100644
--- a/Types/StandardGroups.hs
+++ b/Types/StandardGroups.hs
@@ -96,7 +96,7 @@ standardPreferredContent UnwantedGroup = "exclude=*"
notArchived :: String
notArchived = "not (copies=archive:1 or copies=smallarchive:1)"
-
+
{- Most repositories want any content that is only on untrusted
- or dead repositories, or that otherwise does not have enough copies.
- Does not look at .gitattributes since that is quite a lot slower.
diff --git a/Utility/Batch.hs b/Utility/Batch.hs
index d6dadae677..ff81318fbd 100644
--- a/Utility/Batch.hs
+++ b/Utility/Batch.hs
@@ -32,7 +32,7 @@ batch :: IO a -> IO a
#if defined(linux_HOST_OS) || defined(__ANDROID__)
batch a = wait =<< batchthread
where
- batchthread = asyncBound $ do
+ batchthread = asyncBound $ do
setProcessPriority 0 maxNice
a
#else
diff --git a/Utility/CoProcess.hs b/Utility/CoProcess.hs
index 332c09d49f..97826ec1e9 100644
--- a/Utility/CoProcess.hs
+++ b/Utility/CoProcess.hs
@@ -65,7 +65,7 @@ query ch send receive = do
restartable s (receive $ coProcessFrom s)
return
where
- restartable s a cont
+ restartable s a cont
| coProcessNumRestarts (coProcessSpec s) > 0 =
maybe restart cont =<< catchMaybeIO a
| otherwise = cont =<< a
@@ -87,7 +87,7 @@ rawMode ch = do
raw $ coProcessTo s
return ch
where
- raw h = do
+ raw h = do
fileEncoding h
#ifdef mingw32_HOST_OS
hSetNewlineMode h noNewlineTranslation
diff --git a/Utility/CopyFile.hs b/Utility/CopyFile.hs
index 6601d0a809..503ab842ae 100644
--- a/Utility/CopyFile.hs
+++ b/Utility/CopyFile.hs
@@ -47,10 +47,10 @@ createLinkOrCopy :: FilePath -> FilePath -> IO Bool
#ifndef mingw32_HOST_OS
createLinkOrCopy src dest = go `catchIO` const fallback
where
- go = do
+ go = do
createLink src dest
return True
- fallback = copyFileExternal CopyAllMetaData src dest
+ fallback = copyFileExternal CopyAllMetaData src dest
#else
createLinkOrCopy = copyFileExternal CopyAllMetaData
#endif
diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs
index 2f0f841797..0615149e5b 100644
--- a/Utility/Daemon.hs
+++ b/Utility/Daemon.hs
@@ -175,7 +175,7 @@ winLockFile pid pidfile = do
cleanstale
return $ prefix ++ show pid ++ suffix
where
- prefix = pidfile ++ "."
+ prefix = pidfile ++ "."
suffix = ".lck"
cleanstale = mapM_ (void . tryIO . removeFile) =<<
(filter iswinlockfile <$> dirContents (parentDir pidfile))
diff --git a/Utility/DataUnits.hs b/Utility/DataUnits.hs
index 7575af21f0..e035b2f867 100644
--- a/Utility/DataUnits.hs
+++ b/Utility/DataUnits.hs
@@ -120,7 +120,7 @@ roughSize units short i
showUnit x (Unit size abbrev name) = s ++ " " ++ unit
where
- v = (fromInteger x :: Double) / fromInteger size
+ v = (fromInteger x :: Double) / fromInteger size
s = showImprecise 2 v
unit
| short = abbrev
diff --git a/Utility/Directory.hs b/Utility/Directory.hs
index a4429d5b96..e4e4b80a75 100644
--- a/Utility/Directory.hs
+++ b/Utility/Directory.hs
@@ -56,7 +56,7 @@ dirContentsRecursive = dirContentsRecursiveSkipping (const False) True
dirContentsRecursiveSkipping :: (FilePath -> Bool) -> Bool -> FilePath -> IO [FilePath]
dirContentsRecursiveSkipping skipdir followsubdirsymlinks topdir = go [topdir]
where
- go [] = return []
+ go [] = return []
go (dir:dirs)
| skipdir (takeFileName dir) = go dirs
| otherwise = unsafeInterleaveIO $ do
@@ -87,7 +87,7 @@ dirContentsRecursiveSkipping skipdir followsubdirsymlinks topdir = go [topdir]
dirTreeRecursiveSkipping :: (FilePath -> Bool) -> FilePath -> IO [FilePath]
dirTreeRecursiveSkipping skipdir topdir = go [] [topdir]
where
- go c [] = return c
+ go c [] = return c
go c (dir:dirs)
| skipdir (takeFileName dir) = go c dirs
| otherwise = unsafeInterleaveIO $ do
diff --git a/Utility/ExternalSHA.hs b/Utility/ExternalSHA.hs
index 595acd8cff..858d04e6a6 100644
--- a/Utility/ExternalSHA.hs
+++ b/Utility/ExternalSHA.hs
@@ -57,7 +57,7 @@ externalSHA command shasize file = do
Left $ "Unexpected character in output of " ++ command ++ "\"" ++ sha ++ "\""
| otherwise = Right sha'
where
- sha' = map toLower sha
+ sha' = map toLower sha
expectedSHALength :: Int -> Int
expectedSHALength 1 = 40
diff --git a/Utility/FileSystemEncoding.hs b/Utility/FileSystemEncoding.hs
index b81fdc5326..fa4b39aa31 100644
--- a/Utility/FileSystemEncoding.hs
+++ b/Utility/FileSystemEncoding.hs
@@ -111,7 +111,7 @@ truncateFilePath :: Int -> FilePath -> FilePath
#ifndef mingw32_HOST_OS
truncateFilePath n = go . reverse
where
- go f =
+ go f =
let bytes = decodeW8 f
in if length bytes <= n
then reverse f
diff --git a/Utility/Format.hs b/Utility/Format.hs
index 2a5ae5c349..78620f9b91 100644
--- a/Utility/Format.hs
+++ b/Utility/Format.hs
@@ -117,7 +117,7 @@ decode_c s = unescape ("", s)
handle (x:'x':n1:n2:rest)
| isescape x && allhex = (fromhex, rest)
where
- allhex = isHexDigit n1 && isHexDigit n2
+ allhex = isHexDigit n1 && isHexDigit n2
fromhex = [chr $ readhex [n1, n2]]
readhex h = Prelude.read $ "0x" ++ h :: Int
handle (x:n1:n2:n3:rest)
diff --git a/Utility/Gpg.hs b/Utility/Gpg.hs
index f9b60f276e..f880e55fa7 100644
--- a/Utility/Gpg.hs
+++ b/Utility/Gpg.hs
@@ -166,7 +166,7 @@ secretKeys :: IO (M.Map KeyId UserId)
secretKeys = catchDefaultIO M.empty makemap
where
makemap = M.fromList . parse . lines <$> readStrict params
- params = [Params "--with-colons --list-secret-keys --fixed-list-mode"]
+ params = [Params "--with-colons --list-secret-keys --fixed-list-mode"]
parse = extract [] Nothing . map (split ":")
extract c (Just keyid) (("uid":_:_:_:_:_:_:_:_:userid:_):rest) =
extract ((keyid, decode_c userid):c) Nothing rest
@@ -196,7 +196,7 @@ genSecretKey keytype passphrase userid keysize =
withHandle StdinHandle createProcessSuccess (proc gpgcmd params) feeder
where
params = ["--batch", "--gen-key"]
- feeder h = do
+ feeder h = do
hPutStr h $ unlines $ catMaybes
[ Just $ "Key-Type: " ++
case keytype of
@@ -232,7 +232,7 @@ genRandom highQuality size = checksize <$> readStrict
randomquality :: Int
randomquality = if highQuality then 2 else 1
- {- The size is the number of bytes of entropy desired; the data is
+ {- The size is the number of bytes of entropy desired; the data is
- base64 encoded, so needs 8 bits to represent every 6 bytes of
- entropy. -}
expectedlength = size * 8 `div` 6
diff --git a/Utility/HumanTime.hs b/Utility/HumanTime.hs
index 2aef1b09ce..4214ea680d 100644
--- a/Utility/HumanTime.hs
+++ b/Utility/HumanTime.hs
@@ -47,8 +47,8 @@ daysToDuration i = Duration $ i * dsecs
parseDuration :: String -> Maybe Duration
parseDuration = Duration <$$> go 0
where
- go n [] = return n
- go n s = do
+ go n [] = return n
+ go n s = do
num <- readish s :: Maybe Integer
case dropWhile isDigit s of
(c:rest) -> do
diff --git a/Utility/InodeCache.hs b/Utility/InodeCache.hs
index 91359457ab..328b775958 100644
--- a/Utility/InodeCache.hs
+++ b/Utility/InodeCache.hs
@@ -182,7 +182,7 @@ checkSentinalFile s = do
SentinalStatus (not unchanged) tsdelta
where
#ifdef mingw32_HOST_OS
- unchanged = oldinode == newinode && oldsize == newsize
+ unchanged = oldinode == newinode && oldsize == newsize
tsdelta = TSDelta $ do
-- Run when generating an InodeCache,
-- to get the current delta.
diff --git a/Utility/Matcher.hs b/Utility/Matcher.hs
index 76f8903f5c..3356bdd073 100644
--- a/Utility/Matcher.hs
+++ b/Utility/Matcher.hs
@@ -90,7 +90,7 @@ tokenGroups :: [Token op] -> [TokenGroup op]
tokenGroups [] = []
tokenGroups (t:ts) = go t
where
- go Open =
+ go Open =
let (gr, rest) = findClose ts
in gr : tokenGroups rest
go Close = tokenGroups ts -- not picky about missing Close
@@ -101,7 +101,7 @@ findClose l =
let (g, rest) = go [] l
in (Group (reverse g), rest)
where
- go c [] = (c, []) -- not picky about extra Close
+ go c [] = (c, []) -- not picky about extra Close
go c (t:ts) = dispatch t
where
dispatch Close = (c, ts)
diff --git a/Utility/Path.hs b/Utility/Path.hs
index 99c9438bfb..9035cbc496 100644
--- a/Utility/Path.hs
+++ b/Utility/Path.hs
@@ -235,11 +235,11 @@ toCygPath p
| null drive = recombine parts
| otherwise = recombine $ "/cygdrive" : driveletter drive : parts
where
- (drive, p') = splitDrive p
+ (drive, p') = splitDrive p
parts = splitDirectories p'
- driveletter = map toLower . takeWhile (/= ':')
+ driveletter = map toLower . takeWhile (/= ':')
recombine = fixtrailing . Posix.joinPath
- fixtrailing s
+ fixtrailing s
| hasTrailingPathSeparator p = Posix.addTrailingPathSeparator s
| otherwise = s
#endif
@@ -272,7 +272,7 @@ fileNameLengthLimit dir = do
sanitizeFilePath :: String -> FilePath
sanitizeFilePath = map sanitize
where
- sanitize c
+ sanitize c
| c == '.' = c
| isSpace c || isPunctuation c || isSymbol c || isControl c || c == '/' = '_'
| otherwise = c
diff --git a/Utility/Quvi.hs b/Utility/Quvi.hs
index 228ff7809c..cf3a23cfd5 100644
--- a/Utility/Quvi.hs
+++ b/Utility/Quvi.hs
@@ -113,7 +113,7 @@ supported Quvi04 url = boolSystem "quvi"
supported Quvi09 url = (firstlevel <&&> secondlevel)
`catchNonAsync` (\_ -> return False)
where
- firstlevel = case uriAuthority =<< parseURIRelaxed url of
+ firstlevel = case uriAuthority =<< parseURIRelaxed url of
Nothing -> return False
Just auth -> do
let domain = map toLower $ uriRegName auth
diff --git a/Utility/Rsync.hs b/Utility/Rsync.hs
index d0a89b2b0c..8dee6093c2 100644
--- a/Utility/Rsync.hs
+++ b/Utility/Rsync.hs
@@ -57,7 +57,7 @@ rsync = boolSystem "rsync" . rsyncParamsFixup
rsyncParamsFixup :: [CommandParam] -> [CommandParam]
rsyncParamsFixup = map fixup
where
- fixup (File f) = File (toCygPath f)
+ fixup (File f) = File (toCygPath f)
fixup p = p
{- Runs rsync, but intercepts its progress output and updates a meter.
diff --git a/Utility/SRV.hs b/Utility/SRV.hs
index f1671758eb..1b86aeb765 100644
--- a/Utility/SRV.hs
+++ b/Utility/SRV.hs
@@ -74,7 +74,7 @@ lookupSRV (SRV srv) = do
maybe [] use r
#endif
where
- use = orderHosts . map tohosts
+ use = orderHosts . map tohosts
tohosts (priority, weight, port, hostname) =
( (priority, weight)
, (B8.toString hostname, PortNumber $ fromIntegral port)
diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs
index 305410c54d..5a14b15f32 100644
--- a/Utility/Scheduled.hs
+++ b/Utility/Scheduled.hs
@@ -96,9 +96,9 @@ calcNextTime schedule@(Schedule recurrance scheduledtime) lasttime currenttime
NextTimeExactly t -> window (localDay t) (localDay t)
| otherwise = NextTimeExactly . startTime <$> findfromtoday False
where
- findfromtoday anytime = findfrom recurrance afterday today
+ findfromtoday anytime = findfrom recurrance afterday today
where
- today = localDay currenttime
+ today = localDay currenttime
afterday = sameaslastrun || toolatetoday
toolatetoday = not anytime && localTimeOfDay currenttime >= nexttime
sameaslastrun = lastrun == Just today
@@ -163,8 +163,8 @@ calcNextTime schedule@(Schedule recurrance scheduledtime) lasttime currenttime
Divisible n r'@(Yearly _) -> handlediv n r' ynum Nothing
Divisible _ r'@(Divisible _ _) -> findfrom r' afterday candidate
where
- skip n = findfrom r False (addDays n candidate)
- handlediv n r' getval mmax
+ skip n = findfrom r False (addDays n candidate)
+ handlediv n r' getval mmax
| n > 0 && maybe True (n <=) mmax =
findfromwhere r' (divisible n . getval) afterday candidate
| otherwise = Nothing
@@ -267,7 +267,7 @@ toRecurrance s = case words s of
constructor u
| "s" `isSuffixOf` u = constructor $ reverse $ drop 1 $ reverse u
| otherwise = Nothing
- withday sd u = do
+ withday sd u = do
c <- constructor u
d <- readish sd
Just $ c (Just d)
@@ -285,7 +285,7 @@ fromScheduledTime AnyTime = "any time"
fromScheduledTime (SpecificTime h m) =
show h' ++ (if m > 0 then ":" ++ pad 2 (show m) else "") ++ " " ++ ampm
where
- pad n s = take (n - length s) (repeat '0') ++ s
+ pad n s = take (n - length s) (repeat '0') ++ s
(h', ampm)
| h == 0 = (12, "AM")
| h < 12 = (h, "AM")
@@ -304,10 +304,10 @@ toScheduledTime v = case words v of
(s:[]) -> go s id
_ -> Nothing
where
- h0 h
+ h0 h
| h == 12 = 0
| otherwise = h
- go :: String -> (Int -> Int) -> Maybe ScheduledTime
+ go :: String -> (Int -> Int) -> Maybe ScheduledTime
go s adjust =
let (h, m) = separate (== ':') s
in SpecificTime
@@ -363,7 +363,7 @@ instance Arbitrary Recurrance where
]
]
where
- arbday = oneof
+ arbday = oneof
[ Just <$> nonNegative arbitrary
, pure Nothing
]
diff --git a/Utility/SshConfig.hs b/Utility/SshConfig.hs
index 529e5c9903..e45d09acd2 100644
--- a/Utility/SshConfig.hs
+++ b/Utility/SshConfig.hs
@@ -56,7 +56,7 @@ parseSshConfig = go [] . lines
| iscomment l = hoststanza host c ((Left $ mkcomment l):hc) ls
| otherwise = case splitline l of
(indent, k, v)
- | isHost k -> hoststanza v
+ | isHost k -> hoststanza v
(HostConfig host (reverse hc):c) [] ls
| otherwise -> hoststanza host c
((Right $ SshSetting indent k v):hc) ls
@@ -87,7 +87,7 @@ genSshConfig = unlines . concatMap gen
findHostConfigKey :: SshConfig -> Key -> Maybe Value
findHostConfigKey (HostConfig _ cs) wantk = go (rights cs) (map toLower wantk)
where
- go [] _ = Nothing
+ go [] _ = Nothing
go ((SshSetting _ k v):rest) wantk'
| map toLower k == wantk' = Just v
| otherwise = go rest wantk'
@@ -98,7 +98,7 @@ addToHostConfig :: SshConfig -> Key -> Value -> SshConfig
addToHostConfig (HostConfig host cs) k v =
HostConfig host $ Right (SshSetting indent k v) : cs
where
- {- The indent is taken from any existing SshSetting
+ {- The indent is taken from any existing SshSetting
- in the HostConfig (largest indent wins). -}
indent = fromMaybe "\t" $ headMaybe $ reverse $
sortBy (comparing length) $ map getindent cs
diff --git a/Utility/TList.hs b/Utility/TList.hs
index 4b91b767fa..5532cdce5e 100644
--- a/Utility/TList.hs
+++ b/Utility/TList.hs
@@ -57,7 +57,7 @@ modifyTList tlist a = do
unless (emptyDList dl') $
putTMVar tlist dl'
where
- emptyDList = D.list True (\_ _ -> False)
+ emptyDList = D.list True (\_ _ -> False)
consTList :: TList a -> a -> STM ()
consTList tlist v = modifyTList tlist $ \dl -> D.cons v dl
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs
index 6bcfce9196..6c42e103b8 100644
--- a/Utility/WebApp.hs
+++ b/Utility/WebApp.hs
@@ -117,7 +117,7 @@ getSocket h = do
when (isJust h) $
error "getSocket with HostName not supported on this OS"
addr <- inet_addr "127.0.0.1"
- sock <- socket AF_INET Stream defaultProtocol
+ sock <- socket AF_INET Stream defaultProtocol
preparesocket sock
bindSocket sock (SockAddrInet aNY_PORT addr)
use sock
diff --git a/doc/design/requests_routing/simroutes.hs b/doc/design/requests_routing/simroutes.hs
index d911259354..3918160405 100644
--- a/doc/design/requests_routing/simroutes.hs
+++ b/doc/design/requests_routing/simroutes.hs
@@ -182,7 +182,7 @@ merge (ImmobileNode ir) t@(TransferNode { transferrepo = tr }) =
, satisfiedRequests = satisfiedRequests' `S.union` checkSatisfied wantFiles' haveFiles'
}
where
- wantFiles' = foldr addRequest (wantFiles r1) (wantFiles r2)
+ wantFiles' = foldr addRequest (wantFiles r1) (wantFiles r2)
haveFiles' = S.foldr (addFile wantFiles' satisfiedRequests') (haveFiles r1) (haveFiles r2)
satisfiedRequests' = satisfiedRequests r1 `S.union` satisfiedRequests r2
@@ -229,7 +229,7 @@ emptyImmobile = ImmobileNode (NodeRepo [] S.empty S.empty)
mkTransfer :: (RandomGen g) => [NodeName] -> Rand g TransferNode
mkTransfer immobiles = do
- -- Transfer nodes are given random routes. May be simplistic.
+ -- Transfer nodes are given random routes. May be simplistic.
-- Also, some immobile nodes will not be serviced by any transfer nodes.
numpossiblelocs <- getRandomR transferDestinationsRange
possiblelocs <- sequence (replicate numpossiblelocs (randomfrom immobiles))
@@ -283,7 +283,7 @@ summarize _initial@(Network origis _) _final@(Network is _ts) = format
--, ("Immobile nodes at end", show is)
]
where
- findoriginreqs = filter (\r -> requestTTL r == originTTL)
+ findoriginreqs = filter (\r -> requestTTL r == originTTL)
findunsatisfied r =
let wantedfs = S.fromList $ map requestedFile (findoriginreqs (wantFiles r))
in S.difference wantedfs (haveFiles r)