Skip to content

Commit

Permalink
Compare functions only
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Jan 24, 2020
1 parent 8eb780c commit 3cde9d4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ private Expression visitClonedApp(Concrete.AppExpression expr, Expression coreEx

@Override
public Expression visitApp(Concrete.AppExpression expr, Expression coreExpr) {
if (subExpr instanceof Concrete.AppExpression && Objects.equals(
((Concrete.AppExpression) subExpr).getFunction().getData(),
expr.getFunction().getData()
)) return coreExpr;
if (matchesSubExpr(expr)) return coreExpr;
Concrete.Expression cloned = Concrete.AppExpression.make(expr.getData(), expr.getFunction(), new ArrayList<>(expr.getArguments()));
return visitClonedApp(((Concrete.AppExpression) cloned), coreExpr);
Expand Down

0 comments on commit 3cde9d4

Please sign in to comment.