git.iko.soy/rowtype-yoga/purescript-arraybuffer-builder
on master help sign in
packaging
commit0c7dc154d5f8bdcb1deb50d469183c288ed24d9f authorJames Brock <jamesbrock@gmail.com> dateSun 26 Jul 2020, 22:42 (6 years ago) parentd0b8760
3 files changed+14−8
shell.nix+1 spago.dhall+2−2 src/Data/ArrayBuffer/Builder.purs+11−6
shell.nix+1
@@ -15,5 +15,6 @@ pkgs.mkShell {
1515 easy-ps.purs-0_13_8
1616 easy-ps.psc-package
1717 easy-ps.spago
18+ pkgs.nodePackages.bower
1819 ];
1920}
spago.dhall+2−2
@@ -1,6 +1,4 @@
11{-
2−Welcome to a Spago project!
3−You can edit this file as you like.
42-}
53{ name = "purescript-arraybuffer-builder"
64, dependencies =
@@ -9,4 +7,6 @@ You can edit this file as you like.
97 ]
108, packages = ./packages.dhall
119, sources = [ "src/**/*.purs", "test/**/*.purs" ]
10+, license = "MIT"
11+, repository = "https://github.com/jamesdbrock/purescript-arraybuffer-builder"
1212}
src/Data/ArrayBuffer/Builder.purs+11−6
@@ -5,10 +5,16 @@
55-- | [`Data.Binary.Put`](https://hackage.haskell.org/package/binary/docs/Data-Binary-Put.html)
66-- | module.
77-- |
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.
914-- |
1015-- | ## Deserialization
1116-- |
17+-- | This module is only for writing `ArrayBuffer`s, not reading them.
1218-- | See
1319-- | [__purescript-parsing-dataview__](https://pursuit.purescript.org/packages/purescript-parsing-dataview/)
1420-- | for a way to deserialize from `ArrayBuffer` back to Purescript data.
@@ -440,11 +446,6 @@ putFloat64le = putArrayBuffer <=< encodeFloat64le
440446-- | We hope that this implementation is fairly fast, but we
441447-- | haven't chosen this implementation because it's fast, we've chosen
442448-- | 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.
448449-- | If someone wants to create a fast Purescript ArrayBuffer serialization
449450-- | library, then they can benchmark against this one to prove that the new
450451-- | one is fast.
@@ -461,3 +462,7 @@ putFloat64le = putArrayBuffer <=< encodeFloat64le
461462-- |
462463-- | We've tried to design the API for this library with minimal assumptions,
463464-- | 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