git.iko.soy/rowtype-yoga/purescript-arraybuffer-builder
on master help sign in
packaging
0c7dc15James Brock
shell.nix+1
@@ -15,5 +15,6 @@ pkgs.mkShell {
15 easy-ps.purs-0_13_8
15 easy-ps.purs-0_13_8
16 easy-ps.psc-package
16 easy-ps.psc-package
17 easy-ps.spago
17 easy-ps.spago
18+ pkgs.nodePackages.bower
18 ];
19 ];
19}
20}
spago.dhall+2−2
@@ -1,6 +1,4 @@
1{-
1{-
2−Welcome to a Spago project!
3−You can edit this file as you like.
4-}
2-}
5{ name = "purescript-arraybuffer-builder"
3{ name = "purescript-arraybuffer-builder"
6, dependencies =
4, dependencies =
@@ -9,4 +7,6 @@ You can edit this file as you like.
9 ]
7 ]
10, packages = ./packages.dhall
8, packages = ./packages.dhall
11, sources = [ "src/**/*.purs", "test/**/*.purs" ]
9, sources = [ "src/**/*.purs", "test/**/*.purs" ]
10+, license = "MIT"
11+, repository = "https://github.com/jamesdbrock/purescript-arraybuffer-builder"
12}
12}
src/Data/ArrayBuffer/Builder.purs+11−6
@@ -5,10 +5,16 @@
5-- | [`Data.Binary.Put`](https://hackage.haskell.org/package/binary/docs/Data-Binary-Put.html)
5-- | [`Data.Binary.Put`](https://hackage.haskell.org/package/binary/docs/Data-Binary-Put.html)
6-- | module.
6-- | module.
7-- |
7-- |
8−-- | This library defines no typeclasses.
8+-- | This library defines no typeclasses. Typeclass-based
9+-- | serialization/deserialization generally assumes that we are round-tripping
10+-- | some data structures out to storage and then back into our program.
11+-- | This library is designed for the case that we are serializing some data
12+-- | to be sent to another program which expects a certain serialization format
13+-- | that we don't control.
9-- |
14-- |
10-- | ## Deserialization
15-- | ## Deserialization
11-- |
16-- |
17+-- | This module is only for writing `ArrayBuffer`s, not reading them.
12-- | See
18-- | See
13-- | [__purescript-parsing-dataview__](https://pursuit.purescript.org/packages/purescript-parsing-dataview/)
19-- | [__purescript-parsing-dataview__](https://pursuit.purescript.org/packages/purescript-parsing-dataview/)
14-- | for a way to deserialize from `ArrayBuffer` back to Purescript data.
20-- | for a way to deserialize from `ArrayBuffer` back to Purescript data.
@@ -440,11 +446,6 @@ putFloat64le = putArrayBuffer <=< encodeFloat64le
440-- | We hope that this implementation is fairly fast, but we
446-- | We hope that this implementation is fairly fast, but we
441-- | haven't chosen this implementation because it's fast, we've chosen
447-- | haven't chosen this implementation because it's fast, we've chosen
442-- | this implementation because it's simple.
448-- | this implementation because it's simple.
443−-- | The only currently existing Purescript libary which does ArrayBuffer
444−-- | serialization is
445−-- | https://pursuit.purescript.org/packages/purescript-arraybuffer-class
446−-- | , and that library is heavily typeclass-based and designed
447−-- | for compatibility with the Haskell cereal library.
448-- | If someone wants to create a fast Purescript ArrayBuffer serialization
449-- | If someone wants to create a fast Purescript ArrayBuffer serialization
449-- | library, then they can benchmark against this one to prove that the new
450-- | library, then they can benchmark against this one to prove that the new
450-- | one is fast.
451-- | one is fast.
@@ -461,3 +462,7 @@ putFloat64le = putArrayBuffer <=< encodeFloat64le
461-- |
462-- |
462-- | We've tried to design the API for this library with minimal assumptions,
463-- | We've tried to design the API for this library with minimal assumptions,
463-- | so that if we want to change the Builder implementation later then we can.
464-- | so that if we want to change the Builder implementation later then we can.
465+-- |
466+-- | Alternatives
467+-- | https://pursuit.purescript.org/packages/purescript-node-buffer
468+-- | https://pursuit.purescript.org/packages/purescript-arraybuffer-class