foundation-0.0.21: Alternative prelude with batteries and no dependencies

LicenseBSD-style
MaintainerNicolas Di Prima <nicolas@primetype.co.uk>
Stabilitystatble
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Foundation.List.DList

Description

Data structure for optimised operations (append, cons, snoc) on list

Documentation

data DList a Source #

Instances
Monad DList Source # 
Instance details

Defined in Foundation.List.DList

Methods

(>>=) :: DList a -> (a -> DList b) -> DList b #

(>>) :: DList a -> DList b -> DList b #

return :: a -> DList a #

fail :: String -> DList a #

Functor DList Source # 
Instance details

Defined in Foundation.List.DList

Methods

fmap :: (a -> b) -> DList a -> DList b #

(<$) :: a -> DList b -> DList a #

Applicative DList Source # 
Instance details

Defined in Foundation.List.DList

Methods

pure :: a -> DList a #

(<*>) :: DList (a -> b) -> DList a -> DList b #

liftA2 :: (a -> b -> c) -> DList a -> DList b -> DList c #

(*>) :: DList a -> DList b -> DList b #

(<*) :: DList a -> DList b -> DList a #

IsList (DList a) Source # 
Instance details

Defined in Foundation.List.DList

Associated Types

type Item (DList a) :: * #

Methods

fromList :: [Item (DList a)] -> DList a #

fromListN :: Int -> [Item (DList a)] -> DList a #

toList :: DList a -> [Item (DList a)] #

Eq a => Eq (DList a) Source # 
Instance details

Defined in Foundation.List.DList

Methods

(==) :: DList a -> DList a -> Bool #

(/=) :: DList a -> DList a -> Bool #

Ord a => Ord (DList a) Source # 
Instance details

Defined in Foundation.List.DList

Methods

compare :: DList a -> DList a -> Ordering #

(<) :: DList a -> DList a -> Bool #

(<=) :: DList a -> DList a -> Bool #

(>) :: DList a -> DList a -> Bool #

(>=) :: DList a -> DList a -> Bool #

max :: DList a -> DList a -> DList a #

min :: DList a -> DList a -> DList a #

Show a => Show (DList a) Source # 
Instance details

Defined in Foundation.List.DList

Methods

showsPrec :: Int -> DList a -> ShowS #

show :: DList a -> String #

showList :: [DList a] -> ShowS #

Semigroup (DList a) Source # 
Instance details

Defined in Foundation.List.DList

Methods

(<>) :: DList a -> DList a -> DList a #

sconcat :: NonEmpty (DList a) -> DList a #

stimes :: Integral b => b -> DList a -> DList a #

Monoid (DList a) Source # 
Instance details

Defined in Foundation.List.DList

Methods

mempty :: DList a #

mappend :: DList a -> DList a -> DList a #

mconcat :: [DList a] -> DList a #

Collection (DList a) Source # 
Instance details

Defined in Foundation.List.DList

Methods

null :: DList a -> Bool Source #

length :: DList a -> CountOf (Element (DList a)) Source #

elem :: (Eq a0, a0 ~ Element (DList a)) => Element (DList a) -> DList a -> Bool Source #

notElem :: (Eq a0, a0 ~ Element (DList a)) => Element (DList a) -> DList a -> Bool Source #

maximum :: (Ord a0, a0 ~ Element (DList a)) => NonEmpty (DList a) -> Element (DList a) Source #

minimum :: (Ord a0, a0 ~ Element (DList a)) => NonEmpty (DList a) -> Element (DList a) Source #

any :: (Element (DList a) -> Bool) -> DList a -> Bool Source #

all :: (Element (DList a) -> Bool) -> DList a -> Bool Source #

Foldable (DList a) Source # 
Instance details

Defined in Foundation.List.DList

Methods

foldl' :: (a0 -> Element (DList a) -> a0) -> a0 -> DList a -> a0 Source #

foldr :: (Element (DList a) -> a0 -> a0) -> a0 -> DList a -> a0 Source #

foldr' :: (Element (DList a) -> a0 -> a0) -> a0 -> DList a -> a0 Source #

Sequential (DList a) Source # 
Instance details

Defined in Foundation.List.DList

Methods

take :: CountOf (Element (DList a)) -> DList a -> DList a Source #

revTake :: CountOf (Element (DList a)) -> DList a -> DList a Source #

drop :: CountOf (Element (DList a)) -> DList a -> DList a Source #

revDrop :: CountOf (Element (DList a)) -> DList a -> DList a Source #

splitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) Source #

revSplitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) Source #

splitOn :: (Element (DList a) -> Bool) -> DList a -> [DList a] Source #

break :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

breakEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

breakElem :: Element (DList a) -> DList a -> (DList a, DList a) Source #

takeWhile :: (Element (DList a) -> Bool) -> DList a -> DList a Source #

dropWhile :: (Element (DList a) -> Bool) -> DList a -> DList a Source #

intersperse :: Element (DList a) -> DList a -> DList a Source #

intercalate :: Element (DList a) -> DList a -> Element (DList a) Source #

span :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

spanEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

filter :: (Element (DList a) -> Bool) -> DList a -> DList a Source #

partition :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

reverse :: DList a -> DList a Source #

uncons :: DList a -> Maybe (Element (DList a), DList a) Source #

unsnoc :: DList a -> Maybe (DList a, Element (DList a)) Source #

snoc :: DList a -> Element (DList a) -> DList a Source #

cons :: Element (DList a) -> DList a -> DList a Source #

find :: (Element (DList a) -> Bool) -> DList a -> Maybe (Element (DList a)) Source #

sortBy :: (Element (DList a) -> Element (DList a) -> Ordering) -> DList a -> DList a Source #

singleton :: Element (DList a) -> DList a Source #

head :: NonEmpty (DList a) -> Element (DList a) Source #

last :: NonEmpty (DList a) -> Element (DList a) Source #

tail :: NonEmpty (DList a) -> DList a Source #

init :: NonEmpty (DList a) -> DList a Source #

replicate :: CountOf (Element (DList a)) -> Element (DList a) -> DList a Source #

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

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

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

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

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

type Item (DList a) Source # 
Instance details

Defined in Foundation.List.DList

type Item (DList a) = a
type Element (DList a) Source # 
Instance details

Defined in Foundation.List.DList

type Element (DList a) = a