interruptible-0.1.0.0: Interruptible monad transformers - transformers that can be run and resumed later, conserving their context.

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Trans.Interruptible.Class

Documentation

class MonadTrans t => Interruptible t where

Associated Types

type RSt t :: * -> *

Methods

resume :: Monad m => (a -> t m b) -> RSt t a -> m (RSt t b)

Instances

resume2 :: (Monad m, Interruptible t, Monad (t m), Interruptible u) => (a -> u (t m) b) -> RSt t (RSt u a) -> m (RSt t (RSt u b))

resume3 :: (Monad m, Interruptible t0, Monad (t0 m), Interruptible t1, Monad (t1 (t0 m)), Interruptible t2) => (a -> t2 (t1 (t0 m)) b) -> RSt t0 (RSt t1 (RSt t2 a)) -> m (RSt t0 (RSt t1 (RSt t2 b)))

resume4 :: (Monad m, Interruptible t0, Interruptible t1, Interruptible t2, Interruptible t3, Monad (t0 m), Monad (t1 (t0 m)), Monad (t2 (t1 (t0 m)))) => (a -> t3 (t2 (t1 (t0 m))) b) -> RSt t0 (RSt t1 (RSt t2 (RSt t3 a))) -> m (RSt t0 (RSt t1 (RSt t2 (RSt t3 b))))

resume5 :: (Monad m, Interruptible t0, Interruptible t1, Interruptible t2, Interruptible t3, Interruptible t4, Monad (t0 m), Monad (t1 (t0 m)), Monad (t2 (t1 (t0 m))), Monad (t3 (t2 (t1 (t0 m))))) => (a -> t4 (t3 (t2 (t1 (t0 m)))) b) -> RSt t0 (RSt t1 (RSt t2 (RSt t3 (RSt t4 a)))) -> m (RSt t0 (RSt t1 (RSt t2 (RSt t3 (RSt t4 b)))))