feat: impl display for Program and Term where T: Binder

This commit is contained in:
rvcas
2022-08-03 21:59:57 -04:00
committed by Lucas
parent e70881c27c
commit 198dae7f5d
2 changed files with 22 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ pub enum Error {
OutOfExError(ExBudget),
#[error("Invalid Stepkind: {0}")]
InvalidStepKind(u8),
#[error("Cannot evaluate an open term:\n\n{0:#?}")]
#[error("Cannot evaluate an open term:\n\n{0}")]
OpenTermEvaluated(Term<NamedDeBruijn>),
#[error("The provided Plutus code called 'error'.")]
EvaluationFailure,
@@ -22,9 +22,9 @@ pub enum Error {
NonFunctionalApplication(Value),
#[error("Type mismatch expected '{0}' got '{1}'")]
TypeMismatch(Type, Type),
#[error("A builtin received a term argument when something else was expected:\n\n{}\n\nYou probably forgot to wrap the builtin with a force.", .0.to_pretty())]
#[error("A builtin received a term argument when something else was expected:\n\n{0}\n\nYou probably forgot to wrap the builtin with a force.")]
UnexpectedBuiltinTermArgument(Term<NamedDeBruijn>),
#[error("A builtin expected a term argument, but something else was received:\n\n{}\n\nYou probably have an extra force wrapped around a builtin", .0.to_pretty())]
#[error("A builtin expected a term argument, but something else was received:\n\n{0}\n\nYou probably have an extra force wrapped around a builtin")]
BuiltinTermArgumentExpected(Term<NamedDeBruijn>),
#[error("Unable to unlift value because it is not a constant:\n\n{0:#?}")]
NotAConstant(Value),