| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Plutarch.Extra.Bind
Contents
Type class
class PApply f => PBind (f :: (S -> Type) -> S -> Type) where Source #
Gives the capability to bind a Kleisli arrow over f to a value:
essentially, the equivalent of Haskell's >>=. Unlike Haskell, we don't
require the availability of pure: to recover the equivalent of Haskell's
Monad, you want both PApplicative and PBind.
Laws
Since: 3.0.1
Methods
(#>>=) :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). (PSubcategory f a, PSubcategory f b) => Term s (f a) -> Term s (a :--> f b) -> Term s (f b) infixl 1 Source #
Instances
| PBind PIdentity Source # | Since: 3.0.1 |
| PBind PMaybeData Source # | Since: 3.0.1 |
Defined in Plutarch.Extra.Bind Methods (#>>=) :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). (PSubcategory PMaybeData a, PSubcategory PMaybeData b) => Term s (PMaybeData a) -> Term s (a :--> PMaybeData b) -> Term s (PMaybeData b) Source # | |
| PBind PBuiltinList Source # | Since: 3.0.1 |
Defined in Plutarch.Extra.Bind Methods (#>>=) :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). (PSubcategory PBuiltinList a, PSubcategory PBuiltinList b) => Term s (PBuiltinList a) -> Term s (a :--> PBuiltinList b) -> Term s (PBuiltinList b) Source # | |
| PBind PList Source # | Since: 3.0.1 |
| PBind PMaybe Source # | Since: 3.0.1 |
| PBind (PState s) Source # | Since: 3.0.1 |
| PBind (PEither e) Source # | Forwards the first Since: 3.0.1 |
| (forall (s :: S). Semigroup (Term s a)) => PBind (PPair a) Source # | Since: 3.0.1 |
| PBind f => PBind (PStar f a) Source # | Strengthening to Since: 3.0.1 |