rename a variable
This commit is contained in:
parent
b8412f8e52
commit
fff25999c9
1 changed files with 3 additions and 3 deletions
|
@ -28,12 +28,12 @@ parseBody = uncurry Vector.fromListN <$> go where
|
||||||
parseChunk :: Parser Chunk
|
parseChunk :: Parser Chunk
|
||||||
parseChunk = do
|
parseChunk = do
|
||||||
offset <- parseWord24
|
offset <- parseWord24
|
||||||
size₀ <- parseWord16
|
size <- parseWord16
|
||||||
body <-
|
body <-
|
||||||
if size₀ == 0 then
|
if size == 0 then
|
||||||
liftA2 RLE parseWord16 Parse.anyWord8
|
liftA2 RLE parseWord16 Parse.anyWord8
|
||||||
else
|
else
|
||||||
Normal . makeBytes <$> Parse.take (fromIntegral size₀)
|
Normal . makeBytes <$> Parse.take (fromIntegral size)
|
||||||
pure $ Chunk {offset, body}
|
pure $ Chunk {offset, body}
|
||||||
|
|
||||||
parseWord16 :: Parser Word16
|
parseWord16 :: Parser Word16
|
||||||
|
|
Loading…
Reference in a new issue