Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines a common type various evaluation machine use to return their results.
Synopsis
-
class
AsEvaluationFailure
err
where
- _EvaluationFailure :: Prism' err ()
- evaluationFailure :: AsEvaluationFailure err => err
- _EvaluationFailureVia :: Eq err => err -> Prism' err ()
- data EvaluationResult a
- isEvaluationSuccess :: EvaluationResult a -> Bool
- isEvaluationFailure :: EvaluationResult a -> Bool
Documentation
class AsEvaluationFailure err where Source #
A class for viewing errors as evaluation failures (in the sense of Plutus).
_EvaluationFailure :: Prism' err () Source #
Instances
AsEvaluationFailure () Source # | |
Defined in PlutusCore.Evaluation.Result _EvaluationFailure :: Prism' () () Source # |
|
AsEvaluationFailure KnownTypeError Source # | |
Defined in PlutusCore.Builtin.KnownType |
|
AsEvaluationFailure CekUserError Source # | |
AsEvaluationFailure user => AsEvaluationFailure ( EvaluationError user internal) Source # | |
Defined in PlutusCore.Evaluation.Machine.Exception _EvaluationFailure :: Prism' ( EvaluationError user internal) () Source # |
|
AsEvaluationFailure err => AsEvaluationFailure ( ErrorWithCause err cause) Source # | |
Defined in PlutusCore.Evaluation.Machine.Exception _EvaluationFailure :: Prism' ( ErrorWithCause err cause) () Source # |
evaluationFailure :: AsEvaluationFailure err => err Source #
_EvaluationFailureVia :: Eq err => err -> Prism' err () Source #
Construct a
Prism
focusing on the
*EvaluationFailure
part of
err
by taking
that
*EvaluationFailure
and
- returning it for the setter part of the prism
-
checking the error for equality with
*EvaluationFailure
for the opposite direction.
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
isEvaluationSuccess :: EvaluationResult a -> Bool Source #
Check whether an
EvaluationResult
is an
EvaluationSuccess
.
isEvaluationFailure :: EvaluationResult a -> Bool Source #
Check whether an
EvaluationResult
is an
EvaluationFailure
.