diff options
author | Joey Hess <joey@kitenet.net> | 2014-10-09 14:53:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-10-09 15:09:11 -0400 |
commit | a26b7127d4cc8b2a5e15ef662ab2793dbf9e7919 (patch) | |
tree | 95fb3ff9231bffe68f99b02d872ee308b40d0bc8 /Build | |
parent | be9989b76db21772118f8893ea00d22b6365d301 (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.
Diffstat (limited to 'Build')
-rw-r--r-- | Build/EvilLinker.hs | 10 | ||||
-rw-r--r-- | Build/EvilSplicer.hs | 22 | ||||
-rw-r--r-- | Build/NullSoftInstaller.hs | 2 | ||||
-rw-r--r-- | Build/OSXMkLibs.hs | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/Build/EvilLinker.hs b/Build/EvilLinker.hs index cf0f771e5..e2921cc8c 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 648d631b5..fc41c624f 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 b8fc82605..22d3caf36 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 5640e4d36..ef668bb4a 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) |