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

Copyright(c) Henning Thielemann 2007-2010
Maintainerhaskell@henning-thielemann.de
Stabilitystable
PortabilityHaskell 98
Safe HaskellSafe
LanguageHaskell98

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

Methods

fmap :: (a -> b) -> T time a -> T time b #

(<$) :: a -> T time b -> T time a #

Foldable (T time) Source # 

Methods

fold :: Monoid m => T time m -> m #

foldMap :: Monoid m => (a -> m) -> T time a -> m #

foldr :: (a -> b -> b) -> b -> T time a -> b #

foldr' :: (a -> b -> b) -> b -> T time a -> b #

foldl :: (b -> a -> b) -> b -> T time a -> b #

foldl' :: (b -> a -> b) -> b -> T time a -> b #

foldr1 :: (a -> a -> a) -> T time a -> a #

foldl1 :: (a -> a -> a) -> T time a -> a #

toList :: T time a -> [a] #

null :: T time a -> Bool #

length :: T time a -> Int #

elem :: Eq a => a -> T time a -> Bool #

maximum :: Ord a => T time a -> a #

minimum :: Ord a => T time a -> a #

sum :: Num a => T time a -> a #

product :: Num a => T time a -> a #

Traversable (T time) Source # 

Methods

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

sequenceA :: Applicative f => T time (f a) -> f (T time a) #

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

sequence :: Monad m => T time (m a) -> m (T time a) #

(Eq time, Eq body) => Eq (T time body) Source # 

Methods

(==) :: T time body -> T time body -> Bool #

(/=) :: T time body -> T time body -> Bool #

(Ord time, Ord body) => Ord (T time body) Source # 

Methods

compare :: T time body -> T time body -> Ordering #

(<) :: T time body -> T time body -> Bool #

(<=) :: T time body -> T time body -> Bool #

(>) :: T time body -> T time body -> Bool #

(>=) :: T time body -> T time body -> Bool #

max :: T time body -> T time body -> T time body #

min :: T time body -> T time body -> T time body #

(Show time, Show body) => Show (T time body) Source # 

Methods

showsPrec :: Int -> T time body -> ShowS #

show :: T time body -> String #

showList :: [T time body] -> ShowS #

Semigroup (T time body) Source # 

Methods

(<>) :: T time body -> T time body -> T time body #

sconcat :: NonEmpty (T time body) -> T time body #

stimes :: Integral b => b -> T time body -> T time body #

Monoid (T time body) Source # 

Methods

mempty :: T time body #

mappend :: T time body -> T time body -> T time body #

mconcat :: [T time body] -> T time body #

(Arbitrary time, Arbitrary body) => Arbitrary (T time body) Source # 

Methods

arbitrary :: Gen (T time body) #

shrink :: T time body -> [T time body] #

empty :: T time body Source #

singleton :: body -> time -> T time body Source #

null :: T time body -> Bool Source #

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

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

durationR :: Num time => T time body -> time Source #

mapBody :: (body0 -> body1) -> T time body0 -> T time body1 Source #

mapTime :: (time0 -> time1) -> T time0 body -> T time1 body Source #

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

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

foldrPair :: (body -> time -> a -> a) -> a -> T time body -> a Source #

cons :: body -> time -> T time body -> T time body Source #

snoc :: T time body -> body -> time -> T time body Source #

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

switchR :: c -> (T time body -> body -> time -> c) -> T time body -> c Source #

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