Skip to content

Commit c43104f

Browse files
committed
Apply same treatment to unsafeSlice
1 parent a60a1b2 commit c43104f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

vector/src/Data/Vector/Generic.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ unsafeSlice :: Vector v a => Int -- ^ @i@ starting index
457457
-> v a
458458
-> v a
459459
{-# INLINE_FUSED unsafeSlice #-}
460-
unsafeSlice i n v = checkSlice Unsafe i n (length v) $ basicUnsafeSlice i n v
460+
unsafeSlice !i !n v = checkSlice Unsafe i n (length v) $ basicUnsafeSlice i n v
461461

462462
-- | /O(1)/ Yield all but the last element without copying. The vector may not
463463
-- be empty, but this is not checked.

vector/src/Data/Vector/Generic/Mutable.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ unsafeSlice :: MVector v a => Int -- ^ starting index
425425
-> v s a
426426
-> v s a
427427
{-# INLINE unsafeSlice #-}
428-
unsafeSlice i n v = checkSlice Unsafe i n (length v)
429-
$ basicUnsafeSlice i n v
428+
unsafeSlice !i !n v = checkSlice Unsafe i n (length v)
429+
$ basicUnsafeSlice i n v
430430

431431
-- | Same as 'init', but doesn't do range checks.
432432
unsafeInit :: MVector v a => v s a -> v s a

0 commit comments

Comments
 (0)