@@ -1,5 +1,5 @@
1−-- | Primitive parsers for JavaScript `ArrayBuffer`s with the
2−-- | `ParserT` type and combinators in package __purescript-parsing__.
1+-- | Primitive parsers for input `DataView`s with the
2+-- | `ParserT` type and combinators in package __parsing__.
33-- | See the package README for usage examples.
44-- |
55-- | ### Mutable ArrayBuffer
@@ -9,10 +9,10 @@
99-- | which represents a range of a mutable
1010-- | [__Data.ArrayBuffer.Types.ArrayBuffer__](https://pursuit.purescript.org/packages/purescript-arraybuffer-types/docs/Data.ArrayBuffer.Types#t:ArrayBuffer).
1111-- |
12−-- | For operations for working with `ArrayBuffer` and `DataView`, see
12+-- | For operations for working with `DataView`, see
1313-- | module
1414-- | [__Data.ArrayBuffer.DataView__](https://pursuit.purescript.org/packages/purescript-arraybuffer/docs/Data.ArrayBuffer.DataView)
15−-- | in package __purescript-arraybuffer__.
15+-- | in package __arraybuffer__.
1616-- |
1717-- | Reading from an `ArrayBuffer` is an `Effect`ful activity, so
1818-- | all parsers in this module must be run in a
@@ -257,8 +257,8 @@ takeN :: forall m. MonadEffect m => ByteLength -> ParserT DataView m DataView
257257takeN n = do
258258 ParseState input (Position { index }) _ <- getParserT
259259 if (n < 0) then
260− fail $ "takeN cannot take negative number of bytes"
261− else if (index + n + 1 > DV.byteLength input) then
260+ fail "takeN cannot take negative number of bytes"
261+ else if (index + n > DV.byteLength input) then
262262 fail "takeN expected N bytes"
263263 else do
264264 p <- lift $ liftEffect $ DV.part (DV.buffer input) (DV.byteOffset input + index) n