Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- class PPointed m id where
- class (Functor (m t), Functor (m u), Functor (m v)) => PApplicative m t u v | t u -> v where
- (&<*>) :: PApplicative m t u v => m t (a -> b) -> m u a -> m v b
- (&*>) :: PApplicative m t u v => m t a -> m u b -> m v b
- (&<*) :: PApplicative m t u v => m t a -> m u b -> m v a
- pliftA :: Functor (m t) => (a -> b) -> m t a -> m t b
- pliftA2 :: PApplicative m t u v => (a -> b -> c) -> m t a -> m u b -> m v c
- pliftA3 :: (PApplicative m t u v, PApplicative m v w x) => (a -> b -> c -> d) -> m t a -> m u b -> m w c -> m x d
- class PEmpty m id | m -> id where
- class PAlternative m t u v | t u -> v where
- (&<|>) :: PAlternative m t u v => m t a -> m u a -> m v a
Documentation
class PPointed m id where Source #
Parameterized version of pure
in Applicative
An instance of this should create a parameterized unary type
where the parameter is an identity in respect to papply
Applicative m => PPointed * (ManyReader m) (Many ([] Type)) Source # | |
Applicative m => PPointed * (DistinctWhichReader m) (Which ([] Type)) Source # | |
Applicative m => PPointed * (OverlappingWhichReader m) (Which ([] Type)) Source # | |
Monad m => PPointed * (ManyState m) (Many ([] Type)) Source # | |
Applicative m => PPointed * (ChangingState m) (s, s) Source # | |
class (Functor (m t), Functor (m u), Functor (m v)) => PApplicative m t u v | t u -> v where Source #
Parameterized version of ap
in Applicative
NB. PPointed
cannot be made a superclass because type variable id
is not in scope.
(Functor (ManyReader m (Many c)), Applicative m, Select a c, Select b c, (~) [Type] c (AppendUnique Type a b)) => PApplicative * (ManyReader m) (Many a) (Many b) (Many c) Source # | |
(Monad m, Select a c, Select b c, Amend a c, Amend b c, (~) [Type] c (AppendUnique Type a b)) => PApplicative * (ManyState m) (Many a) (Many b) (Many c) Source # | |
Monad m => PApplicative * (ChangingState m) (s, t) (t, u) (s, u) Source # | |
(&<*>) :: PApplicative m t u v => m t (a -> b) -> m u a -> m v b infixl 4 Source #
Sequential application.
(&*>) :: PApplicative m t u v => m t a -> m u b -> m v b infixl 4 Source #
Sequence actions, discarding the value of the first argument.
(&<*) :: PApplicative m t u v => m t a -> m u b -> m v a infixl 4 Source #
Sequence actions, discarding the value of the second argument.
pliftA2 :: PApplicative m t u v => (a -> b -> c) -> m t a -> m u b -> m v c Source #
Lift a binary function to actions.
pliftA3 :: (PApplicative m t u v, PApplicative m v w x) => (a -> b -> c -> d) -> m t a -> m u b -> m w c -> m x d Source #
Lift a ternary function to actions.
class PEmpty m id | m -> id where Source #
Parameterized version of empty in Alternative
.
An instance of this should create a parameterized unary type
where the parameter is an identity in respect to pappend
Alternative m => PEmpty * (ManyReader m) (Many ([] Type)) Source # | |
Alternative m => PEmpty * (DistinctWhichReader m) (Which ([] Type)) Source # | |
Alternative m => PEmpty * (OverlappingWhichReader m) (Which ([] Type)) Source # | |
Alternative m => PEmpty * (ManyState m) (Many ([] Type)) Source # | |
class PAlternative m t u v | t u -> v where Source #
Parameterized version of Alternative
NB. PEmpty
cannot be made a superclass because type variable id
will be ambiguous.
NB. PAlternative doensn't require PApplicative
as a superclass, because
Some things can be made instances of PAlternative
but not PApplicative
.
(Functor (ManyReader m (Many c)), Alternative m, Select a c, Select b c, (~) [Type] c (AppendUnique Type a b)) => PAlternative * (ManyReader m) (Many a) (Many b) (Many c) Source # | |
(Reinterpret b c, (~) [Type] (Complement Type c b) a, (~) [Type] (Complement Type c a) b, (~) [Type] c (Append Type a b)) => PAlternative * (DistinctWhichReader m) (Which a) (Which b) (Which c) Source # | |
(Alternative m, Reinterpret b c, Reinterpret a c, (~) [Type] c (AppendUnique Type a b)) => PAlternative * (OverlappingWhichReader m) (Which a) (Which b) (Which c) Source # | |
(Monad m, Alternative m, Select a c, Select b c, Amend a c, Amend b c, (~) [Type] c (AppendUnique Type a b)) => PAlternative * (ManyState m) (Many a) (Many b) (Many c) Source # | |
(&<|>) :: PAlternative m t u v => m t a -> m u a -> m v a infixl 3 Source #