ListLike-4.5.1: Generic support for list-like structures

CopyrightCopyright (C) 2007 John Goerzen
LicenseBSD3
MaintainerJohn Lato <jwlato@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.ListLike.CharString

Description

Newtype wrapper for ByteString to enable a Char-based interface Re-exported by Data.ListLike.

Written by John Lato, jwlato@gmail.com

Synopsis

Documentation

newtype CharString Source #

Newtype wrapper around Data.ByteString.Char8.ByteString, this allows for ListLike instances with Char elements.

Constructors

CS 

Fields

Instances

Eq CharString Source # 
Ord CharString Source # 
Read CharString Source # 
Show CharString Source # 
Monoid CharString Source # 
StringLike CharString Source # 
FoldableLL CharString Char Source # 

Methods

foldl :: (a -> Char -> a) -> a -> CharString -> a Source #

foldl' :: (a -> Char -> a) -> a -> CharString -> a Source #

foldl1 :: (Char -> Char -> Char) -> CharString -> Char Source #

foldr :: (Char -> b -> b) -> b -> CharString -> b Source #

foldr' :: (Char -> b -> b) -> b -> CharString -> b Source #

foldr1 :: (Char -> Char -> Char) -> CharString -> Char Source #

ListLike CharString Char Source # 

Methods

empty :: CharString Source #

singleton :: Char -> CharString Source #

cons :: Char -> CharString -> CharString Source #

snoc :: CharString -> Char -> CharString Source #

append :: CharString -> CharString -> CharString Source #

head :: CharString -> Char Source #

uncons :: CharString -> Maybe (Char, CharString) Source #

last :: CharString -> Char Source #

tail :: CharString -> CharString Source #

init :: CharString -> CharString Source #

null :: CharString -> Bool Source #

length :: CharString -> Int Source #

map :: ListLike full' item' => (Char -> item') -> CharString -> full' Source #

rigidMap :: (Char -> Char) -> CharString -> CharString Source #

reverse :: CharString -> CharString Source #

intersperse :: Char -> CharString -> CharString Source #

concat :: (ListLike full' CharString, Monoid CharString) => full' -> CharString Source #

concatMap :: ListLike full' item' => (Char -> full') -> CharString -> full' Source #

rigidConcatMap :: (Char -> CharString) -> CharString -> CharString Source #

any :: (Char -> Bool) -> CharString -> Bool Source #

all :: (Char -> Bool) -> CharString -> Bool Source #

maximum :: CharString -> Char Source #

minimum :: CharString -> Char Source #

replicate :: Int -> Char -> CharString Source #

take :: Int -> CharString -> CharString Source #

drop :: Int -> CharString -> CharString Source #

splitAt :: Int -> CharString -> (CharString, CharString) Source #

takeWhile :: (Char -> Bool) -> CharString -> CharString Source #

dropWhile :: (Char -> Bool) -> CharString -> CharString Source #

dropWhileEnd :: (Char -> Bool) -> CharString -> CharString Source #

span :: (Char -> Bool) -> CharString -> (CharString, CharString) Source #

break :: (Char -> Bool) -> CharString -> (CharString, CharString) Source #

group :: (ListLike full' CharString, Eq Char) => CharString -> full' Source #

inits :: ListLike full' CharString => CharString -> full' Source #

tails :: ListLike full' CharString => CharString -> full' Source #

isPrefixOf :: CharString -> CharString -> Bool Source #

isSuffixOf :: CharString -> CharString -> Bool Source #

isInfixOf :: CharString -> CharString -> Bool Source #

stripPrefix :: CharString -> CharString -> Maybe CharString Source #

stripSuffix :: CharString -> CharString -> Maybe CharString Source #

elem :: Char -> CharString -> Bool Source #

notElem :: Char -> CharString -> Bool Source #

find :: (Char -> Bool) -> CharString -> Maybe Char Source #

filter :: (Char -> Bool) -> CharString -> CharString Source #

partition :: (Char -> Bool) -> CharString -> (CharString, CharString) Source #

index :: CharString -> Int -> Char Source #

elemIndex :: Char -> CharString -> Maybe Int Source #

elemIndices :: (Eq Char, ListLike result Int) => Char -> CharString -> result Source #

findIndex :: (Char -> Bool) -> CharString -> Maybe Int Source #

findIndices :: ListLike result Int => (Char -> Bool) -> CharString -> result Source #

sequence :: (Monad m, ListLike fullinp (m Char)) => fullinp -> m CharString Source #

mapM :: (Monad m, ListLike full' item') => (Char -> m item') -> CharString -> m full' Source #

rigidMapM :: Monad m => (Char -> m Char) -> CharString -> m CharString Source #

nub :: CharString -> CharString Source #

delete :: Char -> CharString -> CharString Source #

deleteFirsts :: CharString -> CharString -> CharString Source #

union :: CharString -> CharString -> CharString Source #

intersect :: CharString -> CharString -> CharString Source #

sort :: CharString -> CharString Source #

insert :: Char -> CharString -> CharString Source #

toList :: CharString -> [Char] Source #

fromList :: [Char] -> CharString Source #

fromListLike :: ListLike full' Char => CharString -> full' Source #

nubBy :: (Char -> Char -> Bool) -> CharString -> CharString Source #

deleteBy :: (Char -> Char -> Bool) -> Char -> CharString -> CharString Source #

deleteFirstsBy :: (Char -> Char -> Bool) -> CharString -> CharString -> CharString Source #

unionBy :: (Char -> Char -> Bool) -> CharString -> CharString -> CharString Source #

intersectBy :: (Char -> Char -> Bool) -> CharString -> CharString -> CharString Source #

groupBy :: (ListLike full' CharString, Eq Char) => (Char -> Char -> Bool) -> CharString -> full' Source #

sortBy :: (Char -> Char -> Ordering) -> CharString -> CharString Source #

insertBy :: (Char -> Char -> Ordering) -> Char -> CharString -> CharString Source #

genericLength :: Num a => CharString -> a Source #

genericTake :: Integral a => a -> CharString -> CharString Source #

genericDrop :: Integral a => a -> CharString -> CharString Source #

genericSplitAt :: Integral a => a -> CharString -> (CharString, CharString) Source #

genericReplicate :: Integral a => a -> Char -> CharString Source #

ListLikeIO CharString Char Source # 

newtype CharStringLazy Source #

Newtype wrapper around Data.ByteString.Lazy.Char8.ByteString, this allows for ListLike instances with Char elements.

Constructors

CSL 

Fields

Instances

Eq CharStringLazy Source # 
Ord CharStringLazy Source # 
Read CharStringLazy Source # 
Show CharStringLazy Source # 
Monoid CharStringLazy Source # 
StringLike CharStringLazy Source # 
FoldableLL CharStringLazy Char Source # 

Methods

foldl :: (a -> Char -> a) -> a -> CharStringLazy -> a Source #

foldl' :: (a -> Char -> a) -> a -> CharStringLazy -> a Source #

foldl1 :: (Char -> Char -> Char) -> CharStringLazy -> Char Source #

foldr :: (Char -> b -> b) -> b -> CharStringLazy -> b Source #

foldr' :: (Char -> b -> b) -> b -> CharStringLazy -> b Source #

foldr1 :: (Char -> Char -> Char) -> CharStringLazy -> Char Source #

ListLike CharStringLazy Char Source # 

Methods

empty :: CharStringLazy Source #

singleton :: Char -> CharStringLazy Source #

cons :: Char -> CharStringLazy -> CharStringLazy Source #

snoc :: CharStringLazy -> Char -> CharStringLazy Source #

append :: CharStringLazy -> CharStringLazy -> CharStringLazy Source #

head :: CharStringLazy -> Char Source #

uncons :: CharStringLazy -> Maybe (Char, CharStringLazy) Source #

last :: CharStringLazy -> Char Source #

tail :: CharStringLazy -> CharStringLazy Source #

init :: CharStringLazy -> CharStringLazy Source #

null :: CharStringLazy -> Bool Source #

length :: CharStringLazy -> Int Source #

map :: ListLike full' item' => (Char -> item') -> CharStringLazy -> full' Source #

rigidMap :: (Char -> Char) -> CharStringLazy -> CharStringLazy Source #

reverse :: CharStringLazy -> CharStringLazy Source #

intersperse :: Char -> CharStringLazy -> CharStringLazy Source #

concat :: (ListLike full' CharStringLazy, Monoid CharStringLazy) => full' -> CharStringLazy Source #

concatMap :: ListLike full' item' => (Char -> full') -> CharStringLazy -> full' Source #

rigidConcatMap :: (Char -> CharStringLazy) -> CharStringLazy -> CharStringLazy Source #

any :: (Char -> Bool) -> CharStringLazy -> Bool Source #

all :: (Char -> Bool) -> CharStringLazy -> Bool Source #

maximum :: CharStringLazy -> Char Source #

minimum :: CharStringLazy -> Char Source #

replicate :: Int -> Char -> CharStringLazy Source #

take :: Int -> CharStringLazy -> CharStringLazy Source #

drop :: Int -> CharStringLazy -> CharStringLazy Source #

splitAt :: Int -> CharStringLazy -> (CharStringLazy, CharStringLazy) Source #

takeWhile :: (Char -> Bool) -> CharStringLazy -> CharStringLazy Source #

dropWhile :: (Char -> Bool) -> CharStringLazy -> CharStringLazy Source #

dropWhileEnd :: (Char -> Bool) -> CharStringLazy -> CharStringLazy Source #

span :: (Char -> Bool) -> CharStringLazy -> (CharStringLazy, CharStringLazy) Source #

break :: (Char -> Bool) -> CharStringLazy -> (CharStringLazy, CharStringLazy) Source #

group :: (ListLike full' CharStringLazy, Eq Char) => CharStringLazy -> full' Source #

inits :: ListLike full' CharStringLazy => CharStringLazy -> full' Source #

tails :: ListLike full' CharStringLazy => CharStringLazy -> full' Source #

isPrefixOf :: CharStringLazy -> CharStringLazy -> Bool Source #

isSuffixOf :: CharStringLazy -> CharStringLazy -> Bool Source #

isInfixOf :: CharStringLazy -> CharStringLazy -> Bool Source #

stripPrefix :: CharStringLazy -> CharStringLazy -> Maybe CharStringLazy Source #

stripSuffix :: CharStringLazy -> CharStringLazy -> Maybe CharStringLazy Source #

elem :: Char -> CharStringLazy -> Bool Source #

notElem :: Char -> CharStringLazy -> Bool Source #

find :: (Char -> Bool) -> CharStringLazy -> Maybe Char Source #

filter :: (Char -> Bool) -> CharStringLazy -> CharStringLazy Source #

partition :: (Char -> Bool) -> CharStringLazy -> (CharStringLazy, CharStringLazy) Source #

index :: CharStringLazy -> Int -> Char Source #

elemIndex :: Char -> CharStringLazy -> Maybe Int Source #

elemIndices :: (Eq Char, ListLike result Int) => Char -> CharStringLazy -> result Source #

findIndex :: (Char -> Bool) -> CharStringLazy -> Maybe Int Source #

findIndices :: ListLike result Int => (Char -> Bool) -> CharStringLazy -> result Source #

sequence :: (Monad m, ListLike fullinp (m Char)) => fullinp -> m CharStringLazy Source #

mapM :: (Monad m, ListLike full' item') => (Char -> m item') -> CharStringLazy -> m full' Source #

rigidMapM :: Monad m => (Char -> m Char) -> CharStringLazy -> m CharStringLazy Source #

nub :: CharStringLazy -> CharStringLazy Source #

delete :: Char -> CharStringLazy -> CharStringLazy Source #

deleteFirsts :: CharStringLazy -> CharStringLazy -> CharStringLazy Source #

union :: CharStringLazy -> CharStringLazy -> CharStringLazy Source #

intersect :: CharStringLazy -> CharStringLazy -> CharStringLazy Source #

sort :: CharStringLazy -> CharStringLazy Source #

insert :: Char -> CharStringLazy -> CharStringLazy Source #

toList :: CharStringLazy -> [Char] Source #

fromList :: [Char] -> CharStringLazy Source #

fromListLike :: ListLike full' Char => CharStringLazy -> full' Source #

nubBy :: (Char -> Char -> Bool) -> CharStringLazy -> CharStringLazy Source #

deleteBy :: (Char -> Char -> Bool) -> Char -> CharStringLazy -> CharStringLazy Source #

deleteFirstsBy :: (Char -> Char -> Bool) -> CharStringLazy -> CharStringLazy -> CharStringLazy Source #

unionBy :: (Char -> Char -> Bool) -> CharStringLazy -> CharStringLazy -> CharStringLazy Source #

intersectBy :: (Char -> Char -> Bool) -> CharStringLazy -> CharStringLazy -> CharStringLazy Source #

groupBy :: (ListLike full' CharStringLazy, Eq Char) => (Char -> Char -> Bool) -> CharStringLazy -> full' Source #

sortBy :: (Char -> Char -> Ordering) -> CharStringLazy -> CharStringLazy Source #

insertBy :: (Char -> Char -> Ordering) -> Char -> CharStringLazy -> CharStringLazy Source #

genericLength :: Num a => CharStringLazy -> a Source #

genericTake :: Integral a => a -> CharStringLazy -> CharStringLazy Source #

genericDrop :: Integral a => a -> CharStringLazy -> CharStringLazy Source #

genericSplitAt :: Integral a => a -> CharStringLazy -> (CharStringLazy, CharStringLazy) Source #

genericReplicate :: Integral a => a -> Char -> CharStringLazy Source #

ListLikeIO CharStringLazy Char Source #