plutus-contract-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.Contract.StateMachine

Synopsis

Documentation

To write your contract as a state machine you need * Two types state and input for the state and inputs of the machine * A 'SM.StateMachineInstance state input' describing the transitions and checks of the state machine (this is the on-chain code) * A 'StateMachineClient state input' with the state machine instance and an allocation function

In many cases it is enough to define the transition function t :: (state, Value) -> input -> Maybe (TxConstraints state) and use mkStateMachine and mkStateMachineClient to get the client. You can then use runInitialise and runStep to initialise and transition the state machine. runStep gets the current state from the utxo set and makes the transition to the next state using the given input and taking care of all payments.

data StateMachineClient s i Source #

Client-side definition of a state machine.

Constructors

StateMachineClient 

Fields

data TxConstraints i o Source #

Restrictions placed on the allocation of funds to outputs of transactions.

Instances

Instances details
Bifunctor TxConstraints 
Instance details

Defined in Ledger.Constraints.TxConstraints

Methods

bimap :: (a -> b) -> (c -> d) -> TxConstraints a c -> TxConstraints b d Source #

first :: (a -> b) -> TxConstraints a c -> TxConstraints b c Source #

second :: (b -> c) -> TxConstraints a b -> TxConstraints a c Source #

(Eq i, Eq o) => Eq (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

(Show i, Show o) => Show (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

Generic (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

Associated Types

type Rep (TxConstraints i o) :: Type -> Type Source #

Methods

from :: TxConstraints i o -> Rep (TxConstraints i o) x Source #

to :: Rep (TxConstraints i o) x -> TxConstraints i o Source #

Semigroup (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

Monoid (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

(ToJSON i, ToJSON o) => ToJSON (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

(FromJSON i, FromJSON o) => FromJSON (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

Monoid (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

Semigroup (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

type Rep (TxConstraints i o) 
Instance details

Defined in Ledger.Constraints.TxConstraints

type Rep (TxConstraints i o) = D1 ('MetaData "TxConstraints" "Ledger.Constraints.TxConstraints" "plutus-ledger-constraints-0.1.0.0-AdCuTwHqkQFFnwldCwEXkg" 'False) (C1 ('MetaCons "TxConstraints" 'PrefixI 'True) (S1 ('MetaSel ('Just "txConstraints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxConstraint]) :*: (S1 ('MetaSel ('Just "txOwnInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ScriptInputConstraint i]) :*: S1 ('MetaSel ('Just "txOwnOutputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ScriptOutputConstraint o]))))

data SMContractError Source #

Instances

Instances details
Eq SMContractError Source # 
Instance details

Defined in Plutus.Contract.StateMachine

Show SMContractError Source # 
Instance details

Defined in Plutus.Contract.StateMachine

Generic SMContractError Source # 
Instance details

Defined in Plutus.Contract.StateMachine

Associated Types

type Rep SMContractError :: Type -> Type Source #

ToJSON SMContractError Source # 
Instance details

Defined in Plutus.Contract.StateMachine

FromJSON SMContractError Source # 
Instance details

Defined in Plutus.Contract.StateMachine

AsContractError SMContractError Source # 
Instance details

Defined in Plutus.Contract.StateMachine

AsSMContractError SMContractError Source # 
Instance details

Defined in Plutus.Contract.StateMachine

type Rep SMContractError Source # 
Instance details

Defined in Plutus.Contract.StateMachine

type Rep SMContractError = D1 ('MetaData "SMContractError" "Plutus.Contract.StateMachine" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "ChooserError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "UnableToExtractTransition" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SMCContractError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError))))

data StateMachine s i Source #

Specification of a state machine, consisting of a transition function that determines the next state from the current state and an input, and a checking function that checks the validity of the transition in the context of the current transaction.

Constructors

StateMachine 

Fields

  • smTransition :: State s -> i -> Maybe (TxConstraints Void Void, State s)

    The transition function of the state machine. Nothing indicates an invalid transition from the current state.

  • smFinal :: s -> Bool

    Check whether a state is the final state

  • smCheck :: s -> i -> ScriptContext -> Bool

    The condition checking function. Can be used to perform checks on the pending transaction that aren't covered by the constraints. smCheck is always run in addition to checking the constraints, so the default implementation always returns true.

  • smThreadToken :: Maybe ThreadToken

    The ThreadToken that identifies the contract instance. Make one with getThreadToken and pass it on to mkStateMachine. Initialising the machine will then mint a thread token value.

Instances

Instances details
ValidatorTypes (StateMachine s i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine.OnChain

Associated Types

type RedeemerType (StateMachine s i) Source #

type DatumType (StateMachine s i) Source #

type DatumType (StateMachine s i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine.OnChain

type DatumType (StateMachine s i) = s
type RedeemerType (StateMachine s i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine.OnChain

type RedeemerType (StateMachine s i) = i

data StateMachineInstance s i Source #

Constructors

StateMachineInstance 

Fields

data State s Source #

Constructors

State 

Fields

Instances

Instances details
Eq s => Eq (State s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine.OnChain

Methods

(==) :: State s -> State s -> Bool Source #

(/=) :: State s -> State s -> Bool Source #

Show s => Show (State s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine.OnChain

Generic (State s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine.OnChain

Associated Types

type Rep (State s) :: Type -> Type Source #

Methods

from :: State s -> Rep (State s) x Source #

to :: Rep (State s) x -> State s Source #

ToJSON s => ToJSON (State s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine.OnChain

FromJSON s => FromJSON (State s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine.OnChain

type Rep (State s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine.OnChain

type Rep (State s) = D1 ('MetaData "State" "Plutus.Contract.StateMachine.OnChain" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "State" 'PrefixI 'True) (S1 ('MetaSel ('Just "stateData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 s) :*: S1 ('MetaSel ('Just "stateValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)))

data OnChainState s i Source #

Typed representation of the on-chain state of a state machine instance

Constructors

OnChainState 

Fields

data WaitingResult t i s Source #

The outcome of waitForUpdateTimeout

Constructors

Timeout t

The timeout happened before any change of the on-chain state was detected

ContractEnded i

The state machine instance ended

Transition i s

The state machine instance transitioned to a new state

InitialState s

The state machine instance was initialised

Instances

Instances details
Functor (WaitingResult t i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

Methods

fmap :: (a -> b) -> WaitingResult t i a -> WaitingResult t i b Source #

(<$) :: a -> WaitingResult t i b -> WaitingResult t i a Source #

(Show t, Show i, Show s) => Show (WaitingResult t i s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

Generic (WaitingResult t i s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

Associated Types

type Rep (WaitingResult t i s) :: Type -> Type Source #

Methods

from :: WaitingResult t i s -> Rep (WaitingResult t i s) x Source #

to :: Rep (WaitingResult t i s) x -> WaitingResult t i s Source #

(ToJSON s, ToJSON i, ToJSON t) => ToJSON (WaitingResult t i s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

(FromJSON s, FromJSON t, FromJSON i) => FromJSON (WaitingResult t i s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

type Rep (WaitingResult t i s) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

data InvalidTransition s i Source #

An invalid transition

Constructors

InvalidTransition 

Fields

Instances

Instances details
(Eq s, Eq i) => Eq (InvalidTransition s i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

(Show s, Show i) => Show (InvalidTransition s i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

Generic (InvalidTransition s i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

Associated Types

type Rep (InvalidTransition s i) :: Type -> Type Source #

(ToJSON i, ToJSON s) => ToJSON (InvalidTransition s i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

(FromJSON s, FromJSON i) => FromJSON (InvalidTransition s i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

type Rep (InvalidTransition s i) Source # 
Instance details

Defined in Plutus.Contract.StateMachine

type Rep (InvalidTransition s i) = D1 ('MetaData "InvalidTransition" "Plutus.Contract.StateMachine" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "InvalidTransition" 'PrefixI 'True) (S1 ('MetaSel ('Just "tfState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (State s))) :*: S1 ('MetaSel ('Just "tfInput") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i)))

data TransitionResult s i Source #

Result of an attempted transition

Constructors

TransitionFailure (InvalidTransition s i)

The transition is not allowed

TransitionSuccess s

The transition is allowed and results in a new state

data ThreadToken Source #

Instances

Instances details
Eq ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Ord ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Show ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Generic ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Associated Types

type Rep ThreadToken :: Type -> Type Source #

ToJSON ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

FromJSON ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

ToSchema ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

UnsafeFromData ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

FromData ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

ToData ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Lift DefaultUni ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Typeable DefaultUni ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

type Rep ThreadToken Source # 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

type Rep ThreadToken = D1 ('MetaData "ThreadToken" "Plutus.Contract.StateMachine.ThreadToken" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "ThreadToken" 'PrefixI 'True) (S1 ('MetaSel ('Just "ttOutRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef) :*: S1 ('MetaSel ('Just "ttCurrencySymbol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CurrencySymbol)))

Constructing the machine instance

mkValidator :: forall s i. ToData s => StateMachine s i -> ValidatorType (StateMachine s i) Source #

Turn a state machine into a validator script.

mkStateMachine :: Maybe ThreadToken -> (State s -> i -> Maybe (TxConstraints Void Void, State s)) -> (s -> Bool) -> StateMachine s i Source #

A state machine that does not perform any additional checks on the ScriptContext (beyond enforcing the constraints)

Constructing the state machine client

mkStateMachineClient :: forall state input. StateMachineInstance state input -> StateMachineClient state input Source #

A state machine client with the defaultChooser function

defaultChooser :: forall state input. [OnChainState state input] -> Either SMContractError (OnChainState state input) Source #

A state chooser function that fails if confronted with anything other than exactly one output

Running the state machine

runGuardedStep Source #

Arguments

:: forall w a e state schema input. (AsSMContractError e, FromData state, ToData state, ToData input) 
=> StateMachineClient state input

The state machine

-> input

The input to apply to the state machine

-> (UnbalancedTx -> state -> state -> Maybe a)

The guard to check before running the step

-> Contract w schema e (Either a (TransitionResult state input)) 

Tries to run one step of a state machine: If the guard (the last argument) returns Nothing when given the unbalanced transaction to be submitted, the old state and the new step, the step is run and Right the new state is returned. If the guard returns Just a, Left a is returned instead.

runStep Source #

Arguments

:: forall w e state schema input. (AsSMContractError e, FromData state, ToData state, ToData input) 
=> StateMachineClient state input

The state machine

-> input

The input to apply to the state machine

-> Contract w schema e (TransitionResult state input) 

Run one step of a state machine, returning the new state.

runInitialise Source #

Arguments

:: forall w e state schema input. (FromData state, ToData state, ToData input, AsSMContractError e) 
=> StateMachineClient state input

The state machine

-> state

The initial state

-> Value

The value locked by the contract at the beginning

-> Contract w schema e state 

Initialise a state machine

runGuardedStepWith Source #

Arguments

:: forall w a e state schema input. (AsSMContractError e, FromData state, ToData state, ToData input) 
=> ScriptLookups (StateMachine state input)

Additional lookups

-> TxConstraints input state

Additional constraints

-> StateMachineClient state input

The state machine

-> input

The input to apply to the state machine

-> (UnbalancedTx -> state -> state -> Maybe a)

The guard to check before running the step

-> Contract w schema e (Either a (TransitionResult state input)) 

The same as runGuardedStep but we can supply additional constraints and lookups for transaction.

runStepWith Source #

Arguments

:: forall w e state schema input. (AsSMContractError e, FromData state, ToData state, ToData input) 
=> ScriptLookups (StateMachine state input)

Additional lookups

-> TxConstraints input state

Additional constraints

-> StateMachineClient state input

The state machine

-> input

The input to apply to the state machine

-> Contract w schema e (TransitionResult state input) 

Run one step of a state machine, returning the new state. We can supply additional constraints and lookups for transaction.

runInitialiseWith Source #

Arguments

:: forall w e state schema input. (FromData state, ToData state, ToData input, AsSMContractError e) 
=> ScriptLookups (StateMachine state input)

Additional lookups

-> TxConstraints input state

Additional constraints

-> StateMachineClient state input

The state machine

-> state

The initial state

-> Value

The value locked by the contract at the beginning

-> Contract w schema e state 

Initialise a state machine and supply additional constraints and lookups for transaction.

getThreadToken :: AsSMContractError e => Contract w schema e ThreadToken Source #

Create a thread token. The thread token contains a reference to an unspent output of the wallet, so it needs to used with mkStateMachine immediately, and the machine must be initialised, to prevent the output from getting spent in the mean time.

getOnChainState :: (AsSMContractError e, FromData state, ToData state) => StateMachineClient state i -> Contract w schema e (Maybe (OnChainState state i, Map TxOutRef ChainIndexTxOut)) Source #

Get the current on-chain state of the state machine instance. Return Nothing if there is no state on chain. Throws an SMContractError if the number of outputs at the machine address is greater than one.

waitForUpdate :: forall state i w schema e. (AsSMContractError e, AsContractError e, FromData state, ToData state, FromData i) => StateMachineClient state i -> Contract w schema e (Maybe (OnChainState state i)) Source #

Wait until the on-chain state of the state machine instance has changed, and return the new state, or return Nothing if the instance has been terminated. If waitForUpdate is called before the instance has even started then it returns the first state of the instance as soon as it has started.

waitForUpdateUntilSlot :: (AsSMContractError e, AsContractError e, FromData state, ToData state, FromData i) => StateMachineClient state i -> Slot -> Contract w schema e (WaitingResult Slot i state) Source #

Wait for the on-chain state of the state machine instance to change until timeoutSlot, and return the new state, or return ContractEnded if the instance has been terminated. If waitForUpdate is called before the instance has even started then it returns the first state of the instance as soon as it has started.

waitForUpdateTimeout Source #

Arguments

:: forall state i t w schema e. (AsSMContractError e, AsContractError e, FromData state, ToData state, FromData i) 
=> StateMachineClient state i

The state machine client

-> Promise w schema e t

The timeout

-> Contract w schema e (Promise w schema e (WaitingResult t i (OnChainState state i))) 

Construct a Promise that waits for an update to the state machine's on-chain state, or a user-defined timeout (whichever happens first).

Lower-level API

data StateMachineTransition state input Source #

Constraints & lookups needed to transition a state machine instance

Constructors

StateMachineTransition 

Fields

mkStep :: forall w e state schema input. (AsSMContractError e, FromData state, ToData state) => StateMachineClient state input -> input -> Contract w schema e (Either (InvalidTransition state input) (StateMachineTransition state input)) Source #

Given a state machine client and an input to apply to the client's state machine instance, compute the StateMachineTransition that can produce an actual transaction performing the transition

Re-exports

data Void Source #

Uninhabited data type

Since: base-4.8.0.0

Instances

Instances details
Eq Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

(==) :: Void -> Void -> Bool Source #

(/=) :: Void -> Void -> Bool Source #

Data Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Void -> c Void Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Void Source #

toConstr :: Void -> Constr Source #

dataTypeOf :: Void -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Void) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void) Source #

gmapT :: (forall b. Data b => b -> b) -> Void -> Void Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Void -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Void -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Void -> m Void Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void Source #

Ord Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Read Void

Reading a Void value is always a parse error, considering Void as a data type with no constructors.

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Show Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Ix Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Generic Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Associated Types

type Rep Void :: Type -> Type Source #

Methods

from :: Void -> Rep Void x Source #

to :: Rep Void x -> Void Source #

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in Data.Void

NFData Void

Defined as rnf = absurd.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Void -> () Source #

Hashable Void 
Instance details

Defined in Data.Hashable.Class

ToJSON Void 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Void 
Instance details

Defined in Data.Aeson.Types.FromJSON

Exception Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

FromCBOR Void 
Instance details

Defined in Cardano.Binary.FromCBOR

Buildable Void 
Instance details

Defined in Formatting.Buildable

Methods

build :: Void -> Builder Source #

ToFormKey Void 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Void -> Text Source #

FromFormKey Void 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToHttpApiData Void 
Instance details

Defined in Web.Internal.HttpApiData

FromHttpApiData Void

Parsing a Void value is always an error, considering Void as a data type with no constructors.

Instance details

Defined in Web.Internal.HttpApiData

NoThunks Void 
Instance details

Defined in NoThunks.Class

Serialise Void

Since: serialise-0.2.4.0

Instance details

Defined in Codec.Serialise.Class

Pretty Void

Finding a good example for printing something that does not exist is hard, so here is an example of printing a list full of nothing.

>>> pretty ([] :: [Void])
[]
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Void -> Doc ann Source #

prettyList :: [Void] -> Doc ann Source #

ValidatorTypes Void 
Instance details

Defined in Ledger.Typed.Scripts.Validators

Associated Types

type RedeemerType Void Source #

type DatumType Void Source #

UnsafeFromData Void 
Instance details

Defined in PlutusTx.IsData.Class

FromData Void 
Instance details

Defined in PlutusTx.IsData.Class

ToData Void 
Instance details

Defined in PlutusTx.IsData.Class

Lift Void

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Void -> Q Exp Source #

liftTyped :: Void -> Q (TExp Void) Source #

PrettyDefaultBy config Void => PrettyBy config Void
>>> prettyBy () ([] :: [Void])
[]
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Void -> Doc ann Source #

prettyListBy :: config -> [Void] -> Doc ann Source #

DefaultPrettyBy config Void 
Instance details

Defined in Text.PrettyBy.Internal

Methods

defaultPrettyBy :: config -> Void -> Doc ann Source #

defaultPrettyListBy :: config -> [Void] -> Doc ann Source #

FunctorWithIndex Void (V1 :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

imap :: (Void -> a -> b) -> V1 a -> V1 b Source #

imapped :: IndexedSetter Void (V1 a) (V1 b) a b Source #

FunctorWithIndex Void (U1 :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

imap :: (Void -> a -> b) -> U1 a -> U1 b Source #

imapped :: IndexedSetter Void (U1 a) (U1 b) a b Source #

FunctorWithIndex Void (Proxy :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

imap :: (Void -> a -> b) -> Proxy a -> Proxy b Source #

imapped :: IndexedSetter Void (Proxy a) (Proxy b) a b Source #

FoldableWithIndex Void (V1 :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

ifoldMap :: Monoid m => (Void -> a -> m) -> V1 a -> m Source #

ifolded :: IndexedFold Void (V1 a) a Source #

ifoldr :: (Void -> a -> b -> b) -> b -> V1 a -> b Source #

ifoldl :: (Void -> b -> a -> b) -> b -> V1 a -> b Source #

ifoldr' :: (Void -> a -> b -> b) -> b -> V1 a -> b Source #

ifoldl' :: (Void -> b -> a -> b) -> b -> V1 a -> b Source #

FoldableWithIndex Void (U1 :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

ifoldMap :: Monoid m => (Void -> a -> m) -> U1 a -> m Source #

ifolded :: IndexedFold Void (U1 a) a Source #

ifoldr :: (Void -> a -> b -> b) -> b -> U1 a -> b Source #

ifoldl :: (Void -> b -> a -> b) -> b -> U1 a -> b Source #

ifoldr' :: (Void -> a -> b -> b) -> b -> U1 a -> b Source #

ifoldl' :: (Void -> b -> a -> b) -> b -> U1 a -> b Source #

FoldableWithIndex Void (Proxy :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

ifoldMap :: Monoid m => (Void -> a -> m) -> Proxy a -> m Source #

ifolded :: IndexedFold Void (Proxy a) a Source #

ifoldr :: (Void -> a -> b -> b) -> b -> Proxy a -> b Source #

ifoldl :: (Void -> b -> a -> b) -> b -> Proxy a -> b Source #

ifoldr' :: (Void -> a -> b -> b) -> b -> Proxy a -> b Source #

ifoldl' :: (Void -> b -> a -> b) -> b -> Proxy a -> b Source #

TraversableWithIndex Void (V1 :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

itraverse :: Applicative f => (Void -> a -> f b) -> V1 a -> f (V1 b) Source #

itraversed :: IndexedTraversal Void (V1 a) (V1 b) a b Source #

TraversableWithIndex Void (U1 :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

itraverse :: Applicative f => (Void -> a -> f b) -> U1 a -> f (U1 b) Source #

itraversed :: IndexedTraversal Void (U1 a) (U1 b) a b Source #

TraversableWithIndex Void (Proxy :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

itraverse :: Applicative f => (Void -> a -> f b) -> Proxy a -> f (Proxy b) Source #

itraversed :: IndexedTraversal Void (Proxy a) (Proxy b) a b Source #

FunctorWithIndex Void (Const e :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

imap :: (Void -> a -> b) -> Const e a -> Const e b Source #

imapped :: IndexedSetter Void (Const e a) (Const e b) a b Source #

FunctorWithIndex Void (Constant e :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

imap :: (Void -> a -> b) -> Constant e a -> Constant e b Source #

imapped :: IndexedSetter Void (Constant e a) (Constant e b) a b Source #

FoldableWithIndex Void (Const e :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

ifoldMap :: Monoid m => (Void -> a -> m) -> Const e a -> m Source #

ifolded :: IndexedFold Void (Const e a) a Source #

ifoldr :: (Void -> a -> b -> b) -> b -> Const e a -> b Source #

ifoldl :: (Void -> b -> a -> b) -> b -> Const e a -> b Source #

ifoldr' :: (Void -> a -> b -> b) -> b -> Const e a -> b Source #

ifoldl' :: (Void -> b -> a -> b) -> b -> Const e a -> b Source #

FoldableWithIndex Void (Constant e :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

ifoldMap :: Monoid m => (Void -> a -> m) -> Constant e a -> m Source #

ifolded :: IndexedFold Void (Constant e a) a Source #

ifoldr :: (Void -> a -> b -> b) -> b -> Constant e a -> b Source #

ifoldl :: (Void -> b -> a -> b) -> b -> Constant e a -> b Source #

ifoldr' :: (Void -> a -> b -> b) -> b -> Constant e a -> b Source #

ifoldl' :: (Void -> b -> a -> b) -> b -> Constant e a -> b Source #

TraversableWithIndex Void (Const e :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

itraverse :: Applicative f => (Void -> a -> f b) -> Const e a -> f (Const e b) Source #

itraversed :: IndexedTraversal Void (Const e a) (Const e b) a b Source #

TraversableWithIndex Void (Constant e :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

itraverse :: Applicative f => (Void -> a -> f b) -> Constant e a -> f (Constant e b) Source #

itraversed :: IndexedTraversal Void (Constant e a) (Constant e b) a b Source #

FunctorWithIndex Void (K1 i c :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

imap :: (Void -> a -> b) -> K1 i c a -> K1 i c b Source #

imapped :: IndexedSetter Void (K1 i c a) (K1 i c b) a b Source #

FoldableWithIndex Void (K1 i c :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

ifoldMap :: Monoid m => (Void -> a -> m) -> K1 i c a -> m Source #

ifolded :: IndexedFold Void (K1 i c a) a Source #

ifoldr :: (Void -> a -> b -> b) -> b -> K1 i c a -> b Source #

ifoldl :: (Void -> b -> a -> b) -> b -> K1 i c a -> b Source #

ifoldr' :: (Void -> a -> b -> b) -> b -> K1 i c a -> b Source #

ifoldl' :: (Void -> b -> a -> b) -> b -> K1 i c a -> b Source #

TraversableWithIndex Void (K1 i c :: Type -> Type) 
Instance details

Defined in Control.Lens.Indexed

Methods

itraverse :: Applicative f => (Void -> a -> f b) -> K1 i c a -> f (K1 i c b) Source #

itraversed :: IndexedTraversal Void (K1 i c a) (K1 i c b) a b Source #

type Rep Void 
Instance details

Defined in Data.Void

type Rep Void = D1 ('MetaData "Void" "Data.Void" "base" 'False) (V1 :: Type -> Type)
type Code Void 
Instance details

Defined in Generics.SOP.Instances

type Code Void = '[] :: [[Type]]
type DatatypeInfoOf Void 
Instance details

Defined in Generics.SOP.Instances

type DatatypeInfoOf Void = 'ADT "Data.Void" "Void" ('[] :: [ConstructorInfo]) ('[] :: [[StrictnessInfo]])
type DatumType Void 
Instance details

Defined in Ledger.Typed.Scripts.Validators

type RedeemerType Void 
Instance details

Defined in Ledger.Typed.Scripts.Validators