Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Derive.LEvent

Contents

Synopsis

LEvent

data LEvent a Source #

Constructors

Event !a 
Log !Log.Msg 

Instances

Instances details
Foldable LEvent Source # 
Instance details

Defined in Derive.LEvent

Methods

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

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

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

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

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

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

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

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

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

toList :: LEvent a -> [a] #

null :: LEvent a -> Bool #

length :: LEvent a -> Int #

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

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

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

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

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

Traversable LEvent Source # 
Instance details

Defined in Derive.LEvent

Methods

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

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

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

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

Functor LEvent Source # 
Instance details

Defined in Derive.LEvent

Methods

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

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

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

Defined in Derive.LEvent

Methods

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

show :: LEvent a -> String #

showList :: [LEvent a] -> ShowS #

DeepSeq.NFData a => DeepSeq.NFData (LEvent a) Source # 
Instance details

Defined in Derive.LEvent

Methods

rnf :: LEvent a -> () #

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

Defined in Derive.LEvent

Methods

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

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

Pretty.Pretty d => Pretty.Pretty (LEvent d) Source # 
Instance details

Defined in Derive.LEvent

format_log :: Log.Msg -> Doc Source #

A variation on Log.format_msg, except this can format the stack nicely.

log_or :: (d -> Bool) -> LEvent d -> Bool Source #

Always true for logs. Useful for take and drop on events.

drop_while :: (a -> Bool) -> [LEvent a] -> [LEvent a] Source #

Drop while the predicate is true, but keep preceding logs.

take_while :: (a -> Bool) -> [LEvent a] -> [LEvent a] Source #

either :: (d -> a) -> (Log.Msg -> a) -> LEvent d -> a Source #

find_event :: (a -> Bool) -> [LEvent a] -> Maybe a Source #

events_of :: [LEvent d] -> [d] Source #

write_logs :: Log.LogMonad m => [LEvent d] -> m [d] Source #

write_snd :: Log.LogMonad m => (a, [Log.Msg]) -> m a Source #

partition :: [LEvent d] -> ([d], [Log.Msg]) Source #

map_accum :: (state -> a -> [a] -> (state, [b])) -> state -> [LEvent a] -> (state, [[LEvent b]]) Source #

This is similar to List.mapAccumL, but lifted into LEvents. It also passes future events to the function.

map_around :: ([a] -> a -> [a] -> [b]) -> [LEvent a] -> [[LEvent b]] Source #

Like map_accum, but provide past and future events to the function.

zip :: [a] -> [LEvent x] -> [LEvent (a, x)] Source #

zip3 :: [a] -> [b] -> [LEvent x] -> [LEvent (a, b, x)] Source #

zip4 :: [a] -> [b] -> [c] -> [LEvent x] -> [LEvent (a, b, c, x)] Source #