plutus-core-1.0.0.1: Language library for Plutus Core
Safe HaskellNone
LanguageHaskell2010

UntypedPlutusCore.Evaluation.Machine.Cek

Description

The API to the CEK machine.

Synopsis

Running the machine

runCek :: (uni `Everywhere` ExMemoryUsage, Ix fun, PrettyUni uni fun) => MachineParameters CekMachineCosts CekValue uni fun -> ExBudgetMode cost uni fun -> EmitterMode uni fun -> Term Name uni fun () -> (Either (CekEvaluationException Name uni fun) (Term Name uni fun ()), cost, [Text]) Source #

Evaluate a term using the CEK machine with logging enabled and keep track of costing. A wrapper around the internal runCek to debruijn input and undebruijn output. *THIS FUNCTION IS PARTIAL if the input term contains free variables*

runCekDeBruijn :: (uni `Everywhere` ExMemoryUsage, Ix fun, PrettyUni uni fun) => MachineParameters CekMachineCosts CekValue uni fun -> ExBudgetMode cost uni fun -> EmitterMode uni fun -> Term NamedDeBruijn uni fun () -> (Either (CekEvaluationException NamedDeBruijn uni fun) (Term NamedDeBruijn uni fun ()), cost, [Text]) Source #

Evaluate a term using the CEK machine and keep track of costing, logging is optional.

runCekNoEmit :: (uni `Everywhere` ExMemoryUsage, Ix fun, PrettyUni uni fun) => MachineParameters CekMachineCosts CekValue uni fun -> ExBudgetMode cost uni fun -> Term Name uni fun () -> (Either (CekEvaluationException Name uni fun) (Term Name uni fun ()), cost) Source #

Evaluate a term using the CEK machine with logging disabled and keep track of costing. *THIS FUNCTION IS PARTIAL if the input term contains free variables*

unsafeRunCekNoEmit :: (GShow uni, Typeable uni, Closed uni, uni `EverywhereAll` '[ExMemoryUsage, PrettyConst], Ix fun, Pretty fun, Typeable fun) => MachineParameters CekMachineCosts CekValue uni fun -> ExBudgetMode cost uni fun -> Term Name uni fun () -> (EvaluationResult (Term Name uni fun ()), cost) Source #

Unsafely evaluate a term using the CEK machine with logging disabled and keep track of costing. May throw a CekMachineException. *THIS FUNCTION IS PARTIAL if the input term contains free variables*

evaluateCek :: (uni `Everywhere` ExMemoryUsage, Ix fun, PrettyUni uni fun) => EmitterMode uni fun -> MachineParameters CekMachineCosts CekValue uni fun -> Term Name uni fun () -> (Either (CekEvaluationException Name uni fun) (Term Name uni fun ()), [Text]) Source #

Evaluate a term using the CEK machine with logging enabled. *THIS FUNCTION IS PARTIAL if the input term contains free variables*

evaluateCekNoEmit :: (uni `Everywhere` ExMemoryUsage, Ix fun, PrettyUni uni fun) => MachineParameters CekMachineCosts CekValue uni fun -> Term Name uni fun () -> Either (CekEvaluationException Name uni fun) (Term Name uni fun ()) Source #

Evaluate a term using the CEK machine with logging disabled. *THIS FUNCTION IS PARTIAL if the input term contains free variables*

unsafeEvaluateCek :: (GShow uni, Typeable uni, Closed uni, uni `EverywhereAll` '[ExMemoryUsage, PrettyConst], Ix fun, Pretty fun, Typeable fun) => EmitterMode uni fun -> MachineParameters CekMachineCosts CekValue uni fun -> Term Name uni fun () -> (EvaluationResult (Term Name uni fun ()), [Text]) Source #

Evaluate a term using the CEK machine with logging enabled. May throw a CekMachineException. *THIS FUNCTION IS PARTIAL if the input term contains free variables*

unsafeEvaluateCekNoEmit :: (GShow uni, Typeable uni, Closed uni, uni `EverywhereAll` '[ExMemoryUsage, PrettyConst], Ix fun, Pretty fun, Typeable fun) => MachineParameters CekMachineCosts CekValue uni fun -> Term Name uni fun () -> EvaluationResult (Term Name uni fun ()) Source #

Evaluate a term using the CEK machine with logging disabled. May throw a CekMachineException. *THIS FUNCTION IS PARTIAL if the input term contains free variables*

data EvaluationResult a Source #

The parameterized type of results various evaluation engines return. On the PLC side this becomes (via makeKnown) either a call to Error or a value of the PLC counterpart of type a.

Instances

Instances details
Monad EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Functor EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

MonadFail EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Applicative EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Foldable EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

fold :: Monoid m => EvaluationResult m -> m Source #

foldMap :: Monoid m => (a -> m) -> EvaluationResult a -> m Source #

foldMap' :: Monoid m => (a -> m) -> EvaluationResult a -> m Source #

foldr :: (a -> b -> b) -> b -> EvaluationResult a -> b Source #

foldr' :: (a -> b -> b) -> b -> EvaluationResult a -> b Source #

foldl :: (b -> a -> b) -> b -> EvaluationResult a -> b Source #

foldl' :: (b -> a -> b) -> b -> EvaluationResult a -> b Source #

foldr1 :: (a -> a -> a) -> EvaluationResult a -> a Source #

foldl1 :: (a -> a -> a) -> EvaluationResult a -> a Source #

toList :: EvaluationResult a -> [a] Source #

null :: EvaluationResult a -> Bool Source #

length :: EvaluationResult a -> Int Source #

elem :: Eq a => a -> EvaluationResult a -> Bool Source #

maximum :: Ord a => EvaluationResult a -> a Source #

minimum :: Ord a => EvaluationResult a -> a Source #

sum :: Num a => EvaluationResult a -> a Source #

product :: Num a => EvaluationResult a -> a Source #

Traversable EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Alternative EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

MonadError () EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

(TypeError ('Text "\8216EvaluationResult\8217 cannot appear in the type of an argument") :: Constraint, uni ~ UniOf val) => ReadKnownIn uni val (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownType

Methods

readKnown :: Maybe cause -> val -> ReadKnownM cause (EvaluationResult a) Source #

MakeKnownIn uni val a => MakeKnownIn uni val (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownType

Methods

makeKnown :: Maybe cause -> EvaluationResult a -> MakeKnownM cause val Source #

PrettyBy config a => PrettyBy config (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

prettyBy :: config -> EvaluationResult a -> Doc ann #

prettyListBy :: config -> [EvaluationResult a] -> Doc ann #

Eq a => Eq (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Show a => Show (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Generic (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Associated Types

type Rep (EvaluationResult a) :: Type -> Type Source #

NFData a => NFData (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

rnf :: EvaluationResult a -> () Source #

PrettyClassic a => Pretty (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

pretty :: EvaluationResult a -> Doc ann #

prettyList :: [EvaluationResult a] -> Doc ann #

KnownTypeAst uni a => KnownTypeAst uni (EvaluationResult a :: Type) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownTypeAst

Associated Types

type ToHoles (EvaluationResult a) :: [Hole] Source #

type ToBinds (EvaluationResult a) :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy (EvaluationResult a) -> Type0 TyName uni () Source #

type Rep (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

type Rep (EvaluationResult a) = D1 ('MetaData "EvaluationResult" "PlutusCore.Evaluation.Result" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "EvaluationSuccess" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "EvaluationFailure" 'PrefixI 'False) (U1 :: Type -> Type))
type ToHoles (EvaluationResult a :: Type) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownTypeAst

type ToHoles (EvaluationResult a :: Type) = '[TypeHole a :: Hole]
type ToBinds (EvaluationResult a :: Type) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownTypeAst

unsafeExtractEvaluationResult :: (PrettyPlc internal, PrettyPlc term, Typeable internal, Typeable term) => Either (EvaluationException user internal term) a -> EvaluationResult a Source #

Errors

data CekUserError Source #

Constructors

CekOutOfExError ExRestrictingBudget

The final overspent (i.e. negative) budget.

CekEvaluationFailure

Error has been called or a builtin application has failed

Instances

Instances details
Eq CekUserError Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Show CekUserError Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Generic CekUserError Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Associated Types

type Rep CekUserError :: Type -> Type Source #

NFData CekUserError Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

rnf :: CekUserError -> () Source #

Pretty CekUserError Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

pretty :: CekUserError -> Doc ann #

prettyList :: [CekUserError] -> Doc ann #

HasErrorCode CekUserError Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

AsEvaluationFailure CekUserError Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

PrettyUni uni fun => MonadError (CekEvaluationException NamedDeBruijn uni fun) (CekM uni fun s) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

throwError :: CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a

catchError :: CekM uni fun s a -> (CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a) -> CekM uni fun s a

type Rep CekUserError Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

type Rep CekUserError = D1 ('MetaData "CekUserError" "UntypedPlutusCore.Evaluation.Machine.Cek.Internal" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "CekOutOfExError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExRestrictingBudget)) :+: C1 ('MetaCons "CekEvaluationFailure" 'PrefixI 'False) (U1 :: Type -> Type))

data ErrorWithCause err cause Source #

An error and (optionally) what caused it.

Constructors

ErrorWithCause 

Fields

Instances

Instances details
Bifunctor ErrorWithCause Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

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

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

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

(PrettyBy config cause, PrettyBy config err) => PrettyBy config (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

prettyBy :: config -> ErrorWithCause err cause -> Doc ann #

prettyListBy :: config -> [ErrorWithCause err cause] -> Doc ann #

Functor (ErrorWithCause err) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

fmap :: (a -> b) -> ErrorWithCause err a -> ErrorWithCause err b Source #

(<$) :: a -> ErrorWithCause err b -> ErrorWithCause err a Source #

Foldable (ErrorWithCause err) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

fold :: Monoid m => ErrorWithCause err m -> m Source #

foldMap :: Monoid m => (a -> m) -> ErrorWithCause err a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ErrorWithCause err a -> m Source #

foldr :: (a -> b -> b) -> b -> ErrorWithCause err a -> b Source #

foldr' :: (a -> b -> b) -> b -> ErrorWithCause err a -> b Source #

foldl :: (b -> a -> b) -> b -> ErrorWithCause err a -> b Source #

foldl' :: (b -> a -> b) -> b -> ErrorWithCause err a -> b Source #

foldr1 :: (a -> a -> a) -> ErrorWithCause err a -> a Source #

foldl1 :: (a -> a -> a) -> ErrorWithCause err a -> a Source #

toList :: ErrorWithCause err a -> [a] Source #

null :: ErrorWithCause err a -> Bool Source #

length :: ErrorWithCause err a -> Int Source #

elem :: Eq a => a -> ErrorWithCause err a -> Bool Source #

maximum :: Ord a => ErrorWithCause err a -> a Source #

minimum :: Ord a => ErrorWithCause err a -> a Source #

sum :: Num a => ErrorWithCause err a -> a Source #

product :: Num a => ErrorWithCause err a -> a Source #

Traversable (ErrorWithCause err) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

traverse :: Applicative f => (a -> f b) -> ErrorWithCause err a -> f (ErrorWithCause err b) Source #

sequenceA :: Applicative f => ErrorWithCause err (f a) -> f (ErrorWithCause err a) Source #

mapM :: Monad m => (a -> m b) -> ErrorWithCause err a -> m (ErrorWithCause err b) Source #

sequence :: Monad m => ErrorWithCause err (m a) -> m (ErrorWithCause err a) Source #

(Eq err, Eq cause) => Eq (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

(==) :: ErrorWithCause err cause -> ErrorWithCause err cause -> Bool Source #

(/=) :: ErrorWithCause err cause -> ErrorWithCause err cause -> Bool Source #

(PrettyPlc cause, PrettyPlc err) => Show (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

showsPrec :: Int -> ErrorWithCause err cause -> ShowS Source #

show :: ErrorWithCause err cause -> String Source #

showList :: [ErrorWithCause err cause] -> ShowS Source #

Generic (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Associated Types

type Rep (ErrorWithCause err cause) :: Type -> Type Source #

Methods

from :: ErrorWithCause err cause -> Rep (ErrorWithCause err cause) x Source #

to :: Rep (ErrorWithCause err cause) x -> ErrorWithCause err cause Source #

(PrettyPlc cause, PrettyPlc err, Typeable cause, Typeable err) => Exception (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

(NFData err, NFData cause) => NFData (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

rnf :: ErrorWithCause err cause -> () Source #

(Pretty err, Pretty cause) => Pretty (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

pretty :: ErrorWithCause err cause -> Doc ann #

prettyList :: [ErrorWithCause err cause] -> Doc ann #

HasErrorCode err => HasErrorCode (ErrorWithCause err t) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

AsEvaluationFailure err => AsEvaluationFailure (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

_EvaluationFailure :: Prism' (ErrorWithCause err cause) () Source #

PrettyUni uni fun => MonadError (CekEvaluationException NamedDeBruijn uni fun) (CekM uni fun s) 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

throwError :: CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a

catchError :: CekM uni fun s a -> (CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a) -> CekM uni fun s a

type Rep (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

type Rep (ErrorWithCause err cause) = D1 ('MetaData "ErrorWithCause" "PlutusCore.Evaluation.Machine.Exception" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "ErrorWithCause" 'PrefixI 'True) (S1 ('MetaSel ('Just "_ewcError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 err) :*: S1 ('MetaSel ('Just "_ewcCause") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe cause))))

type CekEvaluationException name uni fun = EvaluationException CekUserError (MachineError fun) (Term name uni fun ()) Source #

The CEK machine-specific EvaluationException.

data EvaluationError user internal Source #

The type of errors (all of them) which can occur during evaluation (some are used-caused, some are internal).

Constructors

InternalEvaluationError internal

Indicates bugs.

UserEvaluationError user

Indicates user errors.

Instances

Instances details
(HasPrettyDefaults config ~ 'True, PrettyBy config internal, Pretty user) => PrettyBy config (EvaluationError user internal) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

prettyBy :: config -> EvaluationError user internal -> Doc ann #

prettyListBy :: config -> [EvaluationError user internal] -> Doc ann #

Functor (EvaluationError user) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

fmap :: (a -> b) -> EvaluationError user a -> EvaluationError user b Source #

(<$) :: a -> EvaluationError user b -> EvaluationError user a Source #

(Eq internal, Eq user) => Eq (EvaluationError user internal) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

(==) :: EvaluationError user internal -> EvaluationError user internal -> Bool Source #

(/=) :: EvaluationError user internal -> EvaluationError user internal -> Bool Source #

(Show internal, Show user) => Show (EvaluationError user internal) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

showsPrec :: Int -> EvaluationError user internal -> ShowS Source #

show :: EvaluationError user internal -> String Source #

showList :: [EvaluationError user internal] -> ShowS Source #

Generic (EvaluationError user internal) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Associated Types

type Rep (EvaluationError user internal) :: Type -> Type Source #

Methods

from :: EvaluationError user internal -> Rep (EvaluationError user internal) x Source #

to :: Rep (EvaluationError user internal) x -> EvaluationError user internal Source #

(NFData internal, NFData user) => NFData (EvaluationError user internal) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

rnf :: EvaluationError user internal -> () Source #

(HasErrorCode user, HasErrorCode internal) => HasErrorCode (EvaluationError user internal) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

errorCode :: EvaluationError user internal -> ErrorCode Source #

AsEvaluationFailure user => AsEvaluationFailure (EvaluationError user internal) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

_EvaluationFailure :: Prism' (EvaluationError user internal) () Source #

AsUnliftingError internal => AsUnliftingError (EvaluationError user internal) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

_UnliftingError :: Prism' (EvaluationError user internal) UnliftingError Source #

_UnliftingErrorE :: Prism' (EvaluationError user internal) Text Source #

internal ~ MachineError fun => AsMachineError (EvaluationError user internal) fun Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

AsEvaluationError (EvaluationError user internal) user internal Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

_EvaluationError :: Prism' (EvaluationError user internal) (EvaluationError user internal) Source #

_InternalEvaluationError :: Prism' (EvaluationError user internal) internal Source #

_UserEvaluationError :: Prism' (EvaluationError user internal) user Source #

PrettyUni uni fun => MonadError (CekEvaluationException NamedDeBruijn uni fun) (CekM uni fun s) 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

throwError :: CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a

catchError :: CekM uni fun s a -> (CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a) -> CekM uni fun s a

type Rep (EvaluationError user internal) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

type Rep (EvaluationError user internal) = D1 ('MetaData "EvaluationError" "PlutusCore.Evaluation.Machine.Exception" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "InternalEvaluationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 internal)) :+: C1 ('MetaCons "UserEvaluationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 user)))

Costing

data ExBudgetCategory fun Source #

Constructors

BStep StepKind 
BBuiltinApp fun 
BStartup 

Instances

Instances details
ExBudgetBuiltin fun (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Eq fun => Eq (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Ord fun => Ord (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Show fun => Show (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Generic (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Associated Types

type Rep (ExBudgetCategory fun) :: Type -> Type Source #

NFData fun => NFData (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

rnf :: ExBudgetCategory fun -> () Source #

Hashable fun => Hashable (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Show fun => Pretty (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

pretty :: ExBudgetCategory fun -> Doc ann #

prettyList :: [ExBudgetCategory fun] -> Doc ann #

type Rep (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

type Rep (ExBudgetCategory fun) = D1 ('MetaData "ExBudgetCategory" "UntypedPlutusCore.Evaluation.Machine.Cek.Internal" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "BStep" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StepKind)) :+: (C1 ('MetaCons "BBuiltinApp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 fun)) :+: C1 ('MetaCons "BStartup" 'PrefixI 'False) (U1 :: Type -> Type)))

newtype CekBudgetSpender uni fun s Source #

The CEK machine is parameterized over a spendBudget function. This makes the budgeting machinery extensible and allows us to separate budgeting logic from evaluation logic and avoid branching on the union of all possible budgeting state types during evaluation.

Constructors

CekBudgetSpender 

Fields

newtype ExBudgetMode cost uni fun Source #

A budgeting mode to execute the CEK machine in.

Constructors

ExBudgetMode 

Fields

data StepKind Source #

Instances

Instances details
Bounded StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Enum StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Eq StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Ord StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Show StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Generic StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Associated Types

type Rep StepKind :: Type -> Type Source #

NFData StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

rnf :: StepKind -> () Source #

Hashable StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

type Rep StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

type Rep StepKind = D1 ('MetaData "StepKind" "UntypedPlutusCore.Evaluation.Machine.Cek.Internal" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) ((C1 ('MetaCons "BConst" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BVar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BLamAbs" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BApply" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BDelay" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BForce" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BBuiltin" 'PrefixI 'False) (U1 :: Type -> Type))))

newtype CekExTally fun Source #

For a detailed report on what costs how much + the same overall budget that Counting gives. The (derived) Monoid instance of CekExTally is the main piece of the machinery.

Constructors

CekExTally (MonoidalHashMap (ExBudgetCategory fun) ExBudget) 

Instances

Instances details
(Show fun, Ord fun) => PrettyBy config (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

prettyBy :: config -> CekExTally fun -> Doc ann #

prettyListBy :: config -> [CekExTally fun] -> Doc ann #

Eq fun => Eq (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

(==) :: CekExTally fun -> CekExTally fun -> Bool Source #

(/=) :: CekExTally fun -> CekExTally fun -> Bool Source #

Show fun => Show (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Generic (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Associated Types

type Rep (CekExTally fun) :: Type -> Type Source #

Methods

from :: CekExTally fun -> Rep (CekExTally fun) x Source #

to :: Rep (CekExTally fun) x -> CekExTally fun Source #

(Eq fun, Hashable fun) => Semigroup (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

(<>) :: CekExTally fun -> CekExTally fun -> CekExTally fun Source #

sconcat :: NonEmpty (CekExTally fun) -> CekExTally fun Source #

stimes :: Integral b => b -> CekExTally fun -> CekExTally fun Source #

(Eq fun, Hashable fun) => Monoid (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

NFData fun => NFData (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

rnf :: CekExTally fun -> () Source #

(Show fun, Ord fun) => Pretty (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

pretty :: CekExTally fun -> Doc ann #

prettyList :: [CekExTally fun] -> Doc ann #

type Rep (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

type Rep (CekExTally fun) = D1 ('MetaData "CekExTally" "UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'True) (C1 ('MetaCons "CekExTally" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MonoidalHashMap (ExBudgetCategory fun) ExBudget))))

newtype CountingSt Source #

For calculating the cost of execution by counting up using the Monoid instance of ExBudget.

Constructors

CountingSt ExBudget 

Instances

Instances details
Eq CountingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Show CountingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Semigroup CountingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Monoid CountingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

NFData CountingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

rnf :: CountingSt -> () Source #

Pretty CountingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

pretty :: CountingSt -> Doc ann #

prettyList :: [CountingSt] -> Doc ann #

PrettyBy config CountingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

prettyBy :: config -> CountingSt -> Doc ann #

prettyListBy :: config -> [CountingSt] -> Doc ann #

data TallyingSt fun Source #

Constructors

TallyingSt (CekExTally fun) ExBudget 

Instances

Instances details
(Show fun, Ord fun) => PrettyBy config (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

prettyBy :: config -> TallyingSt fun -> Doc ann #

prettyListBy :: config -> [TallyingSt fun] -> Doc ann #

Eq fun => Eq (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

(==) :: TallyingSt fun -> TallyingSt fun -> Bool Source #

(/=) :: TallyingSt fun -> TallyingSt fun -> Bool Source #

Show fun => Show (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Generic (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Associated Types

type Rep (TallyingSt fun) :: Type -> Type Source #

Methods

from :: TallyingSt fun -> Rep (TallyingSt fun) x Source #

to :: Rep (TallyingSt fun) x -> TallyingSt fun Source #

(Eq fun, Hashable fun) => Semigroup (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

(<>) :: TallyingSt fun -> TallyingSt fun -> TallyingSt fun Source #

sconcat :: NonEmpty (TallyingSt fun) -> TallyingSt fun Source #

stimes :: Integral b => b -> TallyingSt fun -> TallyingSt fun Source #

(Eq fun, Hashable fun) => Monoid (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

NFData fun => NFData (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

rnf :: TallyingSt fun -> () Source #

(Show fun, Ord fun) => Pretty (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

pretty :: TallyingSt fun -> Doc ann #

prettyList :: [TallyingSt fun] -> Doc ann #

type Rep (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

type Rep (TallyingSt fun) = D1 ('MetaData "TallyingSt" "UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "TallyingSt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (CekExTally fun)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExBudget)))

newtype RestrictingSt Source #

Instances

Instances details
Eq RestrictingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Show RestrictingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Semigroup RestrictingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Monoid RestrictingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

NFData RestrictingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

rnf :: RestrictingSt -> () Source #

Pretty RestrictingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

pretty :: RestrictingSt -> Doc ann #

prettyList :: [RestrictingSt] -> Doc ann #

PrettyBy config RestrictingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

prettyBy :: config -> RestrictingSt -> Doc ann #

prettyListBy :: config -> [RestrictingSt] -> Doc ann #

data CekMachineCosts Source #

Costs for evaluating AST nodes. Times should be specified in picoseconds, memory sizes in bytes.

Instances

Instances details
Eq CekMachineCosts Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

Show CekMachineCosts Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

Generic CekMachineCosts Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

Associated Types

type Rep CekMachineCosts :: Type -> Type Source #

NFData CekMachineCosts Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

Methods

rnf :: CekMachineCosts -> () Source #

FromJSON CekMachineCosts Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

Methods

parseJSON :: Value -> Parser CekMachineCosts

parseJSONList :: Value -> Parser [CekMachineCosts]

ToJSON CekMachineCosts Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

Methods

toJSON :: CekMachineCosts -> Value

toEncoding :: CekMachineCosts -> Encoding

toJSONList :: [CekMachineCosts] -> Value

toEncodingList :: [CekMachineCosts] -> Encoding

NoThunks CekMachineCosts Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

Methods

noThunks :: Context -> CekMachineCosts -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> CekMachineCosts -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy CekMachineCosts -> String

Lift CekMachineCosts Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

type Rep CekMachineCosts Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

type Rep CekMachineCosts = D1 ('MetaData "CekMachineCosts" "UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "CekMachineCosts" 'PrefixI 'True) (((S1 ('MetaSel ('Just "cekStartupCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExBudget) :*: S1 ('MetaSel ('Just "cekVarCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExBudget)) :*: (S1 ('MetaSel ('Just "cekConstCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExBudget) :*: S1 ('MetaSel ('Just "cekLamCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExBudget))) :*: ((S1 ('MetaSel ('Just "cekDelayCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExBudget) :*: S1 ('MetaSel ('Just "cekForceCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExBudget)) :*: (S1 ('MetaSel ('Just "cekApplyCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExBudget) :*: S1 ('MetaSel ('Just "cekBuiltinCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExBudget)))))

Costing modes

counting :: ExBudgetMode CountingSt uni fun Source #

For calculating the cost of execution.

tallying :: (Eq fun, Hashable fun) => ExBudgetMode (TallyingSt fun) uni fun Source #

For a detailed report on what costs how much + the same overall budget that Counting gives.

restricting :: forall uni fun. PrettyUni uni fun => ExRestrictingBudget -> ExBudgetMode RestrictingSt uni fun Source #

For execution, to avoid overruns.

enormousBudget :: ExRestrictingBudget Source #

When we want to just evaluate the program we use the Restricting mode with an enormous budget, so that evaluation costs of on-chain budgeting are reflected accurately in benchmarks.

Emitter modes

noEmitter :: EmitterMode uni fun Source #

No emitter.

logEmitter :: EmitterMode uni fun Source #

Emits log only.

logWithTimeEmitter :: EmitterMode uni fun Source #

Emits log with timestamp.

logWithBudgetEmitter :: EmitterMode uni fun Source #

Emits log with the budget.

Misc

data CekValue uni fun Source #

Constructors

VCon !(Some (ValueOf uni)) 
VDelay (Term NamedDeBruijn uni fun ()) !(CekValEnv uni fun) 
VLamAbs NamedDeBruijn (Term NamedDeBruijn uni fun ()) !(CekValEnv uni fun) 
VBuiltin !fun (Term NamedDeBruijn uni fun ()) (CekValEnv uni fun) !(BuiltinRuntime (CekValue uni fun)) 

Instances

Instances details
(Closed uni, GShow uni, Everywhere uni PrettyConst, Pretty fun) => PrettyBy PrettyConfigPlc (CekValue uni fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

prettyBy :: PrettyConfigPlc -> CekValue uni fun -> Doc ann #

prettyListBy :: PrettyConfigPlc -> [CekValue uni fun] -> Doc ann #

Show (BuiltinRuntime (CekValue uni fun)) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

(Everywhere uni Show, GShow uni, Closed uni, Show fun) => Show (CekValue uni fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

showsPrec :: Int -> CekValue uni fun -> ShowS Source #

show :: CekValue uni fun -> String Source #

showList :: [CekValue uni fun] -> ShowS Source #

HasConstant (CekValue uni fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

asConstant :: AsUnliftingError err => Maybe cause -> CekValue uni fun -> Either (ErrorWithCause err cause) (Some (ValueOf (UniOf (CekValue uni fun)))) Source #

fromConstant :: Some (ValueOf (UniOf (CekValue uni fun))) -> CekValue uni fun Source #

type UniOf (CekValue uni fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

type UniOf (CekValue uni fun) = uni

readKnownCek :: (uni `Everywhere` ExMemoryUsage, ReadKnown (Term Name uni fun ()) a, Ix fun, PrettyUni uni fun) => MachineParameters CekMachineCosts CekValue uni fun -> Term Name uni fun () -> Either (CekEvaluationException Name uni fun) a Source #

Unlift a value using the CEK machine. *THIS FUNCTION IS PARTIAL if the input term contains free variables*

class Hashable a #

Instances

Instances details
Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int

hash :: Bool -> Int

Hashable Char 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Char -> Int

hash :: Char -> Int

Hashable Double 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Double -> Int

hash :: Double -> Int

Hashable Float 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Float -> Int

hash :: Float -> Int

Hashable Int 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int -> Int

hash :: Int -> Int

Hashable Int8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int8 -> Int

hash :: Int8 -> Int

Hashable Int16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int16 -> Int

hash :: Int16 -> Int

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int

hash :: Int32 -> Int

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int

hash :: Int64 -> Int

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int

hash :: Integer -> Int

Hashable Natural 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Natural -> Int

hash :: Natural -> Int

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Hashable Word 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word -> Int

hash :: Word -> Int

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int

hash :: Word8 -> Int

Hashable Word16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word16 -> Int

hash :: Word16 -> Int

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int

hash :: Word32 -> Int

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int

hash :: Word64 -> Int

Hashable SomeTypeRep 
Instance details

Defined in Data.Hashable.Class

Hashable () 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> () -> Int

hash :: () -> Int

Hashable Void 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Void -> Int

hash :: Void -> Int

Hashable Unique 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Unique -> Int

hash :: Unique -> Int

Hashable Version 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Version -> Int

hash :: Version -> Int

Hashable ThreadId 
Instance details

Defined in Data.Hashable.Class

Hashable WordPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> WordPtr -> Int

hash :: WordPtr -> Int

Hashable IntPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntPtr -> Int

hash :: IntPtr -> Int

Hashable Fingerprint 
Instance details

Defined in Data.Hashable.Class

Hashable BigNat 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> BigNat -> Int

hash :: BigNat -> Int

Hashable Key 
Instance details

Defined in Data.Aeson.Key

Methods

hashWithSalt :: Int -> Key -> Int

hash :: Key -> Int

Hashable Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

hashWithSalt :: Int -> Value -> Int

hash :: Value -> Int

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> ByteString -> Int

hash :: ByteString -> Int

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> ByteString -> Int

hash :: ByteString -> Int

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int

hash :: Text -> Int

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int

hash :: Text -> Int

Hashable Scientific 
Instance details

Defined in Data.Scientific

Methods

hashWithSalt :: Int -> Scientific -> Int

hash :: Scientific -> Int

Hashable IntSet 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntSet -> Int

hash :: IntSet -> Int

Hashable ShortByteString 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> ShortByteString -> Int

hash :: ShortByteString -> Int

Hashable ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

hashWithSalt :: Int -> ShortText -> Int

hash :: ShortText -> Int

Hashable UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

hashWithSalt :: Int -> UUID -> Int

hash :: UUID -> Int

Hashable Month 
Instance details

Defined in Data.Time.Calendar.Month.Compat

Methods

hashWithSalt :: Int -> Month -> Int

hash :: Month -> Int

Hashable Quarter 
Instance details

Defined in Data.Time.Calendar.Quarter.Compat

Methods

hashWithSalt :: Int -> Quarter -> Int

hash :: Quarter -> Int

Hashable QuarterOfYear 
Instance details

Defined in Data.Time.Calendar.Quarter.Compat

Methods

hashWithSalt :: Int -> QuarterOfYear -> Int

hash :: QuarterOfYear -> Int

Hashable TermUnique Source # 
Instance details

Defined in PlutusCore.Name

Hashable TypeUnique Source # 
Instance details

Defined in PlutusCore.Name

Hashable Unique Source # 
Instance details

Defined in PlutusCore.Name

Methods

hashWithSalt :: Int -> Unique -> Int

hash :: Unique -> Int

Hashable TyName Source # 
Instance details

Defined in PlutusCore.Name

Methods

hashWithSalt :: Int -> TyName -> Int

hash :: TyName -> Int

Hashable Name Source # 
Instance details

Defined in PlutusCore.Name

Methods

hashWithSalt :: Int -> Name -> Int

hash :: Name -> Int

Hashable DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Hashable StepKind Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Hashable ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Hashable a => Hashable [a] 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> [a] -> Int

hash :: [a] -> Int

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int

hash :: Maybe a -> Int

Hashable a => Hashable (Ratio a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ratio a -> Int

hash :: Ratio a -> Int

Hashable (Ptr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ptr a -> Int

hash :: Ptr a -> Int

Hashable (FunPtr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> FunPtr a -> Int

hash :: FunPtr a -> Int

Hashable a => Hashable (Complex a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Complex a -> Int

hash :: Complex a -> Int

Hashable a => Hashable (Min a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Min a -> Int

hash :: Min a -> Int

Hashable a => Hashable (Max a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Max a -> Int

hash :: Max a -> Int

Hashable a => Hashable (First a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> First a -> Int

hash :: First a -> Int

Hashable a => Hashable (Last a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Last a -> Int

hash :: Last a -> Int

Hashable a => Hashable (WrappedMonoid a) 
Instance details

Defined in Data.Hashable.Class

Hashable a => Hashable (Option a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Option a -> Int

hash :: Option a -> Int

Hashable (StableName a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> StableName a -> Int

hash :: StableName a -> Int

Hashable a => Hashable (Identity a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Identity a -> Int

hash :: Identity a -> Int

Hashable a => Hashable (NonEmpty a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> NonEmpty a -> Int

hash :: NonEmpty a -> Int

Hashable v => Hashable (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

hashWithSalt :: Int -> KeyMap v -> Int

hash :: KeyMap v -> Int

Hashable a => Hashable (Solo a) 
Instance details

Defined in Data.Tuple.Solo

Methods

hashWithSalt :: Int -> Solo a -> Int

hash :: Solo a -> Int

Hashable (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Hashed a -> Int

hash :: Hashed a -> Int

Hashable v => Hashable (IntMap v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntMap v -> Int

hash :: IntMap v -> Int

Hashable v => Hashable (Seq v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Seq v -> Int

hash :: Seq v -> Int

Hashable v => Hashable (Set v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Set v -> Int

hash :: Set v -> Int

Hashable v => Hashable (Tree v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Tree v -> Int

hash :: Tree v -> Int

Hashable1 f => Hashable (Fix f) 
Instance details

Defined in Data.Fix

Methods

hashWithSalt :: Int -> Fix f -> Int

hash :: Fix f -> Int

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

hashWithSalt :: Int -> Maybe a -> Int

hash :: Maybe a -> Int

Hashable a => Hashable (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

hashWithSalt :: Int -> HashSet a -> Int

hash :: HashSet a -> Int

Hashable ann => Hashable (Version ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

hashWithSalt :: Int -> Version ann -> Int

hash :: Version ann -> Int

Hashable ann => Hashable (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

hashWithSalt :: Int -> Kind ann -> Int

hash :: Kind ann -> Int

Hashable a => Hashable (RAList a) 
Instance details

Defined in Data.RAList.Internal

Methods

hashWithSalt :: Int -> RAList a -> Int

hash :: RAList a -> Int

Hashable a => Hashable (Leaf a) 
Instance details

Defined in Data.RAList.Tree.Internal

Methods

hashWithSalt :: Int -> Leaf a -> Int

hash :: Leaf a -> Int

Hashable fun => Hashable (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Either a b -> Int

hash :: Either a b -> Int

Hashable (TypeRep a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> TypeRep a -> Int

hash :: TypeRep a -> Int

(Hashable a1, Hashable a2) => Hashable (a1, a2) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2) -> Int

hash :: (a1, a2) -> Int

Hashable (Fixed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Fixed a -> Int

hash :: Fixed a -> Int

Hashable a => Hashable (Arg a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Arg a b -> Int

hash :: Arg a b -> Int

Hashable (Proxy a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Proxy a -> Int

hash :: Proxy a -> Int

(Hashable k, Hashable v) => Hashable (Map k v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Map k v -> Int

hash :: Map k v -> Int

(Hashable a, Hashable b) => Hashable (These a b) 
Instance details

Defined in Data.These

Methods

hashWithSalt :: Int -> These a b -> Int

hash :: These a b -> Int

(Hashable k, Hashable v) => Hashable (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

hashWithSalt :: Int -> HashMap k v -> Int

hash :: HashMap k v -> Int

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

hashWithSalt :: Int -> Either a b -> Int

hash :: Either a b -> Int

(Hashable a, Hashable b) => Hashable (These a b) 
Instance details

Defined in Data.Strict.These

Methods

hashWithSalt :: Int -> These a b -> Int

hash :: These a b -> Int

(Hashable a, Hashable b) => Hashable (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

hashWithSalt :: Int -> Pair a b -> Int

hash :: Pair a b -> Int

Hashable (f a) => Hashable (Node f a) 
Instance details

Defined in Data.RAList.Tree.Internal

Methods

hashWithSalt :: Int -> Node f a -> Int

hash :: Node f a -> Int

(Hashable k, Hashable a) => Hashable (MonoidalHashMap k a) 
Instance details

Defined in Data.HashMap.Monoidal

Methods

hashWithSalt :: Int -> MonoidalHashMap k a -> Int

hash :: MonoidalHashMap k a -> Int

(Hashable a1, Hashable a2, Hashable a3) => Hashable (a1, a2, a3) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3) -> Int

hash :: (a1, a2, a3) -> Int

Hashable a => Hashable (Const a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Const a b -> Int

hash :: Const a b -> Int

(Hashable a1, Hashable a2, Hashable a3, Hashable a4) => Hashable (a1, a2, a3, a4) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4) -> Int

hash :: (a1, a2, a3, a4) -> Int

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Product f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Product f g a -> Int

hash :: Product f g a -> Int

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Sum f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Sum f g a -> Int

hash :: Sum f g a -> Int

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5) => Hashable (a1, a2, a3, a4, a5) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5) -> Int

hash :: (a1, a2, a3, a4, a5) -> Int

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Compose f g a -> Int

hash :: Compose f g a -> Int

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable (a1, a2, a3, a4, a5, a6) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6) -> Int

hash :: (a1, a2, a3, a4, a5, a6) -> Int

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6, Hashable a7) => Hashable (a1, a2, a3, a4, a5, a6, a7) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6, a7) -> Int

hash :: (a1, a2, a3, a4, a5, a6, a7) -> Int

type PrettyUni uni fun = (GShow uni, Closed uni, Pretty fun, Typeable uni, Typeable fun, Everywhere uni PrettyConst) Source #

The set of constraints we need to be able to print things in universes, which we need in order to throw exceptions.