ast: rename Let to Bind
This commit is contained in:
@@ -96,7 +96,7 @@ impl<A: Annotation> Match<A> for Fn<A> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<A: Annotation> Match<A> for Let<A> {
|
||||
impl<A: Annotation> Match<A> for Bind<A> {
|
||||
fn recurse(sub: &mut Subst<A>, pat: &Self, expr: &Self) -> bool {
|
||||
let (Self(pat_kind, pat_pat, pat_expr), Self(expr_kind, expr_pat, expr_expr)) = (pat, expr);
|
||||
pat_kind == expr_kind
|
||||
@@ -159,8 +159,8 @@ impl<A: Annotation> Match<A> for Expr<A> {
|
||||
(Expr::Id(_), _) => false,
|
||||
(Expr::Lit(pat), Expr::Lit(expr)) => pat == expr,
|
||||
(Expr::Lit(_), _) => false,
|
||||
(Expr::Let(pat), Expr::Let(expr)) => Match::recurse(sub, pat, expr),
|
||||
(Expr::Let(..), _) => false,
|
||||
(Expr::Bind(pat), Expr::Bind(expr)) => Match::recurse(sub, pat, expr),
|
||||
(Expr::Bind(..), _) => false,
|
||||
(Expr::Struct(pat), Expr::Struct(expr)) => Match::recurse(sub, pat, expr),
|
||||
(Expr::Struct(_), _) => false,
|
||||
(Expr::Make(pat), Expr::Make(expr)) => Match::recurse(sub, pat, expr),
|
||||
@@ -184,7 +184,7 @@ impl<A: Annotation> Match<A> for Expr<A> {
|
||||
}
|
||||
}
|
||||
Expr::Id(_) | Expr::Lit(_) => {}
|
||||
Expr::Let(expr) => expr.apply(sub),
|
||||
Expr::Bind(expr) => expr.apply(sub),
|
||||
Expr::Struct(expr) => expr.apply(sub),
|
||||
Expr::Make(expr) => expr.apply(sub),
|
||||
Expr::Mod(expr) => expr.apply(sub),
|
||||
|
||||
Reference in New Issue
Block a user