Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BuiltinError
- throwNotAConstant ∷ MonadError BuiltinError m ⇒ m void
- class HasConstant term where
- asConstant ∷ term → Either BuiltinError (Some (ValueOf (UniOf term)))
- fromConstant ∷ Some (ValueOf (UniOf term)) → term
- type HasConstantIn uni term = (UniOf term ~ uni, HasConstant term)
- fromValueOf ∷ ∀ a term. HasConstant term ⇒ UniOf term (Esc a) → a → term
- fromValue ∷ ∀ a term. (HasConstant term, UniOf term `HasTermLevel` a) ⇒ a → term
Documentation
data BuiltinError Source #
The type of errors that readKnown
and makeKnown
can return.
Instances
Show BuiltinError Source # | |
Defined in PlutusCore.Builtin.Result | |
Eq BuiltinError Source # | |
Defined in PlutusCore.Builtin.Result (==) ∷ BuiltinError → BuiltinError → Bool Source # (/=) ∷ BuiltinError → BuiltinError → Bool Source # | |
AsBuiltinError BuiltinError Source # | |
Defined in PlutusCore.Builtin.Result _BuiltinError ∷ Prism' BuiltinError BuiltinError Source # _BuiltinUnliftingEvaluationError ∷ Prism' BuiltinError UnliftingEvaluationError Source # _BuiltinEvaluationFailure ∷ Prism' BuiltinError () Source # | |
AsUnliftingEvaluationError BuiltinError Source # | |
AsEvaluationFailure BuiltinError Source # | |
Defined in PlutusCore.Builtin.Result _EvaluationFailure ∷ Prism' BuiltinError () Source # | |
Pretty BuiltinError Source # | |
Defined in PlutusCore.Builtin.Result pretty ∷ BuiltinError → Doc ann Source # prettyList ∷ [BuiltinError] → Doc ann Source # | |
MonadError BuiltinError BuiltinResult Source # |
|
Defined in PlutusCore.Builtin.Result throwError ∷ BuiltinError → BuiltinResult a Source # catchError ∷ BuiltinResult a → (BuiltinError → BuiltinResult a) → BuiltinResult a Source # |
throwNotAConstant ∷ MonadError BuiltinError m ⇒ m void Source #
class HasConstant term where Source #
Ensures that term
has a Constant
-like constructor to lift values to and unlift values from.
asConstant ∷ term → Either BuiltinError (Some (ValueOf (UniOf term))) Source #
Unwrap from a Constant
-like constructor throwing an UnliftingError
if the provided
term
is not a wrapped Haskell value.
fromConstant ∷ Some (ValueOf (UniOf term)) → term Source #
Wrap a Haskell value as a term
.
Instances
HasConstant val ⇒ HasConstant (Opaque val rep) Source # | |
Defined in PlutusCore.Builtin.Polymorphism | |
HasConstant (SomeConstant uni rep) Source # | |
Defined in PlutusCore.Builtin.Polymorphism asConstant ∷ SomeConstant uni rep → Either BuiltinError (Some (ValueOf (UniOf (SomeConstant uni rep)))) Source # fromConstant ∷ Some (ValueOf (UniOf (SomeConstant uni rep))) → SomeConstant uni rep Source # | |
HasConstant (CkValue uni fun) Source # | |
Defined in PlutusCore.Evaluation.Machine.Ck | |
HasConstant (CekValue uni fun ann) Source # | |
HasConstant (Term name uni fun ()) Source # | |
Defined in UntypedPlutusCore.Core.Type | |
HasConstant (Term TyName Name uni fun ()) Source # | |
type HasConstantIn uni term = (UniOf term ~ uni, HasConstant term) Source #
Ensures that term
has a Constant
-like constructor to lift values to and unlift values from
and connects term
and its uni
.
fromValueOf ∷ ∀ a term. HasConstant term ⇒ UniOf term (Esc a) → a → term Source #
Wrap a Haskell value (given its explicit type tag) as a term
.
fromValue ∷ ∀ a term. (HasConstant term, UniOf term `HasTermLevel` a) ⇒ a → term Source #
Wrap a Haskell value (provided its type is in the universe) as a term
.