Safe Haskell | None |
---|---|
Language | Haskell2010 |
Control.Super.Monad.Constrained.MonadPlus
Description
WARNING: This module is an experiment to see how MonadPlus
may be encoded.
The authors are not aware of any generalized monads that make use of MonadPlus
.
Hence, we do not know if this encoding of it is sufficient.
Therefore, the encoding is not in its final form and may change in the future.
- class AlternativeEmpty m => MonadPlusZero m where
- type MonadPlusZeroCts m a :: Constraint
- class AlternativeAlt f g h => MonadPlusAdd f g h where
- type MonadPlusAddCts f g h a :: Constraint
Documentation
class AlternativeEmpty m => MonadPlusZero m where Source #
The encoding of the mzero
operation.
Return
is not a superclass, because the indices or constraints involved
in an MonadPlusZero
instance may differ from those involved with the Return
instance.
WARNING: This module is an experiment to see how MonadPlus
may be encoded.
The authors are not aware of any generalized applicatives that make use of MonadPlus
.
Hence, we do not know if this encoding of it is sufficient.
Therefore, the encoding is not in its final form and may change in the future.
Minimal complete definition
Associated Types
type MonadPlusZeroCts m a :: Constraint Source #
Methods
mzero :: MonadPlusZeroCts m a => m a Source #
Instances
MonadPlusZero [] Source # | |
MonadPlusZero Maybe Source # | |
MonadPlusZero IO Source # | |
MonadPlusZero Option Source # | |
MonadPlusZero STM Source # | |
MonadPlusZero ReadPrec Source # | |
MonadPlusZero ReadP Source # | |
MonadPlusZero (U1 *) Source # | |
MonadPlusZero (Proxy *) Source # | |
MonadPlusZero f => MonadPlusZero (Rec1 * f) Source # | |
MonadPlusZero f => MonadPlusZero (Alt * f) Source # | |
(MonadPlusZero f, MonadPlusZero g) => MonadPlusZero ((:*:) * f g) Source # | |
(MonadPlusZero f, MonadPlusZero f') => MonadPlusZero (Product * f f') Source # | |
MonadPlusZero f => MonadPlusZero (M1 * i c f) Source # | |
class AlternativeAlt f g h => MonadPlusAdd f g h where Source #
The encoding of the mplus
operation
Bind
is not a superclass, because the indices or constraints involved
in an MonadPlusAdd
instance may differ from those involved with the Bind
instance.
WARNING: This module is an experiment to see how MonadPlus
may be encoded.
The authors are not aware of any generalized applicatives that make use of MonadPlus
.
Hence, we do not know if this encoding of it is sufficient.
Therefore, the encoding is not in its final form and may change in the future.
Minimal complete definition
Associated Types
type MonadPlusAddCts f g h a :: Constraint Source #
Methods
mplus :: MonadPlusAddCts f g h a => f a -> g a -> h a Source #
Instances
MonadPlusAdd [] [] [] Source # | |
MonadPlusAdd Maybe Maybe Maybe Source # | |
MonadPlusAdd IO IO IO Source # | |
MonadPlusAdd Option Option Option Source # | |
MonadPlusAdd STM STM STM Source # | |
MonadPlusAdd ReadPrec ReadPrec ReadPrec Source # | |
MonadPlusAdd ReadP ReadP ReadP Source # | |
MonadPlusAdd (U1 *) (U1 *) (U1 *) Source # | |
MonadPlusAdd (Proxy *) (Proxy *) (Proxy *) Source # | |
MonadPlusAdd f g h => MonadPlusAdd (Rec1 * f) (Rec1 * g) (Rec1 * h) Source # | |
MonadPlusAdd f g h => MonadPlusAdd (Alt * f) (Alt * g) (Alt * h) Source # | |
(MonadPlusAdd f g h, MonadPlusAdd f' g' h') => MonadPlusAdd ((:*:) * f f') ((:*:) * g g') ((:*:) * h h') Source # | |
(MonadPlusAdd f g h, MonadPlusAdd f' g' h') => MonadPlusAdd (Product * f f') (Product * g g') (Product * h h') Source # | |
MonadPlusAdd f g h => MonadPlusAdd (M1 * i c f) (M1 * i c g) (M1 * i c h) Source # | |