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
- toBytesArray :: Array -> Bytes Inc
- fromBytesArray :: Bytes p -> Array
- toMBytesMArray :: MArray s -> MBytes Inc s
- fromMBytesMArray :: MBytes p s -> MArray s
Documentation
A space efficient, packed, unboxed Unicode text type.
Instances
MemRead Text Source # | |
Defined in Data.Prim.Memory.Internal byteCountMem :: Text -> Count Word8 Source # indexOffMem :: Prim e => Text -> Off e -> e Source # indexByteOffMem :: Prim e => Text -> Off Word8 -> e Source # copyByteOffToMBytesMem :: (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 :: 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 byteCountMem :: Array -> Count Word8 Source # indexOffMem :: Prim e => Array -> Off e -> e Source # indexByteOffMem :: Prim e => Array -> Off Word8 -> e Source # copyByteOffToMBytesMem :: (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 :: 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
fromBytesArray :: Bytes p -> Array Source #
fromMBytesMArray :: MBytes p s -> MArray s Source #