org.aya.guest0x0.syntax.CompData Maven / Gradle / Ivy
package org.aya.guest0x0.syntax;
import org.aya.pretty.doc.Doc;
import org.aya.pretty.doc.Docile;
import org.jetbrains.annotations.NotNull;
import java.util.function.Function;
public record CompData(
@NotNull Expr phi,
@NotNull Expr ty,
@NotNull Expr walls,
@NotNull Expr bottom
) implements Docile {
public @NotNull CompData fmap(@NotNull Function f) {
return new CompData<>(f.apply(phi), f.apply(ty), f.apply(walls), f.apply(bottom));
}
@Override public @NotNull Doc toDoc() {
return Doc.sep(Doc.plain("hc"), walls.toDoc(), Doc.plain("on"), bottom.toDoc());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy