Commit e199891f authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

Avoid trivial cases of NondecreasingIndentation

This cleanup allows the following refactoring commit to avoid adding a
few `{-# LANGUAGE NondecreasingIndentation #-}` pragmas.
Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
parent 2dd80f69
......@@ -1002,8 +1002,8 @@ genMachOp _ op [x] = case op of
sameConv from ty reduce expand = do
x'@(vx, stmts, top) <- exprToVar x
let sameConv' op = do
(v1, s1) <- doExpr ty $ Cast op vx ty
return (v1, stmts `snocOL` s1, top)
(v1, s1) <- doExpr ty $ Cast op vx ty
return (v1, stmts `snocOL` s1, top)
dflags <- getDynFlags
let toWidth = llvmWidthInBits dflags ty
-- LLVM doesn't like trying to convert to same width, so
......
......@@ -185,8 +185,8 @@ lazyGetToks dflags filename handle = do
-- large module names (#5981)
nextbuf <- hGetStringBufferBlock handle new_size
if (len nextbuf == 0) then lazyLexBuf handle state True new_size else do
newbuf <- appendStringBuffers (buffer state) nextbuf
unsafeInterleaveIO $ lazyLexBuf handle state{buffer=newbuf} False new_size
newbuf <- appendStringBuffers (buffer state) nextbuf
unsafeInterleaveIO $ lazyLexBuf handle state{buffer=newbuf} False new_size
getToks :: DynFlags -> FilePath -> StringBuffer -> [Located Token]
......
......@@ -707,14 +707,13 @@ getBS bh = do
l <- get bh
fp <- mallocForeignPtrBytes l
withForeignPtr fp $ \ptr -> do
let
go n | n == l = return $ BS.fromForeignPtr fp 0 l
let go n | n == l = return $ BS.fromForeignPtr fp 0 l
| otherwise = do
b <- getByte bh
pokeElemOff ptr n b
go (n+1)
--
go 0
--
go 0
instance Binary ByteString where
put_ bh f = putBS bh f
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment