Package hydra.ext.haskell.ast
Class DataDeclaration
java.lang.Object
hydra.ext.haskell.ast.DataDeclaration
- All Implemented Interfaces:
Serializable,Comparable<DataDeclaration>
A data type declaration
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal List<ConstructorWithComments>The data constructorsstatic final NameType class constraintsstatic final NameDerived type class instancesstatic final Namefinal DeclarationHeadThe declaration headstatic final Namefinal DataOrNewtypeThe 'data' or 'newtype' keywordstatic final Namestatic final Name -
Constructor Summary
ConstructorsConstructorDescriptionDataDeclaration(DataOrNewtype keyword, List<Assertion> context, DeclarationHead head, List<ConstructorWithComments> constructors, List<Deriving> deriving) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(DataDeclaration other) booleaninthashCode()withConstructors(List<ConstructorWithComments> constructors) withContext(List<Assertion> context) withDeriving(List<Deriving> deriving) withHead(DeclarationHead head) withKeyword(DataOrNewtype keyword)
-
Field Details
-
TYPE_
-
KEYWORD
-
CONTEXT
-
HEAD
-
CONSTRUCTORS
-
DERIVING
-
keyword
The 'data' or 'newtype' keyword -
context
Type class constraints -
head
The declaration head -
constructors
The data constructors -
deriving
Derived type class instances
-
-
Constructor Details
-
DataDeclaration
public DataDeclaration(DataOrNewtype keyword, List<Assertion> context, DeclarationHead head, List<ConstructorWithComments> constructors, List<Deriving> deriving)
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<DataDeclaration>
-
withKeyword
-
withContext
-
withHead
-
withConstructors
-
withDeriving
-