Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- serveJobsAPI :: (Ord t, MonadError BackendInternalError m, MonadJob m t (Seq event) output, ToJSON event, ToJSON output, MimeRender JSON output, Foldable callback) => (JobID 'Safe -> LoggerM m event -> JobHandle m) -> m env -> t -> (JobError -> BackendInternalError) -> (env -> JobHandle m -> input -> IO (Either BackendInternalError output)) -> AsyncJobsServerT' ctI ctO callback event input output m
- newJob :: (Ord t, MonadJob m t (Seq event) output, ToJSON event, ToJSON output, MimeRender JSON output, Foldable callbacks) => (JobID 'Safe -> LoggerM m event -> JobHandle m) -> m env -> t -> (env -> JobHandle m -> input -> IO (Either BackendInternalError output)) -> JobInput callbacks input -> m (JobStatus 'Safe event)
Documentation
serveJobsAPI :: (Ord t, MonadError BackendInternalError m, MonadJob m t (Seq event) output, ToJSON event, ToJSON output, MimeRender JSON output, Foldable callback) => (JobID 'Safe -> LoggerM m event -> JobHandle m) -> m env -> t -> (JobError -> BackendInternalError) -> (env -> JobHandle m -> input -> IO (Either BackendInternalError output)) -> AsyncJobsServerT' ctI ctO callback event input output m #
Internals for testing
newJob :: (Ord t, MonadJob m t (Seq event) output, ToJSON event, ToJSON output, MimeRender JSON output, Foldable callbacks) => (JobID 'Safe -> LoggerM m event -> JobHandle m) -> m env -> t -> (env -> JobHandle m -> input -> IO (Either BackendInternalError output)) -> JobInput callbacks input -> m (JobStatus 'Safe event) #