Skip to content

Commit 4968226

Browse files
committed
Saturate arguments for run(Effect)FnX
1 parent fde881b commit 4968226

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Data/ArrayBuffer/Typed.purs

+5-5
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ elem x mo a = runFn3 includesImpl a x (toNullable mo)
270270

271271
-- | Fetch element at index.
272272
unsafeAt :: forall a t. TypedArray a t => Partial => ArrayView a -> Offset -> t
273-
unsafeAt = runFn2 unsafeAtImpl
273+
unsafeAt a o = runFn2 unsafeAtImpl a o
274274

275275
-- | Folding from the left
276276
foldlM :: forall a t b. TypedArray a t => (b -> t -> Offset -> Effect b) -> b -> ArrayView a -> Effect b
@@ -350,7 +350,7 @@ foreign import reverseImpl :: forall a. EffectFn1 (ArrayView a) Unit
350350

351351
-- | Reverses a typed array in-place.
352352
reverse :: forall a. ArrayView a -> Effect Unit
353-
reverse = runEffectFn1 reverseImpl
353+
reverse a = runEffectFn1 reverseImpl a
354354

355355
foreign import setImpl :: forall a b. EffectFn3 (ArrayView a) Offset b Unit
356356

@@ -380,7 +380,7 @@ foreign import sortImpl :: forall a. EffectFn1 (ArrayView a) Unit
380380

381381
-- | Sorts the values in-place
382382
sort :: forall a. ArrayView a -> Effect Unit
383-
sort = runEffectFn1 sortImpl
383+
sort a = runEffectFn1 sortImpl a
384384

385385

386386
foreign import subArrayImpl :: forall a. Fn3 (ArrayView a) (Nullable Offset) (Nullable Offset) (ArrayView a)
@@ -404,7 +404,7 @@ foreign import joinImpl :: forall a. Fn2 (ArrayView a) String String
404404

405405
-- | Prints array to a delimiter-separated string - see [MDN's spec](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) for details.
406406
toString' :: forall a. ArrayView a -> String -> String
407-
toString' = runFn2 joinImpl
407+
toString' a s = runFn2 joinImpl a s
408408

409409

410410
foreign import unsafeAtImpl :: forall a b. Fn2 (ArrayView a) Offset b
@@ -413,7 +413,7 @@ foreign import hasIndexImpl :: forall a. Fn2 (ArrayView a) Offset Boolean
413413

414414
-- | Determine if a certain index is valid.
415415
hasIndex :: forall a. ArrayView a -> Offset -> Boolean
416-
hasIndex = runFn2 hasIndexImpl
416+
hasIndex a o = runFn2 hasIndexImpl a o
417417

418418
-- | Fetch element at index.
419419
at :: forall a t. TypedArray a t => ArrayView a -> Offset -> Maybe t

0 commit comments

Comments
 (0)