From a26b7127d4cc8b2a5e15ef662ab2793dbf9e7919 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 9 Oct 2014 14:53:13 -0400 Subject: 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. --- Logs/FsckResults.hs | 2 +- Logs/MetaData.hs | 2 +- Logs/Schedule.hs | 2 +- Logs/Transitions.hs | 6 +++--- Logs/Web.hs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Logs') diff --git a/Logs/FsckResults.hs b/Logs/FsckResults.hs index 619dd586c..23367a3d3 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 250317090..d63a87470 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 1d78467bb..540667059 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 64e9d3344..15ea32401 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 ede600ec2..1d16e10b3 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 -- cgit v1.2.3