grisette-0.2.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2023
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Grisette.Core.Control.Monad.Class.MonadParallelUnion

Description

 
Synopsis

Documentation

class (UnionLike m, Monad m) => MonadParallelUnion m where Source #

Parallel union monad.

With the QualifiedDo extension and the Grisette.Qualified.ParallelUnionDo module, one can execute the paths in parallel and merge the results with:

:set -XQualifiedDo -XOverloadedStrings
import Grisette
import qualified Grisette.Qualified.ParallelUnionDo as P
P.do
  x <- mrgIf "a" (return 1) (return 2) :: UnionM Int
  return $ x + 1

-- {If a 2 3}

Methods

parBindUnion :: (Mergeable b, NFData b) => m a -> (a -> m b) -> m b Source #

Instances

Instances details
MonadParallelUnion UnionM Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

parBindUnion :: (Mergeable b, NFData b) => UnionM a -> (a -> UnionM b) -> UnionM b Source #

MonadParallelUnion m => MonadParallelUnion (MaybeT m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b Source #

(MonadParallelUnion m, Mergeable e, NFData e) => MonadParallelUnion (ExceptT e m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b Source #

MonadParallelUnion m => MonadParallelUnion (IdentityT m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b Source #

(MonadParallelUnion m, Mergeable a, NFData a) => MonadParallelUnion (ReaderT a m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => ReaderT a m a0 -> (a0 -> ReaderT a m b) -> ReaderT a m b Source #

(MonadParallelUnion m, Mergeable s, NFData s) => MonadParallelUnion (StateT s m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => StateT s m a -> (a -> StateT s m b) -> StateT s m b Source #

(MonadParallelUnion m, Mergeable s, NFData s) => MonadParallelUnion (StateT s m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => StateT s m a -> (a -> StateT s m b) -> StateT s m b Source #

(MonadParallelUnion m, Mergeable s, Monoid s, NFData s) => MonadParallelUnion (WriterT s m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => WriterT s m a -> (a -> WriterT s m b) -> WriterT s m b Source #

(MonadParallelUnion m, Mergeable s, Monoid s, NFData s) => MonadParallelUnion (WriterT s m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => WriterT s m a -> (a -> WriterT s m b) -> WriterT s m b Source #

(MonadParallelUnion m, Mergeable s, Mergeable r, Mergeable w, Monoid w, NFData r, NFData w, NFData s) => MonadParallelUnion (RWST r w s m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b Source #

(MonadParallelUnion m, Mergeable s, Mergeable r, Mergeable w, Monoid w, NFData r, NFData w, NFData s) => MonadParallelUnion (RWST r w s m) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.Class.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b Source #