ListLike-4.7.7: Generalized support for list-like structures
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.ListLike.Vector.Generic

Description

ListLike instance for any type supporting the Data.Vector.Generic interface. To avoid collisions with other Vector instances, this module must be imported directly.

Orphan instances

(Eq (v Char), Vector v Char) => StringLike (v Char) Source # 
Instance details

Methods

toString :: v Char -> String Source #

lines :: ListLike full (v Char) => v Char -> full Source #

words :: ListLike full (v Char) => v Char -> full Source #

unlines :: ListLike full (v Char) => full -> v Char Source #

unwords :: ListLike full (v Char) => full -> v Char Source #

show :: Show a => a -> v Char Source #

fromStringLike :: StringLike s' => v Char -> s' Source #

fromText :: Text -> v Char Source #

fromLazyText :: Text -> v Char Source #

(Eq (v Char), Vector v Char) => IsString (v Char) Source # 
Instance details

Methods

fromString :: String -> v Char #

(IsList (v a), Item (v a) ~ a, Monoid (v a), Eq (v a), Vector v a) => ListLike (v a) a Source # 
Instance details

Methods

empty :: v a Source #

singleton :: a -> v a Source #

cons :: a -> v a -> v a Source #

snoc :: v a -> a -> v a Source #

append :: v a -> v a -> v a Source #

head :: v a -> a Source #

uncons :: v a -> Maybe (a, v a) Source #

last :: v a -> a Source #

tail :: v a -> v a Source #

init :: v a -> v a Source #

null :: v a -> Bool Source #

length :: v a -> Int Source #

map :: ListLike full' item' => (a -> item') -> v a -> full' Source #

rigidMap :: (a -> a) -> v a -> v a Source #

reverse :: v a -> v a Source #

intersperse :: a -> v a -> v a Source #

concat :: ListLike full' (v a) => full' -> v a Source #

concatMap :: ListLike full' item' => (a -> full') -> v a -> full' Source #

rigidConcatMap :: (a -> v a) -> v a -> v a Source #

any :: (a -> Bool) -> v a -> Bool Source #

all :: (a -> Bool) -> v a -> Bool Source #

maximum :: v a -> a Source #

minimum :: v a -> a Source #

replicate :: Int -> a -> v a Source #

take :: Int -> v a -> v a Source #

drop :: Int -> v a -> v a Source #

splitAt :: Int -> v a -> (v a, v a) Source #

takeWhile :: (a -> Bool) -> v a -> v a Source #

dropWhile :: (a -> Bool) -> v a -> v a Source #

dropWhileEnd :: (a -> Bool) -> v a -> v a Source #

span :: (a -> Bool) -> v a -> (v a, v a) Source #

break :: (a -> Bool) -> v a -> (v a, v a) Source #

group :: (ListLike full' (v a), Eq a) => v a -> full' Source #

inits :: ListLike full' (v a) => v a -> full' Source #

tails :: ListLike full' (v a) => v a -> full' Source #

isPrefixOf :: v a -> v a -> Bool Source #

isSuffixOf :: v a -> v a -> Bool Source #

isInfixOf :: v a -> v a -> Bool Source #

stripPrefix :: v a -> v a -> Maybe (v a) Source #

stripSuffix :: v a -> v a -> Maybe (v a) Source #

elem :: a -> v a -> Bool Source #

notElem :: a -> v a -> Bool Source #

find :: (a -> Bool) -> v a -> Maybe a Source #

filter :: (a -> Bool) -> v a -> v a Source #

partition :: (a -> Bool) -> v a -> (v a, v a) Source #

index :: v a -> Int -> a Source #

elemIndex :: a -> v a -> Maybe Int Source #

elemIndices :: (Eq a, ListLike result Int) => a -> v a -> result Source #

findIndex :: (a -> Bool) -> v a -> Maybe Int Source #

findIndices :: ListLike result Int => (a -> Bool) -> v a -> result Source #

sequence :: (Applicative m, ListLike fullinp (m a)) => fullinp -> m (v a) Source #

mapM :: (Applicative m, ListLike full' item') => (a -> m item') -> v a -> m full' Source #

rigidMapM :: Monad m => (a -> m a) -> v a -> m (v a) Source #

nub :: v a -> v a Source #

delete :: a -> v a -> v a Source #

deleteFirsts :: v a -> v a -> v a Source #

union :: v a -> v a -> v a Source #

intersect :: v a -> v a -> v a Source #

sort :: v a -> v a Source #

insert :: a -> v a -> v a Source #

toList' :: v a -> [a] Source #

fromList' :: [a] -> v a Source #

fromListLike :: ListLike full' a => v a -> full' Source #

nubBy :: (a -> a -> Bool) -> v a -> v a Source #

deleteBy :: (a -> a -> Bool) -> a -> v a -> v a Source #

deleteFirstsBy :: (a -> a -> Bool) -> v a -> v a -> v a Source #

unionBy :: (a -> a -> Bool) -> v a -> v a -> v a Source #

intersectBy :: (a -> a -> Bool) -> v a -> v a -> v a Source #

groupBy :: (ListLike full' (v a), Eq a) => (a -> a -> Bool) -> v a -> full' Source #

sortBy :: (a -> a -> Ordering) -> v a -> v a Source #

insertBy :: (a -> a -> Ordering) -> a -> v a -> v a Source #

genericLength :: Num a0 => v a -> a0 Source #

genericTake :: Integral a0 => a0 -> v a -> v a Source #

genericDrop :: Integral a0 => a0 -> v a -> v a Source #

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

genericReplicate :: Integral a0 => a0 -> a -> v a Source #

Vector v a => FoldableLL (v a) a Source # 
Instance details

Methods

foldl :: (a0 -> a -> a0) -> a0 -> v a -> a0 Source #

foldl' :: (a0 -> a -> a0) -> a0 -> v a -> a0 Source #

foldl1 :: (a -> a -> a) -> v a -> a Source #

foldr :: (a -> b -> b) -> b -> v a -> b Source #

foldr' :: (a -> b -> b) -> b -> v a -> b Source #

foldr1 :: (a -> a -> a) -> v a -> a Source #