Skip to content

Commit 1f4f778

Browse files
committed
Make the Linter happy
1 parent aab476c commit 1f4f778

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/HiFileParser.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@ import Data.Bits (FiniteBits(..),testBit,
4444
import Control.Monad.State
4545
import qualified Debug.Trace
4646

47-
data IfaceGetState = IfaceGetState
47+
newtype IfaceGetState = IfaceGetState
4848
{ useLEB128 :: Bool -- ^ Use LEB128 encoding for numbers
4949
}
5050

5151
type Get a = StateT IfaceGetState G.Get a
5252

53-
enable_debug :: Bool
54-
enable_debug = False
53+
enableDebug :: Bool
54+
enableDebug = False
5555

5656
traceGet :: String -> Get ()
5757
traceGet s
58-
| enable_debug = Debug.Trace.trace s (return ())
58+
| enableDebug = Debug.Trace.trace s (return ())
5959
| otherwise = return ()
6060

6161
traceShow :: Show a => String -> Get a -> Get a
6262
traceShow s g
63-
| not enable_debug = g
63+
| not enableDebug = g
6464
| otherwise = do
6565
a <- g
6666
traceGet (s ++ " " ++ show a)
@@ -187,7 +187,7 @@ getDictionary ptr = do
187187
return dict
188188

189189
getCachedBS :: Dictionary -> Get ByteString
190-
getCachedBS d = go =<< (traceShow "Dict index:" getWord32be)
190+
getCachedBS d = go =<< traceShow "Dict index:" getWord32be
191191
where
192192
go i =
193193
case unDictionary d V.!? fromIntegral i of
@@ -609,7 +609,7 @@ getULEB128 =
609609
go shift w = do
610610
b <- getWord8
611611
let !hasMore = testBit b 7
612-
let !val = w .|. ((clearBit (fromIntegral b) 7) `unsafeShiftL` shift) :: a
612+
let !val = w .|. (clearBit (fromIntegral b) 7 `unsafeShiftL` shift) :: a
613613
if hasMore
614614
then do
615615
go (shift+7) val
@@ -631,7 +631,7 @@ getSLEB128 = do
631631
let !more = testBit byte 7
632632
let !shift' = shift+7
633633
if more
634-
then go (shift') val'
634+
then go shift' val'
635635
else do
636636
let !signed = testBit byte 6
637637
return (val',shift',signed)

0 commit comments

Comments
 (0)