ghc-9.6.3: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Data.List.Infinite

Synopsis

Documentation

data Infinite a Source #

Constructors

Inf a (Infinite a) 

Instances

Instances details
Foldable Infinite Source # 
Instance details

Defined in GHC.Data.List.Infinite

Methods

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

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

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

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

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

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

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

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

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

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

null :: Infinite a -> Bool Source #

length :: Infinite a -> Int Source #

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

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

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

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

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

Traversable Infinite Source # 
Instance details

Defined in GHC.Data.List.Infinite

Methods

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

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

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

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

Applicative Infinite Source # 
Instance details

Defined in GHC.Data.List.Infinite

Methods

pure :: a -> Infinite a Source #

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

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

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

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

Functor Infinite Source # 
Instance details

Defined in GHC.Data.List.Infinite

Methods

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

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

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 #