git.iko.soy/rowtype-yoga/purescript-parsing-dataview
on master help sign in
docs
commit83d29e7d3551ac26ba532942253ac27680897572 authorJames Brock <jamesbrock@gmail.com> dateMon 27 Jul 2020, 23:58 (6 years ago) parent2651a98
1 file changed+9−5
README.md+9−5
README.md+9−5
@@ -3,12 +3,12 @@
33[![CI](https://github.com/jamesdbrock/purescript-parsing-dataview/workflows/CI/badge.svg?branch=master)](https://github.com/jamesdbrock/purescript-parsing-dataview/actions)
44[![Pursuit](http://pursuit.purescript.org/packages/purescript-parsing-dataview/badge)](http://pursuit.purescript.org/packages/purescript-parsing-dataview/)
55
6−The module `Text.Parsing.Parser.DataView` provides primitive parsers for parsing
7−DataViews on Javascript ArrayBuffers with the package
6+Primitive parsers for parsing
7+`DataView`s on Javascript `ArrayBuffer`s with the package
88[__purescript-parsing__](https://pursuit.purescript.org/packages/purescript-parsing/).
99
10−This module brings the input stream support of __purescript-parsing__ to be
11−able to roughly match the built-in stream support of __Megaparsec__:
10+With this package, the input stream support of __purescript-parsing__
11+roughly matches the built-in stream support of __Megaparsec__:
1212
1313| Stream type | purescript-parsing | Megaparsec |
1414|----|-----|----|
@@ -16,6 +16,10 @@ able to roughly match the built-in stream support of __Megaparsec__:
1616| Listy strings | Token | String |
1717| Binary blobs | __Text.Parsing.Parser.DataView__ | ByteString |
1818
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.
22+
1923## Usage examples
2024
2125Parse values out of a `dataview :: Data.ArrayBuffer.Types.DataView`. All
@@ -74,7 +78,7 @@ where
7478 let buffer = Data.ArrayBuffer.DataView.buffer dv
7579 byteOffset = Data.ArrayBuffer.DataView.byteOffset dv
7680 byteLength = Data.ArrayBuffer.DataView.byteLength dv
77− pure $ Data.ArrayBuffer.Typed.part buffer byteOffset byteLength
81+ Data.ArrayBuffer.Typed.part buffer byteOffset byteLength
7882```
7983
8084## Serialization