Skip to content

Commit

Permalink
review: optimize import
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Jan 9, 2025
1 parent 58ec58d commit 858c1d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
3 changes: 1 addition & 2 deletions syntax/src/main/java/org/aya/syntax/core/term/FreeTerm.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public record FreeTerm(@NotNull LocalVar name) implements TyckInternal {
// return this;
// }

@Override
public @NotNull Term bindAllFrom(@NotNull ImmutableSeq<LocalVar> vars, int fromDepth) {
@Override public @NotNull Term bindAllFrom(@NotNull ImmutableSeq<LocalVar> vars, int fromDepth) {
var idx = vars.indexOf(this.name);
if (idx == -1) return this;

Expand Down
12 changes: 3 additions & 9 deletions syntax/src/main/java/org/aya/syntax/core/term/LocalTerm.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2024 Tesla (Yinsen) Zhang.
// Copyright (c) 2020-2025 Tesla (Yinsen) Zhang.
// Use of this source code is governed by the MIT license that can be found in the LICENSE.md file.
package org.aya.syntax.core.term;

Expand All @@ -12,14 +12,8 @@ public record LocalTerm(int index) implements Term {
assert index >= 0 : "Sanity check";
}

@Override
public @NotNull Term descent(@NotNull IndexedFunction<Term, Term> f) {
return this;
}

@Override public @NotNull Term bindAt(@NotNull LocalVar var, int depth) {
return this;
}
@Override public @NotNull Term descent(@NotNull IndexedFunction<Term, Term> f) { return this; }
@Override public @NotNull Term bindAt(@NotNull LocalVar var, int depth) { return this; }

@Override public @NotNull Term replaceAllFrom(int from, @NotNull ImmutableSeq<Term> list) {
var i = index - from;
Expand Down
1 change: 0 additions & 1 deletion syntax/src/main/java/org/aya/syntax/core/term/Param.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package org.aya.syntax.core.term;

import kala.collection.SeqView;
import kala.collection.immutable.ImmutableSeq;
import org.aya.generic.AyaDocile;
import org.aya.pretty.doc.Doc;
import org.aya.syntax.core.RichParam;
Expand Down

0 comments on commit 858c1d6

Please sign in to comment.