Skip to content

Commit 887a5f8

Browse files
committed
Fixed warnings in Data/Vector/Primitive/Mutable.hs
- Data.Vector.Internal.Check was unused - Removed unused variable bindings
1 parent d18ca03 commit 887a5f8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Data/Vector/Primitive/Mutable.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ import Prelude hiding ( length, null, replicate, reverse, map, read,
6262

6363
import Data.Typeable ( Typeable )
6464

65+
-- Data.Vector.Internal.Check is unnecessary
66+
#define NOT_VECTOR_MODULE
6567
#include "vector.h"
6668

6769
-- | Mutable vectors of primitive types.
@@ -77,7 +79,7 @@ instance NFData (MVector s a)
7779

7880
instance Prim a => G.MVector MVector a where
7981
basicLength (MVector _ n _) = n
80-
basicUnsafeSlice j m (MVector i n arr)
82+
basicUnsafeSlice j m (MVector i _ arr)
8183
= MVector (i+j) m arr
8284

8385
{-# INLINE basicOverlaps #-}
@@ -92,10 +94,10 @@ instance Prim a => G.MVector MVector a where
9294
`liftM` newByteArray (n * sizeOf (undefined :: a))
9395

9496
{-# INLINE basicUnsafeRead #-}
95-
basicUnsafeRead (MVector i n arr) j = readByteArray arr (i+j)
97+
basicUnsafeRead (MVector i _ arr) j = readByteArray arr (i+j)
9698

9799
{-# INLINE basicUnsafeWrite #-}
98-
basicUnsafeWrite (MVector i n arr) j x = writeByteArray arr (i+j) x
100+
basicUnsafeWrite (MVector i _ arr) j x = writeByteArray arr (i+j) x
99101

100102
{-# INLINE basicUnsafeCopy #-}
101103
basicUnsafeCopy (MVector i n dst) (MVector j _ src)

0 commit comments

Comments
 (0)