Data.ListLike.CharString

ListLike-4.5.1: Generic support for list-like structures

Copyright | Copyright (C) 2007 John Goerzen
License | BSD3
Maintainer | John Lato <jwlato@gmail.com>
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

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

- newtype CharString = CS {
  - unCS :: ByteString
  }
- newtype CharStringLazy = CSL {
  - unCSL :: ByteString
  }

# Documentation

newtype CharString #

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

Constructors

CS |
Fields unCS :: ByteString

Instances

Eq CharString # |
Methods (==) :: CharString -> CharString -> Bool # (/=) :: CharString -> CharString -> Bool #
Ord CharString # |
Methods compare :: CharString -> CharString -> Ordering # (<) :: CharString -> CharString -> Bool # (<=) :: CharString -> CharString -> Bool # (>) :: CharString -> CharString -> Bool # (>=) :: CharString -> CharString -> Bool # max :: CharString -> CharString -> CharString # min :: CharString -> CharString -> CharString #
Read CharString # |
Methods readsPrec :: Int -> ReadS CharString # readList :: ReadS [CharString] # readPrec :: ReadPrec CharString # readListPrec :: ReadPrec [CharString] #
Show CharString # |
Methods showsPrec :: Int -> CharString -> ShowS # show :: CharString -> String # showList :: [CharString] -> ShowS #
Monoid CharString # |
Methods mempty :: CharString # mappend :: CharString -> CharString -> CharString # mconcat :: [CharString] -> CharString #
StringLike CharString # |
Methods toString :: CharString -> String # fromString :: String -> CharString # lines :: ListLike full CharString => CharString -> full # words :: ListLike full CharString => CharString -> full # unlines :: ListLike full CharString => full -> CharString # unwords :: ListLike full CharString => full -> CharString #
FoldableLL CharString Char # |
Methods foldl :: (a -> Char -> a) -> a -> CharString -> a # foldl' :: (a -> Char -> a) -> a -> CharString -> a # foldl1 :: (Char -> Char -> Char) -> CharString -> Char # foldr :: (Char -> b -> b) -> b -> CharString -> b # foldr' :: (Char -> b -> b) -> b -> CharString -> b # foldr1 :: (Char -> Char -> Char) -> CharString -> Char #
ListLike CharString Char # |
Methods empty :: CharString # singleton :: Char -> CharString # cons :: Char -> CharString -> CharString # snoc :: CharString -> Char -> CharString # append :: CharString -> CharString -> CharString # head :: CharString -> Char # uncons :: CharString -> Maybe (Char, CharString) # last :: CharString -> Char # tail :: CharString -> CharString # init :: CharString -> CharString # null :: CharString -> Bool # length :: CharString -> Int # map :: ListLike full' item' => (Char -> item') -> CharString -> full' # rigidMap :: (Char -> Char) -> CharString -> CharString # reverse :: CharString -> CharString # intersperse :: Char -> CharString -> CharString # concat :: (ListLike full' CharString, Monoid CharString) => full' -> CharString # concatMap :: ListLike full' item' => (Char -> full') -> CharString -> full' # rigidConcatMap :: (Char -> CharString) -> CharString -> CharString # any :: (Char -> Bool) -> CharString -> Bool # all :: (Char -> Bool) -> CharString -> Bool # maximum :: CharString -> Char # minimum :: CharString -> Char # replicate :: Int -> Char -> CharString # take :: Int -> CharString -> CharString # drop :: Int -> CharString -> CharString # splitAt :: Int -> CharString -> (CharString, CharString) # takeWhile :: (Char -> Bool) -> CharString -> CharString # dropWhile :: (Char -> Bool) -> CharString -> CharString # dropWhileEnd :: (Char -> Bool) -> CharString -> CharString # span :: (Char -> Bool) -> CharString -> (CharString, CharString) # break :: (Char -> Bool) -> CharString -> (CharString, CharString) # group :: (ListLike full' CharString, Eq Char) => CharString -> full' # inits :: ListLike full' CharString => CharString -> full' # tails :: ListLike full' CharString => CharString -> full' # isPrefixOf :: CharString -> CharString -> Bool # isSuffixOf :: CharString -> CharString -> Bool # isInfixOf :: CharString -> CharString -> Bool # stripPrefix :: CharString -> CharString -> Maybe CharString # stripSuffix :: CharString -> CharString -> Maybe CharString # elem :: Char -> CharString -> Bool # notElem :: Char -> CharString -> Bool # find :: (Char -> Bool) -> CharString -> Maybe Char # filter :: (Char -> Bool) -> CharString -> CharString # partition :: (Char -> Bool) -> CharString -> (CharString, CharString) # index :: CharString -> Int -> Char # elemIndex :: Char -> CharString -> Maybe Int # elemIndices :: (Eq Char, ListLike result Int) => Char -> CharString -> result # findIndex :: (Char -> Bool) -> CharString -> Maybe Int # findIndices :: ListLike result Int => (Char -> Bool) -> CharString -> result # sequence :: (Monad m, ListLike fullinp (m Char)) => fullinp -> m CharString # mapM :: (Monad m, ListLike full' item') => (Char -> m item') -> CharString -> m full' # rigidMapM :: Monad m => (Char -> m Char) -> CharString -> m CharString # nub :: CharString -> CharString # delete :: Char -> CharString -> CharString # deleteFirsts :: CharString -> CharString -> CharString # union :: CharString -> CharString -> CharString # intersect :: CharString -> CharString -> CharString # sort :: CharString -> CharString # insert :: Char -> CharString -> CharString # toList :: CharString -> [Char] # fromList :: [Char] -> CharString # fromListLike :: ListLike full' Char => CharString -> full' # nubBy :: (Char -> Char -> Bool) -> CharString -> CharString # deleteBy :: (Char -> Char -> Bool) -> Char -> CharString -> CharString # deleteFirstsBy :: (Char -> Char -> Bool) -> CharString -> CharString -> CharString # unionBy :: (Char -> Char -> Bool) -> CharString -> CharString -> CharString # intersectBy :: (Char -> Char -> Bool) -> CharString -> CharString -> CharString # groupBy :: (ListLike full' CharString, Eq Char) => (Char -> Char -> Bool) -> CharString -> full' # sortBy :: (Char -> Char -> Ordering) -> CharString -> CharString # insertBy :: (Char -> Char -> Ordering) -> Char -> CharString -> CharString # genericLength :: Num a => CharString -> a # genericTake :: Integral a => a -> CharString -> CharString # genericDrop :: Integral a => a -> CharString -> CharString # genericSplitAt :: Integral a => a -> CharString -> (CharString, CharString) # genericReplicate :: Integral a => a -> Char -> CharString #
ListLikeIO CharString Char # |
Methods hGetLine :: Handle -> IO CharString # hGetContents :: Handle -> IO CharString # hGet :: Handle -> Int -> IO CharString # hGetNonBlocking :: Handle -> Int -> IO CharString # hPutStr :: Handle -> CharString -> IO () # hPutStrLn :: Handle -> CharString -> IO () # getLine :: IO CharString # getContents :: IO CharString # putStr :: CharString -> IO () # putStrLn :: CharString -> IO () # interact :: (CharString -> CharString) -> IO () # readFile :: FilePath -> IO CharString # writeFile :: FilePath -> CharString -> IO () # appendFile :: FilePath -> CharString -> IO () #

newtype CharStringLazy #

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

Constructors

CSL |
Fields unCSL :: ByteString

Instances

Eq CharStringLazy # |
Methods (==) :: CharStringLazy -> CharStringLazy -> Bool # (/=) :: CharStringLazy -> CharStringLazy -> Bool #
Ord CharStringLazy # |
Methods compare :: CharStringLazy -> CharStringLazy -> Ordering # (<) :: CharStringLazy -> CharStringLazy -> Bool # (<=) :: CharStringLazy -> CharStringLazy -> Bool # (>) :: CharStringLazy -> CharStringLazy -> Bool # (>=) :: CharStringLazy -> CharStringLazy -> Bool # max :: CharStringLazy -> CharStringLazy -> CharStringLazy # min :: CharStringLazy -> CharStringLazy -> CharStringLazy #
Read CharStringLazy # |
Methods readsPrec :: Int -> ReadS CharStringLazy # readList :: ReadS [CharStringLazy] # readPrec :: ReadPrec CharStringLazy # readListPrec :: ReadPrec [CharStringLazy] #
Show CharStringLazy # |
Methods showsPrec :: Int -> CharStringLazy -> ShowS # show :: CharStringLazy -> String # showList :: [CharStringLazy] -> ShowS #
Monoid CharStringLazy # |
Methods mempty :: CharStringLazy # mappend :: CharStringLazy -> CharStringLazy -> CharStringLazy # mconcat :: [CharStringLazy] -> CharStringLazy #
StringLike CharStringLazy # |
Methods toString :: CharStringLazy -> String # fromString :: String -> CharStringLazy # lines :: ListLike full CharStringLazy => CharStringLazy -> full # words :: ListLike full CharStringLazy => CharStringLazy -> full # unlines :: ListLike full CharStringLazy => full -> CharStringLazy # unwords :: ListLike full CharStringLazy => full -> CharStringLazy #
FoldableLL CharStringLazy Char # |
Methods foldl :: (a -> Char -> a) -> a -> CharStringLazy -> a # foldl' :: (a -> Char -> a) -> a -> CharStringLazy -> a # foldl1 :: (Char -> Char -> Char) -> CharStringLazy -> Char # foldr :: (Char -> b -> b) -> b -> CharStringLazy -> b # foldr' :: (Char -> b -> b) -> b -> CharStringLazy -> b # foldr1 :: (Char -> Char -> Char) -> CharStringLazy -> Char #
ListLike CharStringLazy Char # |
Methods empty :: CharStringLazy # singleton :: Char -> CharStringLazy # cons :: Char -> CharStringLazy -> CharStringLazy # snoc :: CharStringLazy -> Char -> CharStringLazy # append :: CharStringLazy -> CharStringLazy -> CharStringLazy # head :: CharStringLazy -> Char # uncons :: CharStringLazy -> Maybe (Char, CharStringLazy) # last :: CharStringLazy -> Char # tail :: CharStringLazy -> CharStringLazy # init :: CharStringLazy -> CharStringLazy # null :: CharStringLazy -> Bool # length :: CharStringLazy -> Int # map :: ListLike full' item' => (Char -> item') -> CharStringLazy -> full' # rigidMap :: (Char -> Char) -> CharStringLazy -> CharStringLazy # reverse :: CharStringLazy -> CharStringLazy # intersperse :: Char -> CharStringLazy -> CharStringLazy # concat :: (ListLike full' CharStringLazy, Monoid CharStringLazy) => full' -> CharStringLazy # concatMap :: ListLike full' item' => (Char -> full') -> CharStringLazy -> full' # rigidConcatMap :: (Char -> CharStringLazy) -> CharStringLazy -> CharStringLazy # any :: (Char -> Bool) -> CharStringLazy -> Bool # all :: (Char -> Bool) -> CharStringLazy -> Bool # maximum :: CharStringLazy -> Char # minimum :: CharStringLazy -> Char # replicate :: Int -> Char -> CharStringLazy # take :: Int -> CharStringLazy -> CharStringLazy # drop :: Int -> CharStringLazy -> CharStringLazy # splitAt :: Int -> CharStringLazy -> (CharStringLazy, CharStringLazy) # takeWhile :: (Char -> Bool) -> CharStringLazy -> CharStringLazy # dropWhile :: (Char -> Bool) -> CharStringLazy -> CharStringLazy # dropWhileEnd :: (Char -> Bool) -> CharStringLazy -> CharStringLazy # span :: (Char -> Bool) -> CharStringLazy -> (CharStringLazy, CharStringLazy) # break :: (Char -> Bool) -> CharStringLazy -> (CharStringLazy, CharStringLazy) # group :: (ListLike full' CharStringLazy, Eq Char) => CharStringLazy -> full' # inits :: ListLike full' CharStringLazy => CharStringLazy -> full' # tails :: ListLike full' CharStringLazy => CharStringLazy -> full' # isPrefixOf :: CharStringLazy -> CharStringLazy -> Bool # isSuffixOf :: CharStringLazy -> CharStringLazy -> Bool # isInfixOf :: CharStringLazy -> CharStringLazy -> Bool # stripPrefix :: CharStringLazy -> CharStringLazy -> Maybe CharStringLazy # stripSuffix :: CharStringLazy -> CharStringLazy -> Maybe CharStringLazy # elem :: Char -> CharStringLazy -> Bool # notElem :: Char -> CharStringLazy -> Bool # find :: (Char -> Bool) -> CharStringLazy -> Maybe Char # filter :: (Char -> Bool) -> CharStringLazy -> CharStringLazy # partition :: (Char -> Bool) -> CharStringLazy -> (CharStringLazy, CharStringLazy) # index :: CharStringLazy -> Int -> Char # elemIndex :: Char -> CharStringLazy -> Maybe Int # elemIndices :: (Eq Char, ListLike result Int) => Char -> CharStringLazy -> result # findIndex :: (Char -> Bool) -> CharStringLazy -> Maybe Int # findIndices :: ListLike result Int => (Char -> Bool) -> CharStringLazy -> result # sequence :: (Monad m, ListLike fullinp (m Char)) => fullinp -> m CharStringLazy # mapM :: (Monad m, ListLike full' item') => (Char -> m item') -> CharStringLazy -> m full' # rigidMapM :: Monad m => (Char -> m Char) -> CharStringLazy -> m CharStringLazy # nub :: CharStringLazy -> CharStringLazy # delete :: Char -> CharStringLazy -> CharStringLazy # deleteFirsts :: CharStringLazy -> CharStringLazy -> CharStringLazy # union :: CharStringLazy -> CharStringLazy -> CharStringLazy # intersect :: CharStringLazy -> CharStringLazy -> CharStringLazy # sort :: CharStringLazy -> CharStringLazy # insert :: Char -> CharStringLazy -> CharStringLazy # toList :: CharStringLazy -> [Char] # fromList :: [Char] -> CharStringLazy # fromListLike :: ListLike full' Char => CharStringLazy -> full' # nubBy :: (Char -> Char -> Bool) -> CharStringLazy -> CharStringLazy # deleteBy :: (Char -> Char -> Bool) -> Char -> CharStringLazy -> CharStringLazy # deleteFirstsBy :: (Char -> Char -> Bool) -> CharStringLazy -> CharStringLazy -> CharStringLazy # unionBy :: (Char -> Char -> Bool) -> CharStringLazy -> CharStringLazy -> CharStringLazy # intersectBy :: (Char -> Char -> Bool) -> CharStringLazy -> CharStringLazy -> CharStringLazy # groupBy :: (ListLike full' CharStringLazy, Eq Char) => (Char -> Char -> Bool) -> CharStringLazy -> full' # sortBy :: (Char -> Char -> Ordering) -> CharStringLazy -> CharStringLazy # insertBy :: (Char -> Char -> Ordering) -> Char -> CharStringLazy -> CharStringLazy # genericLength :: Num a => CharStringLazy -> a # genericTake :: Integral a => a -> CharStringLazy -> CharStringLazy # genericDrop :: Integral a => a -> CharStringLazy -> CharStringLazy # genericSplitAt :: Integral a => a -> CharStringLazy -> (CharStringLazy, CharStringLazy) # genericReplicate :: Integral a => a -> Char -> CharStringLazy #
ListLikeIO CharStringLazy Char # |
Methods hGetLine :: Handle -> IO CharStringLazy # hGetContents :: Handle -> IO CharStringLazy # hGet :: Handle -> Int -> IO CharStringLazy # hGetNonBlocking :: Handle -> Int -> IO CharStringLazy # hPutStr :: Handle -> CharStringLazy -> IO () # hPutStrLn :: Handle -> CharStringLazy -> IO () # getLine :: IO CharStringLazy # getContents :: IO CharStringLazy # putStr :: CharStringLazy -> IO () # putStrLn :: CharStringLazy -> IO () # interact :: (CharStringLazy -> CharStringLazy) -> IO () # readFile :: FilePath -> IO CharStringLazy # writeFile :: FilePath -> CharStringLazy -> IO () # appendFile :: FilePath -> CharStringLazy -> IO () #