Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Choose m k = Choose (Bool -> m k)
- (<|>) :: Has Choose sig m => m a -> m a -> m a
- optional :: Has Choose sig m => m a -> m (Maybe a)
- many :: Has Choose sig m => m a -> m [a]
- some :: Has Choose sig m => m a -> m [a]
- some1 :: Has Choose sig m => m a -> m (NonEmpty a)
- newtype Choosing m a = Choosing {
- getChoosing :: m a
- class (HFunctor sig, Monad m) => Algebra sig m | m -> sig
- type Has eff sig m = (Members eff sig, Algebra sig m)
- run :: Identity a -> a
Choose effect
Since: 1.0.0.0
Instances
Effect Choose Source # | |
HFunctor Choose Source # | |
Algebra Choose NonEmpty Source # | |
Algebra NonDet [] Source # | |
Defined in Control.Algebra | |
Functor m => Functor (Choose m) Source # | |
Generic1 (Choose m :: Type -> Type) Source # | |
(Algebra sig m, Effect sig) => Algebra (Choose :+: sig) (ChooseC m) Source # | |
(Algebra sig m, Effect sig) => Algebra (NonDet :+: sig) (NonDetC m) Source # | |
(Algebra sig m, Effect sig) => Algebra (Cut :+: (NonDet :+: sig)) (CutC m) Source # | |
(Algebra sig m, Effect sig) => Algebra (Cull :+: (NonDet :+: sig)) (CullC m) Source # | |
type Rep1 (Choose m :: Type -> Type) Source # | |
Defined in Control.Effect.Choose.Internal type Rep1 (Choose m :: Type -> Type) = D1 (MetaData "Choose" "Control.Effect.Choose.Internal" "fused-effects-1.0.0.0-inplace" True) (C1 (MetaCons "Choose" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (((->) Bool :: Type -> Type) :.: Rec1 m))) |
Choosing semigroup
Since: 1.0.0.0
Choosing | |
|
Re-exports
class (HFunctor sig, Monad m) => Algebra sig m | m -> sig Source #
The class of carriers (results) for algebras (effect handlers) over signatures (effects), whose actions are given by the alg
method.
Since: 1.0.0.0
Instances
type Has eff sig m = (Members eff sig, Algebra sig m) Source #
m
is a carrier for sig
containing eff
.
Note that if eff
is a sum, it will be decomposed into multiple Member
constraints. While this technically allows one to combine multiple unrelated effects into a single Has
constraint, doing so has two significant drawbacks:
- Due to a problem with recursive type families, this can lead to significantly slower compiles.
- It defeats
ghc
’s warnings for redundant constraints, and thus can lead to a proliferation of redundant constraints as code is changed.