org.aya.generic.stmt.TyckOrder Maven / Gradle / Ivy
// Copyright (c) 2020-2024 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.generic.stmt;
import org.jetbrains.annotations.NotNull;
public sealed interface TyckOrder {
@NotNull TyckUnit unit();
/** "Need to check and obtain the type signature of a definition" */
record Head(@NotNull TyckUnit unit) implements TyckOrder {
@Override public boolean equals(Object obj) {
return obj instanceof Head(var unit1) && unit1 == unit();
}
public Body toBody() { return new Body(unit); }
}
/** Need to check the full implementation of a definition */
record Body(@NotNull TyckUnit unit) implements TyckOrder {
@Override public boolean equals(Object obj) {
return obj instanceof Body(var unit1) && unit1 == unit();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy