GHC.Data.List.Infinite

ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Data.List.Infinite

Synopsis

- data Infinite a = Inf a (Infinite a)
- head :: Infinite a -> a
- tail :: Infinite a -> Infinite a
- filter :: (a -> Bool) -> Infinite a -> Infinite a
- (++) :: Foldable f => f a -> Infinite a -> Infinite a
- unfoldr :: (b -> (a, b)) -> b -> Infinite a
- (!!) :: Infinite a -> Int -> a
- groupBy :: (a -> a -> Bool) -> Infinite a -> Infinite (NonEmpty a)
- dropList :: [a] -> Infinite b -> Infinite b
- iterate :: (a -> a) -> a -> Infinite a
- concatMap :: Foldable f => (a -> f b) -> Infinite a -> Infinite b
- allListsOf :: [a] -> Infinite [a]
- toList :: Infinite a -> [a]
- repeat :: a -> Infinite a

# Documentation

data Infinite a #

Constructors

Inf a (Infinite a) |

#### Instances

Instances details

Applicative Infinite # |
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 # |
Instance details Defined in GHC.Data.List.Infinite Methods fmap :: (a -> b) -> Infinite a -> Infinite b # (<$) :: a -> Infinite b -> Infinite a #
Foldable Infinite # |
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 # |
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 #

tail :: Infinite a -> Infinite a #

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

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

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

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

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

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

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

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

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

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

toList :: Infinite a -> [a] #

repeat :: a -> Infinite a #