Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Derive.LEvent

Contents

Synopsis

LEvent

data LEvent a Source #

Constructors

Event !a 
Log !Log.Msg 

Instances

Functor LEvent # 

Methods

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

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

Foldable LEvent # 

Methods

fold :: Monoid m => LEvent m -> 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 # 

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) #

Eq a => Eq (LEvent a) # 

Methods

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

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

Show a => Show (LEvent a) # 

Methods

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

show :: LEvent a -> String #

showList :: [LEvent a] -> ShowS #

DeepSeq.NFData a => DeepSeq.NFData (LEvent a) # 

Methods

rnf :: LEvent a -> () #

Pretty.Pretty d => Pretty.Pretty (LEvent d) # 

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 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 #