Skip to content

Commit

Permalink
concrete: randomly delete some lines
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Nov 25, 2024
1 parent c58bf26 commit 44eeb55
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions syntax/src/main/java/org/aya/syntax/concrete/Expr.java
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,7 @@ public record ElementList(@NotNull ImmutableSeq<WithPos<Expr>> exprList) {
public void forEach(@NotNull PosedConsumer<Expr> f) { exprList.forEach(f::accept); }
}

public record ListCompNames(
@NotNull Expr monadBind,
@NotNull Expr functorPure
) {
public record ListCompNames(@NotNull Expr monadBind, @NotNull Expr functorPure) {

Check warning on line 417 in syntax/src/main/java/org/aya/syntax/concrete/Expr.java

View check run for this annotation

Codecov / codecov/patch

syntax/src/main/java/org/aya/syntax/concrete/Expr.java#L417

Added line #L417 was not covered by tests
public ListCompNames fmap(@NotNull Function<Expr, Expr> f) {
return new ListCompNames(f.apply(monadBind), f.apply(functorPure));
}
Expand Down Expand Up @@ -469,22 +466,16 @@ public void forEach(@NotNull PosedConsumer<Expr> f) {
/**
* helper constructor, also find constructor calls easily in IDE
*/
public static Expr.Array newList(
@NotNull ImmutableSeq<WithPos<Expr>> exprs
) {
return new Expr.Array(
Either.right(new ElementList(exprs))
);
public static Expr.Array newList(@NotNull ImmutableSeq<WithPos<Expr>> exprs) {
return new Expr.Array(Either.right(new ElementList(exprs)));
}

public static Expr.Array newGenerator(
@NotNull WithPos<Expr> generator,
@NotNull ImmutableSeq<DoBind> bindings,
@NotNull ListCompNames names
) {
return new Expr.Array(
Either.left(new CompBlock(generator, bindings, names))
);
return new Expr.Array(Either.left(new CompBlock(generator, bindings, names)));

Check warning on line 478 in syntax/src/main/java/org/aya/syntax/concrete/Expr.java

View check run for this annotation

Codecov / codecov/patch

syntax/src/main/java/org/aya/syntax/concrete/Expr.java#L478

Added line #L478 was not covered by tests
}
}

Expand Down Expand Up @@ -534,8 +525,7 @@ record LetBind(
) implements SourceNode {
public @NotNull LetBind update(@NotNull ImmutableSeq<Expr.Param> telescope, @NotNull WithPos<Expr> result, @NotNull WithPos<Expr> definedAs) {
return telescope().sameElements(telescope, true) && result() == result && definedAs() == definedAs
? this
: new LetBind(sourcePos, bindName, telescope, result, definedAs);
? this : new LetBind(sourcePos, bindName, telescope, result, definedAs);
}

public @NotNull LetBind descent(@NotNull PosedUnaryOperator<@NotNull Expr> f) {
Expand Down

0 comments on commit 44eeb55

Please sign in to comment.