
hydra.ext.haskell.ast.DataDeclaration_Keyword Maven / Gradle / Ivy
// Note: this is an automatically generated file. Do not edit.
package hydra.ext.haskell.ast;
import java.io.Serializable;
/**
* The 'data' versus 'newtype keyword
*/
public abstract class DataDeclaration_Keyword implements Serializable {
public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/haskell/ast.DataDeclaration.Keyword");
public static final hydra.core.Name FIELD_NAME_DATA = new hydra.core.Name("data");
public static final hydra.core.Name FIELD_NAME_NEWTYPE = new hydra.core.Name("newtype");
private DataDeclaration_Keyword () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(Data instance) ;
R visit(Newtype instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(DataDeclaration_Keyword instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(Data instance) {
return otherwise((instance));
}
default R visit(Newtype instance) {
return otherwise((instance));
}
}
public static final class Data extends hydra.ext.haskell.ast.DataDeclaration_Keyword implements Serializable {
public Data () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Data)) {
return false;
}
Data o = (Data) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class Newtype extends hydra.ext.haskell.ast.DataDeclaration_Keyword implements Serializable {
public Newtype () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Newtype)) {
return false;
}
Newtype o = (Newtype) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy