ghc-9.10.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Data.List.Infinite

Synopsis

Documentation

data Infinite a Source #

Constructors

Inf a (Infinite a) 

Instances

Instances details
Applicative Infinite Source # 
Instance details

Defined in GHC.Data.List.Infinite

Methods

pure :: a -> Infinite a #

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

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

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

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

Functor Infinite Source # 
Instance details

Defined in GHC.Data.List.Infinite

Methods

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

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

Foldable Infinite Source # 
Instance details

Defined in GHC.Data.List.Infinite

Methods

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

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

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

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

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

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

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

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

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

toList :: Infinite a -> [a] #

null :: Infinite a -> Bool #

length :: Infinite a -> Int #

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

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

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

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

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

Traversable Infinite Source # 
Instance details

Defined in GHC.Data.List.Infinite

Methods

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

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

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

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

head :: Infinite a -> a Source #

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

(++) :: Foldable f => f a -> Infinite a -> Infinite a infixr 5 Source #

unfoldr :: (b -> (a, b)) -> b -> Infinite a Source #

(!!) :: Infinite a -> Int -> a Source #

groupBy :: (a -> a -> Bool) -> Infinite a -> Infinite (NonEmpty a) Source #

dropList :: [a] -> Infinite b -> Infinite b Source #

iterate :: (a -> a) -> a -> Infinite a Source #

concatMap :: Foldable f => (a -> f b) -> Infinite a -> Infinite b Source #

allListsOf :: [a] -> Infinite [a] Source #

Compute all lists of the given alphabet. For example: allListsOf "ab" = ["a", "b", "aa", "ba", "ab", "bb", "aaa", "baa", "aba", ...]

toList :: Infinite a -> [a] Source #