purescript-contrib/purescript-arraybuffer

why does `fromArray` take an `Array Number` argument instead of `Array Int`?

matthewleon opened this issue · 2 comments

My apologies for the many questions, I'm just getting started with this lib and some of the design choices aren't obvious to me.

The fromArray implementation uses a Uint8Array for conversion, which seemingly would have less surprising behavior if it were reading from an Array Int rather than an Array Number, no?

No worries, I still have serious doubts about some parts of this library.

fromArray predates Int in PS that's the why :)
There's also toArray and toIntArray, so I guess we could add fromIntArray to avoid bumping major.

Added fromIntArray in 7.0.0.