event-list-0.1.1.1: Event lists with relative or absolute time stamps

PortabilityHaskell 98
Stabilitystable
Maintainerhaskell@henning-thielemann.de
Safe HaskellSafe-Inferred

Data.EventList.Relative.BodyTime

Description

Event lists starting with a body and ending with a time difference.

Documentation

data T time body Source

Instances

Functor (T time) 
Foldable (T time) 
Traversable (T time) 
(Eq time, Eq body) => Eq (T time body) 
(Ord time, Ord body) => Ord (T time body) 
(Show time, Show body) => Show (T time body) 
(Arbitrary time, Arbitrary body) => Arbitrary (T time body) 
Monoid (T time body) 

empty :: T time bodySource

singleton :: body -> time -> T time bodySource

null :: T time body -> BoolSource

fromPairList :: [(body, time)] -> T time bodySource

toPairList :: T time body -> [(body, time)]Source

getTimes :: T time body -> [time]Source

getBodies :: T time body -> [body]Source

duration :: Num time => T time body -> timeSource

durationR :: Num time => T time body -> timeSource

mapBody :: (body0 -> body1) -> T time body0 -> T time body1Source

mapTime :: (time0 -> time1) -> T time0 body -> T time1 bodySource

concatMapMonoid :: Monoid m => (time -> m) -> (body -> m) -> T time body -> mSource

traverse :: Applicative m => (time0 -> m time1) -> (body0 -> m body1) -> T time0 body0 -> m (T time1 body1)Source

traverse_ :: Applicative m => (time -> m ()) -> (body -> m ()) -> T time body -> m ()Source

traverseBody :: Applicative m => (body0 -> m body1) -> T time body0 -> m (T time body1)Source

traverseTime :: Applicative m => (time0 -> m time1) -> T time0 body -> m (T time1 body)Source

mapM :: Monad m => (time0 -> m time1) -> (body0 -> m body1) -> T time0 body0 -> m (T time1 body1)Source

mapM_ :: Monad m => (time -> m ()) -> (body -> m ()) -> T time body -> m ()Source

mapBodyM :: Monad m => (body0 -> m body1) -> T time body0 -> m (T time body1)Source

mapTimeM :: Monad m => (time0 -> m time1) -> T time0 body -> m (T time1 body)Source

foldr :: (body -> a -> b) -> (time -> b -> a) -> b -> T time body -> bSource

foldrPair :: (body -> time -> a -> a) -> a -> T time body -> aSource

cons :: body -> time -> T time body -> T time bodySource

snoc :: T time body -> body -> time -> T time bodySource

viewL :: T time body -> Maybe ((body, time), T time body)Source

viewR :: T time body -> Maybe (T time body, (body, time))Source

switchL :: c -> (body -> time -> T time body -> c) -> T time body -> cSource

switchR :: c -> (T time body -> body -> time -> c) -> T time body -> cSource

span :: (body -> Bool) -> T time body -> (T time body, T time body)Source