| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
H2JVM.Internal.Binary.Write
Description
Utilities for writing binary data.
Synopsis
- class WriteBinary a where
- writeBinary :: a -> Put
- writeList :: (WriteBinary a, Integral i, Foldable t, HasCallStack, TryFrom Int i) => (i -> Put) -> t a -> Put
Documentation
class WriteBinary a where Source #
Like Binary but only supporting writing
Methods
writeBinary :: a -> Put Source #
Instances
Arguments
| :: (WriteBinary a, Integral i, Foldable t, HasCallStack, TryFrom Int i) | |
| => (i -> Put) | function to write the length of the list |
| -> t a | |
| -> Put |
Write a list of items, prefixed by its length. If the length of the list cannot be safely converted to the type of length prefix, this will throw an error.