feat: Finish up assert feature
Better error reporing on NonFunctionalApplication Error Refactor redundant code Add handling of whens with one clause.
This commit is contained in:
@@ -343,7 +343,7 @@ impl Machine {
|
||||
Err(Error::UnexpectedBuiltinTermArgument(t.as_ref().clone()))
|
||||
}
|
||||
}
|
||||
rest => Err(Error::NonFunctionalApplication(rest)),
|
||||
rest => Err(Error::NonFunctionalApplication(rest, argument)),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ pub enum Error {
|
||||
EvaluationFailure,
|
||||
#[error("Attempted to instantiate a non-polymorphic term:\n\n{0:#?}")]
|
||||
NonPolymorphicInstantiation(Value),
|
||||
#[error("Attempted to apply a non-function:\n\n{0:#?}")]
|
||||
NonFunctionalApplication(Value),
|
||||
#[error("Attempted to apply a non-function:\n\n{0:#?} to argument:\n\n{1:#?}")]
|
||||
NonFunctionalApplication(Value, Value),
|
||||
#[error("Type mismatch expected '{0}' got '{1}'")]
|
||||
TypeMismatch(Type, Type),
|
||||
#[error("Type mismatch expected '(list a)' got '{0}'")]
|
||||
|
||||
Reference in New Issue
Block a user