About

Metadata

  • Last updated , by andrewthad
  • License BSD-3-Clause
  • Maintained by: amartin@layer3com.com

  • Lottery factor: 2

Links

Installation

Tested Compilers

  1. 9.8.1
  2. 9.6.3
  3. 9.4.8

Package Flags

Use the -f option with cabal commands to enable flags

    avoid-rawmemchr (on by default)

    Avoid using rawmemchr which is non-portable GNU libc only

Readme

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.