binary
binary copied to clipboard
Efficient, pure binary serialisation using ByteStrings in Haskell.
99% of the time, I see developers trying to use `fail` to throw an error in the same way `error` does, but `fail` means "early termination of a monad", not...
Available from `Data.Tuple` in `base-4.16` (GHC-9.2) and `ghc-prim`'s `GHC.Tuple` (GHC-9.0) cc @treeowl
I think the examples highlight what this wrapper is supposed to accomplish. ``` -- Simple usage with DerivingVia: data Foo = Foo Int String deriving Generic deriving Binary via GenericBinary...
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.10.3 bash-3.2$ cabal install binary --lib Resolving dependencies... cabal: Could not resolve dependencies: [__0] trying: binary-0.8.8.0/installed-0.8.8.0 (user goal) [__1] next...
Do not merge this unless `BoxedRep` is approved.
I was starting with: ``` data Variable = Variable { length :: !Word32, var :: !ByteString, tree :: !Word8 } deriving (Generic, Binary, Show) ``` but I need the `var`...
There are several types from `primitive` that would benefit from having instances: `ByteArray`, `Array`, `SmallArray`, `PrimArray`, `UnliftedArray`. I can add these. It will cause the library to pick up a...
Word8 is used to store the constructor. While this is big enough to store the constructors, the size parameter of getSum and putSum will wrap to zero. We get this...
Hi, I need a MonadFix instance for the Put monad so I can use the length of an expressions output as a parameter to construct the expression (for example, to...
There is no way to get out `Put a -> (a, Builder)` in a single call. This is also a wart in the design of `cereal`. This seems to be...