Copyright | (c) Sirui Lu 2023 |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | siruilu@cs.washington.edu |
Stability | Experimental |
Portability | GHC only |
Safe Haskell | None |
Language | Haskell2010 |
Grisette.Experimental.MonadParallelUnion
Description
Synopsis
- class (MonadUnion m, TryMerge m) => MonadParallelUnion (m :: Type -> Type) where
- parBindUnion :: (Mergeable b, NFData b) => m a -> (a -> m b) -> m b
Documentation
class (MonadUnion m, TryMerge m) => MonadParallelUnion (m :: Type -> Type) 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:
import Grisette import qualified Grisette.Qualified.ParallelUnionDo as P P.do x <- mrgIf "a" (return 1) (return 2) :: Union Int return $ x + 1 -- {If a 2 3}
Methods
parBindUnion :: (Mergeable b, NFData b) => m a -> (a -> m b) -> m b Source #