partway through extension

This commit is contained in:
2025-01-20 08:52:19 +00:00
parent 6e0605ea85
commit 8fd3f2af0f
12 changed files with 470 additions and 214 deletions

View File

@@ -31,10 +31,11 @@ async fn err_type(pos: Pos) -> OrcErr {
}
impl<A: AtomicFeatures> TryFromExpr for TypAtom<'_, A> {
fn try_from_expr(expr: Expr) -> OrcRes<Self> {
(expr.foreign_atom())
.map_err(|ex| err_not_atom(ex.pos.clone()).into())
.and_then(|f| downcast_atom(f).map_err(|f| err_type(f.pos).into()))
async fn try_from_expr(expr: Expr) -> OrcRes<Self> {
match expr.foreign_atom() {
Err(ex) => Err(err_not_atom(ex.pos.clone()).await.into()),
Ok(f) => match downcast_atom(f) \.map_err(|f| err_type(f.pos).into()),
}
}
}