event-monad- Event-graph simulation monad transformer




scheduleEventAt :: (ScheduleEvent m t e, Num t) => t -> e -> m EventIDSource

schedule an event at an absolute time (see scheduleEventIn)

retryEventAt :: (RetryEvent m t, Num t) => t -> m EventIDSource

retry the currently-executing event at an absolute time (see retryEventIn)

data EventDescriptor m t Source

An existential wrapper containing an event which can be executed in the monad m.

I would like to existentially quantify the time parameter too, since it's uniquely determined according to the functional dependencies of MonadTime, but GHC doesn't unify it with its actual type in pattern matches - I was not able to use it as a PrintfArg in:

 instance MonadEvent (EventT Double IO) (EventDescriptor (EventT Double IO))


forall e . ScheduleEvent m t e => EventDescriptor 


eventId :: EventID
eventTime :: t
event :: e


(Monad m, Pretty t) => MonadEvent (EventT t m) (EventDescriptor (EventT t m) t) 

newtype EventID Source

An opaque identifier for events.


EventID Int