liqwid-plutarch-extra-3.21.1: A collection of Plutarch extras from Liqwid Labs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Plutarch.Extra.State

Synopsis

Documentation

data PState (s :: S -> Type) (a :: S -> Type) (s' :: S) Source #

Since: 1.0.0

Instances

Instances details
PApplicative (PState s) Source #

Since: 1.0.0

Instance details

Defined in Plutarch.Extra.State

Methods

ppure :: forall (a :: S -> Type) (s0 :: S). PSubcategory (PState s) a => Term s0 (a :--> PState s a) Source #

PApply (PState s) Source #

Since: 1.0.0

Instance details

Defined in Plutarch.Extra.State

Methods

pliftA2 :: forall (a :: S -> Type) (b :: S -> Type) (c :: S -> Type) (s0 :: S). (PSubcategory (PState s) a, PSubcategory (PState s) b, PSubcategory (PState s) c) => Term s0 ((a :--> (b :--> c)) :--> (PState s a :--> (PState s b :--> PState s c))) Source #

PBind (PState s) Source #

Since: 3.0.1

Instance details

Defined in Plutarch.Extra.State

Methods

(#>>=) :: forall (a :: S -> Type) (b :: S -> Type) (s0 :: S). (PSubcategory (PState s) a, PSubcategory (PState s) b) => Term s0 (PState s a) -> Term s0 (a :--> PState s b) -> Term s0 (PState s b) Source #

PFunctor (PState s) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.Extra.State

Associated Types

type PSubcategory (PState s) :: (S -> Type) -> Constraint Source #

Methods

pfmap :: forall (a :: S -> Type) (b :: S -> Type) (s0 :: S). (PSubcategory (PState s) a, PSubcategory (PState s) b) => Term s0 ((a :--> b) :--> (PState s a :--> PState s b)) Source #

pfconst :: forall (a :: S -> Type) (b :: S -> Type) (s0 :: S). (PSubcategory (PState s) a, PSubcategory (PState s) b) => Term s0 (a :--> (PState s b :--> PState s a)) Source #

DerivePlutusType (PState s a) Source #

Since: 1.4.0

Instance details

Defined in Plutarch.Extra.State

Associated Types

type DPTStrat (PState s a) Source #

PlutusType (PState s a) Source # 
Instance details

Defined in Plutarch.Extra.State

Associated Types

type PInner (PState s a) :: PType Source #

type PCovariant' (PState s a) Source #

type PContravariant' (PState s a) Source #

type PVariant' (PState s a) Source #

Methods

pcon' :: forall (s0 :: S). PState s a s0 -> Term s0 (PInner (PState s a)) Source #

pmatch' :: forall (s0 :: S) (b :: PType). Term s0 (PInner (PState s a)) -> (PState s a s0 -> Term s0 b) -> Term s0 b Source #

Generic (PState s a s') Source # 
Instance details

Defined in Plutarch.Extra.State

Associated Types

type Rep (PState s a s') :: Type -> Type Source #

Methods

from :: PState s a s' -> Rep (PState s a s') x Source #

to :: Rep (PState s a s') x -> PState s a s' Source #

type PSubcategory (PState s) Source # 
Instance details

Defined in Plutarch.Extra.State

type DPTStrat (PState s a) Source # 
Instance details

Defined in Plutarch.Extra.State

type PContravariant' (PState s a) Source # 
Instance details

Defined in Plutarch.Extra.State

type PContravariant' (PState s a) = All2 PContravariant'' (PCode (PState s a))
type PCovariant' (PState s a) Source # 
Instance details

Defined in Plutarch.Extra.State

type PCovariant' (PState s a) = All2 PCovariant'' (PCode (PState s a))
type PInner (PState s a) Source #

Since: 1.0.0

Instance details

Defined in Plutarch.Extra.State

type PInner (PState s a) = DerivedPInner (DPTStrat (PState s a)) (PState s a)
type PVariant' (PState s a) Source # 
Instance details

Defined in Plutarch.Extra.State

type PVariant' (PState s a) = All2 PVariant'' (PCode (PState s a))
type Rep (PState s a s') Source #

Since: 1.4.0

Instance details

Defined in Plutarch.Extra.State

type Rep (PState s a s') = D1 ('MetaData "PState" "Plutarch.Extra.State" "liqwid-plutarch-extra-3.21.1-KPadsMN5oqEA2Ctxwq6qig" 'True) (C1 ('MetaCons "PState" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s' (s :--> PPair s a)))))

pstate :: forall (s :: S -> Type) (a :: S -> Type) (s' :: S). Term s' ((s :--> PPair s a) :--> PState s a) Source #

Lift a Plutarch lambda into PState.

Since: 1.0.0

prunState :: forall (s :: S -> Type) (a :: S -> Type) (s' :: S). Term s' (PState s a :--> (s :--> PPair s a)) Source #

Since: 1.0.0

pevalState :: forall (s :: S -> Type) (a :: S -> Type) (s' :: S). Term s' (PState s a :--> (s :--> a)) Source #

Since: 1.0.0

pexecState :: forall (s :: S -> Type) (a :: S -> Type) (s' :: S). Term s' (PState s a :--> (s :--> s)) Source #

Since: 1.0.0

pget :: forall (s :: S -> Type) (s' :: S). Term s' (PState s s) Source #

Since: 1.0.0

pput :: forall (s :: S -> Type) (s' :: S). Term s' (s :--> PState s PUnit) Source #

Since: 1.0.0

pmodify :: forall (s :: S -> Type) (s' :: S). Term s' ((s :--> s) :--> PState s PUnit) Source #

Since: 1.0.0