@@ -3,12 +3,12 @@
3[](https://github.com/jamesdbrock/purescript-parsing-dataview/actions)
3[](https://github.com/jamesdbrock/purescript-parsing-dataview/actions)
4[](http://pursuit.purescript.org/packages/purescript-parsing-dataview/)
4[](http://pursuit.purescript.org/packages/purescript-parsing-dataview/)
6−The module `Text.Parsing.Parser.DataView` provides primitive parsers for parsing
6+Primitive parsers for parsing
7−DataViews on Javascript ArrayBuffers with the package
7+`DataView`s on Javascript `ArrayBuffer`s with the package
8[__purescript-parsing__](https://pursuit.purescript.org/packages/purescript-parsing/).
8[__purescript-parsing__](https://pursuit.purescript.org/packages/purescript-parsing/).
10−This module brings the input stream support of __purescript-parsing__ to be
10+With this package, the input stream support of __purescript-parsing__
11−able to roughly match the built-in stream support of __Megaparsec__:
11+roughly matches the built-in stream support of __Megaparsec__:
13| Stream type | purescript-parsing | Megaparsec |
13| Stream type | purescript-parsing | Megaparsec |
14|----|-----|----|
14|----|-----|----|
@@ -16,6 +16,10 @@ able to roughly match the built-in stream support of __Megaparsec__:
16| Listy strings | Token | String |
16| Listy strings | Token | String |
17| Binary blobs | __Text.Parsing.Parser.DataView__ | ByteString |
17| Binary blobs | __Text.Parsing.Parser.DataView__ | ByteString |
19+Perhaps some day this package can be
20+[merged into __purescript-parsing__](https://github.com/purescript-contrib/purescript-parsing/issues/88),
21+but for now it has too many non-*purescript-contrib* dependencies.
19## Usage examples
23## Usage examples
21Parse values out of a `dataview :: Data.ArrayBuffer.Types.DataView`. All
25Parse values out of a `dataview :: Data.ArrayBuffer.Types.DataView`. All
@@ -74,7 +78,7 @@ where
74 let buffer = Data.ArrayBuffer.DataView.buffer dv
78 let buffer = Data.ArrayBuffer.DataView.buffer dv
75 byteOffset = Data.ArrayBuffer.DataView.byteOffset dv
79 byteOffset = Data.ArrayBuffer.DataView.byteOffset dv
76 byteLength = Data.ArrayBuffer.DataView.byteLength dv
80 byteLength = Data.ArrayBuffer.DataView.byteLength dv
77− pure $ Data.ArrayBuffer.Typed.part buffer byteOffset byteLength
81+ Data.ArrayBuffer.Typed.part buffer byteOffset byteLength
80## Serialization
84## Serialization