feat: unliftaff
This commit is contained in:
parent
f58fa86d93
commit
4f7e9399f3
@ -3,6 +3,7 @@ package:
|
|||||||
- aff
|
- aff
|
||||||
- arrays
|
- arrays
|
||||||
- avar
|
- avar
|
||||||
|
- unlift
|
||||||
name: sync
|
name: sync
|
||||||
test:
|
test:
|
||||||
main: Test.Main
|
main: Test.Main
|
||||||
|
@ -9,6 +9,7 @@ import Control.Monad.Fork.Class (class MonadBracket, class MonadFork, class Mona
|
|||||||
import Control.Monad.Reader (class MonadAsk, ReaderT(..), ask)
|
import Control.Monad.Reader (class MonadAsk, ReaderT(..), ask)
|
||||||
import Control.Monad.Rec.Class (class MonadRec)
|
import Control.Monad.Rec.Class (class MonadRec)
|
||||||
import Control.Monad.Trans.Class (class MonadTrans, lift)
|
import Control.Monad.Trans.Class (class MonadTrans, lift)
|
||||||
|
import Control.Monad.Unlift (class MonadUnlift)
|
||||||
import Control.Parallel (class Parallel, parallel, sequential)
|
import Control.Parallel (class Parallel, parallel, sequential)
|
||||||
import Data.Async.Class (class AsyncState)
|
import Data.Async.Class (class AsyncState)
|
||||||
import Data.Async.Class as State
|
import Data.Async.Class as State
|
||||||
@ -20,7 +21,9 @@ import Data.Traversable (for, for_)
|
|||||||
import Data.Tuple (fst, snd)
|
import Data.Tuple (fst, snd)
|
||||||
import Data.Tuple.Nested (type (/\), (/\))
|
import Data.Tuple.Nested (type (/\), (/\))
|
||||||
import Effect.Aff.Class (class MonadAff)
|
import Effect.Aff.Class (class MonadAff)
|
||||||
|
import Effect.Aff.Unlift (class MonadUnliftAff)
|
||||||
import Effect.Class (class MonadEffect)
|
import Effect.Class (class MonadEffect)
|
||||||
|
import Effect.Unlift (class MonadUnliftEffect)
|
||||||
|
|
||||||
-- | Computations with a mutable value of type `s` that may be evaluated in parallel
|
-- | Computations with a mutable value of type `s` that may be evaluated in parallel
|
||||||
-- |
|
-- |
|
||||||
@ -172,6 +175,8 @@ derive newtype instance (MonadThrow e m) => MonadThrow e (AsyncStateT w s m)
|
|||||||
derive newtype instance (MonadError e m) => MonadError e (AsyncStateT w s m)
|
derive newtype instance (MonadError e m) => MonadError e (AsyncStateT w s m)
|
||||||
derive newtype instance (MonadFork f m) => MonadFork f (AsyncStateT w s m)
|
derive newtype instance (MonadFork f m) => MonadFork f (AsyncStateT w s m)
|
||||||
derive newtype instance (MonadRec m) => MonadRec (AsyncStateT w s m)
|
derive newtype instance (MonadRec m) => MonadRec (AsyncStateT w s m)
|
||||||
|
derive newtype instance (MonadUnliftAff m) => MonadUnliftAff (AsyncStateT w s m)
|
||||||
|
derive newtype instance (MonadUnliftEffect m) => MonadUnliftEffect (AsyncStateT w s m)
|
||||||
instance (Parallel f m) => Parallel (AsyncStateT w s f) (AsyncStateT w s m) where
|
instance (Parallel f m) => Parallel (AsyncStateT w s f) (AsyncStateT w s m) where
|
||||||
parallel a = wrap $ parallel $ unwrap a
|
parallel a = wrap $ parallel $ unwrap a
|
||||||
sequential a = wrap $ sequential $ unwrap a
|
sequential a = wrap $ sequential $ unwrap a
|
||||||
|
Loading…
Reference in New Issue
Block a user