Skip to content

Commit

Permalink
Fix name shadowing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
noughtmare committed Mar 5, 2022
1 parent a04d938 commit 2ef63df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Data/ByteString/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -340,16 +340,16 @@ packChars cs = unsafePackLenChars (List.length cs) cs

unsafePackLenBytes :: Int -> [Word8] -> ByteString
unsafePackLenBytes len xs =
unsafeCreate len $ \p -> foldr
unsafeCreate len $ \p0 -> foldr
(\x go p -> poke p x >> go (p `plusPtr` 1))
(\_ -> return ()) xs p
(\_ -> return ()) xs p0
{-# INLINE unsafePackLenBytes #-}

unsafePackLenChars :: Int -> [Char] -> ByteString
unsafePackLenChars len cs =
unsafeCreate len $ \p -> foldr
unsafeCreate len $ \p0 -> foldr
(\x go p -> poke p (c2w x) >> go (p `plusPtr` 1))
(\_ -> return ()) cs p
(\_ -> return ()) cs p0
{-# INLINE unsafePackLenChars #-}


Expand Down

0 comments on commit 2ef63df

Please sign in to comment.