streams-3.3: Various Haskell 2010 stream comonads

Copyright(C) 2011-2015 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell98

Data.Stream.Future

Description

 

Synopsis

Documentation

data Future a Source #

Constructors

Last a 
a :< (Future a) infixr 5 

Instances

Functor Future Source # 

Methods

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

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

Applicative Future Source # 

Methods

pure :: a -> Future a #

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

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

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

Foldable Future Source # 

Methods

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

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

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

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

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

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

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

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

toList :: Future a -> [a] #

null :: Future a -> Bool #

length :: Future a -> Int #

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

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

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

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

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

Traversable Future Source # 

Methods

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

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

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

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

Comonad Future Source # 

Methods

extract :: Future a -> a #

duplicate :: Future a -> Future (Future a) #

extend :: (Future a -> b) -> Future a -> Future b #

ComonadApply Future Source # 

Methods

(<@>) :: Future (a -> b) -> Future a -> Future b #

(@>) :: Future a -> Future b -> Future b #

(<@) :: Future a -> Future b -> Future a #

Traversable1 Future Source # 

Methods

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

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

Alt Future Source # 

Methods

(<!>) :: Future a -> Future a -> Future a #

some :: Applicative Future => Future a -> Future [a] #

many :: Applicative Future => Future a -> Future [a] #

Apply Future Source # 

Methods

(<.>) :: Future (a -> b) -> Future a -> Future b #

(.>) :: Future a -> Future b -> Future b #

(<.) :: Future a -> Future b -> Future a #

Extend Future Source # 

Methods

duplicated :: Future a -> Future (Future a) #

extended :: (Future a -> b) -> Future a -> Future b #

Foldable1 Future Source # 

Methods

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

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

IsList (Future a) Source # 

Associated Types

type Item (Future a) :: * #

Methods

fromList :: [Item (Future a)] -> Future a #

fromListN :: Int -> [Item (Future a)] -> Future a #

toList :: Future a -> [Item (Future a)] #

Eq a => Eq (Future a) Source # 

Methods

(==) :: Future a -> Future a -> Bool #

(/=) :: Future a -> Future a -> Bool #

Data a => Data (Future a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Future a -> c (Future a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Future a) #

toConstr :: Future a -> Constr #

dataTypeOf :: Future a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Future a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Future a)) #

gmapT :: (forall b. Data b => b -> b) -> Future a -> Future a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Future a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Future a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Future a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Future a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Future a -> m (Future a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Future a -> m (Future a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Future a -> m (Future a) #

Ord a => Ord (Future a) Source # 

Methods

compare :: Future a -> Future a -> Ordering #

(<) :: Future a -> Future a -> Bool #

(<=) :: Future a -> Future a -> Bool #

(>) :: Future a -> Future a -> Bool #

(>=) :: Future a -> Future a -> Bool #

max :: Future a -> Future a -> Future a #

min :: Future a -> Future a -> Future a #

Read a => Read (Future a) Source # 
Show a => Show (Future a) Source # 

Methods

showsPrec :: Int -> Future a -> ShowS #

show :: Future a -> String #

showList :: [Future a] -> ShowS #

Semigroup (Future a) Source # 

Methods

(<>) :: Future a -> Future a -> Future a #

sconcat :: NonEmpty (Future a) -> Future a #

stimes :: Integral b => b -> Future a -> Future a #

type Item (Future a) Source # 
type Item (Future a) = a

length :: Foldable t => forall a. t a -> Int #

Returns the size/length of a finite structure as an Int. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

index :: Int -> Future a -> a Source #