Foundation.List.DList

foundation-0.0.30: Alternative prelude with batteries and no dependencies

License | BSD-style
Maintainer | Nicolas Di Prima <nicolas@primetype.co.uk>
Stability | statble
Portability | portable
Safe Haskell | None
Language | Haskell2010

Foundation.List.DList

Description

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

# Documentation

data DList a #

#### Instances

Instances details

Applicative DList # |
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 #
Functor DList # |
Instance details Defined in Foundation.List.DList Methods fmap :: (a -> b) -> DList a -> DList b # (<$) :: a -> DList b -> DList a #
Monad DList # |
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 #
Collection (DList a) # |
Instance details Defined in Foundation.List.DList Methods null :: DList a -> Bool # length :: DList a -> CountOf (Element (DList a)) # elem :: (Eq a0, a0 ~ Element (DList a)) => Element (DList a) -> DList a -> Bool # notElem :: (Eq a0, a0 ~ Element (DList a)) => Element (DList a) -> DList a -> Bool # maximum :: (Ord a0, a0 ~ Element (DList a)) => NonEmpty (DList a) -> Element (DList a) # minimum :: (Ord a0, a0 ~ Element (DList a)) => NonEmpty (DList a) -> Element (DList a) # any :: (Element (DList a) -> Bool) -> DList a -> Bool # all :: (Element (DList a) -> Bool) -> DList a -> Bool #
Foldable (DList a) # |
Instance details Defined in Foundation.List.DList Methods foldl' :: (a0 -> Element (DList a) -> a0) -> a0 -> DList a -> a0 # foldr :: (Element (DList a) -> a0 -> a0) -> a0 -> DList a -> a0 # foldr' :: (Element (DList a) -> a0 -> a0) -> a0 -> DList a -> a0 #
Sequential (DList a) # |
Instance details Defined in Foundation.List.DList Methods take :: CountOf (Element (DList a)) -> DList a -> DList a # revTake :: CountOf (Element (DList a)) -> DList a -> DList a # drop :: CountOf (Element (DList a)) -> DList a -> DList a # revDrop :: CountOf (Element (DList a)) -> DList a -> DList a # splitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) # revSplitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) # splitOn :: (Element (DList a) -> Bool) -> DList a -> [DList a] # break :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # breakEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # breakElem :: Element (DList a) -> DList a -> (DList a, DList a) # takeWhile :: (Element (DList a) -> Bool) -> DList a -> DList a # dropWhile :: (Element (DList a) -> Bool) -> DList a -> DList a # intersperse :: Element (DList a) -> DList a -> DList a # intercalate :: Element (DList a) -> DList a -> Element (DList a) # span :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # spanEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # filter :: (Element (DList a) -> Bool) -> DList a -> DList a # partition :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # reverse :: DList a -> DList a # uncons :: DList a -> Maybe (Element (DList a), DList a) # unsnoc :: DList a -> Maybe (DList a, Element (DList a)) # snoc :: DList a -> Element (DList a) -> DList a # cons :: Element (DList a) -> DList a -> DList a # find :: (Element (DList a) -> Bool) -> DList a -> Maybe (Element (DList a)) # sortBy :: (Element (DList a) -> Element (DList a) -> Ordering) -> DList a -> DList a # singleton :: Element (DList a) -> DList a # head :: NonEmpty (DList a) -> Element (DList a) # last :: NonEmpty (DList a) -> Element (DList a) # tail :: NonEmpty (DList a) -> DList a # init :: NonEmpty (DList a) -> DList a # replicate :: CountOf (Element (DList a)) -> Element (DList a) -> DList a # isPrefixOf :: DList a -> DList a -> Bool # isSuffixOf :: DList a -> DList a -> Bool # isInfixOf :: DList a -> DList a -> Bool # stripPrefix :: DList a -> DList a -> Maybe (DList a) # stripSuffix :: DList a -> DList a -> Maybe (DList a) #
Monoid (DList a) # |
Instance details Defined in Foundation.List.DList Methods mempty :: DList a # mappend :: DList a -> DList a -> DList a # mconcat :: [DList a] -> DList a #
Semigroup (DList a) # |
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 #
IsList (DList a) # |
Instance details Defined in Foundation.List.DList Associated Types
type Item (DList a) |
Instance details Defined in Foundation.List.DList type Item (DList a) = a
Methods fromList :: [Item (DList a)] -> DList a # fromListN :: Int -> [Item (DList a)] -> DList a # toList :: DList a -> [Item (DList a)] #
Show a => Show (DList a) # |
Instance details Defined in Foundation.List.DList Methods showsPrec :: Int -> DList a -> ShowS # show :: DList a -> String # showList :: [DList a] -> ShowS #
Eq a => Eq (DList a) # |
Instance details Defined in Foundation.List.DList Methods (==) :: DList a -> DList a -> Bool # (/=) :: DList a -> DList a -> Bool #
Ord a => Ord (DList a) # |
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 #
type Element (DList a) # |
Instance details Defined in Foundation.List.DList type Element (DList a) = a
type Item (DList a) # |
Instance details Defined in Foundation.List.DList type Item (DList a) = a