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

PortabilityHaskell 98



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


data T time body Source


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

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

empty :: T time bodySource

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

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

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