compact-string-0.3: ContentsIndex
Data.CompactString.Unsafe
Portabilityuntested
Stabilityexperimental
Maintainertwanvl@gmail.com
Contents
Basic interface
Conversion from ByteString
Description
Unsafe functions on CompactStrings. All these functions can lead to crashes if not used properly.
Synopsis
unsafeHead :: Encoding a => CompactString a -> Char
unsafeLast :: Encoding a => CompactString a -> Char
unsafeTail :: Encoding a => CompactString a -> CompactString a
unsafeInit :: Encoding a => CompactString a -> CompactString a
unsafeFromByteString :: ByteString -> CompactString a
Basic interface
unsafeHead :: Encoding a => CompactString a -> Char
A variety of head for non-empty CompactString. unsafeHead omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the CompactString is non-empty.
unsafeLast :: Encoding a => CompactString a -> Char
A variety of last for non-empty CompactString. unsafeLast omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the CompactString is non-empty.
unsafeTail :: Encoding a => CompactString a -> CompactString a
A variety of tail for non-empty CompactString. unsafeTail omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the CompactString is non-empty.
unsafeInit :: Encoding a => CompactString a -> CompactString a
A variety of init for non-empty CompactString. unsafeInit omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the CompactString is non-empty.
Conversion from ByteString
unsafeFromByteString :: ByteString -> CompactString a
Convert a ByteString to a CompactString, does not check whether the ByteString represents a valid string in the encoding a.
Produced by Haddock version 0.8