More adjustments

This commit is contained in:
2023-05-29 21:34:54 +01:00
parent 12112ff063
commit 5a18f14d3b
11 changed files with 47 additions and 37 deletions

View File

@@ -70,10 +70,12 @@ fn substitute(paths: &PathSet, value: Clause, body: ExprInst) -> ExprInst {
x: substitute(right, value.clone(), x.clone()),
}),
(Clause::LambdaArg, None) => Ok(value.clone()),
(_, None) =>
panic!("Substitution path ends in something other than LambdaArg"),
(_, Some(_)) =>
panic!("Substitution path leads into something other than Apply"),
(_, None) => {
panic!("Substitution path ends in something other than LambdaArg")
},
(_, Some(_)) => {
panic!("Substitution path leads into something other than Apply")
},
}
})
.unwrap()

View File

@@ -23,8 +23,9 @@ impl Display for RuntimeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Extern(e) => write!(f, "Error in external function: {e}"),
Self::NonFunctionApplication(loc) =>
write!(f, "Primitive applied as function at {loc:?}"),
Self::NonFunctionApplication(loc) => {
write!(f, "Primitive applied as function at {loc:?}")
},
}
}
}