forked from Orchid/orchid
More adjustments
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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:?}")
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user