Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data PMaybe (a :: S -> Type) (s :: S)
- data PMaybeSoP (a :: S -> Type) (s :: S)
- = PJustSoP (Term s a)
- | PNothingSoP
- pjust :: forall (a :: S -> Type) (s :: S). Term s (a :--> PMaybe a)
- pnothing :: forall (a :: S -> Type) (s :: S). Term s (PMaybe a)
- pisJust :: forall (a :: S -> Type) (s :: S). Term s (PMaybe a :--> PBool)
- pfromJust :: forall (a :: S -> Type) (s :: S). Term s (PMaybe a :--> a)
- ptraceIfNothing :: forall (a :: S -> Type) (s :: S). Term s PString -> Term s (PMaybe a) -> Term s a
- pfromMaybe :: forall (a :: S -> Type) (s :: S). Term s (a :--> (PMaybe a :--> a))
- pmaybe :: forall (b :: S -> Type) (a :: S -> Type) (s :: S). Term s (b :--> ((a :--> b) :--> (PMaybe a :--> b)))
- passertPJust :: forall (a :: S -> Type) (s :: S). Term s (PString :--> (PMaybe a :--> a))
- pmapMaybe :: Term s ((a :--> b) :--> (PMaybe a :--> PMaybe b))
- pmapMaybeSoP :: Term s ((a :--> b) :--> (PMaybeSoP a :--> PMaybeSoP b))
- pmaybeToMaybeSoP :: Term s (PMaybe a :--> PMaybeSoP a)
- pmaybeSoPToMaybe :: Term s (PMaybeSoP a :--> PMaybe a)
Type
data PMaybe (a :: S -> Type) (s :: S) Source #
Plutus Maybe type, with Scott-encoded repr
Instances
data PMaybeSoP (a :: S -> Type) (s :: S) Source #
@since WIP
PJustSoP (Term s a) | |
PNothingSoP |
Instances
Functions
Introduction
pjust :: forall (a :: S -> Type) (s :: S). Term s (a :--> PMaybe a) Source #
Construct a PJust
value.
@since WIP
pnothing :: forall (a :: S -> Type) (s :: S). Term s (PMaybe a) Source #
Construct a PNothing
value.
@since WIP
Predicates
Eliminators
pmaybe :: forall (b :: S -> Type) (a :: S -> Type) (s :: S). Term s (b :--> ((a :--> b) :--> (PMaybe a :--> b))) Source #
passertPJust :: forall (a :: S -> Type) (s :: S). Term s (PString :--> (PMaybe a :--> a)) Source #
Extract the value stored in a PMaybe
container. If there's no value,
throw an error with the given message.
@since WIP