Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- data Task a = Task {
- taskStart :: MVar (Maybe (SomeException -> IO ()))
- taskResult :: TaskResult a
- data TaskException
- data TaskResult a = TaskResult {
- taskResultEmpty :: IO Bool
- taskResultTryRead :: IO (Maybe (Either SomeException a))
- taskResultTake :: IO (Either SomeException a)
- taskResultFail :: SomeException -> IO ()
- taskStarted :: Task a -> IO Bool
- taskRunning :: Task a -> IO Bool
- taskStopped :: Task a -> IO Bool
- taskDone :: Task a -> IO Bool
- taskFailed :: Task a -> IO Bool
- taskCancelled :: Task a -> IO Bool
- taskWaitStart :: Task a -> IO Bool
- taskWait :: Task a -> IO (Either SomeException a)
- taskKill :: Task a -> IO ()
- taskCancel :: Task a -> IO Bool
- taskStop :: Task a -> IO Bool
- runTask :: (MonadCatch m, MonadIO m, MonadIO n) => (m () -> n ()) -> m a -> n (Task a)
- runTask_ :: (MonadCatch m, MonadIO m, MonadIO n) => (Task a -> m () -> n ()) -> m a -> n (Task a)
- forkTask :: IO a -> IO (Task a)
Documentation
Task result
Task | |
|
data TaskException Source
data TaskResult a Source
TaskResult | |
|
taskStarted :: Task a -> IO Bool Source
taskRunning :: Task a -> IO Bool Source
taskStopped :: Task a -> IO Bool Source
taskFailed :: Task a -> IO Bool Source
taskCancelled :: Task a -> IO Bool Source
taskWaitStart :: Task a -> IO Bool Source
Wait until task starts or be cancelled, returns True if started
taskCancel :: Task a -> IO Bool Source
Cancel task if it is not started yet