primal-memory-0.2.0.0: Unified interface for memory managemenet.

Copyright(c) Alexey Kuleshevich 2020
LicenseBSD3
MaintainerAlexey Kuleshevich <alexey@kuleshevi.ch>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Prim.Memory.Text

Description

 
Synopsis

Documentation

data Text #

A space efficient, packed, unboxed Unicode text type.

Constructors

Text !Array !Int !Int 
Instances
MemRead Text Source # 
Instance details

Defined in Data.Prim.Memory.Internal

data MText s Source #

Mutable version of a Text

Constructors

MText !(MArray s) !Int !Int 

data Array #

Immutable array type.

The Array constructor is exposed since text-1.1.1.3

Constructors

Array 

Fields

Instances
MemRead Array Source # 
Instance details

Defined in Data.Prim.Memory.Internal

data MArray s #

Mutable array type, for use in the ST monad.

The MArray constructor is exposed since text-1.1.1.3

Constructors

MArray 

Fields

Instances
MemAlloc MArray Source # 
Instance details

Defined in Data.Prim.Memory.Internal

Associated Types

type FrozenMem MArray = (fm :: Type) Source #

Methods

getByteCountMem :: MonadPrim s m => MArray s -> m (Count Word8) Source #

allocMem :: (Prim e, MonadPrim s m) => Count e -> m (MArray s) Source #

thawMem :: MonadPrim s m => FrozenMem MArray -> m (MArray s) Source #

freezeMem :: MonadPrim s m => MArray s -> m (FrozenMem MArray) Source #

resizeMem :: (MonadPrim s m, Prim e) => MArray s -> Count e -> m (MArray s) Source #

MemWrite MArray Source # 
Instance details

Defined in Data.Prim.Memory.Internal

Methods

readOffMem :: (MonadPrim s m, Prim e) => MArray s -> Off e -> m e Source #

readByteOffMem :: (MonadPrim s m, Prim e) => MArray s -> Off Word8 -> m e Source #

writeOffMem :: (MonadPrim s m, Prim e) => MArray s -> Off e -> e -> m () Source #

writeByteOffMem :: (MonadPrim s m, Prim e) => MArray s -> Off Word8 -> e -> m () Source #

moveByteOffToMBytesMem :: (MonadPrim s m, Prim e) => MArray s -> Off Word8 -> MBytes p s -> Off Word8 -> Count e -> m () Source #

moveByteOffToPtrMem :: (MonadPrim s m, Prim e) => MArray s -> Off Word8 -> Ptr e -> Off Word8 -> Count e -> m () Source #

copyByteOffMem :: (MonadPrim s m, MemRead mr, Prim e) => mr -> Off Word8 -> MArray s -> Off Word8 -> Count e -> m () Source #

moveByteOffMem :: (MonadPrim s m, MemWrite mw', Prim e) => mw' s -> Off Word8 -> MArray s -> Off Word8 -> Count e -> m () Source #

setMem :: (MonadPrim s m, Prim e) => MArray s -> Off e -> Count e -> e -> m () Source #

type FrozenMem MArray Source # 
Instance details

Defined in Data.Prim.Memory.Internal