Copyright | (c) Alexey Kuleshevich 2020 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <alexey@kuleshevi.ch> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data Text = Text !Array !Int !Int
- data MText s = MText !(MArray s) !Int !Int
- data Array = Array {
- aBA :: ByteArray#
- data MArray s = MArray {
- maBA :: MutableByteArray# s
- fromArrayBytes :: Array -> Bytes 'Inc
- toArrayBytes :: Bytes p -> Array
- fromMArrayMBytes :: MArray s -> MBytes 'Inc s
- toMArrayMBytes :: MBytes p s -> MArray s
Documentation
A space efficient, packed, unboxed Unicode text type.
Instances
MemRead Text Source # | |
Defined in Data.Prim.Memory.Internal isSameMem :: Text -> Text -> Bool byteCountMem :: Text -> Count Word8 Source # indexOffMem :: Prim e => Text -> Off e -> e Source # indexByteOffMem :: Prim e => Text -> Off Word8 -> e Source # copyByteOffToMBytesMem :: forall s m e (p :: Pinned). (MonadPrim s m, Prim e) => Text -> Off Word8 -> MBytes p s -> Off Word8 -> Count e -> m () Source # copyByteOffToPtrMem :: (MonadPrim s m, Prim e) => Text -> Off Word8 -> Ptr e -> Off Word8 -> Count e -> m () Source # compareByteOffToPtrMem :: (MonadPrim s m, Prim e) => Text -> Off Word8 -> Ptr e -> Off Word8 -> Count e -> m Ordering Source # compareByteOffToBytesMem :: forall e (p :: Pinned). Prim e => Text -> Off Word8 -> Bytes p -> Off Word8 -> Count e -> Ordering Source # compareByteOffMem :: (MemRead mr', Prim e) => mr' -> Off Word8 -> Text -> Off Word8 -> Count e -> Ordering Source # |
Immutable array type.
The Array
constructor is exposed since text-1.1.1.3
Array | |
|
Instances
MemRead Array Source # | |
Defined in Data.Prim.Memory.Internal isSameMem :: Array -> Array -> Bool byteCountMem :: Array -> Count Word8 Source # indexOffMem :: Prim e => Array -> Off e -> e Source # indexByteOffMem :: Prim e => Array -> Off Word8 -> e Source # copyByteOffToMBytesMem :: forall s m e (p :: Pinned). (MonadPrim s m, Prim e) => Array -> Off Word8 -> MBytes p s -> Off Word8 -> Count e -> m () Source # copyByteOffToPtrMem :: (MonadPrim s m, Prim e) => Array -> Off Word8 -> Ptr e -> Off Word8 -> Count e -> m () Source # compareByteOffToPtrMem :: (MonadPrim s m, Prim e) => Array -> Off Word8 -> Ptr e -> Off Word8 -> Count e -> m Ordering Source # compareByteOffToBytesMem :: forall e (p :: Pinned). Prim e => Array -> Off Word8 -> Bytes p -> Off Word8 -> Count e -> Ordering Source # compareByteOffMem :: (MemRead mr', Prim e) => mr' -> Off Word8 -> Array -> Off Word8 -> Count e -> Ordering Source # |
Mutable array type, for use in the ST monad.
The MArray
constructor is exposed since text-1.1.1.3
MArray | |
|
Instances
toArrayBytes :: Bytes p -> Array Source #