data-array-byte-0.1.0.1: Compatibility layer for Data.Array.Byte
Copyright(c) Roman Leshchinskiy 2009-2012
LicenseBSD-style
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Array.Byte

Description

Compatibility layer for Data.Array.Byte, providing boxed wrappers for ByteArray# and MutableByteArray# and relevant instances for GHC < 9.4. Include it into your Cabal file:

build-depends: base
if impl(ghc < 9.4)
  build-depends: data-array-byte

and then import Data.Array.Byte unconditionally.

Originally derived from primitive package.

Synopsis

Documentation

data ByteArray Source #

Boxed wrapper for ByteArray#.

Since ByteArray# is an unlifted type and not a member of kind Type, things like [ByteArray#] or IO ByteArray# are ill-typed. To work around this inconvenience this module provides a standard boxed wrapper, inhabiting Type. Clients are expected to use ByteArray in higher-level APIs, but wrap and unwrap ByteArray internally as they please and use functions from GHC.Exts.

Constructors

ByteArray ByteArray# 

Instances

Instances details
Data ByteArray Source # 
Instance details

Defined in Data.Array.Byte

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteArray -> c ByteArray #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteArray #

toConstr :: ByteArray -> Constr #

dataTypeOf :: ByteArray -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteArray) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteArray) #

gmapT :: (forall b. Data b => b -> b) -> ByteArray -> ByteArray #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteArray -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteArray -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

Monoid ByteArray Source # 
Instance details

Defined in Data.Array.Byte

Semigroup ByteArray Source # 
Instance details

Defined in Data.Array.Byte

IsList ByteArray Source # 
Instance details

Defined in Data.Array.Byte

Associated Types

type Item ByteArray #

Show ByteArray Source # 
Instance details

Defined in Data.Array.Byte

NFData ByteArray Source # 
Instance details

Defined in Data.Array.Byte

Methods

rnf :: ByteArray -> () #

Eq ByteArray Source # 
Instance details

Defined in Data.Array.Byte

Ord ByteArray Source #

Non-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions.

Instance details

Defined in Data.Array.Byte

Lift ByteArray Source # 
Instance details

Defined in Data.Array.Byte

Methods

lift :: Quote m => ByteArray -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => ByteArray -> Code m ByteArray #

type Item ByteArray Source # 
Instance details

Defined in Data.Array.Byte

data MutableByteArray s Source #

Boxed wrapper for MutableByteArray#.

Since MutableByteArray# is an unlifted type and not a member of kind Type, things like [MutableByteArray#] or IO MutableByteArray# are ill-typed. To work around this inconvenience this module provides a standard boxed wrapper, inhabiting Type. Clients are expected to use MutableByteArray in higher-level APIs, but wrap and unwrap MutableByteArray internally as they please and use functions from GHC.Exts.

Instances

Instances details
Typeable s => Data (MutableByteArray s) Source # 
Instance details

Defined in Data.Array.Byte

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MutableByteArray s -> c (MutableByteArray s) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MutableByteArray s) #

toConstr :: MutableByteArray s -> Constr #

dataTypeOf :: MutableByteArray s -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MutableByteArray s)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MutableByteArray s)) #

gmapT :: (forall b. Data b => b -> b) -> MutableByteArray s -> MutableByteArray s #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MutableByteArray s -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MutableByteArray s -> r #

gmapQ :: (forall d. Data d => d -> u) -> MutableByteArray s -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MutableByteArray s -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MutableByteArray s -> m (MutableByteArray s) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MutableByteArray s -> m (MutableByteArray s) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MutableByteArray s -> m (MutableByteArray s) #

NFData (MutableByteArray s) Source # 
Instance details

Defined in Data.Array.Byte

Methods

rnf :: MutableByteArray s -> () #

Eq (MutableByteArray s) Source # 
Instance details

Defined in Data.Array.Byte