Skip to content

Commit ff799d0

Browse files
committed
Don't export Typed.part'
1 parent 051d43b commit ff799d0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5-
## v11.0.0 [Unreleased]
5+
## v11.0.0
66

77
Jorge Acereda has graciously donated this package to __purescript-contrib__.
8+
89
For version 11, we have refactored this library so that it depends only on
910
other packages in __purescript-contrib__.
1011

@@ -25,3 +26,5 @@ to the type declarations in your own dependent code:
2526
* Replace the type `AProxy` with `Proxy` from the Prelude.
2627
* Remove most of the `Nat` typeclass constraints. https://github.com/purescript-contrib/purescript-arraybuffer/issues/29
2728
* Replace any `BytesPerValue a b` typeclass constraints with `BytesPerType a`.
29+
30+
We have also privatized `Typed.part'`. https://github.com/purescript-contrib/purescript-arraybuffer/issues/32

src/Data/ArrayBuffer/Typed.purs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module Data.ArrayBuffer.Typed
3434
, buffer, byteOffset, byteLength, length
3535
, compare, eq
3636
, class TypedArray
37-
, create, whole, remainder, part, part', empty, fromArray
37+
, create, whole, remainder, part, empty, fromArray
3838
, fill, set, setTyped, copyWithin
3939
, map, traverse, traverse_, filter
4040
, mapWithIndex, traverseWithIndex, traverseWithIndex_, filterWithIndex
@@ -137,6 +137,8 @@ part :: forall a t. TypedArray a t => BytesPerType a => ArrayBuffer -> Index ->
137137
part a x y = part' a o y
138138
where o = x * byteWidth (Proxy :: Proxy a)
139139

140+
-- | The ByteOffset must be aligned.
141+
-- | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#byteoffset_must_be_aligned
140142
part' :: forall a t. TypedArray a t => ArrayBuffer -> ByteOffset -> Length -> Effect (ArrayView a)
141143
part' a x y = runEffectFn3 create a (notNull x) (notNull y)
142144

0 commit comments

Comments
 (0)