dlist-nonempty-0.1.2: Non-empty difference lists
Safe HaskellUnsafe
LanguageHaskell2010

Data.DList.NonEmpty.Unsafe

Description

This module exports the internal representation of NonEmptyDList.

Use with care. It's very easy to break the safe interface:

>>> let nedl = NEDL ((1 :|) . map (+1))
>>> nedl <> nedl
fromNonEmpty (1 :| [2])
Synopsis

Documentation

newtype NonEmptyDList a Source #

A difference list is a function that, given a list, returns the original contents of the difference list prepended to the given list.

Implemented as a newtype over [a] -> NonEmpty a.

Constructors

NEDL 

Fields

Instances

Instances details
Foldable NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Methods

fold :: Monoid m => NonEmptyDList m -> m #

foldMap :: Monoid m => (a -> m) -> NonEmptyDList a -> m #

foldMap' :: Monoid m => (a -> m) -> NonEmptyDList a -> m #

foldr :: (a -> b -> b) -> b -> NonEmptyDList a -> b #

foldr' :: (a -> b -> b) -> b -> NonEmptyDList a -> b #

foldl :: (b -> a -> b) -> b -> NonEmptyDList a -> b #

foldl' :: (b -> a -> b) -> b -> NonEmptyDList a -> b #

foldr1 :: (a -> a -> a) -> NonEmptyDList a -> a #

foldl1 :: (a -> a -> a) -> NonEmptyDList a -> a #

toList :: NonEmptyDList a -> [a] #

null :: NonEmptyDList a -> Bool #

length :: NonEmptyDList a -> Int #

elem :: Eq a => a -> NonEmptyDList a -> Bool #

maximum :: Ord a => NonEmptyDList a -> a #

minimum :: Ord a => NonEmptyDList a -> a #

sum :: Num a => NonEmptyDList a -> a #

product :: Num a => NonEmptyDList a -> a #

Traversable NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Methods

traverse :: Applicative f => (a -> f b) -> NonEmptyDList a -> f (NonEmptyDList b) #

sequenceA :: Applicative f => NonEmptyDList (f a) -> f (NonEmptyDList a) #

mapM :: Monad m => (a -> m b) -> NonEmptyDList a -> m (NonEmptyDList b) #

sequence :: Monad m => NonEmptyDList (m a) -> m (NonEmptyDList a) #

Applicative NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Functor NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Methods

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

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

Monad NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Alt NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Apply NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Bind NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Foldable1 NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Methods

fold1 :: Semigroup m => NonEmptyDList m -> m #

foldMap1 :: Semigroup m => (a -> m) -> NonEmptyDList a -> m #

toNonEmpty :: NonEmptyDList a -> NonEmpty a #

Traversable1 NonEmptyDList Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Methods

traverse1 :: Apply f => (a -> f b) -> NonEmptyDList a -> f (NonEmptyDList b) #

sequence1 :: Apply f => NonEmptyDList (f b) -> f (NonEmptyDList b) #

a ~ Char => IsString (NonEmptyDList a) Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Semigroup (NonEmptyDList a) Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

IsList (NonEmptyDList a) Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Associated Types

type Item (NonEmptyDList a) #

Read a => Read (NonEmptyDList a) Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

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

Defined in Data.DList.NonEmpty.Internal

NFData a => NFData (NonEmptyDList a) Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

Methods

rnf :: NonEmptyDList a -> () #

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

Defined in Data.DList.NonEmpty.Internal

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

Defined in Data.DList.NonEmpty.Internal

type Item (NonEmptyDList a) Source # 
Instance details

Defined in Data.DList.NonEmpty.Internal

type Item (NonEmptyDList a) = a