@hackage byteslice0.2.15.0
Slicing managed and unmanaged memory
Installation
Tested Compilers
Dependencies (11)
- base >=4.14 && <5
- bytestring >=0.10.8 && <0.13
- natural-arithmetic >=0.1.4
- primitive >=0.7.4 && <0.10
- primitive-addr >=0.1 && <0.2
- primitive-unlifted >=0.1.2 && <2.3 Show all…
Dependents (43)
@hackage/scientific-notation, @hackage/json-syntax, @hackage/flatbuffers-builder, @hackage/protobuf-builder, @hackage/http-exchange, @hackage/bytetrie, Show all…
Package Flags
avoid-rawmemchr
(on by default)
Avoid using rawmemchr which is non-portable GNU libc only
byteslice
Purpose
Types for dealing with slices of 'ByteArray' and 'MutableByteArray'. These are never supposed to introduce overhead. Rather, they exist to clarify intent in type signatures.
receive ::
Resource -- ^ Some scarce resource
-> MutableByteArray RealWorld -- ^ Buffer
-> Int -- ^ Offset
-> Int -- ^ Length
-> IO ()
With this library, we instead write
receive ::
Resource -- ^ Some scarce resource
-> MutableBytes RealWorld -- ^ Buffer
-> IO ()
The combination of the worker-wrapper transformation and inlining means that we can expect these two to end up generating the same code in most situations.