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.
This commit is contained in:
Joey Hess 2014-10-09 14:53:13 -04:00
parent 8f69d55f03
commit 7b50b3c057
131 changed files with 242 additions and 242 deletions

View file

@ -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>>>"

View file

@ -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

View file

@ -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

View file

@ -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)