hydra-ext 0.17.0 → 0.17.4
raw patch · 58 files changed
+17789/−9928 lines, 58 filesdep ~hydra-kerneldep ~hydra-rdfPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: hydra-kernel, hydra-rdf
API changes (from Hackage documentation)
- Hydra.Atlas: AtlasAttributeDef_CardinalityList :: AtlasAttributeDef_Cardinality
- Hydra.Atlas: AtlasAttributeDef_CardinalitySet :: AtlasAttributeDef_Cardinality
- Hydra.Atlas: AtlasAttributeDef_CardinalitySingle :: AtlasAttributeDef_Cardinality
- Hydra.Atlas: AtlasAttributeDef_IndexTypeDefault :: AtlasAttributeDef_IndexType
- Hydra.Atlas: AtlasAttributeDef_IndexTypeString :: AtlasAttributeDef_IndexType
- Hydra.Atlas: _AtlasAttributeDef_Cardinality :: Name
- Hydra.Atlas: _AtlasAttributeDef_Cardinality_list :: Name
- Hydra.Atlas: _AtlasAttributeDef_Cardinality_set :: Name
- Hydra.Atlas: _AtlasAttributeDef_Cardinality_single :: Name
- Hydra.Atlas: _AtlasAttributeDef_IndexType :: Name
- Hydra.Atlas: _AtlasAttributeDef_IndexType_default :: Name
- Hydra.Atlas: _AtlasAttributeDef_IndexType_string :: Name
- Hydra.Atlas: data AtlasAttributeDef_Cardinality
- Hydra.Atlas: data AtlasAttributeDef_IndexType
- Hydra.Atlas: instance GHC.Classes.Eq Hydra.Atlas.AtlasAttributeDef_Cardinality
- Hydra.Atlas: instance GHC.Classes.Eq Hydra.Atlas.AtlasAttributeDef_IndexType
- Hydra.Atlas: instance GHC.Classes.Ord Hydra.Atlas.AtlasAttributeDef_Cardinality
- Hydra.Atlas: instance GHC.Classes.Ord Hydra.Atlas.AtlasAttributeDef_IndexType
- Hydra.Atlas: instance GHC.Read.Read Hydra.Atlas.AtlasAttributeDef_Cardinality
- Hydra.Atlas: instance GHC.Read.Read Hydra.Atlas.AtlasAttributeDef_IndexType
- Hydra.Atlas: instance GHC.Show.Show Hydra.Atlas.AtlasAttributeDef_Cardinality
- Hydra.Atlas: instance GHC.Show.Show Hydra.Atlas.AtlasAttributeDef_IndexType
- Hydra.Avro.Coder: avro_foreignKey :: String
- Hydra.Avro.Coder: avro_primaryKey :: String
- Hydra.Avro.SchemaJson: avro_aliases :: String
- Hydra.Avro.SchemaJson: avro_array :: String
- Hydra.Avro.SchemaJson: avro_ascending :: String
- Hydra.Avro.SchemaJson: avro_boolean :: String
- Hydra.Avro.SchemaJson: avro_bytes :: String
- Hydra.Avro.SchemaJson: avro_default :: String
- Hydra.Avro.SchemaJson: avro_descending :: String
- Hydra.Avro.SchemaJson: avro_doc :: String
- Hydra.Avro.SchemaJson: avro_double :: String
- Hydra.Avro.SchemaJson: avro_enum :: String
- Hydra.Avro.SchemaJson: avro_fields :: String
- Hydra.Avro.SchemaJson: avro_fixed :: String
- Hydra.Avro.SchemaJson: avro_float :: String
- Hydra.Avro.SchemaJson: avro_ignore :: String
- Hydra.Avro.SchemaJson: avro_int :: String
- Hydra.Avro.SchemaJson: avro_items :: String
- Hydra.Avro.SchemaJson: avro_long :: String
- Hydra.Avro.SchemaJson: avro_map :: String
- Hydra.Avro.SchemaJson: avro_name :: String
- Hydra.Avro.SchemaJson: avro_namespace :: String
- Hydra.Avro.SchemaJson: avro_null :: String
- Hydra.Avro.SchemaJson: avro_order :: String
- Hydra.Avro.SchemaJson: avro_record :: String
- Hydra.Avro.SchemaJson: avro_size :: String
- Hydra.Avro.SchemaJson: avro_string :: String
- Hydra.Avro.SchemaJson: avro_symbols :: String
- Hydra.Avro.SchemaJson: avro_type :: String
- Hydra.Avro.SchemaJson: avro_values :: String
- Hydra.Azure.Dtld: Interface_ContentsCommand :: Command -> Interface_Contents
- Hydra.Azure.Dtld: Interface_ContentsComponent :: Component -> Interface_Contents
- Hydra.Azure.Dtld: Interface_ContentsProperty :: Property -> Interface_Contents
- Hydra.Azure.Dtld: Interface_ContentsRelationship :: Relationship -> Interface_Contents
- Hydra.Azure.Dtld: Interface_ContentsTelemetry :: Telemetry -> Interface_Contents
- Hydra.Azure.Dtld: SchemaComplex :: Schema_Complex -> Schema
- Hydra.Azure.Dtld: SchemaPrimitive :: Schema_Primitive -> Schema
- Hydra.Azure.Dtld: Schema_Array :: Iri -> Schema -> Maybe Dtmi -> Maybe String -> Maybe String -> Maybe String -> Schema_Array
- Hydra.Azure.Dtld: Schema_ComplexArray :: Schema_Array -> Schema_Complex
- Hydra.Azure.Dtld: Schema_ComplexEnum :: Schema_Enum -> Schema_Complex
- Hydra.Azure.Dtld: Schema_ComplexMap :: Schema_Map -> Schema_Complex
- Hydra.Azure.Dtld: Schema_ComplexObject :: Schema_Object -> Schema_Complex
- Hydra.Azure.Dtld: Schema_Enum :: Iri -> [EnumValue] -> IntegerOrString -> Maybe Dtmi -> Maybe String -> Maybe String -> Maybe String -> Schema_Enum
- Hydra.Azure.Dtld: Schema_Interface :: Dtmi -> Schema_Interface_Type -> Maybe String -> Maybe String -> Maybe String -> Schema_Interface
- Hydra.Azure.Dtld: Schema_Interface_TypeArray :: Schema_Array -> Schema_Interface_Type
- Hydra.Azure.Dtld: Schema_Interface_TypeEnum :: Schema_Enum -> Schema_Interface_Type
- Hydra.Azure.Dtld: Schema_Interface_TypeMap :: Schema_Map -> Schema_Interface_Type
- Hydra.Azure.Dtld: Schema_Interface_TypeObject :: Schema_Object -> Schema_Interface_Type
- Hydra.Azure.Dtld: Schema_Map :: Iri -> MapKey -> MapValue -> Maybe Dtmi -> Maybe String -> Maybe String -> Maybe String -> Schema_Map
- Hydra.Azure.Dtld: Schema_Object :: Iri -> Set Field -> Maybe Dtmi -> Maybe String -> Maybe String -> Maybe String -> Schema_Object
- Hydra.Azure.Dtld: Schema_PrimitiveBoolean :: Schema_Primitive
- Hydra.Azure.Dtld: Schema_PrimitiveDate :: Schema_Primitive
- Hydra.Azure.Dtld: Schema_PrimitiveDateTime :: Schema_Primitive
- Hydra.Azure.Dtld: Schema_PrimitiveDouble :: Schema_Primitive
- Hydra.Azure.Dtld: Schema_PrimitiveDuration :: Schema_Primitive
- Hydra.Azure.Dtld: Schema_PrimitiveFloat :: Schema_Primitive
- Hydra.Azure.Dtld: Schema_PrimitiveInteger :: Schema_Primitive
- Hydra.Azure.Dtld: Schema_PrimitiveLong :: Schema_Primitive
- Hydra.Azure.Dtld: Schema_PrimitiveString :: Schema_Primitive
- Hydra.Azure.Dtld: Schema_PrimitiveTime :: Schema_Primitive
- Hydra.Azure.Dtld: [schema_ArrayComment] :: Schema_Array -> Maybe String
- Hydra.Azure.Dtld: [schema_ArrayDescription] :: Schema_Array -> Maybe String
- Hydra.Azure.Dtld: [schema_ArrayDisplayName] :: Schema_Array -> Maybe String
- Hydra.Azure.Dtld: [schema_ArrayElementSchema] :: Schema_Array -> Schema
- Hydra.Azure.Dtld: [schema_ArrayId] :: Schema_Array -> Maybe Dtmi
- Hydra.Azure.Dtld: [schema_ArrayType] :: Schema_Array -> Iri
- Hydra.Azure.Dtld: [schema_EnumComment] :: Schema_Enum -> Maybe String
- Hydra.Azure.Dtld: [schema_EnumDescription] :: Schema_Enum -> Maybe String
- Hydra.Azure.Dtld: [schema_EnumDisplayName] :: Schema_Enum -> Maybe String
- Hydra.Azure.Dtld: [schema_EnumEnumValues] :: Schema_Enum -> [EnumValue]
- Hydra.Azure.Dtld: [schema_EnumId] :: Schema_Enum -> Maybe Dtmi
- Hydra.Azure.Dtld: [schema_EnumType] :: Schema_Enum -> Iri
- Hydra.Azure.Dtld: [schema_EnumValueSchema] :: Schema_Enum -> IntegerOrString
- Hydra.Azure.Dtld: [schema_InterfaceComment] :: Schema_Interface -> Maybe String
- Hydra.Azure.Dtld: [schema_InterfaceDescription] :: Schema_Interface -> Maybe String
- Hydra.Azure.Dtld: [schema_InterfaceDisplayName] :: Schema_Interface -> Maybe String
- Hydra.Azure.Dtld: [schema_InterfaceId] :: Schema_Interface -> Dtmi
- Hydra.Azure.Dtld: [schema_InterfaceType] :: Schema_Interface -> Schema_Interface_Type
- Hydra.Azure.Dtld: [schema_MapComment] :: Schema_Map -> Maybe String
- Hydra.Azure.Dtld: [schema_MapDescription] :: Schema_Map -> Maybe String
- Hydra.Azure.Dtld: [schema_MapDisplayName] :: Schema_Map -> Maybe String
- Hydra.Azure.Dtld: [schema_MapId] :: Schema_Map -> Maybe Dtmi
- Hydra.Azure.Dtld: [schema_MapMapKey] :: Schema_Map -> MapKey
- Hydra.Azure.Dtld: [schema_MapMapValue] :: Schema_Map -> MapValue
- Hydra.Azure.Dtld: [schema_MapType] :: Schema_Map -> Iri
- Hydra.Azure.Dtld: [schema_ObjectComment] :: Schema_Object -> Maybe String
- Hydra.Azure.Dtld: [schema_ObjectDescription] :: Schema_Object -> Maybe String
- Hydra.Azure.Dtld: [schema_ObjectDisplayName] :: Schema_Object -> Maybe String
- Hydra.Azure.Dtld: [schema_ObjectFields] :: Schema_Object -> Set Field
- Hydra.Azure.Dtld: [schema_ObjectId] :: Schema_Object -> Maybe Dtmi
- Hydra.Azure.Dtld: [schema_ObjectType] :: Schema_Object -> Iri
- Hydra.Azure.Dtld: _Interface_Contents :: Name
- Hydra.Azure.Dtld: _Interface_Contents_command :: Name
- Hydra.Azure.Dtld: _Interface_Contents_component :: Name
- Hydra.Azure.Dtld: _Interface_Contents_property :: Name
- Hydra.Azure.Dtld: _Interface_Contents_relationship :: Name
- Hydra.Azure.Dtld: _Interface_Contents_telemetry :: Name
- Hydra.Azure.Dtld: _Schema_Array :: Name
- Hydra.Azure.Dtld: _Schema_Array_comment :: Name
- Hydra.Azure.Dtld: _Schema_Array_description :: Name
- Hydra.Azure.Dtld: _Schema_Array_displayName :: Name
- Hydra.Azure.Dtld: _Schema_Array_elementSchema :: Name
- Hydra.Azure.Dtld: _Schema_Array_id :: Name
- Hydra.Azure.Dtld: _Schema_Array_type :: Name
- Hydra.Azure.Dtld: _Schema_Complex :: Name
- Hydra.Azure.Dtld: _Schema_Complex_array :: Name
- Hydra.Azure.Dtld: _Schema_Complex_enum :: Name
- Hydra.Azure.Dtld: _Schema_Complex_map :: Name
- Hydra.Azure.Dtld: _Schema_Complex_object :: Name
- Hydra.Azure.Dtld: _Schema_Enum :: Name
- Hydra.Azure.Dtld: _Schema_Enum_comment :: Name
- Hydra.Azure.Dtld: _Schema_Enum_description :: Name
- Hydra.Azure.Dtld: _Schema_Enum_displayName :: Name
- Hydra.Azure.Dtld: _Schema_Enum_enumValues :: Name
- Hydra.Azure.Dtld: _Schema_Enum_id :: Name
- Hydra.Azure.Dtld: _Schema_Enum_type :: Name
- Hydra.Azure.Dtld: _Schema_Enum_valueSchema :: Name
- Hydra.Azure.Dtld: _Schema_Interface :: Name
- Hydra.Azure.Dtld: _Schema_Interface_Type :: Name
- Hydra.Azure.Dtld: _Schema_Interface_Type_array :: Name
- Hydra.Azure.Dtld: _Schema_Interface_Type_enum :: Name
- Hydra.Azure.Dtld: _Schema_Interface_Type_map :: Name
- Hydra.Azure.Dtld: _Schema_Interface_Type_object :: Name
- Hydra.Azure.Dtld: _Schema_Interface_comment :: Name
- Hydra.Azure.Dtld: _Schema_Interface_description :: Name
- Hydra.Azure.Dtld: _Schema_Interface_displayName :: Name
- Hydra.Azure.Dtld: _Schema_Interface_id :: Name
- Hydra.Azure.Dtld: _Schema_Interface_type :: Name
- Hydra.Azure.Dtld: _Schema_Map :: Name
- Hydra.Azure.Dtld: _Schema_Map_comment :: Name
- Hydra.Azure.Dtld: _Schema_Map_description :: Name
- Hydra.Azure.Dtld: _Schema_Map_displayName :: Name
- Hydra.Azure.Dtld: _Schema_Map_id :: Name
- Hydra.Azure.Dtld: _Schema_Map_mapKey :: Name
- Hydra.Azure.Dtld: _Schema_Map_mapValue :: Name
- Hydra.Azure.Dtld: _Schema_Map_type :: Name
- Hydra.Azure.Dtld: _Schema_Object :: Name
- Hydra.Azure.Dtld: _Schema_Object_comment :: Name
- Hydra.Azure.Dtld: _Schema_Object_description :: Name
- Hydra.Azure.Dtld: _Schema_Object_displayName :: Name
- Hydra.Azure.Dtld: _Schema_Object_fields :: Name
- Hydra.Azure.Dtld: _Schema_Object_id :: Name
- Hydra.Azure.Dtld: _Schema_Object_type :: Name
- Hydra.Azure.Dtld: _Schema_Primitive :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_boolean :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_date :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_dateTime :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_double :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_duration :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_float :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_integer :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_long :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_string :: Name
- Hydra.Azure.Dtld: _Schema_Primitive_time :: Name
- Hydra.Azure.Dtld: data Interface_Contents
- Hydra.Azure.Dtld: data Schema_Array
- Hydra.Azure.Dtld: data Schema_Complex
- Hydra.Azure.Dtld: data Schema_Enum
- Hydra.Azure.Dtld: data Schema_Interface
- Hydra.Azure.Dtld: data Schema_Interface_Type
- Hydra.Azure.Dtld: data Schema_Map
- Hydra.Azure.Dtld: data Schema_Object
- Hydra.Azure.Dtld: data Schema_Primitive
- Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.Interface_Contents
- Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.Schema_Array
- Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.Schema_Complex
- Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.Schema_Enum
- Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.Schema_Interface
- Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.Schema_Interface_Type
- Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.Schema_Map
- Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.Schema_Object
- Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.Schema_Primitive
- Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.Interface_Contents
- Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.Schema_Array
- Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.Schema_Complex
- Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.Schema_Enum
- Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.Schema_Interface
- Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.Schema_Interface_Type
- Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.Schema_Map
- Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.Schema_Object
- Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.Schema_Primitive
- Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.Interface_Contents
- Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.Schema_Array
- Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.Schema_Complex
- Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.Schema_Enum
- Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.Schema_Interface
- Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.Schema_Interface_Type
- Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.Schema_Map
- Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.Schema_Object
- Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.Schema_Primitive
- Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.Interface_Contents
- Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.Schema_Array
- Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.Schema_Complex
- Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.Schema_Enum
- Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.Schema_Interface
- Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.Schema_Interface_Type
- Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.Schema_Map
- Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.Schema_Object
- Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.Schema_Primitive
- Hydra.Datalog.Syntax: AtomList_Multiple :: Atom -> AtomList -> AtomList_Multiple
- Hydra.Datalog.Syntax: ConstantList_Multiple :: Constant -> ConstantList -> ConstantList_Multiple
- Hydra.Datalog.Syntax: Program_ElmtFact :: Fact -> Program_Elmt
- Hydra.Datalog.Syntax: Program_ElmtRule :: Rule -> Program_Elmt
- Hydra.Datalog.Syntax: TermList_Multiple :: Term -> TermList -> TermList_Multiple
- Hydra.Datalog.Syntax: [atomList_MultipleAtomList] :: AtomList_Multiple -> AtomList
- Hydra.Datalog.Syntax: [atomList_MultipleAtom] :: AtomList_Multiple -> Atom
- Hydra.Datalog.Syntax: [constantList_MultipleConstantList] :: ConstantList_Multiple -> ConstantList
- Hydra.Datalog.Syntax: [constantList_MultipleConstant] :: ConstantList_Multiple -> Constant
- Hydra.Datalog.Syntax: [termList_MultipleTermList] :: TermList_Multiple -> TermList
- Hydra.Datalog.Syntax: [termList_MultipleTerm] :: TermList_Multiple -> Term
- Hydra.Datalog.Syntax: _AtomList_Multiple :: Name
- Hydra.Datalog.Syntax: _AtomList_Multiple_Atom :: Name
- Hydra.Datalog.Syntax: _AtomList_Multiple_AtomList :: Name
- Hydra.Datalog.Syntax: _AtomList_multiple :: Name
- Hydra.Datalog.Syntax: _ConstantList_Multiple :: Name
- Hydra.Datalog.Syntax: _ConstantList_Multiple_Constant :: Name
- Hydra.Datalog.Syntax: _ConstantList_Multiple_ConstantList :: Name
- Hydra.Datalog.Syntax: _ConstantList_multiple :: Name
- Hydra.Datalog.Syntax: _Program_Elmt :: Name
- Hydra.Datalog.Syntax: _Program_Elmt_Fact :: Name
- Hydra.Datalog.Syntax: _Program_Elmt_Rule :: Name
- Hydra.Datalog.Syntax: _TermList_Multiple :: Name
- Hydra.Datalog.Syntax: _TermList_Multiple_Term :: Name
- Hydra.Datalog.Syntax: _TermList_Multiple_TermList :: Name
- Hydra.Datalog.Syntax: _TermList_multiple :: Name
- Hydra.Datalog.Syntax: data AtomList_Multiple
- Hydra.Datalog.Syntax: data ConstantList_Multiple
- Hydra.Datalog.Syntax: data Program_Elmt
- Hydra.Datalog.Syntax: data TermList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Classes.Eq Hydra.Datalog.Syntax.AtomList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Classes.Eq Hydra.Datalog.Syntax.ConstantList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Classes.Eq Hydra.Datalog.Syntax.Program_Elmt
- Hydra.Datalog.Syntax: instance GHC.Classes.Eq Hydra.Datalog.Syntax.TermList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Classes.Ord Hydra.Datalog.Syntax.AtomList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Classes.Ord Hydra.Datalog.Syntax.ConstantList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Classes.Ord Hydra.Datalog.Syntax.Program_Elmt
- Hydra.Datalog.Syntax: instance GHC.Classes.Ord Hydra.Datalog.Syntax.TermList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Read.Read Hydra.Datalog.Syntax.AtomList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Read.Read Hydra.Datalog.Syntax.ConstantList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Read.Read Hydra.Datalog.Syntax.Program_Elmt
- Hydra.Datalog.Syntax: instance GHC.Read.Read Hydra.Datalog.Syntax.TermList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Show.Show Hydra.Datalog.Syntax.AtomList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Show.Show Hydra.Datalog.Syntax.ConstantList_Multiple
- Hydra.Datalog.Syntax: instance GHC.Show.Show Hydra.Datalog.Syntax.Program_Elmt
- Hydra.Datalog.Syntax: instance GHC.Show.Show Hydra.Datalog.Syntax.TermList_Multiple
- Hydra.Graphql.Syntax: DirectiveLocations_Sequence :: DirectiveLocations -> DirectiveLocation -> DirectiveLocations_Sequence
- Hydra.Graphql.Syntax: DirectiveLocations_Sequence2 :: Maybe () -> DirectiveLocation -> DirectiveLocations_Sequence2
- Hydra.Graphql.Syntax: EnumTypeExtension_Sequence :: Name -> Maybe Directives -> EnumValuesDefinition -> EnumTypeExtension_Sequence
- Hydra.Graphql.Syntax: EnumTypeExtension_Sequence2 :: Name -> Directives -> EnumTypeExtension_Sequence2
- Hydra.Graphql.Syntax: ImplementsInterfaces_Sequence :: ImplementsInterfaces -> NamedType -> ImplementsInterfaces_Sequence
- Hydra.Graphql.Syntax: ImplementsInterfaces_Sequence2 :: Maybe () -> NamedType -> ImplementsInterfaces_Sequence2
- Hydra.Graphql.Syntax: InputObjectTypeDefinition_Sequence :: Maybe Description -> Name -> Maybe Directives -> InputFieldsDefinition -> InputObjectTypeDefinition_Sequence
- Hydra.Graphql.Syntax: InputObjectTypeDefinition_Sequence2 :: Maybe Description -> Name -> Maybe Directives -> InputObjectTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: InputObjectTypeExtension_Sequence :: Name -> Maybe Directives -> InputFieldsDefinition -> InputObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: InputObjectTypeExtension_Sequence2 :: Name -> Directives -> InputObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: InterfaceTypeDefinition_Sequence :: Maybe Description -> Name -> Maybe ImplementsInterfaces -> Maybe Directives -> FieldsDefinition -> InterfaceTypeDefinition_Sequence
- Hydra.Graphql.Syntax: InterfaceTypeDefinition_Sequence2 :: Maybe Description -> Name -> ImplementsInterfaces -> Maybe Directives -> InterfaceTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: InterfaceTypeExtension_Sequence :: Name -> Maybe ImplementsInterfaces -> Maybe Directives -> FieldsDefinition -> InterfaceTypeExtension_Sequence
- Hydra.Graphql.Syntax: InterfaceTypeExtension_Sequence2 :: Name -> Maybe ImplementsInterfaces -> Directives -> InterfaceTypeExtension_Sequence2
- Hydra.Graphql.Syntax: InterfaceTypeExtension_Sequence3 :: Name -> ImplementsInterfaces -> InterfaceTypeExtension_Sequence3
- Hydra.Graphql.Syntax: ListValueSequence :: ListValue_Sequence -> ListValue
- Hydra.Graphql.Syntax: ListValue_Sequence :: ListValue_Sequence
- Hydra.Graphql.Syntax: ObjectTypeExtension_Sequence :: Name -> Maybe ImplementsInterfaces -> Maybe Directives -> FieldsDefinition -> ObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: ObjectTypeExtension_Sequence2 :: Name -> Maybe ImplementsInterfaces -> Maybe Directives -> ObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: ObjectTypeExtension_Sequence3 :: Name -> ImplementsInterfaces -> ObjectTypeExtension_Sequence3
- Hydra.Graphql.Syntax: ObjectValueSequence :: ObjectValue_Sequence -> ObjectValue
- Hydra.Graphql.Syntax: ObjectValue_Sequence :: ObjectValue_Sequence
- Hydra.Graphql.Syntax: OperationDefinition_Sequence :: OperationType -> Maybe Name -> Maybe VariablesDefinition -> Maybe Directives -> SelectionSet -> OperationDefinition_Sequence
- Hydra.Graphql.Syntax: SchemaExtension_Sequence :: Maybe Directives -> RootOperationTypeDefinition -> SchemaExtension_Sequence
- Hydra.Graphql.Syntax: UnionMemberTypes_Sequence :: UnionMemberTypes -> NamedType -> UnionMemberTypes_Sequence
- Hydra.Graphql.Syntax: UnionMemberTypes_Sequence2 :: Maybe () -> NamedType -> UnionMemberTypes_Sequence2
- Hydra.Graphql.Syntax: UnionTypeExtension_Sequence :: Name -> Maybe Directives -> UnionMemberTypes -> UnionTypeExtension_Sequence
- Hydra.Graphql.Syntax: UnionTypeExtension_Sequence2 :: Name -> Directives -> UnionTypeExtension_Sequence2
- Hydra.Graphql.Syntax: [directiveLocations_Sequence2DirectiveLocation] :: DirectiveLocations_Sequence2 -> DirectiveLocation
- Hydra.Graphql.Syntax: [directiveLocations_Sequence2Or] :: DirectiveLocations_Sequence2 -> Maybe ()
- Hydra.Graphql.Syntax: [directiveLocations_SequenceDirectiveLocation] :: DirectiveLocations_Sequence -> DirectiveLocation
- Hydra.Graphql.Syntax: [directiveLocations_SequenceDirectiveLocations] :: DirectiveLocations_Sequence -> DirectiveLocations
- Hydra.Graphql.Syntax: [enumTypeExtension_Sequence2Directives] :: EnumTypeExtension_Sequence2 -> Directives
- Hydra.Graphql.Syntax: [enumTypeExtension_Sequence2Name] :: EnumTypeExtension_Sequence2 -> Name
- Hydra.Graphql.Syntax: [enumTypeExtension_SequenceDirectives] :: EnumTypeExtension_Sequence -> Maybe Directives
- Hydra.Graphql.Syntax: [enumTypeExtension_SequenceEnumValuesDefinition] :: EnumTypeExtension_Sequence -> EnumValuesDefinition
- Hydra.Graphql.Syntax: [enumTypeExtension_SequenceName] :: EnumTypeExtension_Sequence -> Name
- Hydra.Graphql.Syntax: [implementsInterfaces_Sequence2Amp] :: ImplementsInterfaces_Sequence2 -> Maybe ()
- Hydra.Graphql.Syntax: [implementsInterfaces_Sequence2NamedType] :: ImplementsInterfaces_Sequence2 -> NamedType
- Hydra.Graphql.Syntax: [implementsInterfaces_SequenceImplementsInterfaces] :: ImplementsInterfaces_Sequence -> ImplementsInterfaces
- Hydra.Graphql.Syntax: [implementsInterfaces_SequenceNamedType] :: ImplementsInterfaces_Sequence -> NamedType
- Hydra.Graphql.Syntax: [inputObjectTypeDefinition_Sequence2Description] :: InputObjectTypeDefinition_Sequence2 -> Maybe Description
- Hydra.Graphql.Syntax: [inputObjectTypeDefinition_Sequence2Directives] :: InputObjectTypeDefinition_Sequence2 -> Maybe Directives
- Hydra.Graphql.Syntax: [inputObjectTypeDefinition_Sequence2Name] :: InputObjectTypeDefinition_Sequence2 -> Name
- Hydra.Graphql.Syntax: [inputObjectTypeDefinition_SequenceDescription] :: InputObjectTypeDefinition_Sequence -> Maybe Description
- Hydra.Graphql.Syntax: [inputObjectTypeDefinition_SequenceDirectives] :: InputObjectTypeDefinition_Sequence -> Maybe Directives
- Hydra.Graphql.Syntax: [inputObjectTypeDefinition_SequenceInputFieldsDefinition] :: InputObjectTypeDefinition_Sequence -> InputFieldsDefinition
- Hydra.Graphql.Syntax: [inputObjectTypeDefinition_SequenceName] :: InputObjectTypeDefinition_Sequence -> Name
- Hydra.Graphql.Syntax: [inputObjectTypeExtension_Sequence2Directives] :: InputObjectTypeExtension_Sequence2 -> Directives
- Hydra.Graphql.Syntax: [inputObjectTypeExtension_Sequence2Name] :: InputObjectTypeExtension_Sequence2 -> Name
- Hydra.Graphql.Syntax: [inputObjectTypeExtension_SequenceDirectives] :: InputObjectTypeExtension_Sequence -> Maybe Directives
- Hydra.Graphql.Syntax: [inputObjectTypeExtension_SequenceInputFieldsDefinition] :: InputObjectTypeExtension_Sequence -> InputFieldsDefinition
- Hydra.Graphql.Syntax: [inputObjectTypeExtension_SequenceName] :: InputObjectTypeExtension_Sequence -> Name
- Hydra.Graphql.Syntax: [interfaceTypeDefinition_Sequence2Description] :: InterfaceTypeDefinition_Sequence2 -> Maybe Description
- Hydra.Graphql.Syntax: [interfaceTypeDefinition_Sequence2Directives] :: InterfaceTypeDefinition_Sequence2 -> Maybe Directives
- Hydra.Graphql.Syntax: [interfaceTypeDefinition_Sequence2ImplementsInterfaces] :: InterfaceTypeDefinition_Sequence2 -> ImplementsInterfaces
- Hydra.Graphql.Syntax: [interfaceTypeDefinition_Sequence2Name] :: InterfaceTypeDefinition_Sequence2 -> Name
- Hydra.Graphql.Syntax: [interfaceTypeDefinition_SequenceDescription] :: InterfaceTypeDefinition_Sequence -> Maybe Description
- Hydra.Graphql.Syntax: [interfaceTypeDefinition_SequenceDirectives] :: InterfaceTypeDefinition_Sequence -> Maybe Directives
- Hydra.Graphql.Syntax: [interfaceTypeDefinition_SequenceFieldsDefinition] :: InterfaceTypeDefinition_Sequence -> FieldsDefinition
- Hydra.Graphql.Syntax: [interfaceTypeDefinition_SequenceImplementsInterfaces] :: InterfaceTypeDefinition_Sequence -> Maybe ImplementsInterfaces
- Hydra.Graphql.Syntax: [interfaceTypeDefinition_SequenceName] :: InterfaceTypeDefinition_Sequence -> Name
- Hydra.Graphql.Syntax: [interfaceTypeExtension_Sequence2Directives] :: InterfaceTypeExtension_Sequence2 -> Directives
- Hydra.Graphql.Syntax: [interfaceTypeExtension_Sequence2ImplementsInterfaces] :: InterfaceTypeExtension_Sequence2 -> Maybe ImplementsInterfaces
- Hydra.Graphql.Syntax: [interfaceTypeExtension_Sequence2Name] :: InterfaceTypeExtension_Sequence2 -> Name
- Hydra.Graphql.Syntax: [interfaceTypeExtension_Sequence3ImplementsInterfaces] :: InterfaceTypeExtension_Sequence3 -> ImplementsInterfaces
- Hydra.Graphql.Syntax: [interfaceTypeExtension_Sequence3Name] :: InterfaceTypeExtension_Sequence3 -> Name
- Hydra.Graphql.Syntax: [interfaceTypeExtension_SequenceDirectives] :: InterfaceTypeExtension_Sequence -> Maybe Directives
- Hydra.Graphql.Syntax: [interfaceTypeExtension_SequenceFieldsDefinition] :: InterfaceTypeExtension_Sequence -> FieldsDefinition
- Hydra.Graphql.Syntax: [interfaceTypeExtension_SequenceImplementsInterfaces] :: InterfaceTypeExtension_Sequence -> Maybe ImplementsInterfaces
- Hydra.Graphql.Syntax: [interfaceTypeExtension_SequenceName] :: InterfaceTypeExtension_Sequence -> Name
- Hydra.Graphql.Syntax: [objectTypeExtension_Sequence2Directives] :: ObjectTypeExtension_Sequence2 -> Maybe Directives
- Hydra.Graphql.Syntax: [objectTypeExtension_Sequence2ImplementsInterfaces] :: ObjectTypeExtension_Sequence2 -> Maybe ImplementsInterfaces
- Hydra.Graphql.Syntax: [objectTypeExtension_Sequence2Name] :: ObjectTypeExtension_Sequence2 -> Name
- Hydra.Graphql.Syntax: [objectTypeExtension_Sequence3ImplementsInterfaces] :: ObjectTypeExtension_Sequence3 -> ImplementsInterfaces
- Hydra.Graphql.Syntax: [objectTypeExtension_Sequence3Name] :: ObjectTypeExtension_Sequence3 -> Name
- Hydra.Graphql.Syntax: [objectTypeExtension_SequenceDirectives] :: ObjectTypeExtension_Sequence -> Maybe Directives
- Hydra.Graphql.Syntax: [objectTypeExtension_SequenceFieldsDefinition] :: ObjectTypeExtension_Sequence -> FieldsDefinition
- Hydra.Graphql.Syntax: [objectTypeExtension_SequenceImplementsInterfaces] :: ObjectTypeExtension_Sequence -> Maybe ImplementsInterfaces
- Hydra.Graphql.Syntax: [objectTypeExtension_SequenceName] :: ObjectTypeExtension_Sequence -> Name
- Hydra.Graphql.Syntax: [operationDefinition_SequenceDirectives] :: OperationDefinition_Sequence -> Maybe Directives
- Hydra.Graphql.Syntax: [operationDefinition_SequenceName] :: OperationDefinition_Sequence -> Maybe Name
- Hydra.Graphql.Syntax: [operationDefinition_SequenceOperationType] :: OperationDefinition_Sequence -> OperationType
- Hydra.Graphql.Syntax: [operationDefinition_SequenceSelectionSet] :: OperationDefinition_Sequence -> SelectionSet
- Hydra.Graphql.Syntax: [operationDefinition_SequenceVariablesDefinition] :: OperationDefinition_Sequence -> Maybe VariablesDefinition
- Hydra.Graphql.Syntax: [schemaExtension_SequenceDirectives] :: SchemaExtension_Sequence -> Maybe Directives
- Hydra.Graphql.Syntax: [schemaExtension_SequenceRootOperationTypeDefinition] :: SchemaExtension_Sequence -> RootOperationTypeDefinition
- Hydra.Graphql.Syntax: [unionMemberTypes_Sequence2NamedType] :: UnionMemberTypes_Sequence2 -> NamedType
- Hydra.Graphql.Syntax: [unionMemberTypes_Sequence2Or] :: UnionMemberTypes_Sequence2 -> Maybe ()
- Hydra.Graphql.Syntax: [unionMemberTypes_SequenceNamedType] :: UnionMemberTypes_Sequence -> NamedType
- Hydra.Graphql.Syntax: [unionMemberTypes_SequenceUnionMemberTypes] :: UnionMemberTypes_Sequence -> UnionMemberTypes
- Hydra.Graphql.Syntax: [unionTypeExtension_Sequence2Directives] :: UnionTypeExtension_Sequence2 -> Directives
- Hydra.Graphql.Syntax: [unionTypeExtension_Sequence2Name] :: UnionTypeExtension_Sequence2 -> Name
- Hydra.Graphql.Syntax: [unionTypeExtension_SequenceDirectives] :: UnionTypeExtension_Sequence -> Maybe Directives
- Hydra.Graphql.Syntax: [unionTypeExtension_SequenceName] :: UnionTypeExtension_Sequence -> Name
- Hydra.Graphql.Syntax: [unionTypeExtension_SequenceUnionMemberTypes] :: UnionTypeExtension_Sequence -> UnionMemberTypes
- Hydra.Graphql.Syntax: _DirectiveLocations_Sequence :: Name
- Hydra.Graphql.Syntax: _DirectiveLocations_Sequence2 :: Name
- Hydra.Graphql.Syntax: _DirectiveLocations_Sequence2_DirectiveLocation :: Name
- Hydra.Graphql.Syntax: _DirectiveLocations_Sequence2_Or :: Name
- Hydra.Graphql.Syntax: _DirectiveLocations_Sequence_DirectiveLocation :: Name
- Hydra.Graphql.Syntax: _DirectiveLocations_Sequence_DirectiveLocations :: Name
- Hydra.Graphql.Syntax: _DirectiveLocations_sequence :: Name
- Hydra.Graphql.Syntax: _DirectiveLocations_sequence2 :: Name
- Hydra.Graphql.Syntax: _EnumTypeExtension_Sequence :: Name
- Hydra.Graphql.Syntax: _EnumTypeExtension_Sequence2 :: Name
- Hydra.Graphql.Syntax: _EnumTypeExtension_Sequence2_Directives :: Name
- Hydra.Graphql.Syntax: _EnumTypeExtension_Sequence2_Name :: Name
- Hydra.Graphql.Syntax: _EnumTypeExtension_Sequence_Directives :: Name
- Hydra.Graphql.Syntax: _EnumTypeExtension_Sequence_EnumValuesDefinition :: Name
- Hydra.Graphql.Syntax: _EnumTypeExtension_Sequence_Name :: Name
- Hydra.Graphql.Syntax: _EnumTypeExtension_sequence :: Name
- Hydra.Graphql.Syntax: _EnumTypeExtension_sequence2 :: Name
- Hydra.Graphql.Syntax: _ImplementsInterfaces_Sequence :: Name
- Hydra.Graphql.Syntax: _ImplementsInterfaces_Sequence2 :: Name
- Hydra.Graphql.Syntax: _ImplementsInterfaces_Sequence2_Amp :: Name
- Hydra.Graphql.Syntax: _ImplementsInterfaces_Sequence2_NamedType :: Name
- Hydra.Graphql.Syntax: _ImplementsInterfaces_Sequence_ImplementsInterfaces :: Name
- Hydra.Graphql.Syntax: _ImplementsInterfaces_Sequence_NamedType :: Name
- Hydra.Graphql.Syntax: _ImplementsInterfaces_sequence :: Name
- Hydra.Graphql.Syntax: _ImplementsInterfaces_sequence2 :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_Sequence :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_Sequence2 :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_Sequence2_Description :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_Sequence2_Directives :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_Sequence2_Name :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_Sequence_Description :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_Sequence_Directives :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_Sequence_InputFieldsDefinition :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_Sequence_Name :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_sequence :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeDefinition_sequence2 :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeExtension_Sequence :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeExtension_Sequence2 :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeExtension_Sequence2_Directives :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeExtension_Sequence2_Name :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeExtension_Sequence_Directives :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeExtension_Sequence_InputFieldsDefinition :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeExtension_Sequence_Name :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeExtension_sequence :: Name
- Hydra.Graphql.Syntax: _InputObjectTypeExtension_sequence2 :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence2 :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence2_Description :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence2_Directives :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence2_ImplementsInterfaces :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence2_Name :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence_Description :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence_Directives :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence_FieldsDefinition :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence_ImplementsInterfaces :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_Sequence_Name :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_sequence :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeDefinition_sequence2 :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence2 :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence2_Directives :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence2_ImplementsInterfaces :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence2_Name :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence3 :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence3_ImplementsInterfaces :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence3_Name :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence_Directives :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence_FieldsDefinition :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence_ImplementsInterfaces :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_Sequence_Name :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_sequence :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_sequence2 :: Name
- Hydra.Graphql.Syntax: _InterfaceTypeExtension_sequence3 :: Name
- Hydra.Graphql.Syntax: _ListValue_Sequence :: Name
- Hydra.Graphql.Syntax: _ListValue_sequence :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence2 :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence2_Directives :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence2_ImplementsInterfaces :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence2_Name :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence3 :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence3_ImplementsInterfaces :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence3_Name :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence_Directives :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence_FieldsDefinition :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence_ImplementsInterfaces :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_Sequence_Name :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_sequence :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_sequence2 :: Name
- Hydra.Graphql.Syntax: _ObjectTypeExtension_sequence3 :: Name
- Hydra.Graphql.Syntax: _ObjectValue_Sequence :: Name
- Hydra.Graphql.Syntax: _ObjectValue_sequence :: Name
- Hydra.Graphql.Syntax: _OperationDefinition_Sequence :: Name
- Hydra.Graphql.Syntax: _OperationDefinition_Sequence_Directives :: Name
- Hydra.Graphql.Syntax: _OperationDefinition_Sequence_Name :: Name
- Hydra.Graphql.Syntax: _OperationDefinition_Sequence_OperationType :: Name
- Hydra.Graphql.Syntax: _OperationDefinition_Sequence_SelectionSet :: Name
- Hydra.Graphql.Syntax: _OperationDefinition_Sequence_VariablesDefinition :: Name
- Hydra.Graphql.Syntax: _OperationDefinition_sequence :: Name
- Hydra.Graphql.Syntax: _SchemaExtension_Sequence :: Name
- Hydra.Graphql.Syntax: _SchemaExtension_Sequence_Directives :: Name
- Hydra.Graphql.Syntax: _SchemaExtension_Sequence_RootOperationTypeDefinition :: Name
- Hydra.Graphql.Syntax: _SchemaExtension_sequence :: Name
- Hydra.Graphql.Syntax: _UnionMemberTypes_Sequence :: Name
- Hydra.Graphql.Syntax: _UnionMemberTypes_Sequence2 :: Name
- Hydra.Graphql.Syntax: _UnionMemberTypes_Sequence2_NamedType :: Name
- Hydra.Graphql.Syntax: _UnionMemberTypes_Sequence2_Or :: Name
- Hydra.Graphql.Syntax: _UnionMemberTypes_Sequence_NamedType :: Name
- Hydra.Graphql.Syntax: _UnionMemberTypes_Sequence_UnionMemberTypes :: Name
- Hydra.Graphql.Syntax: _UnionMemberTypes_sequence :: Name
- Hydra.Graphql.Syntax: _UnionMemberTypes_sequence2 :: Name
- Hydra.Graphql.Syntax: _UnionTypeExtension_Sequence :: Name
- Hydra.Graphql.Syntax: _UnionTypeExtension_Sequence2 :: Name
- Hydra.Graphql.Syntax: _UnionTypeExtension_Sequence2_Directives :: Name
- Hydra.Graphql.Syntax: _UnionTypeExtension_Sequence2_Name :: Name
- Hydra.Graphql.Syntax: _UnionTypeExtension_Sequence_Directives :: Name
- Hydra.Graphql.Syntax: _UnionTypeExtension_Sequence_Name :: Name
- Hydra.Graphql.Syntax: _UnionTypeExtension_Sequence_UnionMemberTypes :: Name
- Hydra.Graphql.Syntax: _UnionTypeExtension_sequence :: Name
- Hydra.Graphql.Syntax: _UnionTypeExtension_sequence2 :: Name
- Hydra.Graphql.Syntax: data DirectiveLocations_Sequence
- Hydra.Graphql.Syntax: data DirectiveLocations_Sequence2
- Hydra.Graphql.Syntax: data EnumTypeExtension_Sequence
- Hydra.Graphql.Syntax: data EnumTypeExtension_Sequence2
- Hydra.Graphql.Syntax: data ImplementsInterfaces_Sequence
- Hydra.Graphql.Syntax: data ImplementsInterfaces_Sequence2
- Hydra.Graphql.Syntax: data InputObjectTypeDefinition_Sequence
- Hydra.Graphql.Syntax: data InputObjectTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: data InputObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: data InputObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: data InterfaceTypeDefinition_Sequence
- Hydra.Graphql.Syntax: data InterfaceTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: data InterfaceTypeExtension_Sequence
- Hydra.Graphql.Syntax: data InterfaceTypeExtension_Sequence2
- Hydra.Graphql.Syntax: data InterfaceTypeExtension_Sequence3
- Hydra.Graphql.Syntax: data ListValue_Sequence
- Hydra.Graphql.Syntax: data ObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: data ObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: data ObjectTypeExtension_Sequence3
- Hydra.Graphql.Syntax: data ObjectValue_Sequence
- Hydra.Graphql.Syntax: data OperationDefinition_Sequence
- Hydra.Graphql.Syntax: data SchemaExtension_Sequence
- Hydra.Graphql.Syntax: data UnionMemberTypes_Sequence
- Hydra.Graphql.Syntax: data UnionMemberTypes_Sequence2
- Hydra.Graphql.Syntax: data UnionTypeExtension_Sequence
- Hydra.Graphql.Syntax: data UnionTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.DirectiveLocations_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.DirectiveLocations_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.EnumTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.EnumTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ImplementsInterfaces_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ImplementsInterfaces_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InputObjectTypeDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InputObjectTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InputObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InputObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence3
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ListValue_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence3
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ObjectValue_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.OperationDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.SchemaExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.UnionMemberTypes_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.UnionMemberTypes_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.UnionTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.UnionTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.DirectiveLocations_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.DirectiveLocations_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.EnumTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.EnumTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ImplementsInterfaces_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ImplementsInterfaces_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InputObjectTypeDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InputObjectTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InputObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InputObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence3
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ListValue_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence3
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ObjectValue_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.OperationDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.SchemaExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.UnionMemberTypes_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.UnionMemberTypes_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.UnionTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.UnionTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.DirectiveLocations_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.DirectiveLocations_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.EnumTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.EnumTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ImplementsInterfaces_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ImplementsInterfaces_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InputObjectTypeDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InputObjectTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InputObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InputObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence3
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ListValue_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence3
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ObjectValue_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.OperationDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.SchemaExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.UnionMemberTypes_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.UnionMemberTypes_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.UnionTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.UnionTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.DirectiveLocations_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.DirectiveLocations_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.EnumTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.EnumTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ImplementsInterfaces_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ImplementsInterfaces_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InputObjectTypeDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InputObjectTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InputObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InputObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeDefinition_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeExtension_Sequence3
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ListValue_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ObjectTypeExtension_Sequence3
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ObjectValue_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.OperationDefinition_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.SchemaExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.UnionMemberTypes_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.UnionMemberTypes_Sequence2
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.UnionTypeExtension_Sequence
- Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.UnionTypeExtension_Sequence2
- Hydra.Json.Schema: AdditionalItemsAny :: Bool -> AdditionalItems
- Hydra.Json.Schema: AdditionalItemsSchema :: Schema -> AdditionalItems
- Hydra.Json.Schema: ArrayRestrictionAdditionalItems :: AdditionalItems -> ArrayRestriction
- Hydra.Json.Schema: ArrayRestrictionItems :: Items -> ArrayRestriction
- Hydra.Json.Schema: ArrayRestrictionMaxItems :: Int -> ArrayRestriction
- Hydra.Json.Schema: ArrayRestrictionMinItems :: Int -> ArrayRestriction
- Hydra.Json.Schema: ArrayRestrictionUniqueItems :: Bool -> ArrayRestriction
- Hydra.Json.Schema: Document :: Maybe String -> Maybe (Map Keyword Schema) -> Schema -> Document
- Hydra.Json.Schema: ItemsSameItems :: Schema -> Items
- Hydra.Json.Schema: ItemsVarItems :: [Schema] -> Items
- Hydra.Json.Schema: Keyword :: String -> Keyword
- Hydra.Json.Schema: Limit :: Int -> Bool -> Limit
- Hydra.Json.Schema: MultipleRestrictionAllOf :: [Schema] -> MultipleRestriction
- Hydra.Json.Schema: MultipleRestrictionAnyOf :: [Schema] -> MultipleRestriction
- Hydra.Json.Schema: MultipleRestrictionEnum :: [Value] -> MultipleRestriction
- Hydra.Json.Schema: MultipleRestrictionNot :: Schema -> MultipleRestriction
- Hydra.Json.Schema: MultipleRestrictionOneOf :: [Schema] -> MultipleRestriction
- Hydra.Json.Schema: NumericRestrictionMaximum :: Limit -> NumericRestriction
- Hydra.Json.Schema: NumericRestrictionMinimum :: Limit -> NumericRestriction
- Hydra.Json.Schema: NumericRestrictionMultipleOf :: Int -> NumericRestriction
- Hydra.Json.Schema: ObjectRestrictionAdditionalProperties :: AdditionalItems -> ObjectRestriction
- Hydra.Json.Schema: ObjectRestrictionDependencies :: Map Keyword SchemaOrArray -> ObjectRestriction
- Hydra.Json.Schema: ObjectRestrictionMaxProperties :: Int -> ObjectRestriction
- Hydra.Json.Schema: ObjectRestrictionMinProperties :: Int -> ObjectRestriction
- Hydra.Json.Schema: ObjectRestrictionPatternProperties :: Map RegularExpression Schema -> ObjectRestriction
- Hydra.Json.Schema: ObjectRestrictionProperties :: Map Keyword Schema -> ObjectRestriction
- Hydra.Json.Schema: ObjectRestrictionRequired :: [Keyword] -> ObjectRestriction
- Hydra.Json.Schema: RegularExpression :: String -> RegularExpression
- Hydra.Json.Schema: RestrictionArray :: ArrayRestriction -> Restriction
- Hydra.Json.Schema: RestrictionDescription :: String -> Restriction
- Hydra.Json.Schema: RestrictionMultiple :: MultipleRestriction -> Restriction
- Hydra.Json.Schema: RestrictionNumber :: NumericRestriction -> Restriction
- Hydra.Json.Schema: RestrictionObject :: ObjectRestriction -> Restriction
- Hydra.Json.Schema: RestrictionReference :: SchemaReference -> Restriction
- Hydra.Json.Schema: RestrictionString :: StringRestriction -> Restriction
- Hydra.Json.Schema: RestrictionTitle :: String -> Restriction
- Hydra.Json.Schema: RestrictionType :: Type -> Restriction
- Hydra.Json.Schema: Schema :: [Restriction] -> Schema
- Hydra.Json.Schema: SchemaOrArrayArray :: [Keyword] -> SchemaOrArray
- Hydra.Json.Schema: SchemaOrArraySchema :: Schema -> SchemaOrArray
- Hydra.Json.Schema: SchemaReference :: String -> SchemaReference
- Hydra.Json.Schema: StringRestrictionMaxLength :: Int -> StringRestriction
- Hydra.Json.Schema: StringRestrictionMinLength :: Int -> StringRestriction
- Hydra.Json.Schema: StringRestrictionPattern :: RegularExpression -> StringRestriction
- Hydra.Json.Schema: TypeMultiple :: [TypeName] -> Type
- Hydra.Json.Schema: TypeNameArray :: TypeName
- Hydra.Json.Schema: TypeNameBoolean :: TypeName
- Hydra.Json.Schema: TypeNameInteger :: TypeName
- Hydra.Json.Schema: TypeNameNull :: TypeName
- Hydra.Json.Schema: TypeNameNumber :: TypeName
- Hydra.Json.Schema: TypeNameObject :: TypeName
- Hydra.Json.Schema: TypeNameString :: TypeName
- Hydra.Json.Schema: TypeSingle :: TypeName -> Type
- Hydra.Json.Schema: [documentDefinitions] :: Document -> Maybe (Map Keyword Schema)
- Hydra.Json.Schema: [documentId] :: Document -> Maybe String
- Hydra.Json.Schema: [documentRoot] :: Document -> Schema
- Hydra.Json.Schema: [limitExclusive] :: Limit -> Bool
- Hydra.Json.Schema: [limitValue] :: Limit -> Int
- Hydra.Json.Schema: [unKeyword] :: Keyword -> String
- Hydra.Json.Schema: [unRegularExpression] :: RegularExpression -> String
- Hydra.Json.Schema: [unSchemaReference] :: SchemaReference -> String
- Hydra.Json.Schema: [unSchema] :: Schema -> [Restriction]
- Hydra.Json.Schema: _AdditionalItems :: Name
- Hydra.Json.Schema: _AdditionalItems_any :: Name
- Hydra.Json.Schema: _AdditionalItems_schema :: Name
- Hydra.Json.Schema: _ArrayRestriction :: Name
- Hydra.Json.Schema: _ArrayRestriction_additionalItems :: Name
- Hydra.Json.Schema: _ArrayRestriction_items :: Name
- Hydra.Json.Schema: _ArrayRestriction_maxItems :: Name
- Hydra.Json.Schema: _ArrayRestriction_minItems :: Name
- Hydra.Json.Schema: _ArrayRestriction_uniqueItems :: Name
- Hydra.Json.Schema: _Document :: Name
- Hydra.Json.Schema: _Document_definitions :: Name
- Hydra.Json.Schema: _Document_id :: Name
- Hydra.Json.Schema: _Document_root :: Name
- Hydra.Json.Schema: _Items :: Name
- Hydra.Json.Schema: _Items_sameItems :: Name
- Hydra.Json.Schema: _Items_varItems :: Name
- Hydra.Json.Schema: _Keyword :: Name
- Hydra.Json.Schema: _Limit :: Name
- Hydra.Json.Schema: _Limit_exclusive :: Name
- Hydra.Json.Schema: _Limit_value :: Name
- Hydra.Json.Schema: _MultipleRestriction :: Name
- Hydra.Json.Schema: _MultipleRestriction_allOf :: Name
- Hydra.Json.Schema: _MultipleRestriction_anyOf :: Name
- Hydra.Json.Schema: _MultipleRestriction_enum :: Name
- Hydra.Json.Schema: _MultipleRestriction_not :: Name
- Hydra.Json.Schema: _MultipleRestriction_oneOf :: Name
- Hydra.Json.Schema: _NumericRestriction :: Name
- Hydra.Json.Schema: _NumericRestriction_maximum :: Name
- Hydra.Json.Schema: _NumericRestriction_minimum :: Name
- Hydra.Json.Schema: _NumericRestriction_multipleOf :: Name
- Hydra.Json.Schema: _ObjectRestriction :: Name
- Hydra.Json.Schema: _ObjectRestriction_additionalProperties :: Name
- Hydra.Json.Schema: _ObjectRestriction_dependencies :: Name
- Hydra.Json.Schema: _ObjectRestriction_maxProperties :: Name
- Hydra.Json.Schema: _ObjectRestriction_minProperties :: Name
- Hydra.Json.Schema: _ObjectRestriction_patternProperties :: Name
- Hydra.Json.Schema: _ObjectRestriction_properties :: Name
- Hydra.Json.Schema: _ObjectRestriction_required :: Name
- Hydra.Json.Schema: _RegularExpression :: Name
- Hydra.Json.Schema: _Restriction :: Name
- Hydra.Json.Schema: _Restriction_array :: Name
- Hydra.Json.Schema: _Restriction_description :: Name
- Hydra.Json.Schema: _Restriction_multiple :: Name
- Hydra.Json.Schema: _Restriction_number :: Name
- Hydra.Json.Schema: _Restriction_object :: Name
- Hydra.Json.Schema: _Restriction_reference :: Name
- Hydra.Json.Schema: _Restriction_string :: Name
- Hydra.Json.Schema: _Restriction_title :: Name
- Hydra.Json.Schema: _Restriction_type :: Name
- Hydra.Json.Schema: _Schema :: Name
- Hydra.Json.Schema: _SchemaOrArray :: Name
- Hydra.Json.Schema: _SchemaOrArray_array :: Name
- Hydra.Json.Schema: _SchemaOrArray_schema :: Name
- Hydra.Json.Schema: _SchemaReference :: Name
- Hydra.Json.Schema: _StringRestriction :: Name
- Hydra.Json.Schema: _StringRestriction_maxLength :: Name
- Hydra.Json.Schema: _StringRestriction_minLength :: Name
- Hydra.Json.Schema: _StringRestriction_pattern :: Name
- Hydra.Json.Schema: _Type :: Name
- Hydra.Json.Schema: _TypeName :: Name
- Hydra.Json.Schema: _TypeName_array :: Name
- Hydra.Json.Schema: _TypeName_boolean :: Name
- Hydra.Json.Schema: _TypeName_integer :: Name
- Hydra.Json.Schema: _TypeName_null :: Name
- Hydra.Json.Schema: _TypeName_number :: Name
- Hydra.Json.Schema: _TypeName_object :: Name
- Hydra.Json.Schema: _TypeName_string :: Name
- Hydra.Json.Schema: _Type_multiple :: Name
- Hydra.Json.Schema: _Type_single :: Name
- Hydra.Json.Schema: data AdditionalItems
- Hydra.Json.Schema: data ArrayRestriction
- Hydra.Json.Schema: data Document
- Hydra.Json.Schema: data Items
- Hydra.Json.Schema: data Limit
- Hydra.Json.Schema: data MultipleRestriction
- Hydra.Json.Schema: data NumericRestriction
- Hydra.Json.Schema: data ObjectRestriction
- Hydra.Json.Schema: data Restriction
- Hydra.Json.Schema: data SchemaOrArray
- Hydra.Json.Schema: data StringRestriction
- Hydra.Json.Schema: data Type
- Hydra.Json.Schema: data TypeName
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.AdditionalItems
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.ArrayRestriction
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.Document
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.Items
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.Keyword
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.Limit
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.MultipleRestriction
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.NumericRestriction
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.ObjectRestriction
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.RegularExpression
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.Restriction
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.Schema
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.SchemaOrArray
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.SchemaReference
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.StringRestriction
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.Type
- Hydra.Json.Schema: instance GHC.Classes.Eq Hydra.Json.Schema.TypeName
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.AdditionalItems
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.ArrayRestriction
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.Document
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.Items
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.Keyword
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.Limit
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.MultipleRestriction
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.NumericRestriction
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.ObjectRestriction
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.RegularExpression
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.Restriction
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.Schema
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.SchemaOrArray
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.SchemaReference
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.StringRestriction
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.Type
- Hydra.Json.Schema: instance GHC.Classes.Ord Hydra.Json.Schema.TypeName
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.AdditionalItems
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.ArrayRestriction
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.Document
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.Items
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.Keyword
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.Limit
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.MultipleRestriction
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.NumericRestriction
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.ObjectRestriction
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.RegularExpression
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.Restriction
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.Schema
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.SchemaOrArray
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.SchemaReference
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.StringRestriction
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.Type
- Hydra.Json.Schema: instance GHC.Read.Read Hydra.Json.Schema.TypeName
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.AdditionalItems
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.ArrayRestriction
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.Document
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.Items
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.Keyword
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.Limit
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.MultipleRestriction
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.NumericRestriction
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.ObjectRestriction
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.RegularExpression
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.Restriction
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.Schema
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.SchemaOrArray
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.SchemaReference
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.StringRestriction
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.Type
- Hydra.Json.Schema: instance GHC.Show.Show Hydra.Json.Schema.TypeName
- Hydra.Json.Schema: newtype Keyword
- Hydra.Json.Schema: newtype RegularExpression
- Hydra.Json.Schema: newtype Schema
- Hydra.Json.Schema: newtype SchemaReference
- Hydra.Json.Schema.Serde: key_additionalItems :: String
- Hydra.Json.Schema.Serde: key_additionalProperties :: String
- Hydra.Json.Schema.Serde: key_allOf :: String
- Hydra.Json.Schema.Serde: key_anyOf :: String
- Hydra.Json.Schema.Serde: key_definitions :: String
- Hydra.Json.Schema.Serde: key_dependencies :: String
- Hydra.Json.Schema.Serde: key_description :: String
- Hydra.Json.Schema.Serde: key_enum :: String
- Hydra.Json.Schema.Serde: key_exclusiveMaximum :: String
- Hydra.Json.Schema.Serde: key_exclusiveMinimum :: String
- Hydra.Json.Schema.Serde: key_id :: String
- Hydra.Json.Schema.Serde: key_items :: String
- Hydra.Json.Schema.Serde: key_label :: String
- Hydra.Json.Schema.Serde: key_maxItems :: String
- Hydra.Json.Schema.Serde: key_maxLength :: String
- Hydra.Json.Schema.Serde: key_maxProperties :: String
- Hydra.Json.Schema.Serde: key_maximum :: String
- Hydra.Json.Schema.Serde: key_minItems :: String
- Hydra.Json.Schema.Serde: key_minLength :: String
- Hydra.Json.Schema.Serde: key_minProperties :: String
- Hydra.Json.Schema.Serde: key_minimum :: String
- Hydra.Json.Schema.Serde: key_multipleOf :: String
- Hydra.Json.Schema.Serde: key_not :: String
- Hydra.Json.Schema.Serde: key_oneOf :: String
- Hydra.Json.Schema.Serde: key_pattern :: String
- Hydra.Json.Schema.Serde: key_patternProperties :: String
- Hydra.Json.Schema.Serde: key_properties :: String
- Hydra.Json.Schema.Serde: key_ref :: String
- Hydra.Json.Schema.Serde: key_required :: String
- Hydra.Json.Schema.Serde: key_schema :: String
- Hydra.Json.Schema.Serde: key_title :: String
- Hydra.Json.Schema.Serde: key_type :: String
- Hydra.Json.Schema.Serde: key_uniqueItems :: String
- Hydra.Parquet.Format: EncryptionWithFooterKey :: EncryptionWithFooterKey
- Hydra.Parquet.Format: IndexPageHeader :: IndexPageHeader
- Hydra.Parquet.Format: data EncryptionWithFooterKey
- Hydra.Parquet.Format: data IndexPageHeader
- Hydra.Parquet.Format: instance GHC.Classes.Eq Hydra.Parquet.Format.EncryptionWithFooterKey
- Hydra.Parquet.Format: instance GHC.Classes.Eq Hydra.Parquet.Format.IndexPageHeader
- Hydra.Parquet.Format: instance GHC.Classes.Ord Hydra.Parquet.Format.EncryptionWithFooterKey
- Hydra.Parquet.Format: instance GHC.Classes.Ord Hydra.Parquet.Format.IndexPageHeader
- Hydra.Parquet.Format: instance GHC.Read.Read Hydra.Parquet.Format.EncryptionWithFooterKey
- Hydra.Parquet.Format: instance GHC.Read.Read Hydra.Parquet.Format.IndexPageHeader
- Hydra.Parquet.Format: instance GHC.Show.Show Hydra.Parquet.Format.EncryptionWithFooterKey
- Hydra.Parquet.Format: instance GHC.Show.Show Hydra.Parquet.Format.IndexPageHeader
- Hydra.Protobuf.Coder: collectStructuralTypes_collectFromType :: Type -> Set StructuralTypeRef
- Hydra.Protobuf.Coder: key_proto_field_index :: Name
- Hydra.Sql.Syntax: BooleanTerm_And :: BooleanTerm -> BooleanFactor -> BooleanTerm_And
- Hydra.Sql.Syntax: BooleanTest_Sequence_Option :: Maybe () -> TruthValue -> BooleanTest_Sequence_Option
- Hydra.Sql.Syntax: BooleanValueExpression_Or :: BooleanValueExpression -> BooleanTerm -> BooleanValueExpression_Or
- Hydra.Sql.Syntax: ColumnDefinition_DefaultOrIdentityOrGeneration_OptionDefaultClause :: DefaultClause -> ColumnDefinition_DefaultOrIdentityOrGeneration_Option
- Hydra.Sql.Syntax: ColumnDefinition_DefaultOrIdentityOrGeneration_OptionGenerationClause :: GenerationClause -> ColumnDefinition_DefaultOrIdentityOrGeneration_Option
- Hydra.Sql.Syntax: ColumnDefinition_DefaultOrIdentityOrGeneration_OptionIdentityColumnSpecification :: IdentityColumnSpecification -> ColumnDefinition_DefaultOrIdentityOrGeneration_Option
- Hydra.Sql.Syntax: ColumnDefinition_TypeOrDomain_OptionDataType :: DataType -> ColumnDefinition_TypeOrDomain_Option
- Hydra.Sql.Syntax: ColumnDefinition_TypeOrDomain_OptionDomainName :: DomainName -> ColumnDefinition_TypeOrDomain_Option
- Hydra.Sql.Syntax: ExactNumericType_Dec_Option :: Precision -> Maybe Scale -> ExactNumericType_Dec_Option
- Hydra.Sql.Syntax: ExactNumericType_Decimal_Option :: Precision -> Maybe Scale -> ExactNumericType_Decimal_Option
- Hydra.Sql.Syntax: ExactNumericType_Numeric_Option :: Precision -> Maybe Scale -> ExactNumericType_Numeric_Option
- Hydra.Sql.Syntax: PredefinedType_NationalString :: NationalCharacterStringType -> Maybe CollateClause -> PredefinedType_NationalString
- Hydra.Sql.Syntax: PredefinedType_String :: CharacterStringType -> Maybe CharacterSetSpecification -> Maybe CollateClause -> PredefinedType_String
- Hydra.Sql.Syntax: TableContentsSource_Subtable :: PathResolvedUserDefinedTypeName -> Maybe SubtableClause -> Maybe TableElementList -> TableContentsSource_Subtable
- Hydra.Sql.Syntax: [booleanTerm_AndLhs] :: BooleanTerm_And -> BooleanTerm
- Hydra.Sql.Syntax: [booleanTerm_AndRhs] :: BooleanTerm_And -> BooleanFactor
- Hydra.Sql.Syntax: [booleanTest_Sequence_OptionNOT] :: BooleanTest_Sequence_Option -> Maybe ()
- Hydra.Sql.Syntax: [booleanTest_Sequence_OptionTruthValue] :: BooleanTest_Sequence_Option -> TruthValue
- Hydra.Sql.Syntax: [booleanValueExpression_OrLhs] :: BooleanValueExpression_Or -> BooleanValueExpression
- Hydra.Sql.Syntax: [booleanValueExpression_OrRhs] :: BooleanValueExpression_Or -> BooleanTerm
- Hydra.Sql.Syntax: [exactNumericType_Dec_OptionPrecision] :: ExactNumericType_Dec_Option -> Precision
- Hydra.Sql.Syntax: [exactNumericType_Dec_OptionSequence] :: ExactNumericType_Dec_Option -> Maybe Scale
- Hydra.Sql.Syntax: [exactNumericType_Decimal_OptionPrecision] :: ExactNumericType_Decimal_Option -> Precision
- Hydra.Sql.Syntax: [exactNumericType_Decimal_OptionSequence] :: ExactNumericType_Decimal_Option -> Maybe Scale
- Hydra.Sql.Syntax: [exactNumericType_Numeric_OptionPrecision] :: ExactNumericType_Numeric_Option -> Precision
- Hydra.Sql.Syntax: [exactNumericType_Numeric_OptionSequence] :: ExactNumericType_Numeric_Option -> Maybe Scale
- Hydra.Sql.Syntax: [predefinedType_NationalStringCollate] :: PredefinedType_NationalString -> Maybe CollateClause
- Hydra.Sql.Syntax: [predefinedType_NationalStringType] :: PredefinedType_NationalString -> NationalCharacterStringType
- Hydra.Sql.Syntax: [predefinedType_StringCharacters] :: PredefinedType_String -> Maybe CharacterSetSpecification
- Hydra.Sql.Syntax: [predefinedType_StringCollate] :: PredefinedType_String -> Maybe CollateClause
- Hydra.Sql.Syntax: [predefinedType_StringType] :: PredefinedType_String -> CharacterStringType
- Hydra.Sql.Syntax: [tableContentsSource_SubtableElements] :: TableContentsSource_Subtable -> Maybe TableElementList
- Hydra.Sql.Syntax: [tableContentsSource_SubtableSubtable] :: TableContentsSource_Subtable -> Maybe SubtableClause
- Hydra.Sql.Syntax: [tableContentsSource_SubtableType] :: TableContentsSource_Subtable -> PathResolvedUserDefinedTypeName
- Hydra.Sql.Syntax: _BooleanTerm_And :: Name
- Hydra.Sql.Syntax: _BooleanTerm_And_lhs :: Name
- Hydra.Sql.Syntax: _BooleanTerm_And_rhs :: Name
- Hydra.Sql.Syntax: _BooleanTerm_and :: Name
- Hydra.Sql.Syntax: _BooleanTest_Sequence_Option :: Name
- Hydra.Sql.Syntax: _BooleanTest_Sequence_Option_NOT :: Name
- Hydra.Sql.Syntax: _BooleanTest_Sequence_Option_TruthValue :: Name
- Hydra.Sql.Syntax: _BooleanValueExpression_Or :: Name
- Hydra.Sql.Syntax: _BooleanValueExpression_Or_lhs :: Name
- Hydra.Sql.Syntax: _BooleanValueExpression_Or_rhs :: Name
- Hydra.Sql.Syntax: _BooleanValueExpression_or :: Name
- Hydra.Sql.Syntax: _ColumnDefinition_DefaultOrIdentityOrGeneration_Option :: Name
- Hydra.Sql.Syntax: _ColumnDefinition_DefaultOrIdentityOrGeneration_Option_DefaultClause :: Name
- Hydra.Sql.Syntax: _ColumnDefinition_DefaultOrIdentityOrGeneration_Option_GenerationClause :: Name
- Hydra.Sql.Syntax: _ColumnDefinition_DefaultOrIdentityOrGeneration_Option_IdentityColumnSpecification :: Name
- Hydra.Sql.Syntax: _ColumnDefinition_TypeOrDomain_Option :: Name
- Hydra.Sql.Syntax: _ColumnDefinition_TypeOrDomain_Option_DataType :: Name
- Hydra.Sql.Syntax: _ColumnDefinition_TypeOrDomain_Option_DomainName :: Name
- Hydra.Sql.Syntax: _ExactNumericType_Dec_Option :: Name
- Hydra.Sql.Syntax: _ExactNumericType_Dec_Option_Precision :: Name
- Hydra.Sql.Syntax: _ExactNumericType_Dec_Option_Sequence :: Name
- Hydra.Sql.Syntax: _ExactNumericType_Decimal_Option :: Name
- Hydra.Sql.Syntax: _ExactNumericType_Decimal_Option_Precision :: Name
- Hydra.Sql.Syntax: _ExactNumericType_Decimal_Option_Sequence :: Name
- Hydra.Sql.Syntax: _ExactNumericType_Numeric_Option :: Name
- Hydra.Sql.Syntax: _ExactNumericType_Numeric_Option_Precision :: Name
- Hydra.Sql.Syntax: _ExactNumericType_Numeric_Option_Sequence :: Name
- Hydra.Sql.Syntax: _PredefinedType_NationalString :: Name
- Hydra.Sql.Syntax: _PredefinedType_NationalString_collate :: Name
- Hydra.Sql.Syntax: _PredefinedType_NationalString_type :: Name
- Hydra.Sql.Syntax: _PredefinedType_String :: Name
- Hydra.Sql.Syntax: _PredefinedType_String_characters :: Name
- Hydra.Sql.Syntax: _PredefinedType_String_collate :: Name
- Hydra.Sql.Syntax: _PredefinedType_String_type :: Name
- Hydra.Sql.Syntax: _PredefinedType_nationalString :: Name
- Hydra.Sql.Syntax: _PredefinedType_string :: Name
- Hydra.Sql.Syntax: _TableContentsSource_Subtable :: Name
- Hydra.Sql.Syntax: _TableContentsSource_Subtable_elements :: Name
- Hydra.Sql.Syntax: _TableContentsSource_Subtable_subtable :: Name
- Hydra.Sql.Syntax: _TableContentsSource_Subtable_type :: Name
- Hydra.Sql.Syntax: _TableContentsSource_subtable :: Name
- Hydra.Sql.Syntax: data BooleanTerm_And
- Hydra.Sql.Syntax: data BooleanTest_Sequence_Option
- Hydra.Sql.Syntax: data BooleanValueExpression_Or
- Hydra.Sql.Syntax: data ColumnDefinition_DefaultOrIdentityOrGeneration_Option
- Hydra.Sql.Syntax: data ColumnDefinition_TypeOrDomain_Option
- Hydra.Sql.Syntax: data ExactNumericType_Dec_Option
- Hydra.Sql.Syntax: data ExactNumericType_Decimal_Option
- Hydra.Sql.Syntax: data ExactNumericType_Numeric_Option
- Hydra.Sql.Syntax: data PredefinedType_NationalString
- Hydra.Sql.Syntax: data PredefinedType_String
- Hydra.Sql.Syntax: data TableContentsSource_Subtable
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.BooleanTerm_And
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.BooleanTest_Sequence_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.BooleanValueExpression_Or
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ColumnDefinition_TypeOrDomain_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ExactNumericType_Dec_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ExactNumericType_Decimal_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ExactNumericType_Numeric_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.PredefinedType_NationalString
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.PredefinedType_String
- Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.TableContentsSource_Subtable
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.BooleanTerm_And
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.BooleanTest_Sequence_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.BooleanValueExpression_Or
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ColumnDefinition_TypeOrDomain_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ExactNumericType_Dec_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ExactNumericType_Decimal_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ExactNumericType_Numeric_Option
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.PredefinedType_NationalString
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.PredefinedType_String
- Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.TableContentsSource_Subtable
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.BooleanTerm_And
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.BooleanTest_Sequence_Option
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.BooleanValueExpression_Or
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ColumnDefinition_TypeOrDomain_Option
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ExactNumericType_Dec_Option
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ExactNumericType_Decimal_Option
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ExactNumericType_Numeric_Option
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.PredefinedType_NationalString
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.PredefinedType_String
- Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.TableContentsSource_Subtable
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.BooleanTerm_And
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.BooleanTest_Sequence_Option
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.BooleanValueExpression_Or
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ColumnDefinition_TypeOrDomain_Option
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ExactNumericType_Dec_Option
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ExactNumericType_Decimal_Option
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ExactNumericType_Numeric_Option
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.PredefinedType_NationalString
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.PredefinedType_String
- Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.TableContentsSource_Subtable
+ Hydra.Atlas: AtlasAttributeDefCardinalityList :: AtlasAttributeDefCardinality
+ Hydra.Atlas: AtlasAttributeDefCardinalitySet :: AtlasAttributeDefCardinality
+ Hydra.Atlas: AtlasAttributeDefCardinalitySingle :: AtlasAttributeDefCardinality
+ Hydra.Atlas: AtlasAttributeDefIndexTypeDefault :: AtlasAttributeDefIndexType
+ Hydra.Atlas: AtlasAttributeDefIndexTypeString :: AtlasAttributeDefIndexType
+ Hydra.Atlas: _AtlasAttributeDefCardinality :: Name
+ Hydra.Atlas: _AtlasAttributeDefCardinality_list :: Name
+ Hydra.Atlas: _AtlasAttributeDefCardinality_set :: Name
+ Hydra.Atlas: _AtlasAttributeDefCardinality_single :: Name
+ Hydra.Atlas: _AtlasAttributeDefIndexType :: Name
+ Hydra.Atlas: _AtlasAttributeDefIndexType_default :: Name
+ Hydra.Atlas: _AtlasAttributeDefIndexType_string :: Name
+ Hydra.Atlas: data AtlasAttributeDefCardinality
+ Hydra.Atlas: data AtlasAttributeDefIndexType
+ Hydra.Atlas: instance GHC.Classes.Eq Hydra.Atlas.AtlasAttributeDefCardinality
+ Hydra.Atlas: instance GHC.Classes.Eq Hydra.Atlas.AtlasAttributeDefIndexType
+ Hydra.Atlas: instance GHC.Classes.Ord Hydra.Atlas.AtlasAttributeDefCardinality
+ Hydra.Atlas: instance GHC.Classes.Ord Hydra.Atlas.AtlasAttributeDefIndexType
+ Hydra.Atlas: instance GHC.Read.Read Hydra.Atlas.AtlasAttributeDefCardinality
+ Hydra.Atlas: instance GHC.Read.Read Hydra.Atlas.AtlasAttributeDefIndexType
+ Hydra.Atlas: instance GHC.Show.Show Hydra.Atlas.AtlasAttributeDefCardinality
+ Hydra.Atlas: instance GHC.Show.Show Hydra.Atlas.AtlasAttributeDefIndexType
+ Hydra.Avro.Coder: avroForeignKey :: String
+ Hydra.Avro.Coder: avroPrimaryKey :: String
+ Hydra.Avro.SchemaJson: avroAliases :: String
+ Hydra.Avro.SchemaJson: avroArray :: String
+ Hydra.Avro.SchemaJson: avroAscending :: String
+ Hydra.Avro.SchemaJson: avroBoolean :: String
+ Hydra.Avro.SchemaJson: avroBytes :: String
+ Hydra.Avro.SchemaJson: avroDefault :: String
+ Hydra.Avro.SchemaJson: avroDescending :: String
+ Hydra.Avro.SchemaJson: avroDoc :: String
+ Hydra.Avro.SchemaJson: avroDouble :: String
+ Hydra.Avro.SchemaJson: avroEnum :: String
+ Hydra.Avro.SchemaJson: avroFields :: String
+ Hydra.Avro.SchemaJson: avroFixed :: String
+ Hydra.Avro.SchemaJson: avroFloat :: String
+ Hydra.Avro.SchemaJson: avroIgnore :: String
+ Hydra.Avro.SchemaJson: avroInt :: String
+ Hydra.Avro.SchemaJson: avroItems :: String
+ Hydra.Avro.SchemaJson: avroLong :: String
+ Hydra.Avro.SchemaJson: avroMap :: String
+ Hydra.Avro.SchemaJson: avroName :: String
+ Hydra.Avro.SchemaJson: avroNamespace :: String
+ Hydra.Avro.SchemaJson: avroNull :: String
+ Hydra.Avro.SchemaJson: avroOrder :: String
+ Hydra.Avro.SchemaJson: avroRecord :: String
+ Hydra.Avro.SchemaJson: avroSize :: String
+ Hydra.Avro.SchemaJson: avroString :: String
+ Hydra.Avro.SchemaJson: avroSymbols :: String
+ Hydra.Avro.SchemaJson: avroType :: String
+ Hydra.Avro.SchemaJson: avroValues :: String
+ Hydra.Azure.Dtld: InterfaceContentsCommand :: Command -> InterfaceContents
+ Hydra.Azure.Dtld: InterfaceContentsComponent :: Component -> InterfaceContents
+ Hydra.Azure.Dtld: InterfaceContentsProperty :: Property -> InterfaceContents
+ Hydra.Azure.Dtld: InterfaceContentsRelationship :: Relationship -> InterfaceContents
+ Hydra.Azure.Dtld: InterfaceContentsTelemetry :: Telemetry -> InterfaceContents
+ Hydra.Azure.Dtld: SchemaArray :: Iri -> Schema -> Maybe Dtmi -> Maybe String -> Maybe String -> Maybe String -> SchemaArray
+ Hydra.Azure.Dtld: SchemaComplexArray :: SchemaArray -> SchemaComplex
+ Hydra.Azure.Dtld: SchemaComplexEnum :: SchemaEnum -> SchemaComplex
+ Hydra.Azure.Dtld: SchemaComplexMap :: SchemaMap -> SchemaComplex
+ Hydra.Azure.Dtld: SchemaComplexObject :: SchemaObject -> SchemaComplex
+ Hydra.Azure.Dtld: SchemaComplex_ :: SchemaComplex -> Schema
+ Hydra.Azure.Dtld: SchemaEnum :: Iri -> [EnumValue] -> IntegerOrString -> Maybe Dtmi -> Maybe String -> Maybe String -> Maybe String -> SchemaEnum
+ Hydra.Azure.Dtld: SchemaInterface :: Dtmi -> SchemaInterfaceType -> Maybe String -> Maybe String -> Maybe String -> SchemaInterface
+ Hydra.Azure.Dtld: SchemaInterfaceTypeArray :: SchemaArray -> SchemaInterfaceType
+ Hydra.Azure.Dtld: SchemaInterfaceTypeEnum :: SchemaEnum -> SchemaInterfaceType
+ Hydra.Azure.Dtld: SchemaInterfaceTypeMap :: SchemaMap -> SchemaInterfaceType
+ Hydra.Azure.Dtld: SchemaInterfaceTypeObject :: SchemaObject -> SchemaInterfaceType
+ Hydra.Azure.Dtld: SchemaMap :: Iri -> MapKey -> MapValue -> Maybe Dtmi -> Maybe String -> Maybe String -> Maybe String -> SchemaMap
+ Hydra.Azure.Dtld: SchemaObject :: Iri -> Set Field -> Maybe Dtmi -> Maybe String -> Maybe String -> Maybe String -> SchemaObject
+ Hydra.Azure.Dtld: SchemaPrimitiveBoolean :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitiveDate :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitiveDateTime :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitiveDouble :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitiveDuration :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitiveFloat :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitiveInteger :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitiveLong :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitiveString :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitiveTime :: SchemaPrimitive
+ Hydra.Azure.Dtld: SchemaPrimitive_ :: SchemaPrimitive -> Schema
+ Hydra.Azure.Dtld: [schemaArrayComment] :: SchemaArray -> Maybe String
+ Hydra.Azure.Dtld: [schemaArrayDescription] :: SchemaArray -> Maybe String
+ Hydra.Azure.Dtld: [schemaArrayDisplayName] :: SchemaArray -> Maybe String
+ Hydra.Azure.Dtld: [schemaArrayElementSchema] :: SchemaArray -> Schema
+ Hydra.Azure.Dtld: [schemaArrayId] :: SchemaArray -> Maybe Dtmi
+ Hydra.Azure.Dtld: [schemaArrayType] :: SchemaArray -> Iri
+ Hydra.Azure.Dtld: [schemaEnumComment] :: SchemaEnum -> Maybe String
+ Hydra.Azure.Dtld: [schemaEnumDescription] :: SchemaEnum -> Maybe String
+ Hydra.Azure.Dtld: [schemaEnumDisplayName] :: SchemaEnum -> Maybe String
+ Hydra.Azure.Dtld: [schemaEnumEnumValues] :: SchemaEnum -> [EnumValue]
+ Hydra.Azure.Dtld: [schemaEnumId] :: SchemaEnum -> Maybe Dtmi
+ Hydra.Azure.Dtld: [schemaEnumType] :: SchemaEnum -> Iri
+ Hydra.Azure.Dtld: [schemaEnumValueSchema] :: SchemaEnum -> IntegerOrString
+ Hydra.Azure.Dtld: [schemaInterfaceComment] :: SchemaInterface -> Maybe String
+ Hydra.Azure.Dtld: [schemaInterfaceDescription] :: SchemaInterface -> Maybe String
+ Hydra.Azure.Dtld: [schemaInterfaceDisplayName] :: SchemaInterface -> Maybe String
+ Hydra.Azure.Dtld: [schemaInterfaceId] :: SchemaInterface -> Dtmi
+ Hydra.Azure.Dtld: [schemaInterfaceType] :: SchemaInterface -> SchemaInterfaceType
+ Hydra.Azure.Dtld: [schemaMapComment] :: SchemaMap -> Maybe String
+ Hydra.Azure.Dtld: [schemaMapDescription] :: SchemaMap -> Maybe String
+ Hydra.Azure.Dtld: [schemaMapDisplayName] :: SchemaMap -> Maybe String
+ Hydra.Azure.Dtld: [schemaMapId] :: SchemaMap -> Maybe Dtmi
+ Hydra.Azure.Dtld: [schemaMapMapKey] :: SchemaMap -> MapKey
+ Hydra.Azure.Dtld: [schemaMapMapValue] :: SchemaMap -> MapValue
+ Hydra.Azure.Dtld: [schemaMapType] :: SchemaMap -> Iri
+ Hydra.Azure.Dtld: [schemaObjectComment] :: SchemaObject -> Maybe String
+ Hydra.Azure.Dtld: [schemaObjectDescription] :: SchemaObject -> Maybe String
+ Hydra.Azure.Dtld: [schemaObjectDisplayName] :: SchemaObject -> Maybe String
+ Hydra.Azure.Dtld: [schemaObjectFields] :: SchemaObject -> Set Field
+ Hydra.Azure.Dtld: [schemaObjectId] :: SchemaObject -> Maybe Dtmi
+ Hydra.Azure.Dtld: [schemaObjectType] :: SchemaObject -> Iri
+ Hydra.Azure.Dtld: _InterfaceContents :: Name
+ Hydra.Azure.Dtld: _InterfaceContents_command :: Name
+ Hydra.Azure.Dtld: _InterfaceContents_component :: Name
+ Hydra.Azure.Dtld: _InterfaceContents_property :: Name
+ Hydra.Azure.Dtld: _InterfaceContents_relationship :: Name
+ Hydra.Azure.Dtld: _InterfaceContents_telemetry :: Name
+ Hydra.Azure.Dtld: _SchemaArray :: Name
+ Hydra.Azure.Dtld: _SchemaArray_comment :: Name
+ Hydra.Azure.Dtld: _SchemaArray_description :: Name
+ Hydra.Azure.Dtld: _SchemaArray_displayName :: Name
+ Hydra.Azure.Dtld: _SchemaArray_elementSchema :: Name
+ Hydra.Azure.Dtld: _SchemaArray_id :: Name
+ Hydra.Azure.Dtld: _SchemaArray_type :: Name
+ Hydra.Azure.Dtld: _SchemaComplex :: Name
+ Hydra.Azure.Dtld: _SchemaComplex_array :: Name
+ Hydra.Azure.Dtld: _SchemaComplex_enum :: Name
+ Hydra.Azure.Dtld: _SchemaComplex_map :: Name
+ Hydra.Azure.Dtld: _SchemaComplex_object :: Name
+ Hydra.Azure.Dtld: _SchemaEnum :: Name
+ Hydra.Azure.Dtld: _SchemaEnum_comment :: Name
+ Hydra.Azure.Dtld: _SchemaEnum_description :: Name
+ Hydra.Azure.Dtld: _SchemaEnum_displayName :: Name
+ Hydra.Azure.Dtld: _SchemaEnum_enumValues :: Name
+ Hydra.Azure.Dtld: _SchemaEnum_id :: Name
+ Hydra.Azure.Dtld: _SchemaEnum_type :: Name
+ Hydra.Azure.Dtld: _SchemaEnum_valueSchema :: Name
+ Hydra.Azure.Dtld: _SchemaInterface :: Name
+ Hydra.Azure.Dtld: _SchemaInterfaceType :: Name
+ Hydra.Azure.Dtld: _SchemaInterfaceType_array :: Name
+ Hydra.Azure.Dtld: _SchemaInterfaceType_enum :: Name
+ Hydra.Azure.Dtld: _SchemaInterfaceType_map :: Name
+ Hydra.Azure.Dtld: _SchemaInterfaceType_object :: Name
+ Hydra.Azure.Dtld: _SchemaInterface_comment :: Name
+ Hydra.Azure.Dtld: _SchemaInterface_description :: Name
+ Hydra.Azure.Dtld: _SchemaInterface_displayName :: Name
+ Hydra.Azure.Dtld: _SchemaInterface_id :: Name
+ Hydra.Azure.Dtld: _SchemaInterface_type :: Name
+ Hydra.Azure.Dtld: _SchemaMap :: Name
+ Hydra.Azure.Dtld: _SchemaMap_comment :: Name
+ Hydra.Azure.Dtld: _SchemaMap_description :: Name
+ Hydra.Azure.Dtld: _SchemaMap_displayName :: Name
+ Hydra.Azure.Dtld: _SchemaMap_id :: Name
+ Hydra.Azure.Dtld: _SchemaMap_mapKey :: Name
+ Hydra.Azure.Dtld: _SchemaMap_mapValue :: Name
+ Hydra.Azure.Dtld: _SchemaMap_type :: Name
+ Hydra.Azure.Dtld: _SchemaObject :: Name
+ Hydra.Azure.Dtld: _SchemaObject_comment :: Name
+ Hydra.Azure.Dtld: _SchemaObject_description :: Name
+ Hydra.Azure.Dtld: _SchemaObject_displayName :: Name
+ Hydra.Azure.Dtld: _SchemaObject_fields :: Name
+ Hydra.Azure.Dtld: _SchemaObject_id :: Name
+ Hydra.Azure.Dtld: _SchemaObject_type :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_boolean :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_date :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_dateTime :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_double :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_duration :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_float :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_integer :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_long :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_string :: Name
+ Hydra.Azure.Dtld: _SchemaPrimitive_time :: Name
+ Hydra.Azure.Dtld: data InterfaceContents
+ Hydra.Azure.Dtld: data SchemaArray
+ Hydra.Azure.Dtld: data SchemaComplex
+ Hydra.Azure.Dtld: data SchemaEnum
+ Hydra.Azure.Dtld: data SchemaInterface
+ Hydra.Azure.Dtld: data SchemaInterfaceType
+ Hydra.Azure.Dtld: data SchemaMap
+ Hydra.Azure.Dtld: data SchemaObject
+ Hydra.Azure.Dtld: data SchemaPrimitive
+ Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.InterfaceContents
+ Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.SchemaArray
+ Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.SchemaComplex
+ Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.SchemaEnum
+ Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.SchemaInterface
+ Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.SchemaInterfaceType
+ Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.SchemaMap
+ Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.SchemaObject
+ Hydra.Azure.Dtld: instance GHC.Classes.Eq Hydra.Azure.Dtld.SchemaPrimitive
+ Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.InterfaceContents
+ Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.SchemaArray
+ Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.SchemaComplex
+ Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.SchemaEnum
+ Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.SchemaInterface
+ Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.SchemaInterfaceType
+ Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.SchemaMap
+ Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.SchemaObject
+ Hydra.Azure.Dtld: instance GHC.Classes.Ord Hydra.Azure.Dtld.SchemaPrimitive
+ Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.InterfaceContents
+ Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.SchemaArray
+ Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.SchemaComplex
+ Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.SchemaEnum
+ Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.SchemaInterface
+ Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.SchemaInterfaceType
+ Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.SchemaMap
+ Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.SchemaObject
+ Hydra.Azure.Dtld: instance GHC.Read.Read Hydra.Azure.Dtld.SchemaPrimitive
+ Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.InterfaceContents
+ Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.SchemaArray
+ Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.SchemaComplex
+ Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.SchemaEnum
+ Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.SchemaInterface
+ Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.SchemaInterfaceType
+ Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.SchemaMap
+ Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.SchemaObject
+ Hydra.Azure.Dtld: instance GHC.Show.Show Hydra.Azure.Dtld.SchemaPrimitive
+ Hydra.Datalog.Syntax: AtomListMany :: AtomListMultiple -> AtomList
+ Hydra.Datalog.Syntax: ConstantListMany :: ConstantListMultiple -> ConstantList
+ Hydra.Datalog.Syntax: ProgramElmtFact :: Fact -> ProgramElmt
+ Hydra.Datalog.Syntax: ProgramElmtRule :: Rule -> ProgramElmt
+ Hydra.Datalog.Syntax: TermListMany :: TermListMultiple -> TermList
+ Hydra.Datalog.Syntax: [atomListMultipleAtomList] :: AtomListMultiple -> AtomList
+ Hydra.Datalog.Syntax: [atomListMultipleAtom] :: AtomListMultiple -> Atom
+ Hydra.Datalog.Syntax: [constantListMultipleConstantList] :: ConstantListMultiple -> ConstantList
+ Hydra.Datalog.Syntax: [constantListMultipleConstant] :: ConstantListMultiple -> Constant
+ Hydra.Datalog.Syntax: [termListMultipleTermList] :: TermListMultiple -> TermList
+ Hydra.Datalog.Syntax: [termListMultipleTerm] :: TermListMultiple -> Term
+ Hydra.Datalog.Syntax: _AtomListMultiple :: Name
+ Hydra.Datalog.Syntax: _AtomListMultiple_Atom :: Name
+ Hydra.Datalog.Syntax: _AtomListMultiple_AtomList :: Name
+ Hydra.Datalog.Syntax: _AtomList_many :: Name
+ Hydra.Datalog.Syntax: _ConstantListMultiple :: Name
+ Hydra.Datalog.Syntax: _ConstantListMultiple_Constant :: Name
+ Hydra.Datalog.Syntax: _ConstantListMultiple_ConstantList :: Name
+ Hydra.Datalog.Syntax: _ConstantList_many :: Name
+ Hydra.Datalog.Syntax: _ProgramElmt :: Name
+ Hydra.Datalog.Syntax: _ProgramElmt_Fact :: Name
+ Hydra.Datalog.Syntax: _ProgramElmt_Rule :: Name
+ Hydra.Datalog.Syntax: _TermListMultiple :: Name
+ Hydra.Datalog.Syntax: _TermListMultiple_Term :: Name
+ Hydra.Datalog.Syntax: _TermListMultiple_TermList :: Name
+ Hydra.Datalog.Syntax: _TermList_many :: Name
+ Hydra.Datalog.Syntax: data AtomListMultiple
+ Hydra.Datalog.Syntax: data ConstantListMultiple
+ Hydra.Datalog.Syntax: data ProgramElmt
+ Hydra.Datalog.Syntax: data TermListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Classes.Eq Hydra.Datalog.Syntax.AtomListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Classes.Eq Hydra.Datalog.Syntax.ConstantListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Classes.Eq Hydra.Datalog.Syntax.ProgramElmt
+ Hydra.Datalog.Syntax: instance GHC.Classes.Eq Hydra.Datalog.Syntax.TermListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Classes.Ord Hydra.Datalog.Syntax.AtomListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Classes.Ord Hydra.Datalog.Syntax.ConstantListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Classes.Ord Hydra.Datalog.Syntax.ProgramElmt
+ Hydra.Datalog.Syntax: instance GHC.Classes.Ord Hydra.Datalog.Syntax.TermListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Read.Read Hydra.Datalog.Syntax.AtomListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Read.Read Hydra.Datalog.Syntax.ConstantListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Read.Read Hydra.Datalog.Syntax.ProgramElmt
+ Hydra.Datalog.Syntax: instance GHC.Read.Read Hydra.Datalog.Syntax.TermListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Show.Show Hydra.Datalog.Syntax.AtomListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Show.Show Hydra.Datalog.Syntax.ConstantListMultiple
+ Hydra.Datalog.Syntax: instance GHC.Show.Show Hydra.Datalog.Syntax.ProgramElmt
+ Hydra.Datalog.Syntax: instance GHC.Show.Show Hydra.Datalog.Syntax.TermListMultiple
+ Hydra.Graphql.Syntax: DirectiveLocationsSeq :: DirectiveLocationsSequence -> DirectiveLocations
+ Hydra.Graphql.Syntax: DirectiveLocationsSeq2 :: DirectiveLocationsSequence2 -> DirectiveLocations
+ Hydra.Graphql.Syntax: EnumTypeExtensionSeq :: EnumTypeExtensionSequence -> EnumTypeExtension
+ Hydra.Graphql.Syntax: EnumTypeExtensionSeq2 :: EnumTypeExtensionSequence2 -> EnumTypeExtension
+ Hydra.Graphql.Syntax: ImplementsInterfacesSeq :: ImplementsInterfacesSequence -> ImplementsInterfaces
+ Hydra.Graphql.Syntax: ImplementsInterfacesSeq2 :: ImplementsInterfacesSequence2 -> ImplementsInterfaces
+ Hydra.Graphql.Syntax: InputObjectTypeDefinitionSeq :: InputObjectTypeDefinitionSequence -> InputObjectTypeDefinition
+ Hydra.Graphql.Syntax: InputObjectTypeDefinitionSeq2 :: InputObjectTypeDefinitionSequence2 -> InputObjectTypeDefinition
+ Hydra.Graphql.Syntax: InputObjectTypeExtensionSeq :: InputObjectTypeExtensionSequence -> InputObjectTypeExtension
+ Hydra.Graphql.Syntax: InputObjectTypeExtensionSeq2 :: InputObjectTypeExtensionSequence2 -> InputObjectTypeExtension
+ Hydra.Graphql.Syntax: InterfaceTypeDefinitionSeq :: InterfaceTypeDefinitionSequence -> InterfaceTypeDefinition
+ Hydra.Graphql.Syntax: InterfaceTypeDefinitionSeq2 :: InterfaceTypeDefinitionSequence2 -> InterfaceTypeDefinition
+ Hydra.Graphql.Syntax: InterfaceTypeExtensionSeq :: InterfaceTypeExtensionSequence -> InterfaceTypeExtension
+ Hydra.Graphql.Syntax: InterfaceTypeExtensionSeq2 :: InterfaceTypeExtensionSequence2 -> InterfaceTypeExtension
+ Hydra.Graphql.Syntax: InterfaceTypeExtensionSeq3 :: InterfaceTypeExtensionSequence3 -> InterfaceTypeExtension
+ Hydra.Graphql.Syntax: ListValueSeq :: ListValueSequence -> ListValue
+ Hydra.Graphql.Syntax: ObjectTypeExtensionSeq :: ObjectTypeExtensionSequence -> ObjectTypeExtension
+ Hydra.Graphql.Syntax: ObjectTypeExtensionSeq2 :: ObjectTypeExtensionSequence2 -> ObjectTypeExtension
+ Hydra.Graphql.Syntax: ObjectTypeExtensionSeq3 :: ObjectTypeExtensionSequence3 -> ObjectTypeExtension
+ Hydra.Graphql.Syntax: ObjectValueSeq :: ObjectValueSequence -> ObjectValue
+ Hydra.Graphql.Syntax: OperationDefinitionSeq :: OperationDefinitionSequence -> OperationDefinition
+ Hydra.Graphql.Syntax: SchemaExtensionSeq :: SchemaExtensionSequence -> SchemaExtension
+ Hydra.Graphql.Syntax: UnionMemberTypesSeq :: UnionMemberTypesSequence -> UnionMemberTypes
+ Hydra.Graphql.Syntax: UnionMemberTypesSeq2 :: UnionMemberTypesSequence2 -> UnionMemberTypes
+ Hydra.Graphql.Syntax: UnionTypeExtensionSeq :: UnionTypeExtensionSequence -> UnionTypeExtension
+ Hydra.Graphql.Syntax: UnionTypeExtensionSeq2 :: UnionTypeExtensionSequence2 -> UnionTypeExtension
+ Hydra.Graphql.Syntax: [directiveLocationsSequence2DirectiveLocation] :: DirectiveLocationsSequence2 -> DirectiveLocation
+ Hydra.Graphql.Syntax: [directiveLocationsSequence2Or] :: DirectiveLocationsSequence2 -> Maybe ()
+ Hydra.Graphql.Syntax: [directiveLocationsSequenceDirectiveLocation] :: DirectiveLocationsSequence -> DirectiveLocation
+ Hydra.Graphql.Syntax: [directiveLocationsSequenceDirectiveLocations] :: DirectiveLocationsSequence -> DirectiveLocations
+ Hydra.Graphql.Syntax: [enumTypeExtensionSequence2Directives] :: EnumTypeExtensionSequence2 -> Directives
+ Hydra.Graphql.Syntax: [enumTypeExtensionSequence2Name] :: EnumTypeExtensionSequence2 -> Name
+ Hydra.Graphql.Syntax: [enumTypeExtensionSequenceDirectives] :: EnumTypeExtensionSequence -> Maybe Directives
+ Hydra.Graphql.Syntax: [enumTypeExtensionSequenceEnumValuesDefinition] :: EnumTypeExtensionSequence -> EnumValuesDefinition
+ Hydra.Graphql.Syntax: [enumTypeExtensionSequenceName] :: EnumTypeExtensionSequence -> Name
+ Hydra.Graphql.Syntax: [implementsInterfacesSequence2Amp] :: ImplementsInterfacesSequence2 -> Maybe ()
+ Hydra.Graphql.Syntax: [implementsInterfacesSequence2NamedType] :: ImplementsInterfacesSequence2 -> NamedType
+ Hydra.Graphql.Syntax: [implementsInterfacesSequenceImplementsInterfaces] :: ImplementsInterfacesSequence -> ImplementsInterfaces
+ Hydra.Graphql.Syntax: [implementsInterfacesSequenceNamedType] :: ImplementsInterfacesSequence -> NamedType
+ Hydra.Graphql.Syntax: [inputObjectTypeDefinitionSequence2Description] :: InputObjectTypeDefinitionSequence2 -> Maybe Description
+ Hydra.Graphql.Syntax: [inputObjectTypeDefinitionSequence2Directives] :: InputObjectTypeDefinitionSequence2 -> Maybe Directives
+ Hydra.Graphql.Syntax: [inputObjectTypeDefinitionSequence2Name] :: InputObjectTypeDefinitionSequence2 -> Name
+ Hydra.Graphql.Syntax: [inputObjectTypeDefinitionSequenceDescription] :: InputObjectTypeDefinitionSequence -> Maybe Description
+ Hydra.Graphql.Syntax: [inputObjectTypeDefinitionSequenceDirectives] :: InputObjectTypeDefinitionSequence -> Maybe Directives
+ Hydra.Graphql.Syntax: [inputObjectTypeDefinitionSequenceInputFieldsDefinition] :: InputObjectTypeDefinitionSequence -> InputFieldsDefinition
+ Hydra.Graphql.Syntax: [inputObjectTypeDefinitionSequenceName] :: InputObjectTypeDefinitionSequence -> Name
+ Hydra.Graphql.Syntax: [inputObjectTypeExtensionSequence2Directives] :: InputObjectTypeExtensionSequence2 -> Directives
+ Hydra.Graphql.Syntax: [inputObjectTypeExtensionSequence2Name] :: InputObjectTypeExtensionSequence2 -> Name
+ Hydra.Graphql.Syntax: [inputObjectTypeExtensionSequenceDirectives] :: InputObjectTypeExtensionSequence -> Maybe Directives
+ Hydra.Graphql.Syntax: [inputObjectTypeExtensionSequenceInputFieldsDefinition] :: InputObjectTypeExtensionSequence -> InputFieldsDefinition
+ Hydra.Graphql.Syntax: [inputObjectTypeExtensionSequenceName] :: InputObjectTypeExtensionSequence -> Name
+ Hydra.Graphql.Syntax: [interfaceTypeDefinitionSequence2Description] :: InterfaceTypeDefinitionSequence2 -> Maybe Description
+ Hydra.Graphql.Syntax: [interfaceTypeDefinitionSequence2Directives] :: InterfaceTypeDefinitionSequence2 -> Maybe Directives
+ Hydra.Graphql.Syntax: [interfaceTypeDefinitionSequence2ImplementsInterfaces] :: InterfaceTypeDefinitionSequence2 -> ImplementsInterfaces
+ Hydra.Graphql.Syntax: [interfaceTypeDefinitionSequence2Name] :: InterfaceTypeDefinitionSequence2 -> Name
+ Hydra.Graphql.Syntax: [interfaceTypeDefinitionSequenceDescription] :: InterfaceTypeDefinitionSequence -> Maybe Description
+ Hydra.Graphql.Syntax: [interfaceTypeDefinitionSequenceDirectives] :: InterfaceTypeDefinitionSequence -> Maybe Directives
+ Hydra.Graphql.Syntax: [interfaceTypeDefinitionSequenceFieldsDefinition] :: InterfaceTypeDefinitionSequence -> FieldsDefinition
+ Hydra.Graphql.Syntax: [interfaceTypeDefinitionSequenceImplementsInterfaces] :: InterfaceTypeDefinitionSequence -> Maybe ImplementsInterfaces
+ Hydra.Graphql.Syntax: [interfaceTypeDefinitionSequenceName] :: InterfaceTypeDefinitionSequence -> Name
+ Hydra.Graphql.Syntax: [interfaceTypeExtensionSequence2Directives] :: InterfaceTypeExtensionSequence2 -> Directives
+ Hydra.Graphql.Syntax: [interfaceTypeExtensionSequence2ImplementsInterfaces] :: InterfaceTypeExtensionSequence2 -> Maybe ImplementsInterfaces
+ Hydra.Graphql.Syntax: [interfaceTypeExtensionSequence2Name] :: InterfaceTypeExtensionSequence2 -> Name
+ Hydra.Graphql.Syntax: [interfaceTypeExtensionSequence3ImplementsInterfaces] :: InterfaceTypeExtensionSequence3 -> ImplementsInterfaces
+ Hydra.Graphql.Syntax: [interfaceTypeExtensionSequence3Name] :: InterfaceTypeExtensionSequence3 -> Name
+ Hydra.Graphql.Syntax: [interfaceTypeExtensionSequenceDirectives] :: InterfaceTypeExtensionSequence -> Maybe Directives
+ Hydra.Graphql.Syntax: [interfaceTypeExtensionSequenceFieldsDefinition] :: InterfaceTypeExtensionSequence -> FieldsDefinition
+ Hydra.Graphql.Syntax: [interfaceTypeExtensionSequenceImplementsInterfaces] :: InterfaceTypeExtensionSequence -> Maybe ImplementsInterfaces
+ Hydra.Graphql.Syntax: [interfaceTypeExtensionSequenceName] :: InterfaceTypeExtensionSequence -> Name
+ Hydra.Graphql.Syntax: [objectTypeExtensionSequence2Directives] :: ObjectTypeExtensionSequence2 -> Maybe Directives
+ Hydra.Graphql.Syntax: [objectTypeExtensionSequence2ImplementsInterfaces] :: ObjectTypeExtensionSequence2 -> Maybe ImplementsInterfaces
+ Hydra.Graphql.Syntax: [objectTypeExtensionSequence2Name] :: ObjectTypeExtensionSequence2 -> Name
+ Hydra.Graphql.Syntax: [objectTypeExtensionSequence3ImplementsInterfaces] :: ObjectTypeExtensionSequence3 -> ImplementsInterfaces
+ Hydra.Graphql.Syntax: [objectTypeExtensionSequence3Name] :: ObjectTypeExtensionSequence3 -> Name
+ Hydra.Graphql.Syntax: [objectTypeExtensionSequenceDirectives] :: ObjectTypeExtensionSequence -> Maybe Directives
+ Hydra.Graphql.Syntax: [objectTypeExtensionSequenceFieldsDefinition] :: ObjectTypeExtensionSequence -> FieldsDefinition
+ Hydra.Graphql.Syntax: [objectTypeExtensionSequenceImplementsInterfaces] :: ObjectTypeExtensionSequence -> Maybe ImplementsInterfaces
+ Hydra.Graphql.Syntax: [objectTypeExtensionSequenceName] :: ObjectTypeExtensionSequence -> Name
+ Hydra.Graphql.Syntax: [operationDefinitionSequenceDirectives] :: OperationDefinitionSequence -> Maybe Directives
+ Hydra.Graphql.Syntax: [operationDefinitionSequenceName] :: OperationDefinitionSequence -> Maybe Name
+ Hydra.Graphql.Syntax: [operationDefinitionSequenceOperationType] :: OperationDefinitionSequence -> OperationType
+ Hydra.Graphql.Syntax: [operationDefinitionSequenceSelectionSet] :: OperationDefinitionSequence -> SelectionSet
+ Hydra.Graphql.Syntax: [operationDefinitionSequenceVariablesDefinition] :: OperationDefinitionSequence -> Maybe VariablesDefinition
+ Hydra.Graphql.Syntax: [schemaExtensionSequenceDirectives] :: SchemaExtensionSequence -> Maybe Directives
+ Hydra.Graphql.Syntax: [schemaExtensionSequenceRootOperationTypeDefinition] :: SchemaExtensionSequence -> RootOperationTypeDefinition
+ Hydra.Graphql.Syntax: [unionMemberTypesSequence2NamedType] :: UnionMemberTypesSequence2 -> NamedType
+ Hydra.Graphql.Syntax: [unionMemberTypesSequence2Or] :: UnionMemberTypesSequence2 -> Maybe ()
+ Hydra.Graphql.Syntax: [unionMemberTypesSequenceNamedType] :: UnionMemberTypesSequence -> NamedType
+ Hydra.Graphql.Syntax: [unionMemberTypesSequenceUnionMemberTypes] :: UnionMemberTypesSequence -> UnionMemberTypes
+ Hydra.Graphql.Syntax: [unionTypeExtensionSequence2Directives] :: UnionTypeExtensionSequence2 -> Directives
+ Hydra.Graphql.Syntax: [unionTypeExtensionSequence2Name] :: UnionTypeExtensionSequence2 -> Name
+ Hydra.Graphql.Syntax: [unionTypeExtensionSequenceDirectives] :: UnionTypeExtensionSequence -> Maybe Directives
+ Hydra.Graphql.Syntax: [unionTypeExtensionSequenceName] :: UnionTypeExtensionSequence -> Name
+ Hydra.Graphql.Syntax: [unionTypeExtensionSequenceUnionMemberTypes] :: UnionTypeExtensionSequence -> UnionMemberTypes
+ Hydra.Graphql.Syntax: _DirectiveLocationsSequence :: Name
+ Hydra.Graphql.Syntax: _DirectiveLocationsSequence2 :: Name
+ Hydra.Graphql.Syntax: _DirectiveLocationsSequence2_DirectiveLocation :: Name
+ Hydra.Graphql.Syntax: _DirectiveLocationsSequence2_Or :: Name
+ Hydra.Graphql.Syntax: _DirectiveLocationsSequence_DirectiveLocation :: Name
+ Hydra.Graphql.Syntax: _DirectiveLocationsSequence_DirectiveLocations :: Name
+ Hydra.Graphql.Syntax: _DirectiveLocations_seq :: Name
+ Hydra.Graphql.Syntax: _DirectiveLocations_seq2 :: Name
+ Hydra.Graphql.Syntax: _EnumTypeExtensionSequence :: Name
+ Hydra.Graphql.Syntax: _EnumTypeExtensionSequence2 :: Name
+ Hydra.Graphql.Syntax: _EnumTypeExtensionSequence2_Directives :: Name
+ Hydra.Graphql.Syntax: _EnumTypeExtensionSequence2_Name :: Name
+ Hydra.Graphql.Syntax: _EnumTypeExtensionSequence_Directives :: Name
+ Hydra.Graphql.Syntax: _EnumTypeExtensionSequence_EnumValuesDefinition :: Name
+ Hydra.Graphql.Syntax: _EnumTypeExtensionSequence_Name :: Name
+ Hydra.Graphql.Syntax: _EnumTypeExtension_seq :: Name
+ Hydra.Graphql.Syntax: _EnumTypeExtension_seq2 :: Name
+ Hydra.Graphql.Syntax: _ImplementsInterfacesSequence :: Name
+ Hydra.Graphql.Syntax: _ImplementsInterfacesSequence2 :: Name
+ Hydra.Graphql.Syntax: _ImplementsInterfacesSequence2_Amp :: Name
+ Hydra.Graphql.Syntax: _ImplementsInterfacesSequence2_NamedType :: Name
+ Hydra.Graphql.Syntax: _ImplementsInterfacesSequence_ImplementsInterfaces :: Name
+ Hydra.Graphql.Syntax: _ImplementsInterfacesSequence_NamedType :: Name
+ Hydra.Graphql.Syntax: _ImplementsInterfaces_seq :: Name
+ Hydra.Graphql.Syntax: _ImplementsInterfaces_seq2 :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinitionSequence :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinitionSequence2 :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinitionSequence2_Description :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinitionSequence2_Directives :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinitionSequence2_Name :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinitionSequence_Description :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinitionSequence_Directives :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinitionSequence_InputFieldsDefinition :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinitionSequence_Name :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinition_seq :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeDefinition_seq2 :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeExtensionSequence :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeExtensionSequence2 :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeExtensionSequence2_Directives :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeExtensionSequence2_Name :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeExtensionSequence_Directives :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeExtensionSequence_InputFieldsDefinition :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeExtensionSequence_Name :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeExtension_seq :: Name
+ Hydra.Graphql.Syntax: _InputObjectTypeExtension_seq2 :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence2 :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence2_Description :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence2_Directives :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence2_ImplementsInterfaces :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence2_Name :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence_Description :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence_Directives :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence_FieldsDefinition :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence_ImplementsInterfaces :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinitionSequence_Name :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinition_seq :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeDefinition_seq2 :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence2 :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence2_Directives :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence2_ImplementsInterfaces :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence2_Name :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence3 :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence3_ImplementsInterfaces :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence3_Name :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence_Directives :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence_FieldsDefinition :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence_ImplementsInterfaces :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtensionSequence_Name :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtension_seq :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtension_seq2 :: Name
+ Hydra.Graphql.Syntax: _InterfaceTypeExtension_seq3 :: Name
+ Hydra.Graphql.Syntax: _ListValueSequence :: Name
+ Hydra.Graphql.Syntax: _ListValue_seq :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence2 :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence2_Directives :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence2_ImplementsInterfaces :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence2_Name :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence3 :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence3_ImplementsInterfaces :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence3_Name :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence_Directives :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence_FieldsDefinition :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence_ImplementsInterfaces :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtensionSequence_Name :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtension_seq :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtension_seq2 :: Name
+ Hydra.Graphql.Syntax: _ObjectTypeExtension_seq3 :: Name
+ Hydra.Graphql.Syntax: _ObjectValueSequence :: Name
+ Hydra.Graphql.Syntax: _ObjectValue_seq :: Name
+ Hydra.Graphql.Syntax: _OperationDefinitionSequence :: Name
+ Hydra.Graphql.Syntax: _OperationDefinitionSequence_Directives :: Name
+ Hydra.Graphql.Syntax: _OperationDefinitionSequence_Name :: Name
+ Hydra.Graphql.Syntax: _OperationDefinitionSequence_OperationType :: Name
+ Hydra.Graphql.Syntax: _OperationDefinitionSequence_SelectionSet :: Name
+ Hydra.Graphql.Syntax: _OperationDefinitionSequence_VariablesDefinition :: Name
+ Hydra.Graphql.Syntax: _OperationDefinition_seq :: Name
+ Hydra.Graphql.Syntax: _SchemaExtensionSequence :: Name
+ Hydra.Graphql.Syntax: _SchemaExtensionSequence_Directives :: Name
+ Hydra.Graphql.Syntax: _SchemaExtensionSequence_RootOperationTypeDefinition :: Name
+ Hydra.Graphql.Syntax: _SchemaExtension_seq :: Name
+ Hydra.Graphql.Syntax: _UnionMemberTypesSequence :: Name
+ Hydra.Graphql.Syntax: _UnionMemberTypesSequence2 :: Name
+ Hydra.Graphql.Syntax: _UnionMemberTypesSequence2_NamedType :: Name
+ Hydra.Graphql.Syntax: _UnionMemberTypesSequence2_Or :: Name
+ Hydra.Graphql.Syntax: _UnionMemberTypesSequence_NamedType :: Name
+ Hydra.Graphql.Syntax: _UnionMemberTypesSequence_UnionMemberTypes :: Name
+ Hydra.Graphql.Syntax: _UnionMemberTypes_seq :: Name
+ Hydra.Graphql.Syntax: _UnionMemberTypes_seq2 :: Name
+ Hydra.Graphql.Syntax: _UnionTypeExtensionSequence :: Name
+ Hydra.Graphql.Syntax: _UnionTypeExtensionSequence2 :: Name
+ Hydra.Graphql.Syntax: _UnionTypeExtensionSequence2_Directives :: Name
+ Hydra.Graphql.Syntax: _UnionTypeExtensionSequence2_Name :: Name
+ Hydra.Graphql.Syntax: _UnionTypeExtensionSequence_Directives :: Name
+ Hydra.Graphql.Syntax: _UnionTypeExtensionSequence_Name :: Name
+ Hydra.Graphql.Syntax: _UnionTypeExtensionSequence_UnionMemberTypes :: Name
+ Hydra.Graphql.Syntax: _UnionTypeExtension_seq :: Name
+ Hydra.Graphql.Syntax: _UnionTypeExtension_seq2 :: Name
+ Hydra.Graphql.Syntax: data DirectiveLocationsSequence
+ Hydra.Graphql.Syntax: data DirectiveLocationsSequence2
+ Hydra.Graphql.Syntax: data EnumTypeExtensionSequence
+ Hydra.Graphql.Syntax: data EnumTypeExtensionSequence2
+ Hydra.Graphql.Syntax: data ImplementsInterfacesSequence
+ Hydra.Graphql.Syntax: data ImplementsInterfacesSequence2
+ Hydra.Graphql.Syntax: data InputObjectTypeDefinitionSequence
+ Hydra.Graphql.Syntax: data InputObjectTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: data InputObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: data InputObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: data InterfaceTypeDefinitionSequence
+ Hydra.Graphql.Syntax: data InterfaceTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: data InterfaceTypeExtensionSequence
+ Hydra.Graphql.Syntax: data InterfaceTypeExtensionSequence2
+ Hydra.Graphql.Syntax: data InterfaceTypeExtensionSequence3
+ Hydra.Graphql.Syntax: data ObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: data ObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: data ObjectTypeExtensionSequence3
+ Hydra.Graphql.Syntax: data OperationDefinitionSequence
+ Hydra.Graphql.Syntax: data SchemaExtensionSequence
+ Hydra.Graphql.Syntax: data UnionMemberTypesSequence
+ Hydra.Graphql.Syntax: data UnionMemberTypesSequence2
+ Hydra.Graphql.Syntax: data UnionTypeExtensionSequence
+ Hydra.Graphql.Syntax: data UnionTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.DirectiveLocationsSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.DirectiveLocationsSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.EnumTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.EnumTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ImplementsInterfacesSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ImplementsInterfacesSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InputObjectTypeDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InputObjectTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InputObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InputObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence3
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.ObjectTypeExtensionSequence3
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.OperationDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.SchemaExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.UnionMemberTypesSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.UnionMemberTypesSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.UnionTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Eq Hydra.Graphql.Syntax.UnionTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.DirectiveLocationsSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.DirectiveLocationsSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.EnumTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.EnumTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ImplementsInterfacesSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ImplementsInterfacesSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InputObjectTypeDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InputObjectTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InputObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InputObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence3
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.ObjectTypeExtensionSequence3
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.OperationDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.SchemaExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.UnionMemberTypesSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.UnionMemberTypesSequence2
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.UnionTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Classes.Ord Hydra.Graphql.Syntax.UnionTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.DirectiveLocationsSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.DirectiveLocationsSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.EnumTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.EnumTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ImplementsInterfacesSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ImplementsInterfacesSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InputObjectTypeDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InputObjectTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InputObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InputObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence3
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.ObjectTypeExtensionSequence3
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.OperationDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.SchemaExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.UnionMemberTypesSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.UnionMemberTypesSequence2
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.UnionTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Read.Read Hydra.Graphql.Syntax.UnionTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.DirectiveLocationsSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.DirectiveLocationsSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.EnumTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.EnumTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ImplementsInterfacesSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ImplementsInterfacesSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InputObjectTypeDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InputObjectTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InputObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InputObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeDefinitionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.InterfaceTypeExtensionSequence3
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ObjectTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ObjectTypeExtensionSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.ObjectTypeExtensionSequence3
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.OperationDefinitionSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.SchemaExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.UnionMemberTypesSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.UnionMemberTypesSequence2
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.UnionTypeExtensionSequence
+ Hydra.Graphql.Syntax: instance GHC.Show.Show Hydra.Graphql.Syntax.UnionTypeExtensionSequence2
+ Hydra.Graphql.Syntax: type ListValueSequence = ()
+ Hydra.Graphql.Syntax: type ObjectValueSequence = ()
+ Hydra.Json.Schema.Model: AdditionalItemsAny :: Bool -> AdditionalItems
+ Hydra.Json.Schema.Model: AdditionalItemsSchema :: Schema -> AdditionalItems
+ Hydra.Json.Schema.Model: ArrayRestrictionAdditionalItems :: AdditionalItems -> ArrayRestriction
+ Hydra.Json.Schema.Model: ArrayRestrictionItems :: Items -> ArrayRestriction
+ Hydra.Json.Schema.Model: ArrayRestrictionMaxItems :: Int -> ArrayRestriction
+ Hydra.Json.Schema.Model: ArrayRestrictionMinItems :: Int -> ArrayRestriction
+ Hydra.Json.Schema.Model: ArrayRestrictionUniqueItems :: Bool -> ArrayRestriction
+ Hydra.Json.Schema.Model: Document :: Maybe String -> Maybe (Map Keyword Schema) -> Schema -> Document
+ Hydra.Json.Schema.Model: ItemsSameItems :: Schema -> Items
+ Hydra.Json.Schema.Model: ItemsVarItems :: [Schema] -> Items
+ Hydra.Json.Schema.Model: Keyword :: String -> Keyword
+ Hydra.Json.Schema.Model: Limit :: Int -> Bool -> Limit
+ Hydra.Json.Schema.Model: MultipleRestrictionAllOf :: [Schema] -> MultipleRestriction
+ Hydra.Json.Schema.Model: MultipleRestrictionAnyOf :: [Schema] -> MultipleRestriction
+ Hydra.Json.Schema.Model: MultipleRestrictionEnum :: [Value] -> MultipleRestriction
+ Hydra.Json.Schema.Model: MultipleRestrictionNot :: Schema -> MultipleRestriction
+ Hydra.Json.Schema.Model: MultipleRestrictionOneOf :: [Schema] -> MultipleRestriction
+ Hydra.Json.Schema.Model: NumericRestrictionMaximum :: Limit -> NumericRestriction
+ Hydra.Json.Schema.Model: NumericRestrictionMinimum :: Limit -> NumericRestriction
+ Hydra.Json.Schema.Model: NumericRestrictionMultipleOf :: Int -> NumericRestriction
+ Hydra.Json.Schema.Model: ObjectRestrictionAdditionalProperties :: AdditionalItems -> ObjectRestriction
+ Hydra.Json.Schema.Model: ObjectRestrictionDependencies :: Map Keyword SchemaOrArray -> ObjectRestriction
+ Hydra.Json.Schema.Model: ObjectRestrictionMaxProperties :: Int -> ObjectRestriction
+ Hydra.Json.Schema.Model: ObjectRestrictionMinProperties :: Int -> ObjectRestriction
+ Hydra.Json.Schema.Model: ObjectRestrictionPatternProperties :: Map RegularExpression Schema -> ObjectRestriction
+ Hydra.Json.Schema.Model: ObjectRestrictionProperties :: Map Keyword Schema -> ObjectRestriction
+ Hydra.Json.Schema.Model: ObjectRestrictionRequired :: [Keyword] -> ObjectRestriction
+ Hydra.Json.Schema.Model: RegularExpression :: String -> RegularExpression
+ Hydra.Json.Schema.Model: RestrictionArray :: ArrayRestriction -> Restriction
+ Hydra.Json.Schema.Model: RestrictionDescription :: String -> Restriction
+ Hydra.Json.Schema.Model: RestrictionMultiple :: MultipleRestriction -> Restriction
+ Hydra.Json.Schema.Model: RestrictionNumber :: NumericRestriction -> Restriction
+ Hydra.Json.Schema.Model: RestrictionObject :: ObjectRestriction -> Restriction
+ Hydra.Json.Schema.Model: RestrictionReference :: SchemaReference -> Restriction
+ Hydra.Json.Schema.Model: RestrictionString :: StringRestriction -> Restriction
+ Hydra.Json.Schema.Model: RestrictionTitle :: String -> Restriction
+ Hydra.Json.Schema.Model: RestrictionType :: Type -> Restriction
+ Hydra.Json.Schema.Model: Schema :: [Restriction] -> Schema
+ Hydra.Json.Schema.Model: SchemaOrArrayArray :: [Keyword] -> SchemaOrArray
+ Hydra.Json.Schema.Model: SchemaOrArraySchema :: Schema -> SchemaOrArray
+ Hydra.Json.Schema.Model: SchemaReference :: String -> SchemaReference
+ Hydra.Json.Schema.Model: StringRestrictionMaxLength :: Int -> StringRestriction
+ Hydra.Json.Schema.Model: StringRestrictionMinLength :: Int -> StringRestriction
+ Hydra.Json.Schema.Model: StringRestrictionPattern :: RegularExpression -> StringRestriction
+ Hydra.Json.Schema.Model: TypeMultiple :: [TypeName] -> Type
+ Hydra.Json.Schema.Model: TypeNameArray :: TypeName
+ Hydra.Json.Schema.Model: TypeNameBoolean :: TypeName
+ Hydra.Json.Schema.Model: TypeNameInteger :: TypeName
+ Hydra.Json.Schema.Model: TypeNameNull :: TypeName
+ Hydra.Json.Schema.Model: TypeNameNumber :: TypeName
+ Hydra.Json.Schema.Model: TypeNameObject :: TypeName
+ Hydra.Json.Schema.Model: TypeNameString :: TypeName
+ Hydra.Json.Schema.Model: TypeSingle :: TypeName -> Type
+ Hydra.Json.Schema.Model: [documentDefinitions] :: Document -> Maybe (Map Keyword Schema)
+ Hydra.Json.Schema.Model: [documentId] :: Document -> Maybe String
+ Hydra.Json.Schema.Model: [documentRoot] :: Document -> Schema
+ Hydra.Json.Schema.Model: [limitExclusive] :: Limit -> Bool
+ Hydra.Json.Schema.Model: [limitValue] :: Limit -> Int
+ Hydra.Json.Schema.Model: [unKeyword] :: Keyword -> String
+ Hydra.Json.Schema.Model: [unRegularExpression] :: RegularExpression -> String
+ Hydra.Json.Schema.Model: [unSchemaReference] :: SchemaReference -> String
+ Hydra.Json.Schema.Model: [unSchema] :: Schema -> [Restriction]
+ Hydra.Json.Schema.Model: _AdditionalItems :: Name
+ Hydra.Json.Schema.Model: _AdditionalItems_any :: Name
+ Hydra.Json.Schema.Model: _AdditionalItems_schema :: Name
+ Hydra.Json.Schema.Model: _ArrayRestriction :: Name
+ Hydra.Json.Schema.Model: _ArrayRestriction_additionalItems :: Name
+ Hydra.Json.Schema.Model: _ArrayRestriction_items :: Name
+ Hydra.Json.Schema.Model: _ArrayRestriction_maxItems :: Name
+ Hydra.Json.Schema.Model: _ArrayRestriction_minItems :: Name
+ Hydra.Json.Schema.Model: _ArrayRestriction_uniqueItems :: Name
+ Hydra.Json.Schema.Model: _Document :: Name
+ Hydra.Json.Schema.Model: _Document_definitions :: Name
+ Hydra.Json.Schema.Model: _Document_id :: Name
+ Hydra.Json.Schema.Model: _Document_root :: Name
+ Hydra.Json.Schema.Model: _Items :: Name
+ Hydra.Json.Schema.Model: _Items_sameItems :: Name
+ Hydra.Json.Schema.Model: _Items_varItems :: Name
+ Hydra.Json.Schema.Model: _Keyword :: Name
+ Hydra.Json.Schema.Model: _Limit :: Name
+ Hydra.Json.Schema.Model: _Limit_exclusive :: Name
+ Hydra.Json.Schema.Model: _Limit_value :: Name
+ Hydra.Json.Schema.Model: _MultipleRestriction :: Name
+ Hydra.Json.Schema.Model: _MultipleRestriction_allOf :: Name
+ Hydra.Json.Schema.Model: _MultipleRestriction_anyOf :: Name
+ Hydra.Json.Schema.Model: _MultipleRestriction_enum :: Name
+ Hydra.Json.Schema.Model: _MultipleRestriction_not :: Name
+ Hydra.Json.Schema.Model: _MultipleRestriction_oneOf :: Name
+ Hydra.Json.Schema.Model: _NumericRestriction :: Name
+ Hydra.Json.Schema.Model: _NumericRestriction_maximum :: Name
+ Hydra.Json.Schema.Model: _NumericRestriction_minimum :: Name
+ Hydra.Json.Schema.Model: _NumericRestriction_multipleOf :: Name
+ Hydra.Json.Schema.Model: _ObjectRestriction :: Name
+ Hydra.Json.Schema.Model: _ObjectRestriction_additionalProperties :: Name
+ Hydra.Json.Schema.Model: _ObjectRestriction_dependencies :: Name
+ Hydra.Json.Schema.Model: _ObjectRestriction_maxProperties :: Name
+ Hydra.Json.Schema.Model: _ObjectRestriction_minProperties :: Name
+ Hydra.Json.Schema.Model: _ObjectRestriction_patternProperties :: Name
+ Hydra.Json.Schema.Model: _ObjectRestriction_properties :: Name
+ Hydra.Json.Schema.Model: _ObjectRestriction_required :: Name
+ Hydra.Json.Schema.Model: _RegularExpression :: Name
+ Hydra.Json.Schema.Model: _Restriction :: Name
+ Hydra.Json.Schema.Model: _Restriction_array :: Name
+ Hydra.Json.Schema.Model: _Restriction_description :: Name
+ Hydra.Json.Schema.Model: _Restriction_multiple :: Name
+ Hydra.Json.Schema.Model: _Restriction_number :: Name
+ Hydra.Json.Schema.Model: _Restriction_object :: Name
+ Hydra.Json.Schema.Model: _Restriction_reference :: Name
+ Hydra.Json.Schema.Model: _Restriction_string :: Name
+ Hydra.Json.Schema.Model: _Restriction_title :: Name
+ Hydra.Json.Schema.Model: _Restriction_type :: Name
+ Hydra.Json.Schema.Model: _Schema :: Name
+ Hydra.Json.Schema.Model: _SchemaOrArray :: Name
+ Hydra.Json.Schema.Model: _SchemaOrArray_array :: Name
+ Hydra.Json.Schema.Model: _SchemaOrArray_schema :: Name
+ Hydra.Json.Schema.Model: _SchemaReference :: Name
+ Hydra.Json.Schema.Model: _StringRestriction :: Name
+ Hydra.Json.Schema.Model: _StringRestriction_maxLength :: Name
+ Hydra.Json.Schema.Model: _StringRestriction_minLength :: Name
+ Hydra.Json.Schema.Model: _StringRestriction_pattern :: Name
+ Hydra.Json.Schema.Model: _Type :: Name
+ Hydra.Json.Schema.Model: _TypeName :: Name
+ Hydra.Json.Schema.Model: _TypeName_array :: Name
+ Hydra.Json.Schema.Model: _TypeName_boolean :: Name
+ Hydra.Json.Schema.Model: _TypeName_integer :: Name
+ Hydra.Json.Schema.Model: _TypeName_null :: Name
+ Hydra.Json.Schema.Model: _TypeName_number :: Name
+ Hydra.Json.Schema.Model: _TypeName_object :: Name
+ Hydra.Json.Schema.Model: _TypeName_string :: Name
+ Hydra.Json.Schema.Model: _Type_multiple :: Name
+ Hydra.Json.Schema.Model: _Type_single :: Name
+ Hydra.Json.Schema.Model: data AdditionalItems
+ Hydra.Json.Schema.Model: data ArrayRestriction
+ Hydra.Json.Schema.Model: data Document
+ Hydra.Json.Schema.Model: data Items
+ Hydra.Json.Schema.Model: data Limit
+ Hydra.Json.Schema.Model: data MultipleRestriction
+ Hydra.Json.Schema.Model: data NumericRestriction
+ Hydra.Json.Schema.Model: data ObjectRestriction
+ Hydra.Json.Schema.Model: data Restriction
+ Hydra.Json.Schema.Model: data SchemaOrArray
+ Hydra.Json.Schema.Model: data StringRestriction
+ Hydra.Json.Schema.Model: data Type
+ Hydra.Json.Schema.Model: data TypeName
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.AdditionalItems
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.ArrayRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.Document
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.Items
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.Keyword
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.Limit
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.MultipleRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.NumericRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.ObjectRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.RegularExpression
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.Restriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.Schema
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.SchemaOrArray
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.SchemaReference
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.StringRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.Type
+ Hydra.Json.Schema.Model: instance GHC.Classes.Eq Hydra.Json.Schema.Model.TypeName
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.AdditionalItems
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.ArrayRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.Document
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.Items
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.Keyword
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.Limit
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.MultipleRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.NumericRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.ObjectRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.RegularExpression
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.Restriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.Schema
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.SchemaOrArray
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.SchemaReference
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.StringRestriction
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.Type
+ Hydra.Json.Schema.Model: instance GHC.Classes.Ord Hydra.Json.Schema.Model.TypeName
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.AdditionalItems
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.ArrayRestriction
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.Document
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.Items
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.Keyword
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.Limit
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.MultipleRestriction
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.NumericRestriction
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.ObjectRestriction
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.RegularExpression
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.Restriction
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.Schema
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.SchemaOrArray
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.SchemaReference
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.StringRestriction
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.Type
+ Hydra.Json.Schema.Model: instance GHC.Read.Read Hydra.Json.Schema.Model.TypeName
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.AdditionalItems
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.ArrayRestriction
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.Document
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.Items
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.Keyword
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.Limit
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.MultipleRestriction
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.NumericRestriction
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.ObjectRestriction
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.RegularExpression
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.Restriction
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.Schema
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.SchemaOrArray
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.SchemaReference
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.StringRestriction
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.Type
+ Hydra.Json.Schema.Model: instance GHC.Show.Show Hydra.Json.Schema.Model.TypeName
+ Hydra.Json.Schema.Model: newtype Keyword
+ Hydra.Json.Schema.Model: newtype RegularExpression
+ Hydra.Json.Schema.Model: newtype Schema
+ Hydra.Json.Schema.Model: newtype SchemaReference
+ Hydra.Json.Schema.Serde: keyAdditionalItems :: String
+ Hydra.Json.Schema.Serde: keyAdditionalProperties :: String
+ Hydra.Json.Schema.Serde: keyAllOf :: String
+ Hydra.Json.Schema.Serde: keyAnyOf :: String
+ Hydra.Json.Schema.Serde: keyDefinitions :: String
+ Hydra.Json.Schema.Serde: keyDependencies :: String
+ Hydra.Json.Schema.Serde: keyDescription :: String
+ Hydra.Json.Schema.Serde: keyEnum :: String
+ Hydra.Json.Schema.Serde: keyExclusiveMaximum :: String
+ Hydra.Json.Schema.Serde: keyExclusiveMinimum :: String
+ Hydra.Json.Schema.Serde: keyId :: String
+ Hydra.Json.Schema.Serde: keyItems :: String
+ Hydra.Json.Schema.Serde: keyLabel :: String
+ Hydra.Json.Schema.Serde: keyMaxItems :: String
+ Hydra.Json.Schema.Serde: keyMaxLength :: String
+ Hydra.Json.Schema.Serde: keyMaxProperties :: String
+ Hydra.Json.Schema.Serde: keyMaximum :: String
+ Hydra.Json.Schema.Serde: keyMinItems :: String
+ Hydra.Json.Schema.Serde: keyMinLength :: String
+ Hydra.Json.Schema.Serde: keyMinProperties :: String
+ Hydra.Json.Schema.Serde: keyMinimum :: String
+ Hydra.Json.Schema.Serde: keyMultipleOf :: String
+ Hydra.Json.Schema.Serde: keyNot :: String
+ Hydra.Json.Schema.Serde: keyOneOf :: String
+ Hydra.Json.Schema.Serde: keyPattern :: String
+ Hydra.Json.Schema.Serde: keyPatternProperties :: String
+ Hydra.Json.Schema.Serde: keyProperties :: String
+ Hydra.Json.Schema.Serde: keyRef :: String
+ Hydra.Json.Schema.Serde: keyRequired :: String
+ Hydra.Json.Schema.Serde: keySchema :: String
+ Hydra.Json.Schema.Serde: keyTitle :: String
+ Hydra.Json.Schema.Serde: keyType :: String
+ Hydra.Json.Schema.Serde: keyUniqueItems :: String
+ Hydra.Parquet.Format: type EncryptionWithFooterKey = ()
+ Hydra.Parquet.Format: type IndexPageHeader = ()
+ Hydra.Protobuf.Coder: collectStructuralTypesFromType :: Type -> Set StructuralTypeRef
+ Hydra.Protobuf.Coder: keyProtoFieldIndex :: Name
+ Hydra.Sql.Syntax: BooleanTermConjunction :: BooleanTermAnd -> BooleanTerm
+ Hydra.Sql.Syntax: BooleanTestSequenceOption :: Maybe () -> TruthValue -> BooleanTestSequenceOption
+ Hydra.Sql.Syntax: BooleanValueExpressionDisjunction :: BooleanValueExpressionOr -> BooleanValueExpression
+ Hydra.Sql.Syntax: ColumnDefinitionDefaultOrIdentityOrGenerationOptionDefaultClause :: DefaultClause -> ColumnDefinitionDefaultOrIdentityOrGenerationOption
+ Hydra.Sql.Syntax: ColumnDefinitionDefaultOrIdentityOrGenerationOptionGenerationClause :: GenerationClause -> ColumnDefinitionDefaultOrIdentityOrGenerationOption
+ Hydra.Sql.Syntax: ColumnDefinitionDefaultOrIdentityOrGenerationOptionIdentityColumnSpecification :: IdentityColumnSpecification -> ColumnDefinitionDefaultOrIdentityOrGenerationOption
+ Hydra.Sql.Syntax: ColumnDefinitionTypeOrDomainOptionDataType :: DataType -> ColumnDefinitionTypeOrDomainOption
+ Hydra.Sql.Syntax: ColumnDefinitionTypeOrDomainOptionDomainName :: DomainName -> ColumnDefinitionTypeOrDomainOption
+ Hydra.Sql.Syntax: ExactNumericTypeDecOption :: Precision -> Maybe Scale -> ExactNumericTypeDecOption
+ Hydra.Sql.Syntax: ExactNumericTypeDecimalOption :: Precision -> Maybe Scale -> ExactNumericTypeDecimalOption
+ Hydra.Sql.Syntax: ExactNumericTypeNumericOption :: Precision -> Maybe Scale -> ExactNumericTypeNumericOption
+ Hydra.Sql.Syntax: PredefinedTypeNationalStringType :: PredefinedTypeNationalString -> PredefinedType
+ Hydra.Sql.Syntax: PredefinedTypeStringType :: PredefinedTypeString -> PredefinedType
+ Hydra.Sql.Syntax: TableContentsSourceSubtableOf :: TableContentsSourceSubtable -> TableContentsSource
+ Hydra.Sql.Syntax: [booleanTermAndLhs] :: BooleanTermAnd -> BooleanTerm
+ Hydra.Sql.Syntax: [booleanTermAndRhs] :: BooleanTermAnd -> BooleanFactor
+ Hydra.Sql.Syntax: [booleanTestSequenceOptionNOT] :: BooleanTestSequenceOption -> Maybe ()
+ Hydra.Sql.Syntax: [booleanTestSequenceOptionTruthValue] :: BooleanTestSequenceOption -> TruthValue
+ Hydra.Sql.Syntax: [booleanValueExpressionOrLhs] :: BooleanValueExpressionOr -> BooleanValueExpression
+ Hydra.Sql.Syntax: [booleanValueExpressionOrRhs] :: BooleanValueExpressionOr -> BooleanTerm
+ Hydra.Sql.Syntax: [exactNumericTypeDecOptionPrecision] :: ExactNumericTypeDecOption -> Precision
+ Hydra.Sql.Syntax: [exactNumericTypeDecOptionSequence] :: ExactNumericTypeDecOption -> Maybe Scale
+ Hydra.Sql.Syntax: [exactNumericTypeDecimalOptionPrecision] :: ExactNumericTypeDecimalOption -> Precision
+ Hydra.Sql.Syntax: [exactNumericTypeDecimalOptionSequence] :: ExactNumericTypeDecimalOption -> Maybe Scale
+ Hydra.Sql.Syntax: [exactNumericTypeNumericOptionPrecision] :: ExactNumericTypeNumericOption -> Precision
+ Hydra.Sql.Syntax: [exactNumericTypeNumericOptionSequence] :: ExactNumericTypeNumericOption -> Maybe Scale
+ Hydra.Sql.Syntax: [predefinedTypeNationalStringCollate] :: PredefinedTypeNationalString -> Maybe CollateClause
+ Hydra.Sql.Syntax: [predefinedTypeNationalStringType] :: PredefinedTypeNationalString -> NationalCharacterStringType
+ Hydra.Sql.Syntax: [predefinedTypeStringCharacters] :: PredefinedTypeString -> Maybe CharacterSetSpecification
+ Hydra.Sql.Syntax: [predefinedTypeStringCollate] :: PredefinedTypeString -> Maybe CollateClause
+ Hydra.Sql.Syntax: [predefinedTypeStringType] :: PredefinedTypeString -> CharacterStringType
+ Hydra.Sql.Syntax: [tableContentsSourceSubtableElements] :: TableContentsSourceSubtable -> Maybe TableElementList
+ Hydra.Sql.Syntax: [tableContentsSourceSubtableSubtable] :: TableContentsSourceSubtable -> Maybe SubtableClause
+ Hydra.Sql.Syntax: [tableContentsSourceSubtableType] :: TableContentsSourceSubtable -> PathResolvedUserDefinedTypeName
+ Hydra.Sql.Syntax: _BooleanTermAnd :: Name
+ Hydra.Sql.Syntax: _BooleanTermAnd_lhs :: Name
+ Hydra.Sql.Syntax: _BooleanTermAnd_rhs :: Name
+ Hydra.Sql.Syntax: _BooleanTerm_conjunction :: Name
+ Hydra.Sql.Syntax: _BooleanTestSequenceOption :: Name
+ Hydra.Sql.Syntax: _BooleanTestSequenceOption_NOT :: Name
+ Hydra.Sql.Syntax: _BooleanTestSequenceOption_TruthValue :: Name
+ Hydra.Sql.Syntax: _BooleanValueExpressionOr :: Name
+ Hydra.Sql.Syntax: _BooleanValueExpressionOr_lhs :: Name
+ Hydra.Sql.Syntax: _BooleanValueExpressionOr_rhs :: Name
+ Hydra.Sql.Syntax: _BooleanValueExpression_disjunction :: Name
+ Hydra.Sql.Syntax: _ColumnDefinitionDefaultOrIdentityOrGenerationOption :: Name
+ Hydra.Sql.Syntax: _ColumnDefinitionDefaultOrIdentityOrGenerationOption_DefaultClause :: Name
+ Hydra.Sql.Syntax: _ColumnDefinitionDefaultOrIdentityOrGenerationOption_GenerationClause :: Name
+ Hydra.Sql.Syntax: _ColumnDefinitionDefaultOrIdentityOrGenerationOption_IdentityColumnSpecification :: Name
+ Hydra.Sql.Syntax: _ColumnDefinitionTypeOrDomainOption :: Name
+ Hydra.Sql.Syntax: _ColumnDefinitionTypeOrDomainOption_DataType :: Name
+ Hydra.Sql.Syntax: _ColumnDefinitionTypeOrDomainOption_DomainName :: Name
+ Hydra.Sql.Syntax: _ExactNumericTypeDecOption :: Name
+ Hydra.Sql.Syntax: _ExactNumericTypeDecOption_Precision :: Name
+ Hydra.Sql.Syntax: _ExactNumericTypeDecOption_Sequence :: Name
+ Hydra.Sql.Syntax: _ExactNumericTypeDecimalOption :: Name
+ Hydra.Sql.Syntax: _ExactNumericTypeDecimalOption_Precision :: Name
+ Hydra.Sql.Syntax: _ExactNumericTypeDecimalOption_Sequence :: Name
+ Hydra.Sql.Syntax: _ExactNumericTypeNumericOption :: Name
+ Hydra.Sql.Syntax: _ExactNumericTypeNumericOption_Precision :: Name
+ Hydra.Sql.Syntax: _ExactNumericTypeNumericOption_Sequence :: Name
+ Hydra.Sql.Syntax: _PredefinedTypeNationalString :: Name
+ Hydra.Sql.Syntax: _PredefinedTypeNationalString_collate :: Name
+ Hydra.Sql.Syntax: _PredefinedTypeNationalString_type :: Name
+ Hydra.Sql.Syntax: _PredefinedTypeString :: Name
+ Hydra.Sql.Syntax: _PredefinedTypeString_characters :: Name
+ Hydra.Sql.Syntax: _PredefinedTypeString_collate :: Name
+ Hydra.Sql.Syntax: _PredefinedTypeString_type :: Name
+ Hydra.Sql.Syntax: _PredefinedType_nationalStringType :: Name
+ Hydra.Sql.Syntax: _PredefinedType_stringType :: Name
+ Hydra.Sql.Syntax: _TableContentsSourceSubtable :: Name
+ Hydra.Sql.Syntax: _TableContentsSourceSubtable_elements :: Name
+ Hydra.Sql.Syntax: _TableContentsSourceSubtable_subtable :: Name
+ Hydra.Sql.Syntax: _TableContentsSourceSubtable_type :: Name
+ Hydra.Sql.Syntax: _TableContentsSource_subtableOf :: Name
+ Hydra.Sql.Syntax: data BooleanTermAnd
+ Hydra.Sql.Syntax: data BooleanTestSequenceOption
+ Hydra.Sql.Syntax: data BooleanValueExpressionOr
+ Hydra.Sql.Syntax: data ColumnDefinitionDefaultOrIdentityOrGenerationOption
+ Hydra.Sql.Syntax: data ColumnDefinitionTypeOrDomainOption
+ Hydra.Sql.Syntax: data ExactNumericTypeDecOption
+ Hydra.Sql.Syntax: data ExactNumericTypeDecimalOption
+ Hydra.Sql.Syntax: data ExactNumericTypeNumericOption
+ Hydra.Sql.Syntax: data PredefinedTypeNationalString
+ Hydra.Sql.Syntax: data PredefinedTypeString
+ Hydra.Sql.Syntax: data TableContentsSourceSubtable
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.BooleanTermAnd
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.BooleanTestSequenceOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.BooleanValueExpressionOr
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ColumnDefinitionDefaultOrIdentityOrGenerationOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ColumnDefinitionTypeOrDomainOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ExactNumericTypeDecOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ExactNumericTypeDecimalOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.ExactNumericTypeNumericOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.PredefinedTypeNationalString
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.PredefinedTypeString
+ Hydra.Sql.Syntax: instance GHC.Classes.Eq Hydra.Sql.Syntax.TableContentsSourceSubtable
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.BooleanTermAnd
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.BooleanTestSequenceOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.BooleanValueExpressionOr
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ColumnDefinitionDefaultOrIdentityOrGenerationOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ColumnDefinitionTypeOrDomainOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ExactNumericTypeDecOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ExactNumericTypeDecimalOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.ExactNumericTypeNumericOption
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.PredefinedTypeNationalString
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.PredefinedTypeString
+ Hydra.Sql.Syntax: instance GHC.Classes.Ord Hydra.Sql.Syntax.TableContentsSourceSubtable
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.BooleanTermAnd
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.BooleanTestSequenceOption
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.BooleanValueExpressionOr
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ColumnDefinitionDefaultOrIdentityOrGenerationOption
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ColumnDefinitionTypeOrDomainOption
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ExactNumericTypeDecOption
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ExactNumericTypeDecimalOption
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.ExactNumericTypeNumericOption
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.PredefinedTypeNationalString
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.PredefinedTypeString
+ Hydra.Sql.Syntax: instance GHC.Read.Read Hydra.Sql.Syntax.TableContentsSourceSubtable
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.BooleanTermAnd
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.BooleanTestSequenceOption
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.BooleanValueExpressionOr
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ColumnDefinitionDefaultOrIdentityOrGenerationOption
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ColumnDefinitionTypeOrDomainOption
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ExactNumericTypeDecOption
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ExactNumericTypeDecimalOption
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.ExactNumericTypeNumericOption
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.PredefinedTypeNationalString
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.PredefinedTypeString
+ Hydra.Sql.Syntax: instance GHC.Show.Show Hydra.Sql.Syntax.TableContentsSourceSubtable
- Hydra.Atlas: AtlasAttributeDef :: Maybe String -> Maybe String -> Bool -> Maybe AtlasAttributeDef_Cardinality -> Int -> Int -> Bool -> Bool -> Bool -> Maybe String -> Maybe String -> Int -> Maybe AtlasAttributeDef_IndexType -> [AtlasConstraintDef] -> Map String String -> Maybe String -> AtlasAttributeDef
+ Hydra.Atlas: AtlasAttributeDef :: Maybe String -> Maybe String -> Bool -> Maybe AtlasAttributeDefCardinality -> Int -> Int -> Bool -> Bool -> Bool -> Maybe String -> Maybe String -> Int -> Maybe AtlasAttributeDefIndexType -> [AtlasConstraintDef] -> Map String String -> Maybe String -> AtlasAttributeDef
- Hydra.Atlas: [atlasAttributeDefCardinality] :: AtlasAttributeDef -> Maybe AtlasAttributeDef_Cardinality
+ Hydra.Atlas: [atlasAttributeDefCardinality] :: AtlasAttributeDef -> Maybe AtlasAttributeDefCardinality
- Hydra.Atlas: [atlasAttributeDefIndexType] :: AtlasAttributeDef -> Maybe AtlasAttributeDef_IndexType
+ Hydra.Atlas: [atlasAttributeDefIndexType] :: AtlasAttributeDef -> Maybe AtlasAttributeDefIndexType
- Hydra.Avro.Coder: annotateAdapter :: Maybe (Map Name Term) -> Adapter t0 Type t1 t2 Error -> Adapter t0 Type t1 t2 Error
+ Hydra.Avro.Coder: annotateAdapter :: Maybe (Map Name Term) -> Adapter t0 Type t1 t2 t3 -> Adapter t0 Type t1 t2 t3
- Hydra.Azure.Dtld: Interface :: Dtmi -> Iri -> Iri -> Maybe String -> Maybe (Set Interface_Contents) -> Maybe String -> Maybe String -> Maybe (Set Interface) -> Maybe (Set Schema_Interface) -> Interface
+ Hydra.Azure.Dtld: Interface :: Dtmi -> Iri -> Iri -> Maybe String -> Maybe (Set InterfaceContents) -> Maybe String -> Maybe String -> Maybe (Set Interface) -> Maybe (Set SchemaInterface) -> Interface
- Hydra.Azure.Dtld: [interfaceContents] :: Interface -> Maybe (Set Interface_Contents)
+ Hydra.Azure.Dtld: [interfaceContents] :: Interface -> Maybe (Set InterfaceContents)
- Hydra.Azure.Dtld: [interfaceSchemas] :: Interface -> Maybe (Set Schema_Interface)
+ Hydra.Azure.Dtld: [interfaceSchemas] :: Interface -> Maybe (Set SchemaInterface)
- Hydra.Datalog.Syntax: AtomListMultiple :: AtomList_Multiple -> AtomList
+ Hydra.Datalog.Syntax: AtomListMultiple :: Atom -> AtomList -> AtomListMultiple
- Hydra.Datalog.Syntax: ConstantListMultiple :: ConstantList_Multiple -> ConstantList
+ Hydra.Datalog.Syntax: ConstantListMultiple :: Constant -> ConstantList -> ConstantListMultiple
- Hydra.Datalog.Syntax: Program :: [Program_Elmt] -> Program
+ Hydra.Datalog.Syntax: Program :: [ProgramElmt] -> Program
- Hydra.Datalog.Syntax: TermListMultiple :: TermList_Multiple -> TermList
+ Hydra.Datalog.Syntax: TermListMultiple :: Term -> TermList -> TermListMultiple
- Hydra.Datalog.Syntax: [unProgram] :: Program -> [Program_Elmt]
+ Hydra.Datalog.Syntax: [unProgram] :: Program -> [ProgramElmt]
- Hydra.Graphql.Syntax: DirectiveLocationsSequence :: DirectiveLocations_Sequence -> DirectiveLocations
+ Hydra.Graphql.Syntax: DirectiveLocationsSequence :: DirectiveLocations -> DirectiveLocation -> DirectiveLocationsSequence
- Hydra.Graphql.Syntax: DirectiveLocationsSequence2 :: DirectiveLocations_Sequence2 -> DirectiveLocations
+ Hydra.Graphql.Syntax: DirectiveLocationsSequence2 :: Maybe () -> DirectiveLocation -> DirectiveLocationsSequence2
- Hydra.Graphql.Syntax: EnumTypeExtensionSequence :: EnumTypeExtension_Sequence -> EnumTypeExtension
+ Hydra.Graphql.Syntax: EnumTypeExtensionSequence :: Name -> Maybe Directives -> EnumValuesDefinition -> EnumTypeExtensionSequence
- Hydra.Graphql.Syntax: EnumTypeExtensionSequence2 :: EnumTypeExtension_Sequence2 -> EnumTypeExtension
+ Hydra.Graphql.Syntax: EnumTypeExtensionSequence2 :: Name -> Directives -> EnumTypeExtensionSequence2
- Hydra.Graphql.Syntax: ImplementsInterfacesSequence :: ImplementsInterfaces_Sequence -> ImplementsInterfaces
+ Hydra.Graphql.Syntax: ImplementsInterfacesSequence :: ImplementsInterfaces -> NamedType -> ImplementsInterfacesSequence
- Hydra.Graphql.Syntax: ImplementsInterfacesSequence2 :: ImplementsInterfaces_Sequence2 -> ImplementsInterfaces
+ Hydra.Graphql.Syntax: ImplementsInterfacesSequence2 :: Maybe () -> NamedType -> ImplementsInterfacesSequence2
- Hydra.Graphql.Syntax: InputObjectTypeDefinitionSequence :: InputObjectTypeDefinition_Sequence -> InputObjectTypeDefinition
+ Hydra.Graphql.Syntax: InputObjectTypeDefinitionSequence :: Maybe Description -> Name -> Maybe Directives -> InputFieldsDefinition -> InputObjectTypeDefinitionSequence
- Hydra.Graphql.Syntax: InputObjectTypeDefinitionSequence2 :: InputObjectTypeDefinition_Sequence2 -> InputObjectTypeDefinition
+ Hydra.Graphql.Syntax: InputObjectTypeDefinitionSequence2 :: Maybe Description -> Name -> Maybe Directives -> InputObjectTypeDefinitionSequence2
- Hydra.Graphql.Syntax: InputObjectTypeExtensionSequence :: InputObjectTypeExtension_Sequence -> InputObjectTypeExtension
+ Hydra.Graphql.Syntax: InputObjectTypeExtensionSequence :: Name -> Maybe Directives -> InputFieldsDefinition -> InputObjectTypeExtensionSequence
- Hydra.Graphql.Syntax: InputObjectTypeExtensionSequence2 :: InputObjectTypeExtension_Sequence2 -> InputObjectTypeExtension
+ Hydra.Graphql.Syntax: InputObjectTypeExtensionSequence2 :: Name -> Directives -> InputObjectTypeExtensionSequence2
- Hydra.Graphql.Syntax: InterfaceTypeDefinitionSequence :: InterfaceTypeDefinition_Sequence -> InterfaceTypeDefinition
+ Hydra.Graphql.Syntax: InterfaceTypeDefinitionSequence :: Maybe Description -> Name -> Maybe ImplementsInterfaces -> Maybe Directives -> FieldsDefinition -> InterfaceTypeDefinitionSequence
- Hydra.Graphql.Syntax: InterfaceTypeDefinitionSequence2 :: InterfaceTypeDefinition_Sequence2 -> InterfaceTypeDefinition
+ Hydra.Graphql.Syntax: InterfaceTypeDefinitionSequence2 :: Maybe Description -> Name -> ImplementsInterfaces -> Maybe Directives -> InterfaceTypeDefinitionSequence2
- Hydra.Graphql.Syntax: InterfaceTypeExtensionSequence :: InterfaceTypeExtension_Sequence -> InterfaceTypeExtension
+ Hydra.Graphql.Syntax: InterfaceTypeExtensionSequence :: Name -> Maybe ImplementsInterfaces -> Maybe Directives -> FieldsDefinition -> InterfaceTypeExtensionSequence
- Hydra.Graphql.Syntax: InterfaceTypeExtensionSequence2 :: InterfaceTypeExtension_Sequence2 -> InterfaceTypeExtension
+ Hydra.Graphql.Syntax: InterfaceTypeExtensionSequence2 :: Name -> Maybe ImplementsInterfaces -> Directives -> InterfaceTypeExtensionSequence2
- Hydra.Graphql.Syntax: InterfaceTypeExtensionSequence3 :: InterfaceTypeExtension_Sequence3 -> InterfaceTypeExtension
+ Hydra.Graphql.Syntax: InterfaceTypeExtensionSequence3 :: Name -> ImplementsInterfaces -> InterfaceTypeExtensionSequence3
- Hydra.Graphql.Syntax: ObjectTypeExtensionSequence :: ObjectTypeExtension_Sequence -> ObjectTypeExtension
+ Hydra.Graphql.Syntax: ObjectTypeExtensionSequence :: Name -> Maybe ImplementsInterfaces -> Maybe Directives -> FieldsDefinition -> ObjectTypeExtensionSequence
- Hydra.Graphql.Syntax: ObjectTypeExtensionSequence2 :: ObjectTypeExtension_Sequence2 -> ObjectTypeExtension
+ Hydra.Graphql.Syntax: ObjectTypeExtensionSequence2 :: Name -> Maybe ImplementsInterfaces -> Maybe Directives -> ObjectTypeExtensionSequence2
- Hydra.Graphql.Syntax: ObjectTypeExtensionSequence3 :: ObjectTypeExtension_Sequence3 -> ObjectTypeExtension
+ Hydra.Graphql.Syntax: ObjectTypeExtensionSequence3 :: Name -> ImplementsInterfaces -> ObjectTypeExtensionSequence3
- Hydra.Graphql.Syntax: OperationDefinitionSequence :: OperationDefinition_Sequence -> OperationDefinition
+ Hydra.Graphql.Syntax: OperationDefinitionSequence :: OperationType -> Maybe Name -> Maybe VariablesDefinition -> Maybe Directives -> SelectionSet -> OperationDefinitionSequence
- Hydra.Graphql.Syntax: SchemaExtensionSequence :: SchemaExtension_Sequence -> SchemaExtension
+ Hydra.Graphql.Syntax: SchemaExtensionSequence :: Maybe Directives -> RootOperationTypeDefinition -> SchemaExtensionSequence
- Hydra.Graphql.Syntax: UnionMemberTypesSequence :: UnionMemberTypes_Sequence -> UnionMemberTypes
+ Hydra.Graphql.Syntax: UnionMemberTypesSequence :: UnionMemberTypes -> NamedType -> UnionMemberTypesSequence
- Hydra.Graphql.Syntax: UnionMemberTypesSequence2 :: UnionMemberTypes_Sequence2 -> UnionMemberTypes
+ Hydra.Graphql.Syntax: UnionMemberTypesSequence2 :: Maybe () -> NamedType -> UnionMemberTypesSequence2
- Hydra.Graphql.Syntax: UnionTypeExtensionSequence :: UnionTypeExtension_Sequence -> UnionTypeExtension
+ Hydra.Graphql.Syntax: UnionTypeExtensionSequence :: Name -> Maybe Directives -> UnionMemberTypes -> UnionTypeExtensionSequence
- Hydra.Graphql.Syntax: UnionTypeExtensionSequence2 :: UnionTypeExtension_Sequence2 -> UnionTypeExtension
+ Hydra.Graphql.Syntax: UnionTypeExtensionSequence2 :: Name -> Directives -> UnionTypeExtensionSequence2
- Hydra.Sql.Syntax: BooleanTermAnd :: BooleanTerm_And -> BooleanTerm
+ Hydra.Sql.Syntax: BooleanTermAnd :: BooleanTerm -> BooleanFactor -> BooleanTermAnd
- Hydra.Sql.Syntax: BooleanTest :: BooleanPrimary -> Maybe BooleanTest_Sequence_Option -> BooleanTest
+ Hydra.Sql.Syntax: BooleanTest :: BooleanPrimary -> Maybe BooleanTestSequenceOption -> BooleanTest
- Hydra.Sql.Syntax: BooleanValueExpressionOr :: BooleanValueExpression_Or -> BooleanValueExpression
+ Hydra.Sql.Syntax: BooleanValueExpressionOr :: BooleanValueExpression -> BooleanTerm -> BooleanValueExpressionOr
- Hydra.Sql.Syntax: ColumnDefinition :: ColumnName -> Maybe ColumnDefinition_TypeOrDomain_Option -> Maybe ReferenceScopeCheck -> Maybe ColumnDefinition_DefaultOrIdentityOrGeneration_Option -> [ColumnConstraintDefinition] -> Maybe CollateClause -> ColumnDefinition
+ Hydra.Sql.Syntax: ColumnDefinition :: ColumnName -> Maybe ColumnDefinitionTypeOrDomainOption -> Maybe ReferenceScopeCheck -> Maybe ColumnDefinitionDefaultOrIdentityOrGenerationOption -> [ColumnConstraintDefinition] -> Maybe CollateClause -> ColumnDefinition
- Hydra.Sql.Syntax: ExactNumericTypeDec :: Maybe ExactNumericType_Dec_Option -> ExactNumericType
+ Hydra.Sql.Syntax: ExactNumericTypeDec :: Maybe ExactNumericTypeDecOption -> ExactNumericType
- Hydra.Sql.Syntax: ExactNumericTypeDecimal :: Maybe ExactNumericType_Decimal_Option -> ExactNumericType
+ Hydra.Sql.Syntax: ExactNumericTypeDecimal :: Maybe ExactNumericTypeDecimalOption -> ExactNumericType
- Hydra.Sql.Syntax: ExactNumericTypeNumeric :: Maybe ExactNumericType_Numeric_Option -> ExactNumericType
+ Hydra.Sql.Syntax: ExactNumericTypeNumeric :: Maybe ExactNumericTypeNumericOption -> ExactNumericType
- Hydra.Sql.Syntax: PredefinedTypeNationalString :: PredefinedType_NationalString -> PredefinedType
+ Hydra.Sql.Syntax: PredefinedTypeNationalString :: NationalCharacterStringType -> Maybe CollateClause -> PredefinedTypeNationalString
- Hydra.Sql.Syntax: PredefinedTypeString :: PredefinedType_String -> PredefinedType
+ Hydra.Sql.Syntax: PredefinedTypeString :: CharacterStringType -> Maybe CharacterSetSpecification -> Maybe CollateClause -> PredefinedTypeString
- Hydra.Sql.Syntax: TableContentsSourceSubtable :: TableContentsSource_Subtable -> TableContentsSource
+ Hydra.Sql.Syntax: TableContentsSourceSubtable :: PathResolvedUserDefinedTypeName -> Maybe SubtableClause -> Maybe TableElementList -> TableContentsSourceSubtable
- Hydra.Sql.Syntax: [booleanTestSequence] :: BooleanTest -> Maybe BooleanTest_Sequence_Option
+ Hydra.Sql.Syntax: [booleanTestSequence] :: BooleanTest -> Maybe BooleanTestSequenceOption
- Hydra.Sql.Syntax: [columnDefinitionDefaultOrIdentityOrGeneration] :: ColumnDefinition -> Maybe ColumnDefinition_DefaultOrIdentityOrGeneration_Option
+ Hydra.Sql.Syntax: [columnDefinitionDefaultOrIdentityOrGeneration] :: ColumnDefinition -> Maybe ColumnDefinitionDefaultOrIdentityOrGenerationOption
- Hydra.Sql.Syntax: [columnDefinitionTypeOrDomain] :: ColumnDefinition -> Maybe ColumnDefinition_TypeOrDomain_Option
+ Hydra.Sql.Syntax: [columnDefinitionTypeOrDomain] :: ColumnDefinition -> Maybe ColumnDefinitionTypeOrDomainOption
Files
- CHANGELOG.md +234/−0
- hydra-ext.cabal +4/−4
- src/main/haskell/Hydra/Atlas.hs +94/−16
- src/main/haskell/Hydra/Avro/Coder.hs +82/−36
- src/main/haskell/Hydra/Avro/Encoder.hs +82/−48
- src/main/haskell/Hydra/Avro/Environment.hs +47/−24
- src/main/haskell/Hydra/Avro/Language.hs +27/−1
- src/main/haskell/Hydra/Avro/Schema.hs +77/−0
- src/main/haskell/Hydra/Avro/SchemaJson.hs +194/−84
- src/main/haskell/Hydra/Avro/Testing.hs +224/−140
- src/main/haskell/Hydra/Azure/Dtld.hs +338/−135
- src/main/haskell/Hydra/Cpp/Coder.hs +149/−13
- src/main/haskell/Hydra/Cpp/Environment.hs +6/−0
- src/main/haskell/Hydra/Cpp/Language.hs +28/−1
- src/main/haskell/Hydra/Cpp/Names.hs +34/−7
- src/main/haskell/Hydra/Cpp/Serde.hs +151/−21
- src/main/haskell/Hydra/Cpp/Syntax.hs +2031/−1252
- src/main/haskell/Hydra/Cpp/Utils.hs +48/−0
- src/main/haskell/Hydra/Csharp/Language.hs +28/−1
- src/main/haskell/Hydra/Csharp/Syntax.hs +5295/−3275
- src/main/haskell/Hydra/Datalog/Syntax.hs +135/−66
- src/main/haskell/Hydra/Delta/Parquet.hs +44/−0
- src/main/haskell/Hydra/Geojson/Model.hs +80/−9
- src/main/haskell/Hydra/Graphql/Coder.hs +47/−12
- src/main/haskell/Hydra/Graphql/Language.hs +28/−1
- src/main/haskell/Hydra/Graphql/Serde.hs +27/−1
- src/main/haskell/Hydra/Graphql/Syntax.hs +1395/−864
- src/main/haskell/Hydra/Iana/Linkrelations.hs +125/−0
- src/main/haskell/Hydra/Json/Schema.hs +0/−174
- src/main/haskell/Hydra/Json/Schema/Coder.hs +100/−73
- src/main/haskell/Hydra/Json/Schema/Language.hs +27/−1
- src/main/haskell/Hydra/Json/Schema/Model.hs +279/−0
- src/main/haskell/Hydra/Json/Schema/Serde.hs +261/−164
- src/main/haskell/Hydra/Kusto/Kql.hs +288/−16
- src/main/haskell/Hydra/Osv/Schema.hs +86/−0
- src/main/haskell/Hydra/Parquet/Format.hs +988/−725
- src/main/haskell/Hydra/Pegasus/Coder.hs +48/−12
- src/main/haskell/Hydra/Pegasus/Language.hs +27/−1
- src/main/haskell/Hydra/Pegasus/Pdl.hs +111/−10
- src/main/haskell/Hydra/Pegasus/Serde.hs +28/−8
- src/main/haskell/Hydra/Protobuf/Any.hs +6/−0
- src/main/haskell/Hydra/Protobuf/Coder.hs +76/−29
- src/main/haskell/Hydra/Protobuf/Environment.hs +10/−0
- src/main/haskell/Hydra/Protobuf/Language.hs +28/−1
- src/main/haskell/Hydra/Protobuf/Proto3.hs +91/−0
- src/main/haskell/Hydra/Protobuf/Serde.hs +40/−10
- src/main/haskell/Hydra/Protobuf/SourceContext.hs +5/−0
- src/main/haskell/Hydra/Rust/Coder.hs +57/−3
- src/main/haskell/Hydra/Rust/Language.hs +28/−1
- src/main/haskell/Hydra/Rust/Operators.hs +53/−0
- src/main/haskell/Hydra/Rust/Serde.hs +186/−92
- src/main/haskell/Hydra/Rust/Syntax.hs +2142/−1568
- src/main/haskell/Hydra/Sql/Syntax.hs +1574/−974
- src/main/haskell/Hydra/Stac/Items.hs +55/−0
- src/main/haskell/Hydra/Workflow.hs +17/−0
- src/main/haskell/Hydra/Yaml/Coder.hs +40/−23
- src/main/haskell/Hydra/Yaml/Language.hs +27/−1
- src/main/haskell/Hydra/Yaml/Serde.hs +57/−31
CHANGELOG.md view
@@ -15,6 +15,240 @@ --- +## [0.17.3] - 2026-08-01++Point release on the 0.17.x line, focused on **release-artifact integrity**. The 0.17.2 release shipped+two defects that every existing check missed because they validated only the generated `dist/` tree, never+the packaged artifact: the `hydra-build` sdist shipped 3 of 8 modules, and the published Java `hydra-kernel`+jar was a whole [#417](https://github.com/CategoricalData/hydra/issues/417) rename behind. This release adds+an artifact-level publish-completeness gate that inspects the actual uploaded archive, closing that class of+defect across all five registries.++### Highlights++- **Artifact-content completeness gate** ([#621](https://github.com/CategoricalData/hydra/issues/621)):+ every publish path (Hackage sdist, Maven-Java jar, Maven-Scala jar, PyPI wheel, npm tarball) now inspects+ the *packaged* archive and hard-fails if any module a package's manifest declares is missing. The gate also+ asserts the post-#417 class names are present in the Java kernel jar.++### Bug fixes++- **PyPI wheels dropped non-`hydra.*` roots** ([#621](https://github.com/CategoricalData/hydra/issues/621)):+ the wheel packaging hardcoded `packages = ["src/main/python/hydra"]`, silently omitting `hydra-pg`'s+ `com.gdblab.*` and `openGql.*` modules. The generator now ships every emitted top-level root.++### Improvements++- **CI guard for dist-tree completeness** ([#524](https://github.com/CategoricalData/hydra/issues/524)):+ asserts every manifest `mainModules` namespace is emitted into `dist/haskell`, catching the 0.17.2+ `hydra-build` truncation at the tree level (the artifact gate is the packaged-archive counterpart).+- **Manifest generation extracted** into `Hydra.ManifestGeneration`, and the structurally-unneeded #607+ sed shims dropped ([#622](https://github.com/CategoricalData/hydra/issues/622)).+- **Release-verification signing fix** ([#441](https://github.com/CategoricalData/hydra/issues/441)):+ sign the reproducible uncompressed `.tar` and verify the `.asc` against the GitHub Release asset.+- **Java CI signing gate** ([#591](https://github.com/CategoricalData/hydra/issues/591)): `publishToMavenLocal`+ skips gpg signing when no key is present.++### Internal++- Version bump to 0.17.3; `hostVersion` advanced to 0.17.2 and the temporary #417 Java/Python local-host+ shims removed now that 0.17.2 is published on the registries+ ([#417](https://github.com/CategoricalData/hydra/issues/417)).++## [0.17.2] - 2026-07-28++Point release on the 0.17.x line. Themes: promotion of the generator's routing and manifest+logic into Hydra (`hydra.build.*`), per-package API-doc publishing across Java/Scala/Python,+constraint-polymorphic arithmetic, and new effectful stream/file primitives. Includes the base64+binary-literal rename `literals.binaryToString`/`stringToBinary` → `binaryToBase64`/`base64ToBinary`,+a step toward [#417](https://github.com/CategoricalData/hydra/issues/417) (which remains in progress).++### Highlights++- **Build system promoted into Hydra**: the three generator drivers now consume `hydra.build.routing`+ ([#560](https://github.com/CategoricalData/hydra/issues/560)) and `hydra.build.manifest`+ ([#607](https://github.com/CategoricalData/hydra/issues/607)), retiring the legacy static prefix+ tables; the cold-seeder oil-and-water violation is fixed+ ([#608](https://github.com/CategoricalData/hydra/issues/608)) and guarded+ ([#617](https://github.com/CategoricalData/hydra/issues/617)).+- **Per-package API docs** for all doc-bearing hosts: JavaDoc restructured with cross-links and a fixed+ tag→CI→Pages chain ([#616](https://github.com/CategoricalData/hydra/issues/616)), plus mirrored+ Scaladoc ([#619](https://github.com/CategoricalData/hydra/issues/619)) and Python API docs+ ([#620](https://github.com/CategoricalData/hydra/issues/620)).+- **Constraint-polymorphic arithmetic**: a `numeric` type class with enforcement and value-level dispatch+ ([#566](https://github.com/CategoricalData/hydra/issues/566)), reflected on the target hosts+ ([#618](https://github.com/CategoricalData/hydra/issues/618)).++### New features++- Standard-stream primitives: `stdin`/`stdout`/`stderr` ([#526](https://github.com/CategoricalData/hydra/issues/526)).+- Recursive flag for `hydra.lib.files.listDirectory` ([#527](https://github.com/CategoricalData/hydra/issues/527)).+- Hydra-specific regex syntax with per-target translation (`hydra.read.regex` / `hydra.show.regex`)+ ([#567](https://github.com/CategoricalData/hydra/issues/567)).+- Constraint-polymorphic arithmetic: `numeric` type class + value-level dispatch+ ([#566](https://github.com/CategoricalData/hydra/issues/566)).+- Aggregated Java + Scala Maven publishing into a single Central Portal deployment+ ([#591](https://github.com/CategoricalData/hydra/issues/591)).++### Improvements++- Generator drivers consume `hydra.build.routing` ([#560](https://github.com/CategoricalData/hydra/issues/560))+ and `hydra.build.manifest` ([#607](https://github.com/CategoricalData/hydra/issues/607)).+- Fixed the cold-seeder oil-and-water violation ([#608](https://github.com/CategoricalData/hydra/issues/608))+ and extended `check-oil-and-water.py` to catch cold-seeder imports of unpublished `Hydra.Build.*`+ ([#617](https://github.com/CategoricalData/hydra/issues/617)).+- Moved non-kernel packages to strict validation, clearing the #575 backlog+ ([#580](https://github.com/CategoricalData/hydra/issues/580)).+- Decoupled `Hydra.Sources.Test.All` from `Hydra.Sources.All`'s re-export list+ ([#601](https://github.com/CategoricalData/hydra/issues/601)).+- Renamed `hydra.json.schema` to resolve the module-vs-namespace-prefix conflict that broke+ file-per-module hosts ([#532](https://github.com/CategoricalData/hydra/issues/532)).+- Coders route `hydra.lib.*` overlay imports by overlay-module existence, not name-matching+ `hydra.lib.defaults` ([#568](https://github.com/CategoricalData/hydra/issues/568)).+- Per-package JavaDoc/Scaladoc/Python-doc publishing+ ([#616](https://github.com/CategoricalData/hydra/issues/616),+ [#619](https://github.com/CategoricalData/hydra/issues/619),+ [#620](https://github.com/CategoricalData/hydra/issues/620)).+- Aligned Java-host Scala/TypeScript generation with Haskell on expression layout (line-wrapping,+ declaration order) ([#612](https://github.com/CategoricalData/hydra/issues/612)).++### Bug fixes++- **TypeScript** — added the missing CI job (zero prior coverage)+ ([#571](https://github.com/CategoricalData/hydra/issues/571)); fixed the+ `verify-distribution.sh` smoke-test import so the gate actually gates+ ([#578](https://github.com/CategoricalData/hydra/issues/578)); emit `hydra.parse.regex`'s+ `regexSequence` before its alternation use (TS2448)+ ([#604](https://github.com/CategoricalData/hydra/issues/604)).+- **Build and sync** — `sync.sh` Phase 3 digest-cache now sees cross-package deps on moved kernel+ symbols, fixing stale downstream output ([#606](https://github.com/CategoricalData/hydra/issues/606)).+- **Numeric constraints** — `#566` polymorphism now reflected on the target hosts (targets were+ monomorphizing `int32->int32->int32`) ([#618](https://github.com/CategoricalData/hydra/issues/618)).++---++## [0.17.1] - 2026-07-18++Consolidation release on the 0.17.x line, built against published 0.17.0 hosts. Themes:+generated term-reference DSLs, a translingual package-validation framework, promotion of the+build system into Hydra (`hydra-build`), and broad TypeScript-host and cross-host hardening.++### Highlights++- **Generated term-reference DSLs** ([#467](https://github.com/CategoricalData/hydra/issues/467)):+ kernel term modules now emit one typed, rename-safe reference per definition into every target+ language; the Java and Python coder sources were pivoted onto them, retiring ~700 stringly-typed+ inline references.+- **Package validation** ([#574](https://github.com/CategoricalData/hydra/issues/574),+ [#575](https://github.com/CategoricalData/hydra/issues/575)): a translingual `hydra.validate.*`+ framework with per-package `ValidationProfile`s (undeclared-dependency gate, naming/ordering/docs+ checks). See the [Validation](https://github.com/CategoricalData/hydra/wiki/Validation) wiki page.+- **`hydra-build` package** ([#546](https://github.com/CategoricalData/hydra/issues/546)):+ build-orchestration logic that lived only in host scripts is now translingual Hydra+ (`hydra.build.*`), extracted into a dedicated package.++### New features++- Generated term-reference DSLs ([#467](https://github.com/CategoricalData/hydra/issues/467));+ follow-ups: `TypedName` refs to derived encode/decode/show+ ([#555](https://github.com/CategoricalData/hydra/issues/555)), non-kernel packages+ ([#556](https://github.com/CategoricalData/hydra/issues/556)).+- Translingual package-validation framework ([#574](https://github.com/CategoricalData/hydra/issues/574),+ [#575](https://github.com/CategoricalData/hydra/issues/575)).+- DSL-authoring registration guards: fail-fast completeness checks for the Java/Python/Scala DSL sources+ ([#554](https://github.com/CategoricalData/hydra/issues/554)).+- `hydra-build` package: `hydra.build.modules`+ ([#529](https://github.com/CategoricalData/hydra/issues/529)), `hydra.build.reconcile`+ ([#530](https://github.com/CategoricalData/hydra/issues/530)), extracted from the kernel+ ([#546](https://github.com/CategoricalData/hydra/issues/546)).+- Effectful `hydra.lib.system` primitive library ([#498](https://github.com/CategoricalData/hydra/issues/498)).+- SHA-256 cryptographic hash primitive in `hydra.lib` ([#524](https://github.com/CategoricalData/hydra/issues/524)).+- `hydra-jvm` package: shared JVM serde helpers relocated out of `hydra.java.serde`+ ([#505](https://github.com/CategoricalData/hydra/issues/505)).+- Internalized the Hydra-TinkerPop bindings (formerly HydraPop)+ ([#442](https://github.com/CategoricalData/hydra/issues/442)).+- Compact unit-valued variants in the JSON encoding ([#520](https://github.com/CategoricalData/hydra/issues/520)).+- Structured generation-provenance record (digest v2) ([#413](https://github.com/CategoricalData/hydra/issues/413),+ [#523](https://github.com/CategoricalData/hydra/issues/523)).+- Metadata sidecar + content/version-addressed freshness (`moduleFormatVersion`)+ ([#415](https://github.com/CategoricalData/hydra/issues/415)).+- Worker + issue hierarchy: agent/worker framework, cross-worktree messaging, issue-proposal queue+ (contributor process only) ([#557](https://github.com/CategoricalData/hydra/issues/557)).++### Improvements++- Type inference for annotations ([#229](https://github.com/CategoricalData/hydra/issues/229)).+- Fixed the signature / definition split in primitive definitions+ ([#502](https://github.com/CategoricalData/hydra/issues/502)).+- DSL usability passes across the host-native Java/Python/Scala surfaces+ ([#430](https://github.com/CategoricalData/hydra/issues/430),+ [#553](https://github.com/CategoricalData/hydra/issues/553)).+- Audited the Scala and Lisp-family coders for the unconditional `hydra.lib.*` overlay-import rewrite+ ([#569](https://github.com/CategoricalData/hydra/issues/569)).++### Bug fixes++- **TypeScript host** — V8 stack budget on ts→Java ([#390](https://github.com/CategoricalData/hydra/issues/390));+ effectful libs not generated / 484 tsc errors ([#503](https://github.com/CategoricalData/hydra/issues/503));+ 15 effect/file inference cases ([#504](https://github.com/CategoricalData/hydra/issues/504));+ ts→ts self-host regression ([#507](https://github.com/CategoricalData/hydra/issues/507)); npm packages+ bundling a duplicate kernel ([#584](https://github.com/CategoricalData/hydra/issues/584)); broken npm+ entry points ([#587](https://github.com/CategoricalData/hydra/issues/587));+ `hydra.test.build.modules.allTests` gen-universe gap ([#588](https://github.com/CategoricalData/hydra/issues/588)).+- **TypeScript coder** — reactivated `hydra.lib.*` tests: lazy show-calling let bindings + compact+ `LiteralType` expansion ([#564](https://github.com/CategoricalData/hydra/issues/564)); `binaryToBytes`+ registration + base64 decode in `decodeUtf8` ([#561](https://github.com/CategoricalData/hydra/issues/561));+ `hydra.test.build.*` emission after the #546 split+ ([#570](https://github.com/CategoricalData/hydra/issues/570)); `HYDRA_DEFAULT_IMPLS` in the test runner+ ([#536](https://github.com/CategoricalData/hydra/issues/536)); overlay-import rewrite no longer captures+ `hydra.lib.defaults` ([#565](https://github.com/CategoricalData/hydra/issues/565)).+- **Lisp family** — clj→clj bootstrap hang in `generate_source_files`+ ([#479](https://github.com/CategoricalData/hydra/issues/479)); Common Lisp `test_graph.lisp` loader+ forward-reference ([#496](https://github.com/CategoricalData/hydra/issues/496)); Scheme maps+ last-writer-wins in `union` ([#545](https://github.com/CategoricalData/hydra/issues/545)); Emacs Lisp+ bootstrap `wrong-type-argument (listp :string)` ([#586](https://github.com/CategoricalData/hydra/issues/586));+ `hydra.build.*` regeneration into the Lisp dialects ([#544](https://github.com/CategoricalData/hydra/issues/544)).+- **Kernel and coders** — Java binary-literal signed-byte emission+ ([#528](https://github.com/CategoricalData/hydra/issues/528)); `hydra.json.Decode.fromJson`+ parametric-type support ([#531](https://github.com/CategoricalData/hydra/issues/531)); stale 2-param+ `Coder` shape in Java/Scala test bootstrap ([#552](https://github.com/CategoricalData/hydra/issues/552));+ Java Javadoc ampersand escaping ([#493](https://github.com/CategoricalData/hydra/issues/493)); Scala+ coder over-generalizing `Schema[S,T,V,E]` args, breaking `hydra-pg`+ ([#589](https://github.com/CategoricalData/hydra/issues/589)); kernel dead-code/TODO cleanup+ ([#538](https://github.com/CategoricalData/hydra/issues/538)).+- **Publishing and packaging** — self-broken 0.16.0 `hydra-kernel`/`hydra-python` wheels+ ([#472](https://github.com/CategoricalData/hydra/issues/472)).+- **Lib and build** — `hydra.lib.files` copy/removeDirectory/status overlays across all nine hosts+ ([#525](https://github.com/CategoricalData/hydra/issues/525)); standalone-kernel SHA dependency+ ([#542](https://github.com/CategoricalData/hydra/issues/542)); lexicon's empty Types section+ ([#539](https://github.com/CategoricalData/hydra/issues/539)); silent lexicon-generation failure since+ the coders moved to in-memory synthesis ([#448](https://github.com/CategoricalData/hydra/issues/448));+ duplicated generated-file header in `generate-head-haskell-build.py`+ ([#540](https://github.com/CategoricalData/hydra/issues/540)); `.gitignore` untracking 41 duplicate+ overlaid-runtime copies under `dist/haskell/` ([#501](https://github.com/CategoricalData/hydra/issues/501));+ `bin/prepare-release.sh` Java quality check repointed to `dist/java/hydra-pg` tests after+ ([#511](https://github.com/CategoricalData/hydra/issues/511)).+- **Tests and CI** — restored default-primitive-implementation testing+ ([#388](https://github.com/CategoricalData/hydra/issues/388),+ [#549](https://github.com/CategoricalData/hydra/issues/549)); reactivated ignored kernel test cases+ ([#513](https://github.com/CategoricalData/hydra/issues/513),+ [#550](https://github.com/CategoricalData/hydra/issues/550)); wired + split out the regression harnesses+ ([#535](https://github.com/CategoricalData/hydra/issues/535),+ [#563](https://github.com/CategoricalData/hydra/issues/563)); Scala/Go/Lisp self-containment gates+ ([#537](https://github.com/CategoricalData/hydra/issues/537)); manifest-JSON-tracked CI check+ ([#541](https://github.com/CategoricalData/hydra/issues/541)); per-package test-digest freshness+ ([#551](https://github.com/CategoricalData/hydra/issues/551)); overlay-file restoration in+ `test-stale-output-prune.sh` ([#558](https://github.com/CategoricalData/hydra/issues/558)); DSL-aware+ sync-freshness fingerprint ([#562](https://github.com/CategoricalData/hydra/issues/562)).++### Documentation++- Corrected 0.17.0 Maven coordinates and added npm/Scala release channels, TypeScript/Scala/Lisp+ Getting-started sections, and issue/PR templates+ ([#519](https://github.com/CategoricalData/hydra/issues/519)).++---+ ## [0.17.0] - 2026-07-01 Major themes: first-class support for effects and I/O in the kernel, TypeScript and
hydra-ext.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: hydra-ext-version: 0.17.0+version: 0.17.4 synopsis: Hydra extensions: additional coders and schema integrations description: Hydra is an implementation of the LambdaGraph data model, which takes advantage of an isomorphism between labeled hypergraphs and typed lambda calculus: in Hydra, "graphs are programs, and programs are graphs". Various extensions to Hydra category: Data@@ -53,9 +53,9 @@ Hydra.Graphql.Serde Hydra.Graphql.Syntax Hydra.Iana.Linkrelations- Hydra.Json.Schema Hydra.Json.Schema.Coder Hydra.Json.Schema.Language+ Hydra.Json.Schema.Model Hydra.Json.Schema.Serde Hydra.Kusto.Kql Hydra.Osv.Schema@@ -90,7 +90,7 @@ base >=4.19.0 && <4.22 , bytestring >=0.11.5 && <0.13 , containers >=0.6.7 && <0.8- , hydra-kernel ==0.17.0- , hydra-rdf ==0.17.0+ , hydra-kernel ==0.17.4+ , hydra-rdf ==0.17.4 , scientific >=0.3.7 && <0.4 default-language: Haskell2010
src/main/haskell/Hydra/Atlas.hs view
@@ -1,9 +1,11 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | The Apache Atlas meta-model -- | Based on the the org.apache.atlas.model package in the master branch as of 2022-06-01 -- | https://github.com/apache/atlas/tree/master/intg/src/main/java/org/apache/atlas/model module Hydra.Atlas where+ import qualified Hydra.Core as Core import qualified Hydra.Xml.Schema as Schema import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)@@ -11,13 +13,14 @@ import qualified Data.Int as I import qualified Data.Map as M import qualified Data.Set as S+ -- | class that captures details of a struct-attribute. data AtlasAttributeDef = AtlasAttributeDef { atlasAttributeDefName :: (Maybe String), atlasAttributeDefTypeName :: (Maybe String), atlasAttributeDefIsOptional :: Bool,- atlasAttributeDefCardinality :: (Maybe AtlasAttributeDef_Cardinality),+ atlasAttributeDefCardinality :: (Maybe AtlasAttributeDefCardinality), atlasAttributeDefValuesMinCount :: Int, atlasAttributeDefValuesMaxCount :: Int, atlasAttributeDefIsUnique :: Bool,@@ -26,44 +29,73 @@ atlasAttributeDefDefaultValue :: (Maybe String), atlasAttributeDefDescription :: (Maybe String), atlasAttributeDefSearchWeight :: Int,- atlasAttributeDefIndexType :: (Maybe AtlasAttributeDef_IndexType),+ atlasAttributeDefIndexType :: (Maybe AtlasAttributeDefIndexType), atlasAttributeDefConstraints :: [AtlasConstraintDef], atlasAttributeDefOptions :: (M.Map String String), atlasAttributeDefDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)+ _AtlasAttributeDef = Core.Name "hydra.atlas.AtlasAttributeDef"+ _AtlasAttributeDef_name = Core.Name "name"+ _AtlasAttributeDef_typeName = Core.Name "typeName"+ _AtlasAttributeDef_isOptional = Core.Name "isOptional"+ _AtlasAttributeDef_cardinality = Core.Name "cardinality"+ _AtlasAttributeDef_valuesMinCount = Core.Name "valuesMinCount"+ _AtlasAttributeDef_valuesMaxCount = Core.Name "valuesMaxCount"+ _AtlasAttributeDef_isUnique = Core.Name "isUnique"+ _AtlasAttributeDef_isIndexable = Core.Name "isIndexable"+ _AtlasAttributeDef_includeInNotification = Core.Name "includeInNotification"+ _AtlasAttributeDef_defaultValue = Core.Name "defaultValue"+ _AtlasAttributeDef_description = Core.Name "description"+ _AtlasAttributeDef_searchWeight = Core.Name "searchWeight"+ _AtlasAttributeDef_indexType = Core.Name "indexType"+ _AtlasAttributeDef_constraints = Core.Name "constraints"+ _AtlasAttributeDef_options = Core.Name "options"+ _AtlasAttributeDef_displayName = Core.Name "displayName"-data AtlasAttributeDef_Cardinality =- AtlasAttributeDef_CardinalitySingle |- AtlasAttributeDef_CardinalityList |- AtlasAttributeDef_CardinalitySet++-- | The cardinality of an Atlas attribute: single-valued, a list, or a set+data AtlasAttributeDefCardinality =+ AtlasAttributeDefCardinalitySingle |+ AtlasAttributeDefCardinalityList |+ AtlasAttributeDefCardinalitySet deriving (Eq, Ord, Read, Show)-_AtlasAttributeDef_Cardinality = Core.Name "hydra.atlas.AtlasAttributeDef_Cardinality"-_AtlasAttributeDef_Cardinality_single = Core.Name "single"-_AtlasAttributeDef_Cardinality_list = Core.Name "list"-_AtlasAttributeDef_Cardinality_set = Core.Name "set"-data AtlasAttributeDef_IndexType =- AtlasAttributeDef_IndexTypeDefault |- AtlasAttributeDef_IndexTypeString++_AtlasAttributeDefCardinality = Core.Name "hydra.atlas.AtlasAttributeDefCardinality"++_AtlasAttributeDefCardinality_single = Core.Name "single"++_AtlasAttributeDefCardinality_list = Core.Name "list"++_AtlasAttributeDefCardinality_set = Core.Name "set"++-- | The index type of an Atlas attribute+data AtlasAttributeDefIndexType =+ AtlasAttributeDefIndexTypeDefault |+ AtlasAttributeDefIndexTypeString deriving (Eq, Ord, Read, Show)-_AtlasAttributeDef_IndexType = Core.Name "hydra.atlas.AtlasAttributeDef_IndexType"-_AtlasAttributeDef_IndexType_default = Core.Name "default"-_AtlasAttributeDef_IndexType_string = Core.Name "string"++_AtlasAttributeDefIndexType = Core.Name "hydra.atlas.AtlasAttributeDefIndexType"++_AtlasAttributeDefIndexType_default = Core.Name "default"++_AtlasAttributeDefIndexType_string = Core.Name "string"+ -- | Base class that captures common-attributes for all Atlas types. data AtlasBaseTypeDef = AtlasBaseTypeDef {@@ -80,28 +112,46 @@ atlasBaseTypeDefServiceType :: (Maybe String), atlasBaseTypeDefOptions :: (M.Map String String)} deriving (Eq, Ord, Read, Show)+ _AtlasBaseTypeDef = Core.Name "hydra.atlas.AtlasBaseTypeDef"+ _AtlasBaseTypeDef_category = Core.Name "category"+ _AtlasBaseTypeDef_guid = Core.Name "guid"+ _AtlasBaseTypeDef_createdBy = Core.Name "createdBy"+ _AtlasBaseTypeDef_updatedBy = Core.Name "updatedBy"+ _AtlasBaseTypeDef_createTime = Core.Name "createTime"+ _AtlasBaseTypeDef_updateTime = Core.Name "updateTime"+ _AtlasBaseTypeDef_version = Core.Name "version"+ _AtlasBaseTypeDef_name = Core.Name "name"+ _AtlasBaseTypeDef_description = Core.Name "description"+ _AtlasBaseTypeDef_typeVersion = Core.Name "typeVersion"+ _AtlasBaseTypeDef_serviceType = Core.Name "serviceType"+ _AtlasBaseTypeDef_options = Core.Name "options"+ -- | class that captures details of a constraint. data AtlasConstraintDef = AtlasConstraintDef { atlasConstraintDefType :: (Maybe String), atlasConstraintDefParams :: (M.Map String String)} deriving (Eq, Ord, Read, Show)+ _AtlasConstraintDef = Core.Name "hydra.atlas.AtlasConstraintDef"+ _AtlasConstraintDef_type = Core.Name "type"+ _AtlasConstraintDef_params = Core.Name "params"+ -- | class that captures details of a entity-type. data AtlasEntityDef = AtlasEntityDef {@@ -114,12 +164,19 @@ -- | the value of this field is derived from all the businessMetadataDefs this entityType is referenced in atlasEntityDefBusinessAttributeDefs :: (M.Map String [AtlasAttributeDef])} deriving (Eq, Ord, Read, Show)+ _AtlasEntityDef = Core.Name "hydra.atlas.AtlasEntityDef"+ _AtlasEntityDef_asAtlasStruct = Core.Name "asAtlasStruct"+ _AtlasEntityDef_superTypes = Core.Name "superTypes"+ _AtlasEntityDef_subTypes = Core.Name "subTypes"+ _AtlasEntityDef_relationshipAttributeDefs = Core.Name "relationshipAttributeDefs"+ _AtlasEntityDef_businessAttributeDefs = Core.Name "businessAttributeDefs"+ -- | class that captures details of a struct-attribute. data AtlasRelationshipAttributeDef = AtlasRelationshipAttributeDef {@@ -127,19 +184,29 @@ atlasRelationshipAttributeDefRelationshipTypeName :: (Maybe String), atlasRelationshipAttributeDefIsLegacyAttribute :: Bool} deriving (Eq, Ord, Read, Show)+ _AtlasRelationshipAttributeDef = Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"+ _AtlasRelationshipAttributeDef_asAtlasAttribute = Core.Name "asAtlasAttribute"+ _AtlasRelationshipAttributeDef_relationshipTypeName = Core.Name "relationshipTypeName"+ _AtlasRelationshipAttributeDef_isLegacyAttribute = Core.Name "isLegacyAttribute"+ -- | class that captures details of a struct-type. data AtlasStructDef = AtlasStructDef { atlasStructDefAsAtlasBaseType :: AtlasBaseTypeDef, atlasStructDefAttributeDefs :: [AtlasAttributeDef]} deriving (Eq, Ord, Read, Show)+ _AtlasStructDef = Core.Name "hydra.atlas.AtlasStructDef"+ _AtlasStructDef_asAtlasBaseType = Core.Name "asAtlasBaseType"+ _AtlasStructDef_attributeDefs = Core.Name "attributeDefs"++-- | The category of an Atlas type definition data TypeCategory = TypeCategoryPrimitive | TypeCategoryObjectIdType |@@ -152,14 +219,25 @@ TypeCategoryRelationship | TypeCategoryBusinessMetadata deriving (Eq, Ord, Read, Show)+ _TypeCategory = Core.Name "hydra.atlas.TypeCategory"+ _TypeCategory_primitive = Core.Name "primitive"+ _TypeCategory_objectIdType = Core.Name "objectIdType"+ _TypeCategory_enum = Core.Name "enum"+ _TypeCategory_struct = Core.Name "struct"+ _TypeCategory_classification = Core.Name "classification"+ _TypeCategory_entity = Core.Name "entity"+ _TypeCategory_array = Core.Name "array"+ _TypeCategory_map = Core.Name "map"+ _TypeCategory_relationship = Core.Name "relationship"+ _TypeCategory_businessMetadata = Core.Name "businessMetadata"
src/main/haskell/Hydra/Avro/Coder.hs view
@@ -1,17 +1,23 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Avro-to-Hydra adapter for converting Avro schemas and data to Hydra types and terms module Hydra.Avro.Coder where+ import qualified Hydra.Ast as Ast import qualified Hydra.Avro.Environment as Environment import qualified Hydra.Avro.Schema as Schema import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Core as ExtractCore+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers@@ -21,6 +27,7 @@ import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals+import qualified Hydra.Overlay.Haskell.Lib.Ordering as Ordering import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings@@ -29,10 +36,13 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -42,8 +52,9 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M+ -- | Annotate an adapter's target type with optional annotations-annotateAdapter :: Maybe (M.Map Core.Name Core.Term) -> Coders.Adapter t0 Core.Type t1 t2 Errors.Error -> Coders.Adapter t0 Core.Type t1 t2 Errors.Error+annotateAdapter :: Maybe (M.Map Core.Name Core.Term) -> Coders.Adapter t0 Core.Type t1 t2 t3 -> Coders.Adapter t0 Core.Type t1 t2 t3 annotateAdapter ann ad = Optionals.cases ann ad (\n -> Coders.Adapter { Coders.adapterIsLossy = (Coders.adapterIsLossy ad),@@ -52,6 +63,11 @@ Core.annotatedTypeBody = (Coders.adapterTarget ad), Core.annotatedTypeAnnotation = (Core.TermMap (Maps.mapKeys (\n2 -> Core.TermVariable n2) n))})), Coders.adapterCoder = (Coders.adapterCoder ad)})++-- | The annotation key for foreign key metadata on an Avro field+avroForeignKey :: String+avroForeignKey = "@foreignKey"+ -- | Create an adapter between Avro schemas and Hydra types/terms avroHydraAdapter :: t0 -> Schema.Schema -> Environment.AvroEnvironment -> Either Errors.Error (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term Errors.Error, Environment.AvroEnvironment) avroHydraAdapter cx schema env0 =@@ -153,7 +169,7 @@ fn = Core.fieldName fld in (Right (Model.ValueString (Core.unName fn))))) Schema.NamedTypeFixed _ -> simpleAdapter env1 (Core.TypeLiteral Core.LiteralTypeBinary) (\jv -> case jv of- Model.ValueString v2 -> Right (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary v2)))) (\t -> Eithers.map (\b -> Model.ValueString (Literals.binaryToString b)) (ExtractCore.binary (Graph.Graph {+ Model.ValueString v2 -> Right (Core.TermLiteral (Core.LiteralBinary (Literals.base64ToBinary v2)))) (\t -> Eithers.map (\b -> Model.ValueString (Literals.binaryToBase64 b)) (ExtractCore.binary (Graph.Graph { Graph.graphBoundTerms = Maps.empty, Graph.graphBoundTypes = Maps.empty, Graph.graphClassConstraints = Maps.empty,@@ -169,25 +185,25 @@ env2 = Pairs.second prepResult in (Eithers.bind (findAvroPrimaryKeyField cx qname avroFields) (\pk -> let encodePair =- \cx1 -> \entry ->+ \entry -> let k = Pairs.first entry v = Pairs.second entry- in (Optionals.cases (Maps.lookup k adaptersByFieldName) (err cx1 (Strings.cat [+ in (Optionals.cases (Maps.lookup k adaptersByFieldName) (Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "unrecognized field for ", (showQname qname), ": ",- k])) (\fad -> Eithers.map (\v_ -> Core.Field {+ k])))) (\fad -> Eithers.map (\v_ -> Core.Field { Core.fieldName = (Core.Name k), Core.fieldTerm = v_}) (Coders.coderEncode (Coders.adapterCoder (Pairs.second fad)) v))) decodeField =- \cx1 -> \fld ->+ \fld -> let k = Core.unName (Core.fieldName fld) v = Core.fieldTerm fld- in (Optionals.cases (Maps.lookup k adaptersByFieldName) (err cx1 (Strings.cat [+ in (Optionals.cases (Maps.lookup k adaptersByFieldName) (Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "unrecognized field for ", (showQname qname), ": ",- k])) (\fad -> Eithers.map (\v_ -> (k, v_)) (Coders.coderDecode (Coders.adapterCoder (Pairs.second fad)) v)))+ k])))) (\fad -> Eithers.map (\v_ -> (k, v_)) (Coders.coderDecode (Coders.adapterCoder (Pairs.second fad)) v))) lossy = Lists.foldl (\b -> \fad -> Logic.or b (Coders.adapterIsLossy (Pairs.second fad))) False (Maps.elems adaptersByFieldName) hfields =@@ -204,9 +220,9 @@ Coders.coderEncode = (\jv -> case jv of Model.ValueObject v2 -> Eithers.map (\fields -> Core.TermRecord (Core.Record { Core.recordTypeName = hydraName,- Core.recordFields = fields})) (Eithers.mapList (\e -> encodePair cx e) v2)),+ Core.recordFields = fields})) (Eithers.mapList (\e -> encodePair e) v2)), Coders.coderDecode = (\t -> case t of- Core.TermRecord v2 -> Eithers.map (\kvs -> Model.ValueObject kvs) (Eithers.mapList (\fld -> decodeField cx fld) (Core.recordFields v2)))}},+ Core.TermRecord v2 -> Eithers.map (\kvs -> Model.ValueObject kvs) (Eithers.mapList (\fld -> decodeField fld) (Core.recordFields v2)))}}, env2))))))) (\adEnv2 -> let ad = Pairs.first adEnv2 env2 = Pairs.second adEnv2@@ -216,7 +232,7 @@ Environment.avroEnvironmentNamedAdapters = (Environment.avroEnvironmentNamedAdapters env3), Environment.avroEnvironmentNamespace = lastNs, Environment.avroEnvironmentElements = (Environment.avroEnvironmentElements env3)}- in (Right (annotateAdapter ann ad, env4)))) (\_ad -> err cx (Strings.cat2 "Avro named type defined more than once: " (showQname qname))))+ in (Right (annotateAdapter ann ad, env4)))) (\_ad -> err cx (Strings.concat2 "Avro named type defined more than once: " (showQname qname)))) Schema.SchemaPrimitive v0 -> case v0 of Schema.PrimitiveNull -> simpleAdapter env0 Core.TypeUnit (\jv -> case jv of Model.ValueString v2 -> Right (Core.TermLiteral (Core.LiteralString v2))) (\t -> Eithers.map (\s -> Model.ValueString s) (ExtractCore.string (Graph.Graph {@@ -279,7 +295,7 @@ Graph.graphSchemaTypes = Maps.empty, Graph.graphTypeVariables = Sets.empty}) t)) Schema.PrimitiveBytes -> simpleAdapter env0 (Core.TypeLiteral Core.LiteralTypeBinary) (\jv -> case jv of- Model.ValueString v2 -> Right (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary v2)))) (\t -> Eithers.map (\b -> Model.ValueString (Literals.binaryToString b)) (ExtractCore.binary (Graph.Graph {+ Model.ValueString v2 -> Right (Core.TermLiteral (Core.LiteralBinary (Literals.base64ToBinary v2)))) (\t -> Eithers.map (\b -> Model.ValueString (Literals.binaryToBase64 b)) (ExtractCore.binary (Graph.Graph { Graph.graphBoundTerms = Maps.empty, Graph.graphBoundTypes = Maps.empty, Graph.graphClassConstraints = Maps.empty,@@ -300,7 +316,7 @@ Graph.graphTypeVariables = Sets.empty}) t)) Schema.SchemaReference v0 -> let qname = parseAvroName (Environment.avroEnvironmentNamespace env0) v0- in (Optionals.cases (getAvroHydraAdapter qname env0) (err cx (Strings.cat2 "Referenced Avro type has not been defined: " (showQname qname))) (\ad -> Right (ad, env0)))+ in (Optionals.cases (getAvroHydraAdapter qname env0) (err cx (Strings.concat2 "Referenced Avro type has not been defined: " (showQname qname))) (\ad -> Right (ad, env0))) Schema.SchemaUnion v0 -> let schemas = Schema.unUnion v0 isNull =@@ -327,7 +343,7 @@ Coders.coderDecode = (\t -> case t of Core.TermOptional v1 -> Optionals.cases v1 (Right Model.ValueNull) (\term_ -> Coders.coderDecode (Coders.adapterCoder ad) term_))}}, env1)))- in (Logic.ifElse (Equality.gt (Lists.length nonNulls) 1) (err cx "general-purpose unions are not yet supported") (Optionals.cases (Lists.maybeHead nonNulls) (err cx "cannot generate the empty type") (\nonNullHead -> Logic.ifElse hasNull (forOptional nonNullHead) (Eithers.bind (avroHydraAdapter cx nonNullHead env0) (\adEnv ->+ in (Logic.ifElse (Ordering.gt (Lists.length nonNulls) 1) (err cx "general-purpose unions are not yet supported") (Optionals.cases (Lists.head nonNulls) (err cx "cannot generate the empty type") (\nonNullHead -> Logic.ifElse hasNull (forOptional nonNullHead) (Eithers.bind (avroHydraAdapter cx nonNullHead env0) (\adEnv -> let ad = Pairs.first adEnv env1 = Pairs.second adEnv in (Right (@@ -337,6 +353,7 @@ Coders.adapterTarget = (Coders.adapterTarget ad), Coders.adapterCoder = (Coders.adapterCoder ad)}, env1)))))))+ -- | Convert an Avro qualified name to a Hydra name avroNameToHydraName :: Environment.AvroQualifiedName -> Core.Name avroNameToHydraName qname =@@ -346,10 +363,11 @@ in (Names.unqualifyName (Util.QualifiedName { Util.qualifiedNameModuleName = (Optionals.map (\s -> Packaging.ModuleName s) mns), Util.qualifiedNameLocal = local}))-avro_foreignKey :: String-avro_foreignKey = "@foreignKey"-avro_primaryKey :: String-avro_primaryKey = "@primaryKey"++-- | The annotation key for primary key metadata on an Avro field+avroPrimaryKey :: String+avroPrimaryKey = "@primaryKey"+ -- | An empty Avro environment with no named adapters, no namespace, and no elements emptyAvroEnvironment :: Environment.AvroEnvironment emptyAvroEnvironment =@@ -357,6 +375,7 @@ Environment.avroEnvironmentNamedAdapters = Maps.empty, Environment.avroEnvironmentNamespace = Nothing, Environment.avroEnvironmentElements = Maps.empty}+ -- | Encode a JSON value as a Hydra term for annotation purposes encodeAnnotationValue :: Model.Value -> Core.Term encodeAnnotationValue v =@@ -370,24 +389,29 @@ v_ = Pairs.second entry in (Core.TermLiteral (Core.LiteralString k), (encodeAnnotationValue v_))) v0)) Model.ValueString v0 -> Core.TermLiteral (Core.LiteralString v0)+ -- | Construct an error result with a message in context err :: t0 -> String -> Either Errors.Error t1 err cx msg = Left (Errors.ErrorOther (Errors.OtherError msg))+ -- | Extract a JSON array or return an error expectArrayE :: t0 -> Model.Value -> Either t1 [Model.Value] expectArrayE cx value = case value of Model.ValueArray v0 -> Right v0+ -- | Extract a JSON object or return an error expectObjectE :: t0 -> Model.Value -> Either t1 (M.Map String Model.Value) expectObjectE cx value = case value of Model.ValueObject v0 -> Right (Maps.fromList v0)+ -- | Extract a JSON string or return an error expectStringE :: t0 -> Model.Value -> Either t1 String expectStringE cx value = case value of Model.ValueString v0 -> Right v0+ -- | Extract field annotations and convert them to core Name/Term pairs fieldAnnotationsToCore :: Schema.Field -> M.Map Core.Name Core.Term fieldAnnotationsToCore f =@@ -395,23 +419,27 @@ let k = Pairs.first entry v = Pairs.second entry in (Core.Name k, (encodeAnnotationValue v))) (Maps.toList (Schema.fieldAnnotations f)))+ -- | Find the primary key field among a list of Avro fields findAvroPrimaryKeyField :: t0 -> Environment.AvroQualifiedName -> [Schema.Field] -> Either Errors.Error (Maybe Environment.AvroPrimaryKey) findAvroPrimaryKeyField cx qname avroFields = - let keys = Optionals.cat (Lists.map (\f -> primaryKeyE cx f) avroFields)- in (Logic.ifElse (Lists.null keys) (Right Nothing) (Logic.ifElse (Equality.equal (Lists.length keys) 1) (Right (Lists.maybeHead keys)) (err cx (Strings.cat2 "multiple primary key fields for " (showQname qname)))))+ let keys = Optionals.givens (Lists.map (\f -> primaryKeyE cx f) avroFields)+ in (Logic.ifElse (Lists.null keys) (Right Nothing) (Logic.ifElse (Equality.equal (Lists.length keys) 1) (Right (Lists.head keys)) (err cx (Strings.concat2 "multiple primary key fields for " (showQname qname)))))+ -- | Extract a foreign key annotation from a field, if present foreignKeyE :: t0 -> Schema.Field -> Either Errors.Error (Maybe Environment.AvroForeignKey) foreignKeyE cx f =- Optionals.cases (Maps.lookup avro_foreignKey (Schema.fieldAnnotations f)) (Right Nothing) (\v -> Eithers.bind (expectObjectE cx v) (\m -> Eithers.bind (Eithers.map (\s -> Core.Name s) (requireStringE cx "type" m)) (\tname -> Eithers.bind (optStringE cx "pattern" m) (\pattern_ ->+ Optionals.cases (Maps.lookup avroForeignKey (Schema.fieldAnnotations f)) (Right Nothing) (\v -> Eithers.bind (expectObjectE cx v) (\m -> Eithers.bind (Eithers.map (\s -> Core.Name s) (requireStringE cx "type" m)) (\tname -> Eithers.bind (optStringE cx "pattern" m) (\pattern_ -> let constr = Optionals.cases pattern_ (\s -> Core.Name s) (\pat -> patternToNameConstructor pat) in (Right (Just (Environment.AvroForeignKey { Environment.avroForeignKeyTypeName = tname, Environment.avroForeignKeyConstructor = constr})))))))+ -- | Look up an adapter by qualified name in the environment getAvroHydraAdapter :: Environment.AvroQualifiedName -> Environment.AvroEnvironment -> Maybe (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term Errors.Error) getAvroHydraAdapter qname env = Maps.lookup qname (Environment.avroEnvironmentNamedAdapters env)+ -- | Convert a JSON value to a string, supporting booleans, strings, and numbers jsonToStringE :: t0 -> Model.Value -> Either Errors.Error String jsonToStringE cx v =@@ -420,6 +448,7 @@ Model.ValueString v0 -> Right v0 Model.ValueNumber v0 -> Right (Literals.showDecimal v0) _ -> unexpectedE cx "string, number, or boolean" "other"+ -- | Extract named type annotations and convert them to core Name/Term pairs namedAnnotationsToCore :: Schema.Named -> M.Map Core.Name Core.Term namedAnnotationsToCore n =@@ -427,26 +456,32 @@ let k = Pairs.first entry v = Pairs.second entry in (Core.Name k, (encodeAnnotationValue v))) (Maps.toList (Schema.namedAnnotations n)))+ -- | Look up an optional string attribute in a JSON object map optStringE :: Ord t1 => (t0 -> t1 -> M.Map t1 Model.Value -> Either t2 (Maybe String)) optStringE cx fname m = Optionals.cases (Maps.lookup fname m) (Right Nothing) (\v -> Eithers.map (\s -> Optionals.pure s) (expectStringE cx v))+ -- | Parse a dotted Avro name into a qualified name parseAvroName :: Maybe String -> String -> Environment.AvroQualifiedName parseAvroName mns name_ = let parts = Strings.splitOn "." name_- local = Optionals.fromOptional name_ (Lists.maybeLast parts)+ local = Optionals.withDefault name_ (Lists.last parts) in (Logic.ifElse (Equality.equal (Lists.length parts) 1) (Environment.AvroQualifiedName { Environment.avroQualifiedNameNamespace = mns, Environment.avroQualifiedNameName = local}) (Environment.AvroQualifiedName {- Environment.avroQualifiedNameNamespace = (Optionals.map (\ps -> Strings.intercalate "." ps) (Lists.maybeInit parts)),+ Environment.avroQualifiedNameNamespace = (Optionals.map (\ps -> Strings.join "." ps) (Lists.init parts)), Environment.avroQualifiedNameName = local}))+ -- | Create a name constructor from a pattern string patternToNameConstructor :: String -> String -> Core.Name-patternToNameConstructor pat s = Core.Name (Strings.intercalate s (Strings.splitOn "${}" pat))+patternToNameConstructor pat s = Core.Name (Strings.join s (Strings.splitOn "${}" pat))+ -- | Prepare a single field, producing an adapter and updated environment-prepareField :: t0 -> Environment.AvroEnvironment -> Schema.Field -> Either Errors.Error ((String, (Schema.Field, (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term Errors.Error))), Environment.AvroEnvironment)+prepareField :: t0 -> Environment.AvroEnvironment -> Schema.Field -> Either Errors.Error (+ (String, (Schema.Field, (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term Errors.Error))),+ Environment.AvroEnvironment) prepareField cx env f = let manns = fieldAnnotationsToCore f@@ -463,7 +498,7 @@ decodeTerm = \t -> case t of Core.TermVariable v0 -> Eithers.bind (stringToTermE cx (Coders.adapterTarget ad0) (Core.unName v0)) (\term_ -> Coders.coderDecode (Coders.adapterCoder ad0) term_)- _ -> err cx "expected variable"+ _ -> Left (Errors.ErrorOther (Errors.OtherError "expected variable")) forTypeAndCoder = \env2 -> \ad1 -> \typ -> \cdr -> Right ( Coders.Adapter {@@ -482,18 +517,21 @@ Core.TypeLiteral _ -> forTypeAndCoder env1 ad0 (Core.TypeList elTyp) (Coders.Coder { Coders.coderEncode = (\json -> case json of Model.ValueArray v2 -> Eithers.map (\terms -> Core.TermList terms) (Eithers.mapList (\jv -> encodeValue jv) v2)- _ -> err cx "Expected JSON array"),+ _ -> Left (Errors.ErrorOther (Errors.OtherError "Expected JSON array"))), Coders.coderDecode = decodeTerm}) _ -> err cx "expected literal type inside list foreign key" Core.TypeLiteral _ -> forTypeAndCoder env1 ad0 elTyp (Coders.Coder { Coders.coderEncode = encodeValue, Coders.coderDecode = decodeTerm})- _ -> err cx (Strings.cat2 "unsupported type annotated as foreign key: " "unknown"))))) (\adEnv ->+ _ -> err cx (Strings.concat2 "unsupported type annotated as foreign key: " "unknown"))))) (\adEnv -> let ad = Pairs.first adEnv env1 = Pairs.second adEnv in (Right ((Schema.fieldName f, (f, (annotateAdapter ann ad))), env1)))))+ -- | Thread AvroEnvironment through preparing multiple fields-prepareFields :: t0 -> Environment.AvroEnvironment -> [Schema.Field] -> Either Errors.Error (M.Map String (Schema.Field, (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term Errors.Error)), Environment.AvroEnvironment)+prepareFields :: t0 -> Environment.AvroEnvironment -> [Schema.Field] -> Either Errors.Error (+ M.Map String (Schema.Field, (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term Errors.Error)),+ Environment.AvroEnvironment) prepareFields cx env fields = Lists.foldl (\acc -> \f -> Eithers.bind acc (\accPair -> let m = Pairs.first accPair@@ -504,12 +542,14 @@ k = Pairs.first kv v = Pairs.second kv in (Right (Maps.insert k v m, env2)))))) (Right (Maps.empty, env)) fields+ -- | Extract a primary key annotation from a field, if present primaryKeyE :: t0 -> Schema.Field -> Maybe Environment.AvroPrimaryKey primaryKeyE cx f =- Optionals.cases (Maps.lookup avro_primaryKey (Schema.fieldAnnotations f)) Nothing (\v -> Eithers.either (\_ -> Nothing) (\s -> Just (Environment.AvroPrimaryKey {+ Optionals.cases (Maps.lookup avroPrimaryKey (Schema.fieldAnnotations f)) Nothing (\v -> Eithers.either (\_ -> Nothing) (\s -> Just (Environment.AvroPrimaryKey { Environment.avroPrimaryKeyFieldName = (Core.Name (Schema.fieldName f)), Environment.avroPrimaryKeyConstructor = (patternToNameConstructor s)})) (expectStringE cx v))+ -- | Store an adapter in the environment by qualified name putAvroHydraAdapter :: Environment.AvroQualifiedName -> Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term Errors.Error -> Environment.AvroEnvironment -> Environment.AvroEnvironment putAvroHydraAdapter qname ad env =@@ -517,13 +557,15 @@ Environment.avroEnvironmentNamedAdapters = (Maps.insert qname ad (Environment.avroEnvironmentNamedAdapters env)), Environment.avroEnvironmentNamespace = (Environment.avroEnvironmentNamespace env), Environment.avroEnvironmentElements = (Environment.avroEnvironmentElements env)}+ -- | Look up a required string attribute in a JSON object map requireStringE :: t0 -> String -> M.Map String Model.Value -> Either Errors.Error String requireStringE cx fname m =- Optionals.cases (Maps.lookup fname m) (err cx (Strings.cat [+ Optionals.cases (Maps.lookup fname m) (err cx (Strings.concat [ "required attribute ",- (Literals.showString fname),+ (Literals.printString fname), " not found"])) (\v -> expectStringE cx v)+ -- | Recursively rewrite an Avro schema using a monadic transformation function rewriteAvroSchemaM :: ((Schema.Schema -> Either t0 Schema.Schema) -> Schema.Schema -> Either t0 Schema.Schema) -> Schema.Schema -> Either t0 Schema.Schema rewriteAvroSchemaM f schema =@@ -555,13 +597,15 @@ Schema.SchemaUnion v0 -> Eithers.map (\schemas_ -> Schema.SchemaUnion (Schema.Union schemas_)) (Eithers.mapList (\us -> recurse us) (Schema.unUnion v0)) _ -> Right s in (f fsub schema)+ -- | Convert an Avro qualified name to a display string showQname :: Environment.AvroQualifiedName -> String showQname qname = let mns = Environment.avroQualifiedNameNamespace qname local = Environment.avroQualifiedNameName qname- in (Strings.cat2 (Optionals.cases mns "" (\ns -> Strings.cat2 ns ".")) local)+ in (Strings.concat2 (Optionals.cases mns "" (\ns -> Strings.concat2 ns ".")) local)+ -- | Parse a string into a term of the expected type stringToTermE :: t0 -> Core.Type -> String -> Either Errors.Error Core.Term stringToTermE cx typ s =@@ -570,7 +614,7 @@ readAndWrap = \reader -> \wrapper -> Optionals.cases (reader s) readErr (\v -> Right (Core.TermLiteral (wrapper v))) in case (Strip.deannotateType typ) of Core.TypeLiteral v0 -> case v0 of- Core.LiteralTypeBoolean -> readAndWrap (\x -> Literals.readBoolean x) (\b -> Core.LiteralBoolean b)+ Core.LiteralTypeBoolean -> readAndWrap (\x -> Literals.parseBoolean x) (\b -> Core.LiteralBoolean b) Core.LiteralTypeInteger v1 -> case v1 of Core.IntegerTypeBigint -> readAndWrap (\x -> Literals.readBigint x) (\i -> Core.LiteralInteger (Core.IntegerValueBigint i)) Core.IntegerTypeInt8 -> readAndWrap (\x -> Literals.readInt8 x) (\i -> Core.LiteralInteger (Core.IntegerValueInt8 i))@@ -584,12 +628,13 @@ Core.LiteralTypeString -> Right (Core.TermLiteral (Core.LiteralString s)) _ -> unexpectedE cx "literal type" "other literal type" _ -> unexpectedE cx "literal type" "other"+ -- | Convert a literal term to its string representation termToStringE :: t0 -> Core.Term -> Either Errors.Error String termToStringE cx term = case (Strip.deannotateTerm term) of Core.TermLiteral v0 -> case v0 of- Core.LiteralBoolean v1 -> Right (Literals.showBoolean v1)+ Core.LiteralBoolean v1 -> Right (Literals.printBoolean v1) Core.LiteralInteger v1 -> Right (case v1 of Core.IntegerValueBigint v2 -> Literals.showBigint v2 Core.IntegerValueInt8 v2 -> Literals.showInt8 v2@@ -604,10 +649,11 @@ _ -> unexpectedE cx "boolean, integer, or string" "other literal" Core.TermOptional v0 -> Optionals.cases v0 (unexpectedE cx "literal value" "Nothing") (\term_ -> termToStringE cx term_) _ -> unexpectedE cx "literal value" "other"+ -- | Construct an error for unexpected values unexpectedE :: t0 -> String -> String -> Either Errors.Error t1 unexpectedE cx expected found =- err cx (Strings.cat [+ err cx (Strings.concat [ "Expected ", expected, ", found: ",
src/main/haskell/Hydra/Avro/Encoder.hs view
@@ -1,18 +1,24 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Hydra-to-Avro encoder: converts Hydra types and terms to Avro schemas and JSON values module Hydra.Avro.Encoder where+ import qualified Hydra.Annotations as Annotations import qualified Hydra.Ast as Ast import qualified Hydra.Avro.Environment as Environment import qualified Hydra.Avro.Schema as Schema import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Core as ExtractCore+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers@@ -29,18 +35,23 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed+import qualified Hydra.Typing as Typing import qualified Hydra.Util as Util import qualified Hydra.Validation as Validation import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M+ -- | Build an Avro field from a name-adapter pair buildAvroField :: (Core.Name, (Coders.Adapter t0 Schema.Schema t1 t2 t3)) -> Schema.Field buildAvroField nameAd =@@ -55,16 +66,19 @@ Schema.fieldOrder = Nothing, Schema.fieldAliases = Nothing, Schema.fieldAnnotations = Maps.empty}+ -- | Create an empty encode environment with the given type map emptyEncodeEnvironment :: M.Map Core.Name Core.Type -> Environment.EncodeEnvironment emptyEncodeEnvironment typeMap = Environment.EncodeEnvironment { Environment.encodeEnvironmentTypeMap = typeMap, Environment.encodeEnvironmentEmitted = Maps.empty}+ -- | Encode a Hydra type to an Avro schema adapter, given the type map and a root name encodeType :: t0 -> M.Map Core.Name Core.Type -> Core.Name -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error) encodeType cx typeMap name_ = Eithers.map (\adEnv -> Pairs.first adEnv) (encodeTypeWithEnv cx name_ (emptyEncodeEnvironment typeMap))+ -- | Core encoding logic: recursively encode a Hydra type to an Avro schema encodeTypeInner :: t0 -> Maybe Core.Name -> Core.Type -> Environment.EncodeEnvironment -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error, Environment.EncodeEnvironment) encodeTypeInner cx mName typ env =@@ -130,7 +144,7 @@ Graph.graphPrimitives = Maps.empty, Graph.graphSchemaTypes = Maps.empty, Graph.graphTypeVariables = Sets.empty}) k) (\kStr -> Eithers.map (\vJson -> (kStr, vJson)) (Coders.coderEncode (Coders.adapterCoder valAd) v)))- in (Eithers.map (\pairs -> Model.ValueObject (pairs)) (Eithers.mapList encodeEntry (Maps.toList v3)))),+ in (Eithers.map (\pairs -> Model.ValueObject pairs) (Eithers.mapList encodeEntry (Maps.toList v3)))), Coders.coderDecode = (\j -> case j of Model.ValueObject v3 -> let decodeEntry =@@ -168,7 +182,7 @@ _ -> Eithers.map (\t -> Core.TermOptional (Just t)) (Coders.coderDecode (Coders.adapterCoder innerAd) j))}}, env1))) Core.TypeWrap v0 -> encodeTypeInner cx mName v0 env- Core.TypeVariable v0 -> Optionals.cases (Maps.lookup v0 (Environment.encodeEnvironmentEmitted env)) (Optionals.cases (Maps.lookup v0 (Environment.encodeEnvironmentTypeMap env)) (err cx (Strings.cat2 "referenced type not found: " (Core.unName v0))) (\refType -> encodeTypeInner cx (Just v0) refType env)) (\existingAd -> Right (+ Core.TypeVariable v0 -> Optionals.cases (Maps.lookup v0 (Environment.encodeEnvironmentEmitted env)) (Optionals.cases (Maps.lookup v0 (Environment.encodeEnvironmentTypeMap env)) (err cx (Strings.concat2 "referenced type not found: " (Core.unName v0))) (\refType -> encodeTypeInner cx (Just v0) refType env)) (\existingAd -> Right ( Coders.Adapter { Coders.adapterIsLossy = (Coders.adapterIsLossy existingAd), Coders.adapterSource = (Coders.adapterSource existingAd),@@ -176,16 +190,18 @@ Coders.adapterCoder = (Coders.adapterCoder existingAd)}, env)) _ -> err cx "unsupported Hydra type for Avro encoding"+ -- | Encode with full environment threading. Returns the adapter and updated environment encodeTypeWithEnv :: t0 -> Core.Name -> Environment.EncodeEnvironment -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error, Environment.EncodeEnvironment) encodeTypeWithEnv cx name_ env =- Optionals.cases (Maps.lookup name_ (Environment.encodeEnvironmentTypeMap env)) (err cx (Strings.cat2 "type not found in type map: " (Literals.showString (Core.unName name_)))) (\typ -> encodeTypeInner cx (Just name_) typ env)+ Optionals.cases (Maps.lookup name_ (Environment.encodeEnvironmentTypeMap env)) (err cx (Strings.concat2 "type not found in type map: " (Literals.printString (Core.unName name_)))) (\typ -> encodeTypeInner cx (Just name_) typ env)+ -- | Adapter for all-unit union types (enums) enumAdapter :: t0 -> Core.Type -> Maybe Core.Name -> M.Map Core.Name Core.Term -> [Core.FieldType] -> Environment.EncodeEnvironment -> Either t1 (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error, Environment.EncodeEnvironment) enumAdapter cx typ mName annotations fieldTypes env0 = let symbols = Lists.map (\ft -> localName (Core.fieldTypeName ft)) fieldTypes- typeName = Optionals.fromOptional (typeToName typ) mName+ typeName = Optionals.withDefault (typeToName typ) mName avroAnnotations = hydraAnnotationsToAvro annotations avroSchema = Schema.SchemaNamed (Schema.Named {@@ -207,7 +223,7 @@ Core.TermInject v0 -> let fname = Core.injectionField v0 in (Right (Model.ValueString (localName (Core.fieldName fname))))- _ -> err cx "expected union term for enum"),+ _ -> Left (Errors.ErrorOther (Errors.OtherError "expected union term for enum"))), Coders.coderDecode = (\j -> case j of Model.ValueString v0 -> Right (Core.TermInject (Core.Injection { Core.injectionTypeName = typeName,@@ -219,9 +235,11 @@ Environment.encodeEnvironmentTypeMap = (Environment.encodeEnvironmentTypeMap env0), Environment.encodeEnvironmentEmitted = (Maps.insert typeName adapter_ (Environment.encodeEnvironmentEmitted env0))} in (Right (adapter_, env1))+ -- | Construct an error result with a message in context err :: t0 -> String -> Either Errors.Error t1 err cx msg = Left (Errors.ErrorOther (Errors.OtherError msg))+ -- | Extract annotations from a potentially annotated type extractAnnotations :: Core.Type -> (M.Map Core.Name Core.Term, Core.Type) extractAnnotations typ =@@ -234,6 +252,7 @@ bareType = Pairs.second innerResult in (Maps.union anns innerAnns, bareType) _ -> (Maps.empty, typ)+ -- | Create an adapter for float types floatAdapter :: t0 -> t1 -> Core.FloatType -> Either t2 (Coders.Adapter t1 Schema.Schema Core.Term Model.Value Errors.Error) floatAdapter cx typ ft =@@ -271,14 +290,18 @@ Core.TermLiteral v0 -> case v0 of Core.LiteralFloat v1 -> Right (Model.ValueNumber (floatValueToDouble v1))) (\j -> case j of Model.ValueNumber v0 -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (Literals.decimalToFloat64 v0)))))+ -- | Convert any float value to a JSON decimal number floatValueToDouble :: Core.FloatValue -> Sci.Scientific floatValueToDouble fv = case fv of Core.FloatValueFloat32 v0 -> Literals.float32ToDecimal v0 Core.FloatValueFloat64 v0 -> Literals.float64ToDecimal v0+ -- | Fold over field types, building adapters and threading the environment-foldFieldAdapters :: t0 -> [Core.FieldType] -> Environment.EncodeEnvironment -> Either Errors.Error ([(Core.Name, (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error))], Environment.EncodeEnvironment)+foldFieldAdapters :: t0 -> [Core.FieldType] -> Environment.EncodeEnvironment -> Either Errors.Error (+ [(Core.Name, (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error))],+ Environment.EncodeEnvironment) foldFieldAdapters cx fieldTypes env0 = Lists.foldl (\acc -> \ft -> Eithers.bind acc (\accPair -> let soFar = Pairs.first accPair@@ -290,6 +313,7 @@ env2 = Pairs.second adEnv in (Right (Lists.concat2 soFar [ (fname, ad)], env2)))))) (Right ([], env0)) fieldTypes+ -- | Convert Hydra annotations to Avro annotation map hydraAnnotationsToAvro :: M.Map Core.Name Core.Term -> M.Map String Model.Value hydraAnnotationsToAvro anns =@@ -297,13 +321,16 @@ let k = Pairs.first entry v = Pairs.second entry in (Core.unName k, (termToJsonValue v))) (Maps.toList anns))+ -- | Encode a single type without a type map (for simple/anonymous types) hydraAvroAdapter :: t0 -> M.Map Core.Name Core.Type -> Core.Type -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error) hydraAvroAdapter cx typeMap typ = Eithers.map (\adEnv -> Pairs.first adEnv) (encodeTypeInner cx Nothing typ (emptyEncodeEnvironment typeMap))+ -- | Convert a Hydra Name to an Avro qualified name (local name, optional namespace) hydraNameToAvroName :: Core.Name -> (String, (Maybe String)) hydraNameToAvroName name_ = (localName name_, (nameNamespace name_))+ -- | Create an adapter for integer types integerAdapter :: t0 -> t1 -> Core.IntegerType -> Either t2 (Coders.Adapter t1 Schema.Schema Core.Term Model.Value Errors.Error) integerAdapter cx typ it =@@ -341,6 +368,7 @@ Core.TermLiteral v0 -> case v0 of Core.LiteralInteger v1 -> Right (Model.ValueNumber (integerValueToDouble v1))) (\j -> case j of Model.ValueNumber v0 -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 (Literals.bigintToInt64 (Literals.decimalToBigint v0))))))+ -- | Convert any integer value to a JSON decimal number integerValueToDouble :: Core.IntegerValue -> Sci.Scientific integerValueToDouble iv =@@ -354,6 +382,7 @@ Core.IntegerValueUint16 v0 -> Literals.bigintToDecimal (Literals.uint16ToBigint v0) Core.IntegerValueUint32 v0 -> Literals.bigintToDecimal (Literals.uint32ToBigint v0) Core.IntegerValueUint64 v0 -> Literals.bigintToDecimal (Literals.uint64ToBigint v0)+ -- | Create an adapter for literal types literalAdapter :: t0 -> t1 -> Core.LiteralType -> Either t2 (Coders.Adapter t1 Schema.Schema Core.Term Model.Value Errors.Error) literalAdapter cx typ lt =@@ -377,31 +406,32 @@ Model.ValueString v1 -> Right (Core.TermLiteral (Core.LiteralString v1))) Core.LiteralTypeBinary -> simple (Schema.SchemaPrimitive Schema.PrimitiveBytes) False (\t -> case t of Core.TermLiteral v1 -> case v1 of- Core.LiteralBinary v2 -> Right (Model.ValueString (Literals.binaryToString v2))) (\j -> case j of- Model.ValueString v1 -> Right (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary v1))))+ Core.LiteralBinary v2 -> Right (Model.ValueString (Literals.binaryToBase64 v2))) (\j -> case j of+ Model.ValueString v1 -> Right (Core.TermLiteral (Core.LiteralBinary (Literals.base64ToBinary v1)))) Core.LiteralTypeInteger v0 -> integerAdapter cx typ v0 Core.LiteralTypeFloat v0 -> floatAdapter cx typ v0+ -- | Extract the local part of a qualified name localName :: Core.Name -> String localName name_ = let s = Core.unName name_ parts = Strings.splitOn "." s- in (Optionals.fromOptional s (Lists.maybeLast parts))+ in (Optionals.withDefault s (Lists.last parts))+ -- | Extract the namespace from a qualified name, if any nameNamespace :: Core.Name -> Maybe String nameNamespace name_ = let s = Core.unName name_ parts = Strings.splitOn "." s- in (Logic.ifElse (Equality.equal (Lists.length parts) 1) Nothing (Optionals.map (\ps -> Strings.intercalate "." ps) (Lists.maybeInit parts)))+ in (Logic.ifElse (Equality.equal (Lists.length parts) 1) Nothing (Optionals.map (\ps -> Strings.join "." ps) (Lists.init parts)))+ -- | Build a named type adapter (shared between record and union-as-record)-namedTypeAdapter :: t0 -> Core.Type -> Maybe Core.Name -> M.Map Core.Name Core.Term -> [Core.FieldType] -> Environment.EncodeEnvironment -> ([Schema.Field] -> Schema.NamedType) -> (t0 -> Core.Name -> [(Core.Name, (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error))] -> (- (Core.Term -> Either Errors.Error Model.Value),- (Model.Value -> Either Errors.Error Core.Term))) -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error, Environment.EncodeEnvironment)+namedTypeAdapter :: t0 -> Core.Type -> Maybe Core.Name -> M.Map Core.Name Core.Term -> [Core.FieldType] -> Environment.EncodeEnvironment -> ([Schema.Field] -> Schema.NamedType) -> (t0 -> Core.Name -> [(Core.Name, (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error))] -> ((Core.Term -> Either Errors.Error Model.Value), (Model.Value -> Either Errors.Error Core.Term))) -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error, Environment.EncodeEnvironment) namedTypeAdapter cx typ mName annotations fieldTypes env0 mkNamedType mkCoder = - let typeName = Optionals.fromOptional (typeToName typ) mName+ let typeName = Optionals.withDefault (typeToName typ) mName in (Optionals.cases (Maps.lookup typeName (Environment.encodeEnvironmentEmitted env0)) (Eithers.bind (foldFieldAdapters cx fieldTypes env0) (\faResult -> let fieldAdapters = Pairs.first faResult env1 = Pairs.second faResult@@ -432,10 +462,9 @@ Environment.encodeEnvironmentTypeMap = (Environment.encodeEnvironmentTypeMap env1), Environment.encodeEnvironmentEmitted = (Maps.insert typeName adapter_ (Environment.encodeEnvironmentEmitted env1))} in (Right (adapter_, env2)))) (\existingAd -> Right (existingAd, env0)))+ -- | Build a record term coder from field adapters-recordTermCoder :: t0 -> Core.Name -> [(Core.Name, (Coders.Adapter t1 t2 Core.Term Model.Value Errors.Error))] -> (- (Core.Term -> Either Errors.Error Model.Value),- (Model.Value -> Either Errors.Error Core.Term))+recordTermCoder :: t0 -> Core.Name -> [(Core.Name, (Coders.Adapter t1 t2 Core.Term Model.Value Errors.Error))] -> ((Core.Term -> Either Errors.Error Model.Value), (Model.Value -> Either Errors.Error Core.Term)) recordTermCoder cx typeName fieldAdapters = let encode =@@ -447,26 +476,28 @@ \nameAd -> let fname = Pairs.first nameAd ad = Pairs.second nameAd- fTerm = Optionals.fromOptional Core.TermUnit (Maps.lookup fname fieldMap)+ fTerm = Optionals.withDefault Core.TermUnit (Maps.lookup fname fieldMap) in (Eithers.map (\jv -> (localName fname, jv)) (Coders.coderEncode (Coders.adapterCoder ad) fTerm))- in (Eithers.map (\pairs -> Model.ValueObject (pairs)) (Eithers.mapList encodeField fieldAdapters))+ in (Eithers.map (\pairs -> Model.ValueObject pairs) (Eithers.mapList encodeField fieldAdapters)) _ -> err cx "expected record term" decode = \json -> case json of Model.ValueObject v0 ->- let decodeField =- \nameAd ->- let fname = Pairs.first nameAd- ad = Pairs.second nameAd- jv = Optionals.fromOptional Model.ValueNull (Maps.lookup (localName fname) (Maps.fromList v0))- in (Eithers.map (\t -> Core.Field {- Core.fieldName = fname,- Core.fieldTerm = t}) (Coders.coderDecode (Coders.adapterCoder ad) jv))+ let mm = Maps.fromList v0+ decodeField =+ \nameAd ->+ let fname = Pairs.first nameAd+ ad = Pairs.second nameAd+ jv = Optionals.withDefault Model.ValueNull (Maps.lookup (localName fname) mm)+ in (Eithers.map (\t -> Core.Field {+ Core.fieldName = fname,+ Core.fieldTerm = t}) (Coders.coderDecode (Coders.adapterCoder ad) jv)) in (Eithers.map (\fields -> Core.TermRecord (Core.Record { Core.recordTypeName = typeName, Core.recordFields = fields})) (Eithers.mapList decodeField fieldAdapters)) _ -> err cx "expected JSON object" in (encode, decode)+ -- | Convert a Hydra term to a JSON value (for annotation values) termToJsonValue :: Core.Term -> Model.Value termToJsonValue term =@@ -476,9 +507,9 @@ Core.LiteralBoolean v1 -> Model.ValueBoolean v1 Core.LiteralInteger v1 -> Model.ValueNumber (integerValueToDouble v1) Core.LiteralFloat v1 -> Model.ValueNumber (floatValueToDouble v1)- Core.LiteralBinary v1 -> Model.ValueString (Literals.binaryToString v1)+ Core.LiteralBinary v1 -> Model.ValueString (Literals.binaryToBase64 v1) Core.TermList v0 -> Model.ValueArray (Lists.map termToJsonValue v0)- Core.TermMap v0 -> Model.ValueObject ((Lists.map (\entry ->+ Core.TermMap v0 -> Model.ValueObject (Lists.map (\entry -> let k = Pairs.first entry v = Pairs.second entry in (@@ -487,9 +518,10 @@ Core.LiteralString v2 -> v2 _ -> "<key>" _ -> "<key>",- (termToJsonValue v))) (Maps.toList v0)))+ (termToJsonValue v))) (Maps.toList v0)) Core.TermRecord v0 -> Logic.ifElse (Lists.null (Core.recordFields v0)) Model.ValueNull (Model.ValueString "<record>") _ -> Model.ValueString "<term>"+ -- | Generate a default name for an anonymous type typeToName :: Core.Type -> Core.Name typeToName t =@@ -497,6 +529,7 @@ Core.TypeRecord _ -> Core.Name "Record" Core.TypeUnion _ -> Core.Name "Union" _ -> Core.Name "Unknown"+ -- | Adapter for general unions (encoded as records with optional fields) unionAsRecordAdapter :: t0 -> Core.Type -> Maybe Core.Name -> M.Map Core.Name Core.Term -> [Core.FieldType] -> Environment.EncodeEnvironment -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error, Environment.EncodeEnvironment) unionAsRecordAdapter cx typ mName annotations fieldTypes env0 =@@ -517,7 +550,7 @@ Schema.fieldOrder = Nothing, Schema.fieldAliases = Nothing, Schema.fieldAnnotations = Maps.empty}) fieldAdapters- typeName = Optionals.fromOptional (typeToName typ) mName+ typeName = Optionals.withDefault (typeToName typ) mName avroAnnotations = hydraAnnotationsToAvro annotations avroSchema = Schema.SchemaNamed (Schema.Named {@@ -543,26 +576,27 @@ let fname = Pairs.first nameAd ad = Pairs.second nameAd in (Logic.ifElse (Equality.equal (Core.unName fname) (Core.unName activeName)) (Eithers.map (\jv -> (localName fname, jv)) (Coders.coderEncode (Coders.adapterCoder ad) activeValue)) (Right (localName fname, Model.ValueNull)))- in (Eithers.map (\pairs -> Model.ValueObject (pairs)) (Eithers.mapList encodePair fieldAdapters))- _ -> err cx "expected union term"),+ in (Eithers.map (\pairs -> Model.ValueObject pairs) (Eithers.mapList encodePair fieldAdapters))+ _ -> Left (Errors.ErrorOther (Errors.OtherError "expected union term"))), Coders.coderDecode = (\j -> case j of Model.ValueObject v0 ->- let findActive =- \remaining -> Optionals.cases (Lists.uncons remaining) (err cx "no non-null field in union record") (\p ->- let head_ = Pairs.first p- rest_ = Pairs.second p- fname = Pairs.first head_- ad = Pairs.second head_- mjv = Maps.lookup (localName fname) (Maps.fromList v0)- in (Optionals.cases mjv (findActive rest_) (\jv -> case jv of- Model.ValueNull -> findActive rest_- _ -> Eithers.map (\t -> Core.TermInject (Core.Injection {- Core.injectionTypeName = typeName,- Core.injectionField = Core.Field {- Core.fieldName = fname,- Core.fieldTerm = t}})) (Coders.coderDecode (Coders.adapterCoder ad) jv))))+ let mm = Maps.fromList v0+ findActive =+ \remaining -> Optionals.cases (Lists.uncons remaining) (Left (Errors.ErrorOther (Errors.OtherError "no non-null field in union record"))) (\p ->+ let head_ = Pairs.first p+ rest_ = Pairs.second p+ fname = Pairs.first head_+ ad = Pairs.second head_+ mjv = Maps.lookup (localName fname) mm+ in (Optionals.cases mjv (findActive rest_) (\jv -> case jv of+ Model.ValueNull -> findActive rest_+ _ -> Eithers.map (\t -> Core.TermInject (Core.Injection {+ Core.injectionTypeName = typeName,+ Core.injectionField = Core.Field {+ Core.fieldName = fname,+ Core.fieldTerm = t}})) (Coders.coderDecode (Coders.adapterCoder ad) jv)))) in (findActive fieldAdapters)- _ -> err cx "expected JSON object for union-as-record")}}+ _ -> Left (Errors.ErrorOther (Errors.OtherError "expected JSON object for union-as-record")))}} env2 = Environment.EncodeEnvironment { Environment.encodeEnvironmentTypeMap = (Environment.encodeEnvironmentTypeMap env1),
src/main/haskell/Hydra/Avro/Environment.hs view
@@ -1,7 +1,9 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Type definitions for the Avro code generation environment module Hydra.Avro.Environment where+ import qualified Hydra.Avro.Schema as Schema import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core@@ -10,17 +12,25 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M--- | An Avro qualified name with optional namespace-data AvroQualifiedName =- AvroQualifiedName {- -- | The optional namespace- avroQualifiedNameNamespace :: (Maybe String),- -- | The local name- avroQualifiedNameName :: String}- deriving (Eq, Ord, Read, Show)-_AvroQualifiedName = Core.Name "hydra.avro.environment.AvroQualifiedName"-_AvroQualifiedName_namespace = Core.Name "namespace"-_AvroQualifiedName_name = Core.Name "name"++-- | Environment for Avro-to-Hydra code generation+data AvroEnvironment =+ AvroEnvironment {+ -- | Named adapters for previously processed schemas+ avroEnvironmentNamedAdapters :: (M.Map AvroQualifiedName (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term Errors.Error)),+ -- | The current Avro namespace+ avroEnvironmentNamespace :: (Maybe String),+ -- | Generated Hydra elements+ avroEnvironmentElements :: (M.Map Core.Name Core.Binding)}++_AvroEnvironment = Core.Name "hydra.avro.environment.AvroEnvironment"++_AvroEnvironment_namedAdapters = Core.Name "namedAdapters"++_AvroEnvironment_namespace = Core.Name "namespace"++_AvroEnvironment_elements = Core.Name "elements"+ -- | An Avro foreign key annotation linking a field to another type data AvroForeignKey = AvroForeignKey {@@ -28,9 +38,13 @@ avroForeignKeyTypeName :: Core.Name, -- | A function which constructs element names from string values avroForeignKeyConstructor :: (String -> Core.Name)}+ _AvroForeignKey = Core.Name "hydra.avro.environment.AvroForeignKey"+ _AvroForeignKey_typeName = Core.Name "typeName"+ _AvroForeignKey_constructor = Core.Name "constructor"+ -- | An Avro primary key annotation identifying the element name field data AvroPrimaryKey = AvroPrimaryKey {@@ -38,22 +52,28 @@ avroPrimaryKeyFieldName :: Core.Name, -- | A function which constructs element names from string values avroPrimaryKeyConstructor :: (String -> Core.Name)}+ _AvroPrimaryKey = Core.Name "hydra.avro.environment.AvroPrimaryKey"+ _AvroPrimaryKey_fieldName = Core.Name "fieldName"+ _AvroPrimaryKey_constructor = Core.Name "constructor"--- | Environment for Avro-to-Hydra code generation-data AvroEnvironment =- AvroEnvironment {- -- | Named adapters for previously processed schemas- avroEnvironmentNamedAdapters :: (M.Map AvroQualifiedName (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term Errors.Error)),- -- | The current Avro namespace- avroEnvironmentNamespace :: (Maybe String),- -- | Generated Hydra elements- avroEnvironmentElements :: (M.Map Core.Name Core.Binding)}-_AvroEnvironment = Core.Name "hydra.avro.environment.AvroEnvironment"-_AvroEnvironment_namedAdapters = Core.Name "namedAdapters"-_AvroEnvironment_namespace = Core.Name "namespace"-_AvroEnvironment_elements = Core.Name "elements"++-- | An Avro qualified name with optional namespace+data AvroQualifiedName =+ AvroQualifiedName {+ -- | The optional namespace+ avroQualifiedNameNamespace :: (Maybe String),+ -- | The local name+ avroQualifiedNameName :: String}+ deriving (Eq, Ord, Read, Show)++_AvroQualifiedName = Core.Name "hydra.avro.environment.AvroQualifiedName"++_AvroQualifiedName_namespace = Core.Name "namespace"++_AvroQualifiedName_name = Core.Name "name"+ -- | Environment for Hydra-to-Avro encoding, tracking which named types have been emitted data EncodeEnvironment = EncodeEnvironment {@@ -61,6 +81,9 @@ encodeEnvironmentTypeMap :: (M.Map Core.Name Core.Type), -- | Adapters for types that have already been fully emitted (emit references for these) encodeEnvironmentEmitted :: (M.Map Core.Name (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value Errors.Error))}+ _EncodeEnvironment = Core.Name "hydra.avro.environment.EncodeEnvironment"+ _EncodeEnvironment_typeMap = Core.Name "typeMap"+ _EncodeEnvironment_emitted = Core.Name "emitted"
src/main/haskell/Hydra/Avro/Language.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Language constraints for Apache Avro module Hydra.Avro.Language where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Lexical as Lexical@@ -17,10 +23,13 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -29,6 +38,7 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Language constraints for Apache Avro avroLanguage :: Coders.Language avroLanguage =@@ -40,7 +50,23 @@ Coders.languageConstraintsIntegerTypes = integerTypes, Coders.languageConstraintsTermVariants = termVariants, Coders.languageConstraintsTypeVariants = typeVariants,- Coders.languageConstraintsTypes = typePredicate}}+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeaturePartialApplication,+ Coders.LanguageFeatureNestedCaseStatements,+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "avsc")} where literalVariants = Sets.fromList [
src/main/haskell/Hydra/Avro/Schema.hs view
@@ -1,19 +1,27 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | A model for Avro schemas. Based on the Avro 1.11.1 specification: -- | https://avro.apache.org/docs/1.11.1/specification module Hydra.Avro.Schema where+ import qualified Hydra.Core as Core import qualified Hydra.Json.Model as Model import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M++-- | An Avro array schema data Array = Array { arrayItems :: Schema} deriving (Eq, Ord, Read, Show)+ _Array = Core.Name "hydra.avro.schema.Array"+ _Array_items = Core.Name "items"++-- | An Avro enum schema data Enum = Enum { -- | a JSON array, listing symbols, as JSON strings. All symbols in an enum must be unique; duplicates are prohibited. Every symbol must match the regular expression [A-Za-z_][A-Za-z0-9_]* (the same requirement as for names)@@ -21,9 +29,14 @@ -- | A default value for this enumeration, used during resolution when the reader encounters a symbol from the writer that isn't defined in the reader's schema. The value provided here must be a JSON string that's a member of the symbols array enumDefault :: (Maybe String)} deriving (Eq, Ord, Read, Show)+ _Enum = Core.Name "hydra.avro.schema.Enum"+ _Enum_symbols = Core.Name "symbols"+ _Enum_default = Core.Name "default"++-- | An Avro record field data Field = Field { -- | a JSON string providing the name of the field@@ -41,27 +54,45 @@ -- | Any additional key/value pairs attached to the field fieldAnnotations :: (M.Map String Model.Value)} deriving (Eq, Ord, Read, Show)+ _Field = Core.Name "hydra.avro.schema.Field"+ _Field_name = Core.Name "name"+ _Field_doc = Core.Name "doc"+ _Field_type = Core.Name "type"+ _Field_default = Core.Name "default"+ _Field_order = Core.Name "order"+ _Field_aliases = Core.Name "aliases"+ _Field_annotations = Core.Name "annotations"++-- | An Avro fixed-size binary schema data Fixed = Fixed { -- | an integer, specifying the number of bytes per value fixedSize :: Int} deriving (Eq, Ord, Read, Show)+ _Fixed = Core.Name "hydra.avro.schema.Fixed"+ _Fixed_size = Core.Name "size"++-- | An Avro map schema data Map = Map { mapValues :: Schema} deriving (Eq, Ord, Read, Show)+ _Map = Core.Name "hydra.avro.schema.Map"+ _Map_values = Core.Name "values"++-- | An Avro named schema: enum, fixed, or record data Named = Named { -- | a string naming this schema@@ -76,31 +107,52 @@ -- | Any additional key/value pairs attached to the type namedAnnotations :: (M.Map String Model.Value)} deriving (Eq, Ord, Read, Show)+ _Named = Core.Name "hydra.avro.schema.Named"+ _Named_name = Core.Name "name"+ _Named_namespace = Core.Name "namespace"+ _Named_aliases = Core.Name "aliases"+ _Named_doc = Core.Name "doc"+ _Named_type = Core.Name "type"+ _Named_annotations = Core.Name "annotations"++-- | The type-specific content of an Avro named schema data NamedType = NamedTypeEnum Enum | NamedTypeFixed Fixed | NamedTypeRecord Record deriving (Eq, Ord, Read, Show)+ _NamedType = Core.Name "hydra.avro.schema.NamedType"+ _NamedType_enum = Core.Name "enum"+ _NamedType_fixed = Core.Name "fixed"+ _NamedType_record = Core.Name "record"++-- | Specifies how a field impacts sort ordering of its enclosing record data Order = OrderAscending | OrderDescending | OrderIgnore deriving (Eq, Ord, Read, Show)+ _Order = Core.Name "hydra.avro.schema.Order"+ _Order_ascending = Core.Name "ascending"+ _Order_descending = Core.Name "descending"+ _Order_ignore = Core.Name "ignore"++-- | An Avro primitive type data Primitive = -- | no value PrimitiveNull |@@ -119,22 +171,37 @@ -- | unicode character sequence PrimitiveString deriving (Eq, Ord, Read, Show)+ _Primitive = Core.Name "hydra.avro.schema.Primitive"+ _Primitive_null = Core.Name "null"+ _Primitive_boolean = Core.Name "boolean"+ _Primitive_int = Core.Name "int"+ _Primitive_long = Core.Name "long"+ _Primitive_float = Core.Name "float"+ _Primitive_double = Core.Name "double"+ _Primitive_bytes = Core.Name "bytes"+ _Primitive_string = Core.Name "string"++-- | An Avro record schema data Record = Record { -- | a JSON array, listing fields recordFields :: [Field]} deriving (Eq, Ord, Read, Show)+ _Record = Core.Name "hydra.avro.schema.Record"+ _Record_fields = Core.Name "fields"++-- | An Avro schema, in any of its forms data Schema = SchemaArray Array | SchemaMap Map |@@ -144,15 +211,25 @@ SchemaReference String | SchemaUnion Union deriving (Eq, Ord, Read, Show)+ _Schema = Core.Name "hydra.avro.schema.Schema"+ _Schema_array = Core.Name "array"+ _Schema_map = Core.Name "map"+ _Schema_named = Core.Name "named"+ _Schema_primitive = Core.Name "primitive"+ _Schema_reference = Core.Name "reference"+ _Schema_union = Core.Name "union"++-- | An Avro union schema: a list of alternative schemas newtype Union = Union { unUnion :: [Schema]} deriving (Eq, Ord, Read, Show)+ _Union = Core.Name "hydra.avro.schema.Union"
src/main/haskell/Hydra/Avro/SchemaJson.hs view
@@ -1,15 +1,21 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | JSON serialization and deserialization for Avro schemas module Hydra.Avro.SchemaJson where+ import qualified Hydra.Ast as Ast import qualified Hydra.Avro.Schema as Schema import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Json.Parser as Parser@@ -27,9 +33,12 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -39,162 +48,237 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M++-- | The JSON attribute name for the list of alternate names of a named type or field+avroAliases :: String+avroAliases = "aliases"++-- | The JSON type-name value identifying an Avro array schema+avroArray :: String+avroArray = "array"++-- | The JSON value identifying ascending field order+avroAscending :: String+avroAscending = "ascending"++-- | The JSON type-name value identifying the Avro boolean primitive+avroBoolean :: String+avroBoolean = "boolean"++-- | The JSON type-name value identifying the Avro bytes primitive+avroBytes :: String+avroBytes = "bytes"++-- | The JSON attribute name for a field's or enum's default value+avroDefault :: String+avroDefault = "default"++-- | The JSON value identifying descending field order+avroDescending :: String+avroDescending = "descending"++-- | The JSON attribute name for a named type's or field's documentation string+avroDoc :: String+avroDoc = "doc"++-- | The JSON type-name value identifying the Avro double primitive+avroDouble :: String+avroDouble = "double"++-- | The JSON type-name value identifying an Avro enum schema+avroEnum :: String+avroEnum = "enum"++-- | The JSON attribute name for a record's list of fields+avroFields :: String+avroFields = "fields"++-- | The JSON type-name value identifying an Avro fixed schema+avroFixed :: String+avroFixed = "fixed"++-- | The JSON type-name value identifying the Avro float primitive+avroFloat :: String+avroFloat = "float"++-- | The JSON value identifying ignored field order+avroIgnore :: String+avroIgnore = "ignore"++-- | The JSON type-name value identifying the Avro int primitive+avroInt :: String+avroInt = "int"++-- | The JSON attribute name for an array schema's item type+avroItems :: String+avroItems = "items"++-- | The JSON type-name value identifying the Avro long primitive+avroLong :: String+avroLong = "long"++-- | The JSON type-name value identifying an Avro map schema+avroMap :: String+avroMap = "map"++-- | The JSON attribute name for a named type's or field's name+avroName :: String+avroName = "name"++-- | The JSON attribute name for a named type's namespace+avroNamespace :: String+avroNamespace = "namespace"++-- | The JSON type-name value identifying the Avro null primitive+avroNull :: String+avroNull = "null"++-- | The JSON attribute name for a field's sort order+avroOrder :: String+avroOrder = "order"++-- | The JSON type-name value identifying an Avro record schema+avroRecord :: String+avroRecord = "record"+ -- | Create a coder between Avro schemas and JSON values avroSchemaJsonCoder :: t0 -> Coders.Coder Schema.Schema Model.Value Errors.Error avroSchemaJsonCoder cx = Coders.Coder { Coders.coderEncode = (\schema -> Right (encodeSchema schema)), Coders.coderDecode = (\json -> decodeSchema cx json)}+ -- | Create a coder between Avro schemas and JSON strings avroSchemaStringCoder :: t0 -> Coders.Coder Schema.Schema String Errors.Error avroSchemaStringCoder cx = Coders.Coder { Coders.coderEncode = (\schema -> Right (showJsonValue (encodeSchema schema))), Coders.coderDecode = (\s -> Eithers.bind (Eithers.either (\e -> err cx e) (\v -> Right v) (stringToJsonValue s)) (\json -> decodeSchema cx json))}-avro_aliases :: String-avro_aliases = "aliases"-avro_array :: String-avro_array = "array"-avro_ascending :: String-avro_ascending = "ascending"-avro_boolean :: String-avro_boolean = "boolean"-avro_bytes :: String-avro_bytes = "bytes"-avro_default :: String-avro_default = "default"-avro_descending :: String-avro_descending = "descending"-avro_doc :: String-avro_doc = "doc"-avro_double :: String-avro_double = "double"-avro_enum :: String-avro_enum = "enum"-avro_fields :: String-avro_fields = "fields"-avro_fixed :: String-avro_fixed = "fixed"-avro_float :: String-avro_float = "float"-avro_ignore :: String-avro_ignore = "ignore"-avro_int :: String-avro_int = "int"-avro_items :: String-avro_items = "items"-avro_long :: String-avro_long = "long"-avro_map :: String-avro_map = "map"-avro_name :: String-avro_name = "name"-avro_namespace :: String-avro_namespace = "namespace"-avro_null :: String-avro_null = "null"-avro_order :: String-avro_order = "order"-avro_record :: String-avro_record = "record"-avro_size :: String-avro_size = "size"-avro_string :: String-avro_string = "string"-avro_symbols :: String-avro_symbols = "symbols"-avro_type :: String-avro_type = "type"-avro_values :: String-avro_values = "values"++-- | The JSON attribute name for a fixed schema's byte size+avroSize :: String+avroSize = "size"++-- | The JSON type-name value identifying the Avro string primitive+avroString :: String+avroString = "string"++-- | The JSON attribute name for an enum schema's list of symbols+avroSymbols :: String+avroSymbols = "symbols"++-- | The JSON attribute name for a schema's type name+avroType :: String+avroType = "type"++-- | The JSON attribute name for a map schema's value type+avroValues :: String+avroValues = "values"+ -- | Decode aliases from a JSON object map decodeAliases :: t0 -> M.Map String Model.Value -> Either t1 (Maybe [String]) decodeAliases cx m =- Eithers.bind (optArrayE cx avro_aliases m) (\mArr -> Optionals.cases mArr (Right Nothing) (\arr -> Eithers.map (\strs -> Optionals.pure strs) (Eithers.mapList (expectStringE cx) arr)))+ Eithers.bind (optArrayE cx avroAliases m) (\mArr -> Optionals.cases mArr (Right Nothing) (\arr -> Eithers.map (\strs -> Optionals.pure strs) (Eithers.mapList (expectStringE cx) arr)))+ -- | Decode an Avro array schema from a JSON object map decodeArraySchema :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.Schema decodeArraySchema cx m =- Eithers.bind (requireE cx avro_items m) (\items -> Eithers.map (\s -> Schema.SchemaArray (Schema.Array {+ Eithers.bind (requireE cx avroItems m) (\items -> Eithers.map (\s -> Schema.SchemaArray (Schema.Array { Schema.arrayItems = s})) (decodeSchema cx items))+ -- | Decode an Avro enum type from a JSON object map decodeEnum :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.NamedType decodeEnum cx m =- Eithers.bind (requireArrayE cx avro_symbols m) (\syms -> Eithers.bind (Eithers.mapList (expectStringE cx) syms) (\symbols -> Eithers.bind (optStringE cx avro_default m) (\defVal -> Right (Schema.NamedTypeEnum (Schema.Enum {+ Eithers.bind (requireArrayE cx avroSymbols m) (\syms -> Eithers.bind (Eithers.mapList (expectStringE cx) syms) (\symbols -> Eithers.bind (optStringE cx avroDefault m) (\defVal -> Right (Schema.NamedTypeEnum (Schema.Enum { Schema.enumSymbols = symbols, Schema.enumDefault = defVal})))))+ -- | Decode an Avro field from a JSON object map decodeField :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.Field decodeField cx m =- Eithers.bind (requireStringE cx avro_name m) (\name -> Eithers.bind (optStringE cx avro_doc m) (\fdoc -> Eithers.bind (requireE cx avro_type m) (\typeJson -> Eithers.bind (decodeSchema cx typeJson) (\fieldType -> Eithers.bind (Eithers.bind (optStringE cx avro_order m) (\mOrd -> Eithers.mapOptional (decodeOrder cx) mOrd)) (\order -> Eithers.bind (decodeAliases cx m) (\aliases -> Right (Schema.Field {+ Eithers.bind (requireStringE cx avroName m) (\name -> Eithers.bind (optStringE cx avroDoc m) (\fdoc -> Eithers.bind (requireE cx avroType m) (\typeJson -> Eithers.bind (decodeSchema cx typeJson) (\fieldType -> Eithers.bind (Eithers.bind (optStringE cx avroOrder m) (\mOrd -> Eithers.mapOptional (decodeOrder cx) mOrd)) (\order -> Eithers.bind (decodeAliases cx m) (\aliases -> Right (Schema.Field { Schema.fieldName = name, Schema.fieldDoc = fdoc, Schema.fieldType = fieldType,- Schema.fieldDefault = (optE avro_default m),+ Schema.fieldDefault = (optE avroDefault m), Schema.fieldOrder = order, Schema.fieldAliases = aliases, Schema.fieldAnnotations = (getAnnotations m)})))))))+ -- | Decode an Avro fixed type from a JSON object map decodeFixed :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.NamedType decodeFixed cx m =- Eithers.bind (requireNumberE cx avro_size m) (\n ->+ Eithers.bind (requireNumberE cx avroSize m) (\n -> let size = Literals.bigintToInt32 (Literals.decimalToBigint n) in (Right (Schema.NamedTypeFixed (Schema.Fixed { Schema.fixedSize = size}))))+ -- | Decode an Avro map schema from a JSON object map decodeMapSchema :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.Schema decodeMapSchema cx m =- Eithers.bind (requireE cx avro_values m) (\values -> Eithers.map (\s -> Schema.SchemaMap (Schema.Map {+ Eithers.bind (requireE cx avroValues m) (\values -> Eithers.map (\s -> Schema.SchemaMap (Schema.Map { Schema.mapValues = s})) (decodeSchema cx values))+ -- | Decode a named Avro schema from a JSON object map and a decoded named type result decodeNamedSchema :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.NamedType -> Either Errors.Error Schema.Schema decodeNamedSchema cx m namedTypeResult =- Eithers.bind (requireStringE cx avro_name m) (\name -> Eithers.bind (optStringE cx avro_namespace m) (\ns -> Eithers.bind (optStringE cx avro_doc m) (\sdoc -> Eithers.bind (decodeAliases cx m) (\aliases -> Eithers.bind namedTypeResult (\namedType -> Right (Schema.SchemaNamed (Schema.Named {+ Eithers.bind (requireStringE cx avroName m) (\name -> Eithers.bind (optStringE cx avroNamespace m) (\ns -> Eithers.bind (optStringE cx avroDoc m) (\sdoc -> Eithers.bind (decodeAliases cx m) (\aliases -> Eithers.bind namedTypeResult (\namedType -> Right (Schema.SchemaNamed (Schema.Named { Schema.namedName = name, Schema.namedNamespace = ns, Schema.namedAliases = aliases, Schema.namedDoc = sdoc, Schema.namedType = namedType, Schema.namedAnnotations = (getAnnotations m)})))))))+ -- | Decode an Avro schema from a JSON object given the type name decodeObjectSchema :: t0 -> M.Map String Model.Value -> String -> Either Errors.Error Schema.Schema decodeObjectSchema cx m typeName =- Logic.ifElse (Equality.equal typeName "array") (decodeArraySchema cx m) (Logic.ifElse (Equality.equal typeName "map") (decodeMapSchema cx m) (Logic.ifElse (Equality.equal typeName "record") (decodeNamedSchema cx m (decodeRecord cx m)) (Logic.ifElse (Equality.equal typeName "enum") (decodeNamedSchema cx m (decodeEnum cx m)) (Logic.ifElse (Equality.equal typeName "fixed") (decodeNamedSchema cx m (decodeFixed cx m)) (Optionals.cases (decodePrimitiveName typeName) (err cx (Strings.cat [+ Logic.ifElse (Equality.equal typeName "array") (decodeArraySchema cx m) (Logic.ifElse (Equality.equal typeName "map") (decodeMapSchema cx m) (Logic.ifElse (Equality.equal typeName "record") (decodeNamedSchema cx m (decodeRecord cx m)) (Logic.ifElse (Equality.equal typeName "enum") (decodeNamedSchema cx m (decodeEnum cx m)) (Logic.ifElse (Equality.equal typeName "fixed") (decodeNamedSchema cx m (decodeFixed cx m)) (Optionals.cases (decodePrimitiveName typeName) (err cx (Strings.concat [ "unknown type: ", typeName])) (\p -> Right (Schema.SchemaPrimitive p)))))))+ -- | Decode an Avro field ordering from a string decodeOrder :: t0 -> String -> Either Errors.Error Schema.Order decodeOrder cx o =- Logic.ifElse (Equality.equal o "ascending") (Right Schema.OrderAscending) (Logic.ifElse (Equality.equal o "descending") (Right Schema.OrderDescending) (Logic.ifElse (Equality.equal o "ignore") (Right Schema.OrderIgnore) (err cx (Strings.cat [+ Logic.ifElse (Equality.equal o "ascending") (Right Schema.OrderAscending) (Logic.ifElse (Equality.equal o "descending") (Right Schema.OrderDescending) (Logic.ifElse (Equality.equal o "ignore") (Right Schema.OrderIgnore) (err cx (Strings.concat [ "unknown order: ", o]))))+ -- | Decode a primitive type name string to a Primitive, or Nothing if not a primitive decodePrimitiveName :: String -> Maybe Schema.Primitive decodePrimitiveName s = Logic.ifElse (Equality.equal s "null") (Just Schema.PrimitiveNull) (Logic.ifElse (Equality.equal s "boolean") (Just Schema.PrimitiveBoolean) (Logic.ifElse (Equality.equal s "int") (Just Schema.PrimitiveInt) (Logic.ifElse (Equality.equal s "long") (Just Schema.PrimitiveLong) (Logic.ifElse (Equality.equal s "float") (Just Schema.PrimitiveFloat) (Logic.ifElse (Equality.equal s "double") (Just Schema.PrimitiveDouble) (Logic.ifElse (Equality.equal s "bytes") (Just Schema.PrimitiveBytes) (Logic.ifElse (Equality.equal s "string") (Just Schema.PrimitiveString) Nothing)))))))+ -- | Decode an Avro record type from a JSON object map decodeRecord :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.NamedType decodeRecord cx m =- Eithers.bind (requireArrayE cx avro_fields m) (\fieldJsons -> Eithers.bind (Eithers.mapList (\fj -> Eithers.bind (expectObjectE cx fj) (\fm -> decodeField cx fm)) fieldJsons) (\fields -> Right (Schema.NamedTypeRecord (Schema.Record {+ Eithers.bind (requireArrayE cx avroFields m) (\fieldJsons -> Eithers.bind (Eithers.mapList (\fj -> Eithers.bind (expectObjectE cx fj) (\fm -> decodeField cx fm)) fieldJsons) (\fields -> Right (Schema.NamedTypeRecord (Schema.Record { Schema.recordFields = fields}))))+ -- | Decode an Avro schema from a JSON value decodeSchema :: t0 -> Model.Value -> Either Errors.Error Schema.Schema decodeSchema cx v = case v of Model.ValueString v0 -> Optionals.cases (decodePrimitiveName v0) (Right (Schema.SchemaReference v0)) (\p -> Right (Schema.SchemaPrimitive p)) Model.ValueArray v0 -> Eithers.map (\decoded -> Schema.SchemaUnion (Schema.Union decoded)) (Eithers.mapList (decodeSchema cx) v0)- Model.ValueObject v0 -> Eithers.bind (requireStringE cx avro_type (Maps.fromList v0)) (\typeName -> decodeObjectSchema cx (Maps.fromList v0) typeName)- _ -> err cx (Strings.cat [+ Model.ValueObject v0 ->+ let m = Maps.fromList v0+ in (Eithers.bind (requireStringE cx avroType m) (\typeName -> decodeObjectSchema cx m typeName))+ _ -> err cx (Strings.concat [ "unexpected JSON value for schema: ", (showJsonValue v)])+ -- | Encode annotations as key-value pairs with @ prefix on keys encodeAnnotations :: M.Map String t0 -> [(String, t0)]-encodeAnnotations m = Lists.map (\entry -> (Strings.cat2 "@" (Pairs.first entry), (Pairs.second entry))) (Maps.toList m)+encodeAnnotations m = Lists.map (\entry -> (Strings.concat2 "@" (Pairs.first entry), (Pairs.second entry))) (Maps.toList m)+ -- | Encode an Avro array schema to a JSON object encodeArray :: Schema.Array -> Model.Value encodeArray arr =- Model.ValueObject ([+ Model.ValueObject [ ("type", (Model.ValueString "array")),- ("items", (encodeSchema (Schema.arrayItems arr)))])+ ("items", (encodeSchema (Schema.arrayItems arr)))]+ -- | Encode an Avro enum type as key-value pairs encodeEnum :: Schema.Enum -> [(String, Model.Value)] encodeEnum e =@@ -205,10 +289,11 @@ ("symbols", (Model.ValueArray (Lists.map (\s -> Model.ValueString s) (Schema.enumSymbols e))))], (Optionals.cases (Schema.enumDefault e) [] (\d -> [ ("default", (Model.ValueString d))]))]+ -- | Encode an Avro field to a JSON object encodeField :: Schema.Field -> Model.Value encodeField f =- Model.ValueObject ((Lists.concat [+ Model.ValueObject (Lists.concat [ [ ("name", (Model.ValueString (Schema.fieldName f)))], [@@ -221,23 +306,26 @@ encodeOrder o])), (Optionals.cases (Schema.fieldAliases f) [] (\als -> [ ("aliases", (Model.ValueArray (Lists.map (\a -> Model.ValueString a) als)))])),- (encodeAnnotations (Schema.fieldAnnotations f))]))+ (encodeAnnotations (Schema.fieldAnnotations f))])+ -- | Encode an Avro fixed type as key-value pairs encodeFixed :: Schema.Fixed -> [(String, Model.Value)] encodeFixed f = [ ("type", (Model.ValueString "fixed")), ("size", (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint (Schema.fixedSize f)))))]+ -- | Encode an Avro map schema to a JSON object encodeMap :: Schema.Map -> Model.Value encodeMap mp =- Model.ValueObject ([+ Model.ValueObject [ ("type", (Model.ValueString "map")),- ("values", (encodeSchema (Schema.mapValues mp)))])+ ("values", (encodeSchema (Schema.mapValues mp)))]+ -- | Encode an Avro named type to a JSON object encodeNamed :: Schema.Named -> Model.Value encodeNamed n =- Model.ValueObject ((Lists.concat [+ Model.ValueObject (Lists.concat [ [ ("name", (Model.ValueString (Schema.namedName n)))], (Optionals.cases (Schema.namedNamespace n) [] (\ns -> [@@ -247,7 +335,8 @@ (Optionals.cases (Schema.namedAliases n) [] (\als -> [ ("aliases", (Model.ValueArray (Lists.map (\a -> Model.ValueString a) als)))])), (encodeNamedType (Schema.namedType n)),- (encodeAnnotations (Schema.namedAnnotations n))]))+ (encodeAnnotations (Schema.namedAnnotations n))])+ -- | Encode the specific variant of a named Avro type encodeNamedType :: Schema.NamedType -> [(String, Model.Value)] encodeNamedType nt =@@ -255,6 +344,7 @@ Schema.NamedTypeEnum v0 -> encodeEnum v0 Schema.NamedTypeFixed v0 -> encodeFixed v0 Schema.NamedTypeRecord v0 -> encodeRecord v0+ -- | Encode an Avro field ordering as a key-value pair encodeOrder :: Schema.Order -> (String, Model.Value) encodeOrder o =@@ -264,6 +354,7 @@ Schema.OrderAscending -> "ascending" Schema.OrderDescending -> "descending" Schema.OrderIgnore -> "ignore")))+ -- | Encode an Avro primitive type as a JSON string encodePrimitive :: Schema.Primitive -> Model.Value encodePrimitive p =@@ -276,12 +367,14 @@ Schema.PrimitiveDouble -> "double" Schema.PrimitiveBytes -> "bytes" Schema.PrimitiveString -> "string")+ -- | Encode an Avro record type as key-value pairs encodeRecord :: Schema.Record -> [(String, Model.Value)] encodeRecord r = [ ("type", (Model.ValueString "record")), ("fields", (Model.ValueArray (Lists.map encodeField (Schema.recordFields r))))]+ -- | Encode an Avro schema to a JSON value encodeSchema :: Schema.Schema -> Model.Value encodeSchema schema =@@ -292,79 +385,96 @@ Schema.SchemaNamed v0 -> encodeNamed v0 Schema.SchemaReference v0 -> Model.ValueString v0 Schema.SchemaUnion v0 -> encodeUnion v0+ -- | Encode an Avro union as a JSON array of schemas encodeUnion :: Schema.Union -> Model.Value encodeUnion u = Model.ValueArray (Lists.map encodeSchema (Schema.unUnion u))+ -- | Construct an error result with a message in context err :: t0 -> String -> Either Errors.Error t1 err cx msg = Left (Errors.ErrorOther (Errors.OtherError msg))+ -- | Extract a JSON array or return an error expectArrayE :: t0 -> Model.Value -> Either t1 [Model.Value] expectArrayE cx value = case value of Model.ValueArray v0 -> Right v0+ -- | Extract a JSON number or return an error expectNumberE :: t0 -> Model.Value -> Either t1 Sci.Scientific expectNumberE cx value = case value of Model.ValueNumber v0 -> Right v0--- | Extract a JSON object or return an error++-- | Extract a JSON object as a name-keyed map or return an error (field order is dropped) expectObjectE :: t0 -> Model.Value -> Either t1 (M.Map String Model.Value) expectObjectE cx value = case value of Model.ValueObject v0 -> Right (Maps.fromList v0)+ -- | Extract a JSON string or return an error expectStringE :: t0 -> Model.Value -> Either t1 String expectStringE cx value = case value of Model.ValueString v0 -> Right v0+ -- | Extract annotation entries (keys starting with @) from a JSON object map getAnnotations :: M.Map String t0 -> M.Map String t0 getAnnotations m =- Maps.fromList (Optionals.cat (Lists.map (\entry ->+ Maps.fromList (Optionals.givens (Lists.map (\entry -> let k = Pairs.first entry v = Pairs.second entry- in (Logic.ifElse (Equality.equal (Optionals.fromOptional 0 (Strings.maybeCharAt 0 k)) 64) (Optionals.pure (Strings.fromList (Lists.drop 1 (Strings.toList k)), v)) Nothing)) (Maps.toList m)))+ in (Logic.ifElse (Equality.equal (Optionals.withDefault 0 (Strings.charAt 0 k)) 64) (Optionals.pure (Strings.fromList (Lists.drop 1 (Strings.toList k)), v)) Nothing)) (Maps.toList m)))+ -- | Look up an optional array attribute in a JSON object map optArrayE :: Ord t1 => (t0 -> t1 -> M.Map t1 Model.Value -> Either t2 (Maybe [Model.Value])) optArrayE cx fname m = Optionals.cases (Maps.lookup fname m) (Right Nothing) (\v -> Eithers.map (\a -> Optionals.pure a) (expectArrayE cx v))+ -- | Look up an optional attribute in a JSON object map optE :: Ord t0 => (t0 -> M.Map t0 t1 -> Maybe t1) optE k m = Maps.lookup k m+ -- | Look up an optional string attribute in a JSON object map optStringE :: Ord t1 => (t0 -> t1 -> M.Map t1 Model.Value -> Either t2 (Maybe String)) optStringE cx fname m = Optionals.cases (Maps.lookup fname m) (Right Nothing) (\v -> Eithers.map (\s -> Optionals.pure s) (expectStringE cx v))+ -- | Look up a required array attribute in a JSON object map requireArrayE :: t0 -> String -> M.Map String Model.Value -> Either Errors.Error [Model.Value] requireArrayE cx fname m = Eithers.bind (requireE cx fname m) (\v -> expectArrayE cx v)+ -- | Look up a required attribute in a JSON object map requireE :: t0 -> String -> M.Map String t1 -> Either Errors.Error t1 requireE cx fname m =- Optionals.cases (Maps.lookup fname m) (err cx (Strings.cat [+ Optionals.cases (Maps.lookup fname m) (err cx (Strings.concat [ "required attribute ",- (Literals.showString fname),+ (Literals.printString fname), " not found"])) (\v -> Right v)+ -- | Look up a required number attribute in a JSON object map requireNumberE :: t0 -> String -> M.Map String Model.Value -> Either Errors.Error Sci.Scientific requireNumberE cx fname m = Eithers.bind (requireE cx fname m) (\v -> expectNumberE cx v)+ -- | Look up a required string attribute in a JSON object map requireStringE :: t0 -> String -> M.Map String Model.Value -> Either Errors.Error String requireStringE cx fname m = Eithers.bind (requireE cx fname m) (\v -> expectStringE cx v)+ -- | Convert a JSON value to its string representation showJsonValue :: Model.Value -> String showJsonValue v = Writer.printJson v+ -- | Parse a JSON string, returning Either for compatibility stringToJsonValue :: String -> Either String Model.Value stringToJsonValue s = (\x -> case x of Parsing.ParseResultSuccess v0 -> Right (Parsing.parseSuccessValue v0) Parsing.ParseResultFailure v0 -> Left (Parsing.parseErrorMessage v0)) (Parser.parseJson s)+ -- | Construct an error for unexpected values unexpectedE :: t0 -> String -> String -> Either Errors.Error t1 unexpectedE cx expected found =- err cx (Strings.cat [+ err cx (Strings.concat [ "Expected ", expected, ", found: ",
src/main/haskell/Hydra/Avro/Testing.hs view
@@ -1,68 +1,138 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Test case types for the bidirectional Avro coder module Hydra.Avro.Testing where+ import qualified Hydra.Avro.Schema as Schema import qualified Hydra.Core as Core import qualified Hydra.Json.Model as Model import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci--- | A test case which maps an Avro schema to a Hydra type and compares the result-data TypeLevelForwardTestCase =- TypeLevelForwardTestCase {- -- | A human-readable description of what this test case covers- typeLevelForwardTestCaseDescription :: String,- -- | The input Avro schema- typeLevelForwardTestCaseSchema :: Schema.Schema,- -- | The expected Hydra type- typeLevelForwardTestCaseType :: Core.Type}++-- | A test case for the bidirectional Avro coder+data AvroTestCase =+ -- | Type-level forward mapping (Avro Schema -> Hydra Type)+ AvroTestCaseTypeLevelForward TypeLevelForwardTestCase |+ -- | Type-level reverse mapping (Hydra Type -> Avro Schema)+ AvroTestCaseTypeLevelReverse TypeLevelReverseTestCase |+ -- | Type-level round-trip starting from Avro (Avro -> Hydra -> Avro)+ AvroTestCaseTypeLevelRoundTripAvro TypeLevelRoundTripAvroTestCase |+ -- | Type-level round-trip starting from Hydra (Hydra -> Avro -> Hydra)+ AvroTestCaseTypeLevelRoundTripHydra TypeLevelRoundTripHydraTestCase |+ -- | Term-level forward mapping (JSON -> Hydra Term)+ AvroTestCaseTermLevelForward TermLevelForwardTestCase |+ -- | Term-level reverse mapping (Hydra Term -> JSON)+ AvroTestCaseTermLevelReverse TermLevelReverseTestCase |+ -- | Term-level round-trip starting from JSON (JSON -> Term -> JSON)+ AvroTestCaseTermLevelRoundTripJson TermLevelRoundTripJsonTestCase |+ -- | Term-level round-trip starting from a term (Term -> JSON -> Term)+ AvroTestCaseTermLevelRoundTripTerm TermLevelRoundTripTermTestCase |+ -- | Union-specific encoding and decoding+ AvroTestCaseUnion UnionTestCase |+ -- | Name mapping between Hydra and Avro+ AvroTestCaseNameMapping NameMappingTestCase |+ -- | Lossy conversion with annotation stashing+ AvroTestCaseLossiness LossinessTestCase |+ -- | Schema serialization to and from JSON+ AvroTestCaseSchemaSerialization SchemaSerializationTestCase deriving (Eq, Ord, Read, Show)-_TypeLevelForwardTestCase = Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"-_TypeLevelForwardTestCase_description = Core.Name "description"-_TypeLevelForwardTestCase_schema = Core.Name "schema"-_TypeLevelForwardTestCase_type = Core.Name "type"--- | A test case which maps a Hydra type to an Avro schema and compares the result-data TypeLevelReverseTestCase =- TypeLevelReverseTestCase {++_AvroTestCase = Core.Name "hydra.avro.testing.AvroTestCase"++_AvroTestCase_typeLevelForward = Core.Name "typeLevelForward"++_AvroTestCase_typeLevelReverse = Core.Name "typeLevelReverse"++_AvroTestCase_typeLevelRoundTripAvro = Core.Name "typeLevelRoundTripAvro"++_AvroTestCase_typeLevelRoundTripHydra = Core.Name "typeLevelRoundTripHydra"++_AvroTestCase_termLevelForward = Core.Name "termLevelForward"++_AvroTestCase_termLevelReverse = Core.Name "termLevelReverse"++_AvroTestCase_termLevelRoundTripJson = Core.Name "termLevelRoundTripJson"++_AvroTestCase_termLevelRoundTripTerm = Core.Name "termLevelRoundTripTerm"++_AvroTestCase_union = Core.Name "union"++_AvroTestCase_nameMapping = Core.Name "nameMapping"++_AvroTestCase_lossiness = Core.Name "lossiness"++_AvroTestCase_schemaSerialization = Core.Name "schemaSerialization"++-- | A test case which verifies that lossy conversions stash original information in annotations+data LossinessTestCase =+ LossinessTestCase { -- | A human-readable description of what this test case covers- typeLevelReverseTestCaseDescription :: String,- -- | The input Hydra type- typeLevelReverseTestCaseType :: Core.Type,- -- | The expected Avro schema- typeLevelReverseTestCaseSchema :: Schema.Schema}+ lossinessTestCaseDescription :: String,+ -- | The original Avro schema containing information that may be lost+ lossinessTestCaseOriginalSchema :: Schema.Schema,+ -- | The resulting Hydra type, which should carry annotations for any lost information+ lossinessTestCaseHydraType :: Core.Type,+ -- | The Avro schema recovered from the annotated Hydra type+ lossinessTestCaseRecoveredSchema :: Schema.Schema,+ -- | Whether the adapter reports this conversion as lossy+ lossinessTestCaseIsLossy :: Bool} deriving (Eq, Ord, Read, Show)-_TypeLevelReverseTestCase = Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"-_TypeLevelReverseTestCase_description = Core.Name "description"-_TypeLevelReverseTestCase_type = Core.Name "type"-_TypeLevelReverseTestCase_schema = Core.Name "schema"--- | A test case which maps an Avro schema to a Hydra type and back, verifying the result-data TypeLevelRoundTripAvroTestCase =- TypeLevelRoundTripAvroTestCase {++_LossinessTestCase = Core.Name "hydra.avro.testing.LossinessTestCase"++_LossinessTestCase_description = Core.Name "description"++_LossinessTestCase_originalSchema = Core.Name "originalSchema"++_LossinessTestCase_hydraType = Core.Name "hydraType"++_LossinessTestCase_recoveredSchema = Core.Name "recoveredSchema"++_LossinessTestCase_isLossy = Core.Name "isLossy"++-- | A test case for bidirectional name mapping between Hydra and Avro+data NameMappingTestCase =+ NameMappingTestCase { -- | A human-readable description of what this test case covers- typeLevelRoundTripAvroTestCaseDescription :: String,- -- | The original Avro schema- typeLevelRoundTripAvroTestCaseSchema :: Schema.Schema,- -- | The expected Avro schema after the round-trip, which may differ from the original due to normalization or information loss- typeLevelRoundTripAvroTestCaseExpectedSchema :: Schema.Schema}+ nameMappingTestCaseDescription :: String,+ -- | The Hydra name+ nameMappingTestCaseHydraName :: Core.Name,+ -- | The expected Avro qualified name (dotted string)+ nameMappingTestCaseAvroName :: String,+ -- | The expected Avro namespace, if any+ nameMappingTestCaseAvroNamespace :: (Maybe String)} deriving (Eq, Ord, Read, Show)-_TypeLevelRoundTripAvroTestCase = Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"-_TypeLevelRoundTripAvroTestCase_description = Core.Name "description"-_TypeLevelRoundTripAvroTestCase_schema = Core.Name "schema"-_TypeLevelRoundTripAvroTestCase_expectedSchema = Core.Name "expectedSchema"--- | A test case which maps a Hydra type to an Avro schema and back, verifying the result-data TypeLevelRoundTripHydraTestCase =- TypeLevelRoundTripHydraTestCase {++_NameMappingTestCase = Core.Name "hydra.avro.testing.NameMappingTestCase"++_NameMappingTestCase_description = Core.Name "description"++_NameMappingTestCase_hydraName = Core.Name "hydraName"++_NameMappingTestCase_avroName = Core.Name "avroName"++_NameMappingTestCase_avroNamespace = Core.Name "avroNamespace"++-- | A test case for Avro schema serialization to and from JSON+data SchemaSerializationTestCase =+ SchemaSerializationTestCase { -- | A human-readable description of what this test case covers- typeLevelRoundTripHydraTestCaseDescription :: String,- -- | The original Hydra type- typeLevelRoundTripHydraTestCaseType :: Core.Type,- -- | The expected Hydra type after the round-trip, which may differ from the original due to normalization or information loss- typeLevelRoundTripHydraTestCaseExpectedType :: Core.Type}+ schemaSerializationTestCaseDescription :: String,+ -- | The Avro schema+ schemaSerializationTestCaseSchema :: Schema.Schema,+ -- | The expected JSON representation of the schema+ schemaSerializationTestCaseJson :: Model.Value} deriving (Eq, Ord, Read, Show)-_TypeLevelRoundTripHydraTestCase = Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"-_TypeLevelRoundTripHydraTestCase_description = Core.Name "description"-_TypeLevelRoundTripHydraTestCase_type = Core.Name "type"-_TypeLevelRoundTripHydraTestCase_expectedType = Core.Name "expectedType"++_SchemaSerializationTestCase = Core.Name "hydra.avro.testing.SchemaSerializationTestCase"++_SchemaSerializationTestCase_description = Core.Name "description"++_SchemaSerializationTestCase_schema = Core.Name "schema"++_SchemaSerializationTestCase_json = Core.Name "json"+ -- | A test case which encodes a JSON value as a Hydra term using an Avro schema data TermLevelForwardTestCase = TermLevelForwardTestCase {@@ -75,11 +145,17 @@ -- | The expected Hydra term termLevelForwardTestCaseTerm :: Core.Term} deriving (Eq, Ord, Read, Show)+ _TermLevelForwardTestCase = Core.Name "hydra.avro.testing.TermLevelForwardTestCase"+ _TermLevelForwardTestCase_description = Core.Name "description"+ _TermLevelForwardTestCase_schema = Core.Name "schema"+ _TermLevelForwardTestCase_json = Core.Name "json"+ _TermLevelForwardTestCase_term = Core.Name "term"+ -- | A test case which decodes a Hydra term to a JSON value using an Avro schema data TermLevelReverseTestCase = TermLevelReverseTestCase {@@ -92,11 +168,17 @@ -- | The expected JSON value termLevelReverseTestCaseJson :: Model.Value} deriving (Eq, Ord, Read, Show)+ _TermLevelReverseTestCase = Core.Name "hydra.avro.testing.TermLevelReverseTestCase"+ _TermLevelReverseTestCase_description = Core.Name "description"+ _TermLevelReverseTestCase_schema = Core.Name "schema"+ _TermLevelReverseTestCase_term = Core.Name "term"+ _TermLevelReverseTestCase_json = Core.Name "json"+ -- | A test case which encodes a JSON value as a Hydra term and decodes it back, verifying the result data TermLevelRoundTripJsonTestCase = TermLevelRoundTripJsonTestCase {@@ -109,11 +191,17 @@ -- | The expected JSON value after the round-trip, which may differ from the original due to normalization termLevelRoundTripJsonTestCaseExpectedJson :: Model.Value} deriving (Eq, Ord, Read, Show)+ _TermLevelRoundTripJsonTestCase = Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"+ _TermLevelRoundTripJsonTestCase_description = Core.Name "description"+ _TermLevelRoundTripJsonTestCase_schema = Core.Name "schema"+ _TermLevelRoundTripJsonTestCase_json = Core.Name "json"+ _TermLevelRoundTripJsonTestCase_expectedJson = Core.Name "expectedJson"+ -- | A test case which decodes a Hydra term to JSON and encodes it back, verifying the result data TermLevelRoundTripTermTestCase = TermLevelRoundTripTermTestCase {@@ -126,11 +214,93 @@ -- | The expected Hydra term after the round-trip, which may differ from the original due to normalization termLevelRoundTripTermTestCaseExpectedTerm :: Core.Term} deriving (Eq, Ord, Read, Show)+ _TermLevelRoundTripTermTestCase = Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"+ _TermLevelRoundTripTermTestCase_description = Core.Name "description"+ _TermLevelRoundTripTermTestCase_type = Core.Name "type"+ _TermLevelRoundTripTermTestCase_term = Core.Name "term"+ _TermLevelRoundTripTermTestCase_expectedTerm = Core.Name "expectedTerm"++-- | A test case which maps an Avro schema to a Hydra type and compares the result+data TypeLevelForwardTestCase =+ TypeLevelForwardTestCase {+ -- | A human-readable description of what this test case covers+ typeLevelForwardTestCaseDescription :: String,+ -- | The input Avro schema+ typeLevelForwardTestCaseSchema :: Schema.Schema,+ -- | The expected Hydra type+ typeLevelForwardTestCaseType :: Core.Type}+ deriving (Eq, Ord, Read, Show)++_TypeLevelForwardTestCase = Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"++_TypeLevelForwardTestCase_description = Core.Name "description"++_TypeLevelForwardTestCase_schema = Core.Name "schema"++_TypeLevelForwardTestCase_type = Core.Name "type"++-- | A test case which maps a Hydra type to an Avro schema and compares the result+data TypeLevelReverseTestCase =+ TypeLevelReverseTestCase {+ -- | A human-readable description of what this test case covers+ typeLevelReverseTestCaseDescription :: String,+ -- | The input Hydra type+ typeLevelReverseTestCaseType :: Core.Type,+ -- | The expected Avro schema+ typeLevelReverseTestCaseSchema :: Schema.Schema}+ deriving (Eq, Ord, Read, Show)++_TypeLevelReverseTestCase = Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"++_TypeLevelReverseTestCase_description = Core.Name "description"++_TypeLevelReverseTestCase_type = Core.Name "type"++_TypeLevelReverseTestCase_schema = Core.Name "schema"++-- | A test case which maps an Avro schema to a Hydra type and back, verifying the result+data TypeLevelRoundTripAvroTestCase =+ TypeLevelRoundTripAvroTestCase {+ -- | A human-readable description of what this test case covers+ typeLevelRoundTripAvroTestCaseDescription :: String,+ -- | The original Avro schema+ typeLevelRoundTripAvroTestCaseSchema :: Schema.Schema,+ -- | The expected Avro schema after the round-trip, which may differ from the original due to normalization or information loss+ typeLevelRoundTripAvroTestCaseExpectedSchema :: Schema.Schema}+ deriving (Eq, Ord, Read, Show)++_TypeLevelRoundTripAvroTestCase = Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"++_TypeLevelRoundTripAvroTestCase_description = Core.Name "description"++_TypeLevelRoundTripAvroTestCase_schema = Core.Name "schema"++_TypeLevelRoundTripAvroTestCase_expectedSchema = Core.Name "expectedSchema"++-- | A test case which maps a Hydra type to an Avro schema and back, verifying the result+data TypeLevelRoundTripHydraTestCase =+ TypeLevelRoundTripHydraTestCase {+ -- | A human-readable description of what this test case covers+ typeLevelRoundTripHydraTestCaseDescription :: String,+ -- | The original Hydra type+ typeLevelRoundTripHydraTestCaseType :: Core.Type,+ -- | The expected Hydra type after the round-trip, which may differ from the original due to normalization or information loss+ typeLevelRoundTripHydraTestCaseExpectedType :: Core.Type}+ deriving (Eq, Ord, Read, Show)++_TypeLevelRoundTripHydraTestCase = Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"++_TypeLevelRoundTripHydraTestCase_description = Core.Name "description"++_TypeLevelRoundTripHydraTestCase_type = Core.Name "type"++_TypeLevelRoundTripHydraTestCase_expectedType = Core.Name "expectedType"+ -- | A test case for union type encoding and decoding, covering the various strategies for representing unions in Avro data UnionTestCase = UnionTestCase {@@ -143,99 +313,13 @@ -- | Pairs of corresponding Hydra terms and JSON values for this union unionTestCaseTermPairs :: [(Core.Term, Model.Value)]} deriving (Eq, Ord, Read, Show)+ _UnionTestCase = Core.Name "hydra.avro.testing.UnionTestCase"+ _UnionTestCase_description = Core.Name "description"+ _UnionTestCase_hydraType = Core.Name "hydraType"+ _UnionTestCase_avroSchema = Core.Name "avroSchema"+ _UnionTestCase_termPairs = Core.Name "termPairs"--- | A test case for bidirectional name mapping between Hydra and Avro-data NameMappingTestCase =- NameMappingTestCase {- -- | A human-readable description of what this test case covers- nameMappingTestCaseDescription :: String,- -- | The Hydra name- nameMappingTestCaseHydraName :: Core.Name,- -- | The expected Avro qualified name (dotted string)- nameMappingTestCaseAvroName :: String,- -- | The expected Avro namespace, if any- nameMappingTestCaseAvroNamespace :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_NameMappingTestCase = Core.Name "hydra.avro.testing.NameMappingTestCase"-_NameMappingTestCase_description = Core.Name "description"-_NameMappingTestCase_hydraName = Core.Name "hydraName"-_NameMappingTestCase_avroName = Core.Name "avroName"-_NameMappingTestCase_avroNamespace = Core.Name "avroNamespace"--- | A test case which verifies that lossy conversions stash original information in annotations-data LossinessTestCase =- LossinessTestCase {- -- | A human-readable description of what this test case covers- lossinessTestCaseDescription :: String,- -- | The original Avro schema containing information that may be lost- lossinessTestCaseOriginalSchema :: Schema.Schema,- -- | The resulting Hydra type, which should carry annotations for any lost information- lossinessTestCaseHydraType :: Core.Type,- -- | The Avro schema recovered from the annotated Hydra type- lossinessTestCaseRecoveredSchema :: Schema.Schema,- -- | Whether the adapter reports this conversion as lossy- lossinessTestCaseIsLossy :: Bool}- deriving (Eq, Ord, Read, Show)-_LossinessTestCase = Core.Name "hydra.avro.testing.LossinessTestCase"-_LossinessTestCase_description = Core.Name "description"-_LossinessTestCase_originalSchema = Core.Name "originalSchema"-_LossinessTestCase_hydraType = Core.Name "hydraType"-_LossinessTestCase_recoveredSchema = Core.Name "recoveredSchema"-_LossinessTestCase_isLossy = Core.Name "isLossy"--- | A test case for Avro schema serialization to and from JSON-data SchemaSerializationTestCase =- SchemaSerializationTestCase {- -- | A human-readable description of what this test case covers- schemaSerializationTestCaseDescription :: String,- -- | The Avro schema- schemaSerializationTestCaseSchema :: Schema.Schema,- -- | The expected JSON representation of the schema- schemaSerializationTestCaseJson :: Model.Value}- deriving (Eq, Ord, Read, Show)-_SchemaSerializationTestCase = Core.Name "hydra.avro.testing.SchemaSerializationTestCase"-_SchemaSerializationTestCase_description = Core.Name "description"-_SchemaSerializationTestCase_schema = Core.Name "schema"-_SchemaSerializationTestCase_json = Core.Name "json"--- | A test case for the bidirectional Avro coder-data AvroTestCase =- -- | Type-level forward mapping (Avro Schema -> Hydra Type)- AvroTestCaseTypeLevelForward TypeLevelForwardTestCase |- -- | Type-level reverse mapping (Hydra Type -> Avro Schema)- AvroTestCaseTypeLevelReverse TypeLevelReverseTestCase |- -- | Type-level round-trip starting from Avro (Avro -> Hydra -> Avro)- AvroTestCaseTypeLevelRoundTripAvro TypeLevelRoundTripAvroTestCase |- -- | Type-level round-trip starting from Hydra (Hydra -> Avro -> Hydra)- AvroTestCaseTypeLevelRoundTripHydra TypeLevelRoundTripHydraTestCase |- -- | Term-level forward mapping (JSON -> Hydra Term)- AvroTestCaseTermLevelForward TermLevelForwardTestCase |- -- | Term-level reverse mapping (Hydra Term -> JSON)- AvroTestCaseTermLevelReverse TermLevelReverseTestCase |- -- | Term-level round-trip starting from JSON (JSON -> Term -> JSON)- AvroTestCaseTermLevelRoundTripJson TermLevelRoundTripJsonTestCase |- -- | Term-level round-trip starting from a term (Term -> JSON -> Term)- AvroTestCaseTermLevelRoundTripTerm TermLevelRoundTripTermTestCase |- -- | Union-specific encoding and decoding- AvroTestCaseUnion UnionTestCase |- -- | Name mapping between Hydra and Avro- AvroTestCaseNameMapping NameMappingTestCase |- -- | Lossy conversion with annotation stashing- AvroTestCaseLossiness LossinessTestCase |- -- | Schema serialization to and from JSON- AvroTestCaseSchemaSerialization SchemaSerializationTestCase- deriving (Eq, Ord, Read, Show)-_AvroTestCase = Core.Name "hydra.avro.testing.AvroTestCase"-_AvroTestCase_typeLevelForward = Core.Name "typeLevelForward"-_AvroTestCase_typeLevelReverse = Core.Name "typeLevelReverse"-_AvroTestCase_typeLevelRoundTripAvro = Core.Name "typeLevelRoundTripAvro"-_AvroTestCase_typeLevelRoundTripHydra = Core.Name "typeLevelRoundTripHydra"-_AvroTestCase_termLevelForward = Core.Name "termLevelForward"-_AvroTestCase_termLevelReverse = Core.Name "termLevelReverse"-_AvroTestCase_termLevelRoundTripJson = Core.Name "termLevelRoundTripJson"-_AvroTestCase_termLevelRoundTripTerm = Core.Name "termLevelRoundTripTerm"-_AvroTestCase_union = Core.Name "union"-_AvroTestCase_nameMapping = Core.Name "nameMapping"-_AvroTestCase_lossiness = Core.Name "lossiness"-_AvroTestCase_schemaSerialization = Core.Name "schemaSerialization"
src/main/haskell/Hydra/Azure/Dtld.hs view
@@ -1,4 +1,5 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | An Azure Digital Twin Definition Language (DTLD) model. Based on: -- | https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#digital-twins-definition-language -- | DTLD features which are not currently included in this model:@@ -7,10 +8,12 @@ -- | * model versioning (https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#model-versioning) module Hydra.Azure.Dtld where+ import qualified Hydra.Core as Core import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Set as S+ -- | A Command describes a function or operation that can be performed on any digital twin. data Command = Command {@@ -33,16 +36,27 @@ -- | A description of the output of the Command commandResponse :: (Maybe CommandPayload)} deriving (Eq, Ord, Read, Show)+ _Command = Core.Name "hydra.azure.dtld.Command"+ _Command_type = Core.Name "type"+ _Command_name = Core.Name "name"+ _Command_id = Core.Name "id"+ _Command_comment = Core.Name "comment"+ _Command_description = Core.Name "description"+ _Command_displayName = Core.Name "displayName"+ _Command_commandType = Core.Name "commandType"+ _Command_request = Core.Name "request"+ _Command_response = Core.Name "response"+ -- | A CommandPayload describes the inputs to or the outputs from a Command. data CommandPayload = CommandPayload {@@ -59,21 +73,33 @@ -- | A localizable name for display commandPayloadDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)+ _CommandPayload = Core.Name "hydra.azure.dtld.CommandPayload"+ _CommandPayload_name = Core.Name "name"+ _CommandPayload_schema = Core.Name "schema"+ _CommandPayload_id = Core.Name "id"+ _CommandPayload_comment = Core.Name "comment"+ _CommandPayload_description = Core.Name "description"+ _CommandPayload_displayName = Core.Name "displayName"+ -- | CommandType is deprecated. Either value, synchronous or asynchronous, has the same meaning: a command that starts execution within a configurable time and that completes execution within a configurable time. data CommandType = CommandTypeSynchronous | CommandTypeAsynchronous deriving (Eq, Ord, Read, Show)+ _CommandType = Core.Name "hydra.azure.dtld.CommandType"+ _CommandType_synchronous = Core.Name "synchronous"+ _CommandType_asynchronous = Core.Name "asynchronous"+ -- | Components enable interfaces to be composed of other interfaces. Components are different from relationships because they describe contents that are directly part of the interface. (A relationship describes a link between two interfaces.) data Component = Component {@@ -92,20 +118,31 @@ -- | A localizable name for display componentDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)+ _Component = Core.Name "hydra.azure.dtld.Component"+ _Component_type = Core.Name "type"+ _Component_name = Core.Name "name"+ _Component_schema = Core.Name "schema"+ _Component_id = Core.Name "id"+ _Component_comment = Core.Name "comment"+ _Component_description = Core.Name "description"+ _Component_displayName = Core.Name "displayName"+ -- | A digital twin model identifier newtype Dtmi = Dtmi { unDtmi :: String} deriving (Eq, Ord, Read, Show)+ _Dtmi = Core.Name "hydra.azure.dtld.Dtmi"+ -- | An EnumValue describes an element of an Enum. data EnumValue = EnumValue {@@ -122,13 +159,21 @@ -- | A localizable name for display enumValueDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)+ _EnumValue = Core.Name "hydra.azure.dtld.EnumValue"+ _EnumValue_name = Core.Name "name"+ _EnumValue_enumValue = Core.Name "enumValue"+ _EnumValue_id = Core.Name "id"+ _EnumValue_comment = Core.Name "comment"+ _EnumValue_description = Core.Name "description"+ _EnumValue_displayName = Core.Name "displayName"+ -- | A Field describes a field in an Object. data Field = Field {@@ -145,20 +190,34 @@ -- | A localizable name for display fieldDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)+ _Field = Core.Name "hydra.azure.dtld.Field"+ _Field_name = Core.Name "name"+ _Field_schema = Core.Name "schema"+ _Field_id = Core.Name "id"+ _Field_comment = Core.Name "comment"+ _Field_description = Core.Name "description"+ _Field_displayName = Core.Name "displayName"++-- | A value which may be either an integer or a string data IntegerOrString = IntegerOrStringInteger Int | IntegerOrStringString String deriving (Eq, Ord, Read, Show)+ _IntegerOrString = Core.Name "hydra.azure.dtld.IntegerOrString"+ _IntegerOrString_integer = Core.Name "integer"+ _IntegerOrString_string = Core.Name "string"++-- | An Interface describes the contents (Telemetry, Properties, Commands, Relationships, and Components) of any digital twin. data Interface = Interface { -- | A digital twin model identifier for the interface@@ -170,7 +229,7 @@ -- | A comment for model authors interfaceComment :: (Maybe String), -- | A set of objects that define the contents (Telemetry, Properties, Commands, Relationships, and/or Components) of this interface- interfaceContents :: (Maybe (S.Set Interface_Contents)),+ interfaceContents :: (Maybe (S.Set InterfaceContents)), -- | A localizable description for display interfaceDescription :: (Maybe String), -- | A localizable name for display@@ -178,36 +237,58 @@ -- | A set of DTMIs that refer to interfaces this interface inherits from. Interfaces can inherit from multiple interfaces. interfaceExtends :: (Maybe (S.Set Interface)), -- | A set of IRIs or objects that refer to the reusable schemas within this interface.- interfaceSchemas :: (Maybe (S.Set Schema_Interface))}+ interfaceSchemas :: (Maybe (S.Set SchemaInterface))} deriving (Eq, Ord, Read, Show)+ _Interface = Core.Name "hydra.azure.dtld.Interface"+ _Interface_id = Core.Name "id"+ _Interface_type = Core.Name "type"+ _Interface_context = Core.Name "context"+ _Interface_comment = Core.Name "comment"+ _Interface_contents = Core.Name "contents"+ _Interface_description = Core.Name "description"+ _Interface_displayName = Core.Name "displayName"+ _Interface_extends = Core.Name "extends"+ _Interface_schemas = Core.Name "schemas"-data Interface_Contents =- Interface_ContentsCommand Command |- Interface_ContentsComponent Component |- Interface_ContentsProperty Property |- Interface_ContentsRelationship Relationship |- Interface_ContentsTelemetry Telemetry++-- | One of the kinds of content an Interface may contain: a Command, Component, Property, Relationship, or Telemetry+data InterfaceContents =+ InterfaceContentsCommand Command |+ InterfaceContentsComponent Component |+ InterfaceContentsProperty Property |+ InterfaceContentsRelationship Relationship |+ InterfaceContentsTelemetry Telemetry deriving (Eq, Ord, Read, Show)-_Interface_Contents = Core.Name "hydra.azure.dtld.Interface_Contents"-_Interface_Contents_command = Core.Name "command"-_Interface_Contents_component = Core.Name "component"-_Interface_Contents_property = Core.Name "property"-_Interface_Contents_relationship = Core.Name "relationship"-_Interface_Contents_telemetry = Core.Name "telemetry"++_InterfaceContents = Core.Name "hydra.azure.dtld.InterfaceContents"++_InterfaceContents_command = Core.Name "command"++_InterfaceContents_component = Core.Name "component"++_InterfaceContents_property = Core.Name "property"++_InterfaceContents_relationship = Core.Name "relationship"++_InterfaceContents_telemetry = Core.Name "telemetry"++-- | An Internationalized Resource Identifier newtype Iri = Iri { unIri :: String} deriving (Eq, Ord, Read, Show)+ _Iri = Core.Name "hydra.azure.dtld.Iri"+ -- | A MapKey describes the key in a Map. The schema of a MapKey must be string. data MapKey = MapKey {@@ -224,13 +305,21 @@ -- | A localizable name for display mapKeyDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)+ _MapKey = Core.Name "hydra.azure.dtld.MapKey"+ _MapKey_name = Core.Name "name"+ _MapKey_schema = Core.Name "schema"+ _MapKey_id = Core.Name "id"+ _MapKey_comment = Core.Name "comment"+ _MapKey_description = Core.Name "description"+ _MapKey_displayName = Core.Name "displayName"+ -- | A MapValue describes the values in a Map. data MapValue = MapValue {@@ -247,13 +336,21 @@ -- | A localizable name for display mapValueDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)+ _MapValue = Core.Name "hydra.azure.dtld.MapValue"+ _MapValue_name = Core.Name "name"+ _MapValue_schema = Core.Name "schema"+ _MapValue_id = Core.Name "id"+ _MapValue_comment = Core.Name "comment"+ _MapValue_description = Core.Name "description"+ _MapValue_displayName = Core.Name "displayName"+ -- | A Property describes the read-only and read/write state of any digital twin. For example, a device serial number may be a read-only property, the desired temperature on a thermostat may be a read-write property; and the name of a room may be a read-write property. data Property = Property {@@ -276,16 +373,27 @@ -- | A boolean value that indicates whether the property is writable by an external source, such as an application, or not. The default value is false (read-only). propertyWritable :: (Maybe Bool)} deriving (Eq, Ord, Read, Show)+ _Property = Core.Name "hydra.azure.dtld.Property"+ _Property_type = Core.Name "type"+ _Property_name = Core.Name "name"+ _Property_schema = Core.Name "schema"+ _Property_id = Core.Name "id"+ _Property_comment = Core.Name "comment"+ _Property_description = Core.Name "description"+ _Property_displayName = Core.Name "displayName"+ _Property_unit = Core.Name "unit"+ _Property_writable = Core.Name "writable"+ -- | A Relationship describes a link to another digital twin and enables graphs of digital twins to be created. Relationships are different from Components because they describe a link to a separate digital twin. data Relationship = Relationship {@@ -312,201 +420,284 @@ -- | A boolean value that indicates whether the relationship is writable by an external source, such as an application, or not. The default value is false (read-only). relationshipWritable :: (Maybe Bool)} deriving (Eq, Ord, Read, Show)+ _Relationship = Core.Name "hydra.azure.dtld.Relationship"+ _Relationship_type = Core.Name "type"+ _Relationship_name = Core.Name "name"+ _Relationship_id = Core.Name "id"+ _Relationship_comment = Core.Name "comment"+ _Relationship_description = Core.Name "description"+ _Relationship_displayName = Core.Name "displayName"+ _Relationship_maxMultiplicity = Core.Name "maxMultiplicity"+ _Relationship_minMultiplicity = Core.Name "minMultiplicity"+ _Relationship_properties = Core.Name "properties"+ _Relationship_target = Core.Name "target"+ _Relationship_writable = Core.Name "writable"+ -- | Schemas are used to describe the on-the-wire or serialized format of the data in a digital twin interface. A full set of primitive data types are provided, along with support for a variety of complex schemas in the forms of Arrays, Enums, Maps, and Objects. Schemas described through digital twin's schema definition language are compatible with popular serialization formats, including JSON, Avro, and Protobuf. data Schema =- SchemaPrimitive Schema_Primitive |- SchemaComplex Schema_Complex+ SchemaPrimitive_ SchemaPrimitive |+ SchemaComplex_ SchemaComplex deriving (Eq, Ord, Read, Show)+ _Schema = Core.Name "hydra.azure.dtld.Schema"+ _Schema_primitive = Core.Name "primitive"+ _Schema_complex = Core.Name "complex"+ -- | An Array describes an indexable data type where each element is of the same schema. An Array elements' schema can itself be a primitive or complex schema.-data Schema_Array =- Schema_Array {+data SchemaArray =+ SchemaArray { -- | This must be 'Array'- schema_ArrayType :: Iri,+ schemaArrayType :: Iri, -- | The data type of the array elements- schema_ArrayElementSchema :: Schema,+ schemaArrayElementSchema :: Schema, -- | The ID of the array. If no @id is provided, the digital twin interface processor will assign one.- schema_ArrayId :: (Maybe Dtmi),+ schemaArrayId :: (Maybe Dtmi), -- | A comment for model authors- schema_ArrayComment :: (Maybe String),+ schemaArrayComment :: (Maybe String), -- | A localizable description for display- schema_ArrayDescription :: (Maybe String),+ schemaArrayDescription :: (Maybe String), -- | A localizable name for display- schema_ArrayDisplayName :: (Maybe String)}+ schemaArrayDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)-_Schema_Array = Core.Name "hydra.azure.dtld.Schema_Array"-_Schema_Array_type = Core.Name "type"-_Schema_Array_elementSchema = Core.Name "elementSchema"-_Schema_Array_id = Core.Name "id"-_Schema_Array_comment = Core.Name "comment"-_Schema_Array_description = Core.Name "description"-_Schema_Array_displayName = Core.Name "displayName"++_SchemaArray = Core.Name "hydra.azure.dtld.SchemaArray"++_SchemaArray_type = Core.Name "type"++_SchemaArray_elementSchema = Core.Name "elementSchema"++_SchemaArray_id = Core.Name "id"++_SchemaArray_comment = Core.Name "comment"++_SchemaArray_description = Core.Name "description"++_SchemaArray_displayName = Core.Name "displayName"+ -- | Complex schemas are designed for supporting complex data types made up of primitive data types. Currently the following complex schemas are provided: Array, Enum, Map, and Object. A complex schema can be specified directly as the value in a schema statement or described in the interface schemas set and referenced in the schema statement.-data Schema_Complex =- Schema_ComplexArray Schema_Array |- Schema_ComplexEnum Schema_Enum |- Schema_ComplexMap Schema_Map |- Schema_ComplexObject Schema_Object+data SchemaComplex =+ SchemaComplexArray SchemaArray |+ SchemaComplexEnum SchemaEnum |+ SchemaComplexMap SchemaMap |+ SchemaComplexObject SchemaObject deriving (Eq, Ord, Read, Show)-_Schema_Complex = Core.Name "hydra.azure.dtld.Schema_Complex"-_Schema_Complex_array = Core.Name "array"-_Schema_Complex_enum = Core.Name "enum"-_Schema_Complex_map = Core.Name "map"-_Schema_Complex_object = Core.Name "object"++_SchemaComplex = Core.Name "hydra.azure.dtld.SchemaComplex"++_SchemaComplex_array = Core.Name "array"++_SchemaComplex_enum = Core.Name "enum"++_SchemaComplex_map = Core.Name "map"++_SchemaComplex_object = Core.Name "object"+ -- | An Enum describes a data type with a set of named labels that map to values. The values in an Enum can be either integers or strings, but the labels are always strings.-data Schema_Enum =- Schema_Enum {+data SchemaEnum =+ SchemaEnum { -- | Enum- schema_EnumType :: Iri,+ schemaEnumType :: Iri, -- | A set of enum value and label mappings- schema_EnumEnumValues :: [EnumValue],+ schemaEnumEnumValues :: [EnumValue], -- | The data type for the enum values. All enum values must be of the same type.- schema_EnumValueSchema :: IntegerOrString,+ schemaEnumValueSchema :: IntegerOrString, -- | The ID of the enum. If no @id is provided, the digital twin interface processor will assign one.- schema_EnumId :: (Maybe Dtmi),+ schemaEnumId :: (Maybe Dtmi), -- | A comment for model authors- schema_EnumComment :: (Maybe String),+ schemaEnumComment :: (Maybe String), -- | A localizable description for display- schema_EnumDescription :: (Maybe String),+ schemaEnumDescription :: (Maybe String), -- | A localizable name for display- schema_EnumDisplayName :: (Maybe String)}+ schemaEnumDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)-_Schema_Enum = Core.Name "hydra.azure.dtld.Schema_Enum"-_Schema_Enum_type = Core.Name "type"-_Schema_Enum_enumValues = Core.Name "enumValues"-_Schema_Enum_valueSchema = Core.Name "valueSchema"-_Schema_Enum_id = Core.Name "id"-_Schema_Enum_comment = Core.Name "comment"-_Schema_Enum_description = Core.Name "description"-_Schema_Enum_displayName = Core.Name "displayName"++_SchemaEnum = Core.Name "hydra.azure.dtld.SchemaEnum"++_SchemaEnum_type = Core.Name "type"++_SchemaEnum_enumValues = Core.Name "enumValues"++_SchemaEnum_valueSchema = Core.Name "valueSchema"++_SchemaEnum_id = Core.Name "id"++_SchemaEnum_comment = Core.Name "comment"++_SchemaEnum_description = Core.Name "description"++_SchemaEnum_displayName = Core.Name "displayName"+ -- | Within an interface definition, complex schemas may be defined for reusability across Telemetry, Properties, and Commands. This is designed to promote readability and improved maintenance because schemas that are reused can be defined once (per interface). Interface schemas are defined in the schemas property of an interface.-data Schema_Interface =- Schema_Interface {+data SchemaInterface =+ SchemaInterface { -- | The globally unique identifier for the schema- schema_InterfaceId :: Dtmi,+ schemaInterfaceId :: Dtmi, -- | The type of complex schema. This must refer to one of the complex schema classes (Array, Enum, Map, or Object).- schema_InterfaceType :: Schema_Interface_Type,+ schemaInterfaceType :: SchemaInterfaceType, -- | A comment for model authors- schema_InterfaceComment :: (Maybe String),+ schemaInterfaceComment :: (Maybe String), -- | A localizable description for display- schema_InterfaceDescription :: (Maybe String),+ schemaInterfaceDescription :: (Maybe String), -- | A localizable name for display- schema_InterfaceDisplayName :: (Maybe String)}+ schemaInterfaceDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)-_Schema_Interface = Core.Name "hydra.azure.dtld.Schema_Interface"-_Schema_Interface_id = Core.Name "id"-_Schema_Interface_type = Core.Name "type"-_Schema_Interface_comment = Core.Name "comment"-_Schema_Interface_description = Core.Name "description"-_Schema_Interface_displayName = Core.Name "displayName"-data Schema_Interface_Type =- Schema_Interface_TypeArray Schema_Array |- Schema_Interface_TypeEnum Schema_Enum |- Schema_Interface_TypeMap Schema_Map |- Schema_Interface_TypeObject Schema_Object++_SchemaInterface = Core.Name "hydra.azure.dtld.SchemaInterface"++_SchemaInterface_id = Core.Name "id"++_SchemaInterface_type = Core.Name "type"++_SchemaInterface_comment = Core.Name "comment"++_SchemaInterface_description = Core.Name "description"++_SchemaInterface_displayName = Core.Name "displayName"++-- | The type of a reusable interface schema: Array, Enum, Map, or Object+data SchemaInterfaceType =+ SchemaInterfaceTypeArray SchemaArray |+ SchemaInterfaceTypeEnum SchemaEnum |+ SchemaInterfaceTypeMap SchemaMap |+ SchemaInterfaceTypeObject SchemaObject deriving (Eq, Ord, Read, Show)-_Schema_Interface_Type = Core.Name "hydra.azure.dtld.Schema_Interface_Type"-_Schema_Interface_Type_array = Core.Name "array"-_Schema_Interface_Type_enum = Core.Name "enum"-_Schema_Interface_Type_map = Core.Name "map"-_Schema_Interface_Type_object = Core.Name "object"++_SchemaInterfaceType = Core.Name "hydra.azure.dtld.SchemaInterfaceType"++_SchemaInterfaceType_array = Core.Name "array"++_SchemaInterfaceType_enum = Core.Name "enum"++_SchemaInterfaceType_map = Core.Name "map"++_SchemaInterfaceType_object = Core.Name "object"+ -- | A Map describes a data type of key-value pairs where the values share the same schema. The key in a Map must be a string. The values in a Map can be any schema.-data Schema_Map =- Schema_Map {+data SchemaMap =+ SchemaMap { -- | Map- schema_MapType :: Iri,+ schemaMapType :: Iri, -- | A description of the keys in the map- schema_MapMapKey :: MapKey,+ schemaMapMapKey :: MapKey, -- | A description of the values in the map- schema_MapMapValue :: MapValue,+ schemaMapMapValue :: MapValue, -- | The ID of the map. If no @id is provided, the digital twin interface processor will assign one.- schema_MapId :: (Maybe Dtmi),+ schemaMapId :: (Maybe Dtmi), -- | A comment for model authors- schema_MapComment :: (Maybe String),+ schemaMapComment :: (Maybe String), -- | A localizable description for display- schema_MapDescription :: (Maybe String),+ schemaMapDescription :: (Maybe String), -- | A localizable name for display- schema_MapDisplayName :: (Maybe String)}+ schemaMapDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)-_Schema_Map = Core.Name "hydra.azure.dtld.Schema_Map"-_Schema_Map_type = Core.Name "type"-_Schema_Map_mapKey = Core.Name "mapKey"-_Schema_Map_mapValue = Core.Name "mapValue"-_Schema_Map_id = Core.Name "id"-_Schema_Map_comment = Core.Name "comment"-_Schema_Map_description = Core.Name "description"-_Schema_Map_displayName = Core.Name "displayName"++_SchemaMap = Core.Name "hydra.azure.dtld.SchemaMap"++_SchemaMap_type = Core.Name "type"++_SchemaMap_mapKey = Core.Name "mapKey"++_SchemaMap_mapValue = Core.Name "mapValue"++_SchemaMap_id = Core.Name "id"++_SchemaMap_comment = Core.Name "comment"++_SchemaMap_description = Core.Name "description"++_SchemaMap_displayName = Core.Name "displayName"+ -- | An Object describes a data type made up of named fields (like a struct in C). The fields in an Object map can be primitive or complex schemas.-data Schema_Object =- Schema_Object {+data SchemaObject =+ SchemaObject { -- | Object- schema_ObjectType :: Iri,+ schemaObjectType :: Iri, -- | A set of field descriptions, one for each field in the Object- schema_ObjectFields :: (S.Set Field),+ schemaObjectFields :: (S.Set Field), -- | The ID of the object. If no @id is provided, the digital twin interface processor will assign one.- schema_ObjectId :: (Maybe Dtmi),+ schemaObjectId :: (Maybe Dtmi), -- | A comment for model authors- schema_ObjectComment :: (Maybe String),+ schemaObjectComment :: (Maybe String), -- | A localizable description for display- schema_ObjectDescription :: (Maybe String),+ schemaObjectDescription :: (Maybe String), -- | A localizable name for display- schema_ObjectDisplayName :: (Maybe String)}+ schemaObjectDisplayName :: (Maybe String)} deriving (Eq, Ord, Read, Show)-_Schema_Object = Core.Name "hydra.azure.dtld.Schema_Object"-_Schema_Object_type = Core.Name "type"-_Schema_Object_fields = Core.Name "fields"-_Schema_Object_id = Core.Name "id"-_Schema_Object_comment = Core.Name "comment"-_Schema_Object_description = Core.Name "description"-_Schema_Object_displayName = Core.Name "displayName"++_SchemaObject = Core.Name "hydra.azure.dtld.SchemaObject"++_SchemaObject_type = Core.Name "type"++_SchemaObject_fields = Core.Name "fields"++_SchemaObject_id = Core.Name "id"++_SchemaObject_comment = Core.Name "comment"++_SchemaObject_description = Core.Name "description"++_SchemaObject_displayName = Core.Name "displayName"+ -- | A full set of primitive data types are provided and can be specified directly as the value in a schema statement in a digital twin interface.-data Schema_Primitive =+data SchemaPrimitive = -- | A boolean value- Schema_PrimitiveBoolean |+ SchemaPrimitiveBoolean | -- | A full-date as defined in section 5.6 of RFC 3339- Schema_PrimitiveDate |+ SchemaPrimitiveDate | -- | A date-time as defined in RFC 3339- Schema_PrimitiveDateTime |+ SchemaPrimitiveDateTime | -- | An IEEE 8-byte floating point- Schema_PrimitiveDouble |+ SchemaPrimitiveDouble | -- | A duration in ISO 8601 format- Schema_PrimitiveDuration |+ SchemaPrimitiveDuration | -- | An IEEE 4-byte floating point- Schema_PrimitiveFloat |+ SchemaPrimitiveFloat | -- | A signed 4-byte integer- Schema_PrimitiveInteger |+ SchemaPrimitiveInteger | -- | A signed 8-byte integer- Schema_PrimitiveLong |+ SchemaPrimitiveLong | -- | A UTF8 string- Schema_PrimitiveString |+ SchemaPrimitiveString | -- | A full-time as defined in section 5.6 of RFC 3339- Schema_PrimitiveTime+ SchemaPrimitiveTime deriving (Eq, Ord, Read, Show)-_Schema_Primitive = Core.Name "hydra.azure.dtld.Schema_Primitive"-_Schema_Primitive_boolean = Core.Name "boolean"-_Schema_Primitive_date = Core.Name "date"-_Schema_Primitive_dateTime = Core.Name "dateTime"-_Schema_Primitive_double = Core.Name "double"-_Schema_Primitive_duration = Core.Name "duration"-_Schema_Primitive_float = Core.Name "float"-_Schema_Primitive_integer = Core.Name "integer"-_Schema_Primitive_long = Core.Name "long"-_Schema_Primitive_string = Core.Name "string"-_Schema_Primitive_time = Core.Name "time"++_SchemaPrimitive = Core.Name "hydra.azure.dtld.SchemaPrimitive"++_SchemaPrimitive_boolean = Core.Name "boolean"++_SchemaPrimitive_date = Core.Name "date"++_SchemaPrimitive_dateTime = Core.Name "dateTime"++_SchemaPrimitive_double = Core.Name "double"++_SchemaPrimitive_duration = Core.Name "duration"++_SchemaPrimitive_float = Core.Name "float"++_SchemaPrimitive_integer = Core.Name "integer"++_SchemaPrimitive_long = Core.Name "long"++_SchemaPrimitive_string = Core.Name "string"++_SchemaPrimitive_time = Core.Name "time"+ -- | Telemetry describes the data emitted by any digital twin, whether the data is a regular stream of sensor readings or a computed stream of data, such as occupancy, or an occasional error or information message. data Telemetry = Telemetry {@@ -527,17 +718,29 @@ -- | The unit type of the Telemetry. A semantic type is required for the unit property to be available. telemetryUnit :: (Maybe Unit)} deriving (Eq, Ord, Read, Show)+ _Telemetry = Core.Name "hydra.azure.dtld.Telemetry"+ _Telemetry_type = Core.Name "type"+ _Telemetry_name = Core.Name "name"+ _Telemetry_schema = Core.Name "schema"+ _Telemetry_id = Core.Name "id"+ _Telemetry_comment = Core.Name "comment"+ _Telemetry_description = Core.Name "description"+ _Telemetry_displayName = Core.Name "displayName"+ _Telemetry_unit = Core.Name "unit"++-- | The unit type of a Property or Telemetry value, available when a semantic type is present newtype Unit = Unit { unUnit :: ()} deriving (Eq, Ord, Read, Show)+ _Unit = Core.Name "hydra.azure.dtld.Unit"
src/main/haskell/Hydra/Cpp/Coder.hs view
@@ -1,23 +1,28 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | C++ code generator: converts Hydra modules to C++ header files module Hydra.Cpp.Coder where+ import qualified Hydra.Annotations as Annotations import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core-import qualified Hydra.File as File import qualified Hydra.Cpp.Language as Language import qualified Hydra.Cpp.Serde as Serde import qualified Hydra.Cpp.Syntax as Syntax import qualified Hydra.Decode.Core as DecodeCore import qualified Hydra.Dependencies as Dependencies+import qualified Hydra.Docs as Docs import qualified Hydra.Encode.Core as EncodeCore import qualified Hydra.Environment as Environment import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model@@ -36,15 +41,18 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Predicates as Predicates+import qualified Hydra.Print.Core as PrintCore import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Resolution as Resolution import qualified Hydra.Serialization as Serialization-import qualified Hydra.Show.Core as ShowCore import qualified Hydra.Sorting as Sorting import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -54,11 +62,17 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M++-- | Convert a binding name to a file path bindingNameToFilePath :: Core.Name -> String bindingNameToFilePath name = Names.nameToFilePath Util.CaseConventionLowerSnake Util.CaseConventionLowerSnake (File.FileExtension "h") name++-- | Get the class name from a fully qualified Name className :: Core.Name -> String className name = sanitizeCppName (Names.localNameOf name)++-- | Create a const reference parameter constParameter :: String -> Syntax.TypeExpression -> Syntax.Parameter constParameter name typ = Syntax.Parameter {@@ -70,6 +84,8 @@ Syntax.parameterName = name, Syntax.parameterUnnamed = False, Syntax.parameterDefaultValue = Nothing}++-- | Create a class declaration cppClassDeclaration :: String -> [Syntax.BaseSpecifier] -> Maybe Syntax.ClassBody -> Syntax.Declaration cppClassDeclaration name baseSpecs mbody = Syntax.DeclarationClass (Syntax.ClassDeclaration {@@ -78,6 +94,8 @@ Syntax.classSpecifierName = name, Syntax.classSpecifierInheritance = baseSpecs}, Syntax.classDeclarationBody = mbody})++-- | Create an enum class declaration cppEnumDeclaration :: String -> Maybe Syntax.ClassBody -> Syntax.Declaration cppEnumDeclaration name mbody = Syntax.DeclarationClass (Syntax.ClassDeclaration {@@ -86,18 +104,30 @@ Syntax.classSpecifierName = name, Syntax.classSpecifierInheritance = []}, Syntax.classDeclarationBody = mbody})++-- | Create an enum forward declaration (no body) cppEnumForwardDeclaration :: String -> Syntax.Declaration cppEnumForwardDeclaration name = cppEnumDeclaration name Nothing++-- | Convert a PostfixExpression to a full Expression cppPostfixExpressionToCppExpression :: Syntax.PostfixExpression -> Syntax.Expression cppPostfixExpressionToCppExpression pe = cppUnaryExpressionToCppExpression (Syntax.UnaryExpressionPostfix pe)++-- | Convert a PrimaryExpression to a full Expression cppPrimaryExpressionToCppExpression :: Syntax.PrimaryExpression -> Syntax.Expression cppPrimaryExpressionToCppExpression prim = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary prim)++-- | Convert a UnaryExpression to a full Expression cppUnaryExpressionToCppExpression :: Syntax.UnaryExpression -> Syntax.Expression cppUnaryExpressionToCppExpression ue = Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionLogicalOr (cppUnaryExpressionToCppLogicalOrExpression ue)))++-- | Convert a UnaryExpression to a LogicalOrExpression cppUnaryExpressionToCppLogicalOrExpression :: Syntax.UnaryExpression -> Syntax.LogicalOrExpression cppUnaryExpressionToCppLogicalOrExpression ue = Syntax.LogicalOrExpressionLogicalAnd (Syntax.LogicalAndExpressionInclusiveOr (Syntax.InclusiveOrExpressionExclusiveOr (Syntax.ExclusiveOrExpressionAnd (Syntax.AndExpressionEquality (Syntax.EqualityExpressionRelational (Syntax.RelationalExpressionShift (Syntax.ShiftExpressionAdditive (Syntax.AdditiveExpressionMultiplicative (Syntax.MultiplicativeExpressionUnary ue)))))))))++-- | Create the accept() method implementation using a dynamic_cast chain createAcceptImplementation :: Core.Name -> [Core.FieldType] -> Syntax.Declaration createAcceptImplementation tname variants = Syntax.DeclarationTemplate (Syntax.TemplateDeclaration {@@ -107,11 +137,11 @@ Syntax.templateDeclarationDeclaration = (Syntax.DeclarationFunction (Syntax.FunctionDeclaration { Syntax.functionDeclarationPrefixSpecifiers = [], Syntax.functionDeclarationReturnType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed "R")),- Syntax.functionDeclarationName = (Strings.cat2 (className tname) "::accept"),+ Syntax.functionDeclarationName = (Strings.concat2 (className tname) "::accept"), Syntax.functionDeclarationParameters = [ Syntax.Parameter { Syntax.parameterType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {- Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (Strings.cat2 (visitorName tname) "<R>"))),+ Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (Strings.concat2 (visitorName tname) "<R>"))), Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierLvalueRef})), Syntax.parameterName = "visitor", Syntax.parameterUnnamed = False,@@ -125,7 +155,7 @@ Syntax.explicitAssignmentLeft = (cppUnaryExpressionToCppLogicalOrExpression (Syntax.UnaryExpressionPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "auto ptr")))), Syntax.explicitAssignmentOp = Syntax.AssignmentOperatorAssign, Syntax.explicitAssignmentRight = (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionLogicalOr (cppUnaryExpressionToCppLogicalOrExpression (Syntax.UnaryExpressionPostfix (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {- Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier (Strings.cat2 (Strings.cat2 "dynamic_cast<const " (variantName tname fname)) "*>"))),+ Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier (Strings.concat2 (Strings.concat2 "dynamic_cast<const " (variantName tname fname)) "*>"))), Syntax.functionCallOperationArguments = [ cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionIdentifier "this")]}))))))}))), Syntax.selectionStatementThenBranch = (Syntax.StatementCompound (Syntax.CompoundStatement [@@ -138,14 +168,20 @@ Syntax.unaryOperationOperator = Syntax.UnaryOperatorDereference, Syntax.unaryOperationOperand = (Syntax.UnaryExpressionPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "ptr")))}))]}))))])), Syntax.selectionStatementElseBranch = (Just (createThrowStmt "std::runtime_error" createTypeIdNameCall))}))) variants)))}))})++-- | Create a constructor function body: default if no params, empty compound otherwise createConstructorBody :: [t0] -> Syntax.FunctionBody createConstructorBody params = Logic.ifElse (Lists.null params) Syntax.FunctionBodyDefault (Syntax.FunctionBodyCompound (Syntax.CompoundStatement []))++-- | Create a function call expression createFunctionCallExpr :: String -> [Syntax.Expression] -> Syntax.Expression createFunctionCallExpr funcName args = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation { Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier funcName)), Syntax.functionCallOperationArguments = args}))++-- | Create a header file with pragma once, includes, and declarations createHeaderFile :: [Syntax.IncludeDirective] -> [Syntax.Declaration] -> Syntax.Program createHeaderFile includes decls = Syntax.Program {@@ -154,8 +190,12 @@ Syntax.pragmaDirectiveContent = "once"})], Syntax.programIncludes = includes, Syntax.programDeclarations = decls}++-- | Create an identifier expression createIdentifierExpr :: String -> Syntax.Expression createIdentifierExpr name = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionIdentifier name)++-- | Create a less-than operator for a record type (trivial/placeholder implementation) createLessThanOperator :: Core.Name -> t0 -> Syntax.Declaration createLessThanOperator typeName fields = Syntax.DeclarationFunction (Syntax.FunctionDeclaration {@@ -169,12 +209,18 @@ Syntax.functionDeclarationSuffixSpecifiers = [], Syntax.functionDeclarationBody = (Syntax.FunctionBodyCompound (Syntax.CompoundStatement [ Syntax.StatementJump (Syntax.JumpStatementReturnValue (createLiteralBoolExpr False))]))})++-- | Create a boolean literal expression createLiteralBoolExpr :: Bool -> Syntax.Expression createLiteralBoolExpr val = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralBoolean (Syntax.BooleanLiteral val)))++-- | Create an integer literal expression createLiteralIntExpr :: Integer -> Syntax.Expression createLiteralIntExpr val = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteralDecimal val)))++-- | Create a partial visitor interface with default visit methods that delegate to otherwise() createPartialVisitorInterface :: Core.Name -> [Core.FieldType] -> Syntax.Declaration createPartialVisitorInterface tname variants = Syntax.DeclarationTemplate (Syntax.TemplateDeclaration {@@ -184,7 +230,7 @@ Syntax.templateDeclarationDeclaration = (cppClassDeclaration (partialVisitorName tname) [ Syntax.BaseSpecifier { Syntax.baseSpecifierAccess = Syntax.AccessSpecifierPublic,- Syntax.baseSpecifierName = (Strings.cat2 (visitorName tname) "<R>")}] (Just (Syntax.ClassBody (Lists.concat [+ Syntax.baseSpecifierName = (Strings.concat2 (visitorName tname) "<R>")}] (Just (Syntax.ClassBody (Lists.concat [ [ memberSpecificationPublic], [@@ -211,15 +257,21 @@ Syntax.functionDeclarationBody = (Syntax.FunctionBodyCompound (Syntax.CompoundStatement [ Syntax.StatementJump (Syntax.JumpStatementReturnValue (createFunctionCallExpr "otherwise" [ createIdentifierExpr "value"]))]))})))) variants)]))))})++-- | Create a template type (e.g. std::vector<T>) createTemplateType :: String -> [Syntax.TypeExpression] -> Syntax.TypeExpression createTemplateType name args = Syntax.TypeExpressionTemplate (Syntax.TemplateType { Syntax.templateTypeName = name, Syntax.templateTypeArguments = (Lists.map (\a -> Syntax.TemplateArgumentType a) args)})++-- | Create a throw statement createThrowStmt :: String -> Syntax.Expression -> Syntax.Statement createThrowStmt exceptionType arg = Syntax.StatementJump (Syntax.JumpStatementThrow (createFunctionCallExpr exceptionType [ arg]))++-- | Create a typeid(*this).name() call expression createTypeIdNameCall :: Syntax.Expression createTypeIdNameCall = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {@@ -230,10 +282,14 @@ cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionParenthesized (cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "*this"))))]})), Syntax.memberAccessOperationMember = "name"})), Syntax.functionCallOperationArguments = []}))++-- | Create a type reference, optionally as a shared_ptr for struct types createTypeReference :: Bool -> Core.Name -> Syntax.TypeExpression createTypeReference isPointer name = Logic.ifElse isPointer (createTemplateType "std::shared_ptr" [ toConstType (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (sanitizeCppName (Names.localNameOf name))))]) (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (sanitizeCppName (Names.localNameOf name))))++-- | Create the union base class with protected constructor, virtual destructor, and accept method createUnionBaseClass :: Core.Name -> t0 -> Syntax.Declaration createUnionBaseClass name variants = cppClassDeclaration (className name) [] (Just (Syntax.ClassBody [@@ -261,7 +317,7 @@ Syntax.functionDeclarationParameters = [ Syntax.Parameter { Syntax.parameterType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {- Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (Strings.cat2 (visitorName name) "<R>"))),+ Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (Strings.concat2 (visitorName name) "<R>"))), Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierLvalueRef})), Syntax.parameterName = "visitor", Syntax.parameterUnnamed = False,@@ -269,6 +325,8 @@ Syntax.functionDeclarationSuffixSpecifiers = [ Syntax.FunctionSpecifierSuffixConst], Syntax.functionDeclarationBody = Syntax.FunctionBodyDeclaration}))})))]))++-- | Create a variant subclass (one branch of a union type) createVariantClass :: t0 -> t1 -> Core.Name -> Core.Name -> Core.FieldType -> Either Errors.Error Syntax.Declaration createVariantClass cx g tname parentClass ft = @@ -309,6 +367,8 @@ Syntax.constructorDeclarationParameters = vParams, Syntax.constructorDeclarationInitializers = initList, Syntax.constructorDeclarationBody = (createConstructorBody vParams)}))]]))))))))++-- | Create a visitor interface with pure virtual visit methods createVisitorInterface :: Core.Name -> [Core.FieldType] -> Syntax.Declaration createVisitorInterface tname variants = Syntax.DeclarationTemplate (Syntax.TemplateDeclaration {@@ -344,11 +404,15 @@ Syntax.destructorDeclarationName = (visitorName tname), Syntax.destructorDeclarationSuffixSpecifiers = [], Syntax.destructorDeclarationBody = Syntax.FunctionBodyDefault}))]]))))})++-- | Encode a type application (template instantiation) encodeApplicationType :: t0 -> t1 -> Core.ApplicationType -> Either Errors.Error Syntax.TypeExpression encodeApplicationType cx g at = Eithers.bind (encodeType cx g (Core.applicationTypeFunction at)) (\body -> Eithers.bind (encodeType cx g (Core.applicationTypeArgument at)) (\arg -> Right (createTemplateType "TODO_template" [ body, arg])))++-- | Encode an enum type as a C++ enum class encodeEnumType :: t0 -> t1 -> Core.Name -> [Core.FieldType] -> t2 -> Either t3 [Syntax.Declaration] encodeEnumType cx g name tfields comment = Right [@@ -357,10 +421,16 @@ Syntax.variableDeclarationName = (encodeEnumValue (Core.fieldTypeName ft)), Syntax.variableDeclarationInitializer = Nothing, Syntax.variableDeclarationIsAuto = False}))) tfields)))]++-- | Encode an enum value in UPPER_SNAKE_CASE encodeEnumValue :: Core.Name -> String encodeEnumValue fname = sanitizeCppName (Formatting.convertCaseCamelToUpperSnake (Core.unName fname))++-- | Encode a field name in lower_snake_case encodeFieldName :: Core.Name -> String encodeFieldName fname = sanitizeCppName (Formatting.convertCaseCamelToLowerSnake (Core.unName fname))++-- | Encode a field type as a VariableDeclaration encodeFieldType :: t0 -> Core.FieldType -> t1 -> t2 -> Either Errors.Error Syntax.VariableDeclaration encodeFieldType isParameter ft cx g = @@ -371,8 +441,12 @@ Syntax.variableDeclarationName = (encodeFieldName fname), Syntax.variableDeclarationInitializer = Nothing, Syntax.variableDeclarationIsAuto = False})))++-- | Encode a forall type (strip the quantifier) encodeForallType :: t0 -> t1 -> Core.ForallType -> Either Errors.Error Syntax.TypeExpression encodeForallType cx g lt = encodeType cx g (Core.forallTypeBody lt)++-- | Encode a function type as std::function<R(Args...)> encodeFunctionType :: t0 -> t1 -> Core.FunctionType -> Either Errors.Error Syntax.TypeExpression encodeFunctionType cx g ft = Eithers.bind (encodeType cx g (Core.functionTypeDomain ft)) (\dom -> Eithers.bind (encodeType cx g (Core.functionTypeCodomain ft)) (\cod -> Right (Syntax.TypeExpressionFunction (Syntax.FunctionType {@@ -383,6 +457,8 @@ Syntax.parameterName = "", Syntax.parameterUnnamed = False, Syntax.parameterDefaultValue = Nothing}]}))))++-- | Encode a literal type as a C++ type expression encodeLiteralType :: Core.LiteralType -> Syntax.TypeExpression encodeLiteralType lt = Syntax.TypeExpressionBasic (case lt of@@ -400,12 +476,17 @@ Core.IntegerTypeInt64 -> Syntax.BasicTypeNamed "int64_t" _ -> Syntax.BasicTypeInt Core.LiteralTypeString -> Syntax.BasicTypeString)+ -- | Encode a name with a specified case convention, optionally qualified encodeName :: t0 -> t1 -> t2 -> Core.Name -> String encodeName isQualified conv env name = sanitizeCppName (Names.localNameOf name)++-- | Encode a namespace as a C++ namespace string (e.g. "hydra.cpp" -> "hydra::cpp") encodeNamespace :: Packaging.ModuleName -> String encodeNamespace ns =- Strings.intercalate "::" (Lists.map (\seg -> Formatting.convertCaseCamelToLowerSnake seg) (Strings.splitOn "." (Packaging.unModuleName ns)))+ Strings.join "::" (Lists.map (\seg -> Formatting.convertCaseCamelToLowerSnake seg) (Strings.splitOn "." (Packaging.unModuleName ns)))++-- | Encode a record type as a C++ class with fields and constructor encodeRecordType :: t0 -> t1 -> Core.Name -> [Core.FieldType] -> t2 -> Either Errors.Error [Syntax.Declaration] encodeRecordType cx g name rt comment = Eithers.bind (Eithers.mapList (\f -> encodeFieldType False f cx g) rt) (\cppFields -> Eithers.bind (Eithers.mapList (\f -> encodeFieldType True f cx g) rt) (\constructorParams -> Right [@@ -417,7 +498,7 @@ Syntax.MemberSpecificationMember (Syntax.MemberDeclarationConstructor (Syntax.ConstructorDeclaration { Syntax.constructorDeclarationName = (className name), Syntax.constructorDeclarationParameters = (Lists.map (\p -> Syntax.Parameter {- Syntax.parameterType = (Optionals.fromOptional (Syntax.TypeExpressionBasic Syntax.BasicTypeInt) (Syntax.variableDeclarationType p)),+ Syntax.parameterType = (Optionals.withDefault (Syntax.TypeExpressionBasic Syntax.BasicTypeInt) (Syntax.variableDeclarationType p)), Syntax.parameterName = (Syntax.variableDeclarationName p), Syntax.parameterUnnamed = False, Syntax.parameterDefaultValue = Nothing}) constructorParams),@@ -427,6 +508,8 @@ createIdentifierExpr (Syntax.variableDeclarationName field)]}) cppFields), Syntax.constructorDeclarationBody = (createConstructorBody constructorParams)}))]]))), (createLessThanOperator name rt)]))++-- | Encode a Hydra type as a C++ type expression encodeType :: t0 -> t1 -> Core.Type -> Either Errors.Error Syntax.TypeExpression encodeType cx g typ = @@ -457,12 +540,16 @@ Core.TypeWrap _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous wrapped type")) Core.TypeUnit -> Right (createTemplateType "std::tuple" []) _ -> Left (Errors.ErrorOther (Errors.OtherError "Unsupported type"))++-- | Encode a type as a typedef / using declaration encodeTypeAlias :: t0 -> t1 -> Core.Name -> Core.Type -> t2 -> Either Errors.Error Syntax.Declaration encodeTypeAlias cx g name typ comment = Eithers.bind (encodeType cx g typ) (\cppType -> Right (Syntax.DeclarationTypedef (Syntax.TypedefDeclaration { Syntax.typedefDeclarationName = (className name), Syntax.typedefDeclarationType = cppType, Syntax.typedefDeclarationIsUsing = True})))++-- | Encode a top-level type definition (dispatches to record/union/wrap) encodeTypeDefinition :: t0 -> t1 -> Core.Name -> Core.Type -> Either Errors.Error [Syntax.Declaration] encodeTypeDefinition cx g name typ = @@ -472,10 +559,14 @@ Core.TypeRecord v0 -> encodeRecordType cx g name v0 Nothing Core.TypeUnion v0 -> encodeUnionType cx g name v0 Nothing Core.TypeWrap v0 -> encodeWrappedType cx g name v0 Nothing- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "unexpected type in definition: " (ShowCore.type_ typ))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "unexpected type in definition: " (PrintCore.type_ typ))))++-- | Encode a union type (dispatches to enum or variant based on content) encodeUnionType :: t0 -> t1 -> Core.Name -> [Core.FieldType] -> t2 -> Either Errors.Error [Syntax.Declaration] encodeUnionType cx g name rt comment = Logic.ifElse (Predicates.isEnumRowType rt) (encodeEnumType cx g name rt comment) (encodeVariantType cx g name rt comment)++-- | Encode a variant (tagged union) type as a class hierarchy with visitor pattern encodeVariantType :: t0 -> t1 -> Core.Name -> [Core.FieldType] -> t2 -> Either Errors.Error [Syntax.Declaration] encodeVariantType cx g name variants comment = Eithers.bind (Eithers.mapList (\v -> createVariantClass cx g name name v) variants) (\variantClasses -> Right (Lists.concat [@@ -489,12 +580,16 @@ createPartialVisitorInterface name variants], [ createAcceptImplementation name variants]]))++-- | Encode a wrapped type as a single-field record encodeWrappedType :: t0 -> t1 -> Core.Name -> Core.Type -> t2 -> Either Errors.Error [Syntax.Declaration] encodeWrappedType cx g name typ comment = encodeRecordType cx g name [ Core.FieldType { Core.fieldTypeName = (Core.Name "value"), Core.fieldTypeType = typ}] comment++-- | Find includes for a set of type definitions findIncludes :: Bool -> Packaging.ModuleName -> [Packaging.TypeDefinition] -> [Syntax.IncludeDirective] findIncludes withFwd ns defs = Lists.concat [@@ -512,19 +607,29 @@ Syntax.IncludeDirective { Syntax.includeDirectiveName = (bindingNameToFilePath (fwdHeaderName ns)), Syntax.includeDirectiveIsSystem = False}] [])]++-- | Find type dependencies that are in other namespaces findTypeDependencies :: Packaging.ModuleName -> [Packaging.TypeDefinition] -> [Core.Name] findTypeDependencies ns defs = Lists.filter (\n -> Logic.not (Equality.equal (Optionals.map Packaging.unModuleName (Names.moduleNameOf n)) (Just (Packaging.unModuleName ns)))) (Sets.toList (Lists.foldl (\acc -> \d -> Sets.union acc (Dependencies.typeDependencyNames True (Core.typeSchemeBody (Packaging.typeDefinitionBody d)))) Sets.empty defs))++-- | Construct the forward-declaration header name for a namespace fwdHeaderName :: Packaging.ModuleName -> Core.Name fwdHeaderName ns = Names.unqualifyName (Util.QualifiedName { Util.qualifiedNameModuleName = (Just ns), Util.qualifiedNameLocal = "Fwd"})++-- | Gather metadata from definitions (simplified: always include common headers) gatherMetadata :: t0 -> Bool gatherMetadata defs = True++-- | Generate forward declarations for all variant subclasses generateForwardDeclarations :: Core.Name -> [Core.FieldType] -> [Syntax.Declaration] generateForwardDeclarations tname fields = Lists.map (\ft -> cppClassDeclaration (variantName tname (Core.fieldTypeName ft)) [] Nothing) fields++-- | Generate a single type header file generateTypeFile :: Packaging.ModuleName -> Packaging.TypeDefinition -> t0 -> t1 -> Either Errors.Error (String, String) generateTypeFile ns def_ cx g = @@ -535,9 +640,13 @@ def_] in (Right (serializeHeaderFile name includes [ namespaceDecl ns decls]))))++-- | Generate all type header files for a module (fwd file + individual class files) generateTypeFiles :: Packaging.ModuleName -> [Packaging.TypeDefinition] -> t0 -> t1 -> Either Errors.Error [(String, String)] generateTypeFiles ns defs cx g = Eithers.bind (Eithers.mapList (\d -> generateTypeFile ns d cx g) defs) (\classFiles -> Right classFiles)++-- | Check whether a type maps to an STL container type isStdContainerType :: Core.Type -> Bool isStdContainerType typ = @@ -549,6 +658,8 @@ Core.TypeOptional _ -> True Core.TypeSet _ -> True _ -> False++-- | Check whether a type is a struct type (not a literal and not an enum) isStructType :: Core.Type -> Bool isStructType rawType = @@ -558,6 +669,8 @@ Core.TypeLiteral _ -> True _ -> False in (Logic.and (Logic.not isLiteral) (Logic.not (Predicates.isEnumType rawType)))++-- | Check whether a type maps to a C++ template type (string or STL container) isTemplateType :: Core.Type -> Bool isTemplateType typ = @@ -567,35 +680,53 @@ Core.LiteralTypeString -> True _ -> False _ -> False) (isStdContainerType typ))++-- | A protected access label memberSpecificationProtected :: Syntax.MemberSpecification memberSpecificationProtected = Syntax.MemberSpecificationAccessLabel Syntax.AccessSpecifierProtected++-- | A public access label memberSpecificationPublic :: Syntax.MemberSpecification memberSpecificationPublic = Syntax.MemberSpecificationAccessLabel Syntax.AccessSpecifierPublic++-- | Convert a module to C++ code files (entry point) moduleToCpp :: Packaging.Module -> [Packaging.Definition] -> t0 -> t1 -> Either Errors.Error (M.Map String String) moduleToCpp mod defs cx g = let ns = Packaging.moduleName mod typeDefs = Pairs.first (Environment.partitionDefinitions defs) in (Eithers.bind (generateTypeFiles ns typeDefs cx g) (\typeFiles -> Right (Maps.fromList typeFiles)))++-- | Create a namespace declaration wrapping declarations namespaceDecl :: Packaging.ModuleName -> [Syntax.Declaration] -> Syntax.Declaration namespaceDecl ns decls = Syntax.DeclarationNamespace (Syntax.NamespaceDeclaration { Syntax.namespaceDeclarationName = (encodeNamespace ns), Syntax.namespaceDeclarationDeclarations = decls})++-- | Construct a partial visitor interface name partialVisitorName :: Core.Name -> String-partialVisitorName name = sanitizeCppName (Strings.cat2 (Names.localNameOf name) "PartialVisitor")+partialVisitorName name = sanitizeCppName (Strings.concat2 (Names.localNameOf name) "PartialVisitor")++-- | Sanitize a name to be valid in C++ sanitizeCppName :: String -> String sanitizeCppName name = Formatting.sanitizeWithUnderscores Language.cppReservedWords name++-- | Serialize a header file from name, includes, and declarations serializeHeaderFile :: Core.Name -> [Syntax.IncludeDirective] -> [Syntax.Declaration] -> (String, String) serializeHeaderFile name includes decls = ( bindingNameToFilePath name, (Serialization.printExpr (Serialization.parenthesize (Serde.programToExpr (createHeaderFile includes decls)))))++-- | Wrap a type expression with a const qualifier toConstType :: Syntax.TypeExpression -> Syntax.TypeExpression toConstType baseType = Syntax.TypeExpressionQualified (Syntax.QualifiedType { Syntax.qualifiedTypeBaseType = baseType, Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierConst})++-- | Create an unnamed parameter (for operator overloads, etc.) unnamedParameter :: String -> Syntax.TypeExpression -> Syntax.Parameter unnamedParameter name typ = Syntax.Parameter {@@ -603,7 +734,12 @@ Syntax.parameterName = name, Syntax.parameterUnnamed = True, Syntax.parameterDefaultValue = Nothing}++-- | Construct a variant class name (e.g. "MyType" + "field" -> "MyTypeField") variantName :: Core.Name -> Core.Name -> String-variantName tname fname = sanitizeCppName (Strings.cat2 (Names.localNameOf tname) (Formatting.capitalize (Core.unName fname)))+variantName tname fname =+ sanitizeCppName (Strings.concat2 (Names.localNameOf tname) (Formatting.capitalize (Core.unName fname)))++-- | Construct a visitor interface name visitorName :: Core.Name -> String-visitorName name = sanitizeCppName (Strings.cat2 (Names.localNameOf name) "Visitor")+visitorName name = sanitizeCppName (Strings.concat2 (Names.localNameOf name) "Visitor")
src/main/haskell/Hydra/Cpp/Environment.hs view
@@ -1,13 +1,16 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Type definitions for C++ code generation environment module Hydra.Cpp.Environment where+ import qualified Hydra.Core as Core import qualified Hydra.Packaging as Packaging import qualified Hydra.Util as Util import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M+ -- | Environment for C++ code generation data CppEnvironment = CppEnvironment {@@ -16,6 +19,9 @@ -- | Type variables in scope, with their C++ names cppEnvironmentBoundTypeVariables :: ([Core.Name], (M.Map Core.Name String))} deriving (Eq, Ord, Read, Show)+ _CppEnvironment = Core.Name "hydra.cpp.environment.CppEnvironment"+ _CppEnvironment_namespaces = Core.Name "namespaces"+ _CppEnvironment_boundTypeVariables = Core.Name "boundTypeVariables"
src/main/haskell/Hydra/Cpp/Language.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Language constraints and reserved words for C++ module Hydra.Cpp.Language where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Lexical as Lexical@@ -18,9 +24,12 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -30,6 +39,7 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Set as S+ -- | Language constraints for C++ cppLanguage :: Coders.Language cppLanguage =@@ -41,7 +51,23 @@ Coders.languageConstraintsIntegerTypes = integerTypes, Coders.languageConstraintsTermVariants = termVariants, Coders.languageConstraintsTypeVariants = typeVariants,- Coders.languageConstraintsTypes = typePredicate}}+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeaturePartialApplication,+ Coders.LanguageFeatureNestedCaseStatements,+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "cpp")} where literalVariants = Sets.fromList [@@ -99,6 +125,7 @@ Variants.TypeVariantVariable, Variants.TypeVariantWrap] typePredicate = \_ -> True+ -- | A set of reserved words in C++ cppReservedWords :: S.Set String cppReservedWords =
src/main/haskell/Hydra/Cpp/Names.hs view
@@ -1,7 +1,9 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | C++ naming utilities: encoding Hydra names as C++ names module Hydra.Cpp.Names where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core@@ -9,10 +11,14 @@ import qualified Hydra.Cpp.Language as Language import qualified Hydra.Cpp.Syntax as Syntax import qualified Hydra.Cpp.Utils as Utils+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model@@ -28,9 +34,12 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -39,21 +48,26 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Get the C++ class name from a Hydra Name className :: Core.Name -> String className name = sanitizeCppName (Names.localNameOf name)+ -- | Create a type reference, optionally wrapped in shared_ptr createTypeReference :: Bool -> Environment.CppEnvironment -> Core.Name -> Syntax.TypeExpression createTypeReference isPointer env name = let baseType = Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (encodeName True Util.CaseConventionPascal env name)) in (Logic.ifElse isPointer (Utils.toConstType baseType) baseType)+ -- | Encode an enum value with appropriate naming convention encodeEnumValue :: Environment.CppEnvironment -> Core.Name -> String encodeEnumValue = encodeName False Util.CaseConventionUpperSnake+ -- | Encode a field name with appropriate naming convention encodeFieldName :: Environment.CppEnvironment -> Core.Name -> String encodeFieldName env fname = encodeName False Util.CaseConventionLowerSnake env fname+ -- | Encode a name with specified convention encodeName :: Bool -> Util.CaseConvention -> Environment.CppEnvironment -> Core.Name -> String encodeName isQualified conv env name =@@ -65,8 +79,9 @@ local = Util.qualifiedNameLocal qualName cppLocal = sanitizeCppName (Formatting.convertCase Util.CaseConventionCamel conv local) cppNs =- \nsVal -> Strings.intercalate "::" (Lists.map (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake) (Strings.splitOn "." (Packaging.unModuleName nsVal)))- in (Logic.ifElse isQualified (Optionals.cases (Maps.lookup name boundVars) (Optionals.cases mns cppLocal (\nsVal -> Strings.cat2 (cppNs nsVal) (Strings.cat2 "::" cppLocal))) (\n -> n)) cppLocal)+ \nsVal -> Strings.join "::" (Lists.map (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake) (Strings.splitOn "." (Packaging.unModuleName nsVal)))+ in (Logic.ifElse isQualified (Optionals.cases (Maps.lookup name boundVars) (Optionals.cases mns cppLocal (\nsVal -> Strings.concat2 (cppNs nsVal) (Strings.concat2 "::" cppLocal))) (\n -> n)) cppLocal)+ -- | Encode a qualified name with namespace encodeNameQualified :: Environment.CppEnvironment -> Core.Name -> String encodeNameQualified env name =@@ -76,45 +91,57 @@ qualName = Names.qualifyName name mns = Util.qualifiedNameModuleName qualName local = Util.qualifiedNameLocal qualName- in (Optionals.cases (Maps.lookup name boundVars) (Logic.ifElse (Equality.equal mns (Just focusNs)) (sanitizeCppName local) (Strings.intercalate "::" (Lists.map sanitizeCppName (Strings.splitOn "." (Core.unName name))))) (\n -> n))+ in (Optionals.cases (Maps.lookup name boundVars) (Logic.ifElse (Equality.equal mns (Just focusNs)) (sanitizeCppName local) (Strings.join "::" (Lists.map sanitizeCppName (Strings.splitOn "." (Core.unName name))))) (\n -> n))+ -- | Encode a namespace as a C++ namespace string encodeNamespace :: Packaging.ModuleName -> String encodeNamespace nsVal =- Strings.intercalate "::" (Lists.map (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake) (Strings.splitOn "." (Packaging.unModuleName nsVal)))+ Strings.join "::" (Lists.map (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake) (Strings.splitOn "." (Packaging.unModuleName nsVal)))+ -- | Encode a type variable name encodeTypeVariable :: Core.Name -> String encodeTypeVariable name = Formatting.capitalize (Core.unName name)+ -- | Get the forward header name for a namespace fwdHeaderName :: Packaging.ModuleName -> Core.Name fwdHeaderName nsVal = Names.unqualifyName (Util.QualifiedName { Util.qualifiedNameModuleName = (Just nsVal), Util.qualifiedNameLocal = "Fwd"})+ -- | Create a namespace declaration wrapping inner declarations namespaceDecl :: Packaging.ModuleName -> [Syntax.Declaration] -> Syntax.Declaration namespaceDecl nsVal decls = Syntax.DeclarationNamespace (Syntax.NamespaceDeclaration { Syntax.namespaceDeclarationName = (encodeNamespace nsVal), Syntax.namespaceDeclarationDeclarations = decls})+ -- | Get the partial visitor name for a type partialVisitorName :: Core.Name -> String-partialVisitorName name = sanitizeCppName (Strings.cat2 (Names.localNameOf name) "PartialVisitor")+partialVisitorName name = sanitizeCppName (Strings.concat2 (Names.localNameOf name) "PartialVisitor")+ -- | Sanitize a name to be valid in C++ sanitizeCppName :: String -> String sanitizeCppName = Formatting.sanitizeWithUnderscores Language.cppReservedWords+ -- | Create a reference to a term variable termVariableReference :: Environment.CppEnvironment -> Core.Name -> Syntax.Expression termVariableReference = variableReference Util.CaseConventionLowerSnake+ -- | Create a reference to a type variable typeVariableReference :: Environment.CppEnvironment -> Core.Name -> Syntax.TypeExpression typeVariableReference env name = Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (encodeName True Util.CaseConventionPascal env name))+ -- | Create a variable reference expression variableReference :: Util.CaseConvention -> Environment.CppEnvironment -> Core.Name -> Syntax.Expression variableReference conv env name = Utils.createIdentifierExpr (encodeName True conv env name)+ -- | Get the variant name by combining type name and field name variantName :: Core.Name -> Core.Name -> String-variantName tname fname = sanitizeCppName (Strings.cat2 (Names.localNameOf tname) (Formatting.capitalize (Core.unName fname)))+variantName tname fname =+ sanitizeCppName (Strings.concat2 (Names.localNameOf tname) (Formatting.capitalize (Core.unName fname)))+ -- | Get the visitor name for a type visitorName :: Core.Name -> String-visitorName name = sanitizeCppName (Strings.cat2 (Names.localNameOf name) "Visitor")+visitorName name = sanitizeCppName (Strings.concat2 (Names.localNameOf name) "Visitor")
src/main/haskell/Hydra/Cpp/Serde.hs view
@@ -1,15 +1,21 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Serialization functions for converting C++ AST to abstract expressions module Hydra.Cpp.Serde where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core import qualified Hydra.Cpp.Syntax as Syntax+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality@@ -22,10 +28,13 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Serialization as Serialization+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -34,6 +43,7 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Convert an access specifier to an expression accessSpecifierToExpr :: Syntax.AccessSpecifier -> Ast.Expr accessSpecifierToExpr a =@@ -42,6 +52,7 @@ Syntax.AccessSpecifierProtected -> Serialization.cst "protected" Syntax.AccessSpecifierPrivate -> Serialization.cst "private" Syntax.AccessSpecifierNone -> Serialization.cst ""+ -- | Convert an add operation to an expression addOperationToExpr :: Syntax.AddOperation -> Ast.Expr addOperationToExpr op =@@ -52,6 +63,7 @@ additiveExpressionToExpr left, (Serialization.cst "+"), (multiplicativeExpressionToExpr right)])+ -- | Convert an additive expression to an expression additiveExpressionToExpr :: Syntax.AdditiveExpression -> Ast.Expr additiveExpressionToExpr e =@@ -59,18 +71,21 @@ Syntax.AdditiveExpressionMultiplicative v0 -> multiplicativeExpressionToExpr v0 Syntax.AdditiveExpressionAdd v0 -> addOperationToExpr v0 Syntax.AdditiveExpressionSubtract v0 -> subtractOperationToExpr v0+ -- | Convert an and expression to an expression andExpressionToExpr :: Syntax.AndExpression -> Ast.Expr andExpressionToExpr e = case e of Syntax.AndExpressionEquality v0 -> equalityExpressionToExpr v0 Syntax.AndExpressionBitwiseAnd v0 -> bitwiseAndOperationToExpr v0+ -- | Convert an assignment expression to an expression assignmentExpressionToExpr :: Syntax.AssignmentExpression -> Ast.Expr assignmentExpressionToExpr a = case a of Syntax.AssignmentExpressionConditional v0 -> conditionalExpressionToExpr v0 Syntax.AssignmentExpressionAssignment v0 -> explicitAssignmentToExpr v0+ -- | Convert an assignment operator to an expression assignmentOperatorToExpr :: Syntax.AssignmentOperator -> Ast.Expr assignmentOperatorToExpr op =@@ -86,6 +101,7 @@ Syntax.AssignmentOperatorBitwiseAndAssign -> Serialization.cst "&=" Syntax.AssignmentOperatorBitwiseXorAssign -> Serialization.cst "^=" Syntax.AssignmentOperatorBitwiseOrAssign -> Serialization.cst "|="+ -- | Convert a base specifier to an expression baseSpecifierToExpr :: Syntax.BaseSpecifier -> Ast.Expr baseSpecifierToExpr bs =@@ -95,6 +111,7 @@ in (Serialization.spaceSep [ accessSpecifierToExpr access, (Serialization.cst name)])+ -- | Convert a basic type to an expression basicTypeToExpr :: Syntax.BasicType -> Ast.Expr basicTypeToExpr t =@@ -108,6 +125,7 @@ Syntax.BasicTypeString -> Serialization.cst "std::string" Syntax.BasicTypeAuto -> Serialization.cst "auto" Syntax.BasicTypeNamed v0 -> Serialization.cst v0+ -- | Convert a bitwise and operation to an expression bitwiseAndOperationToExpr :: Syntax.BitwiseAndOperation -> Ast.Expr bitwiseAndOperationToExpr op =@@ -118,6 +136,7 @@ andExpressionToExpr left, (Serialization.cst "&"), (equalityExpressionToExpr right)])+ -- | Convert a bitwise or operation to an expression bitwiseOrOperationToExpr :: Syntax.BitwiseOrOperation -> Ast.Expr bitwiseOrOperationToExpr op =@@ -128,6 +147,7 @@ inclusiveOrExpressionToExpr left, (Serialization.cst "|"), (exclusiveOrExpressionToExpr right)])+ -- | Convert a bitwise xor operation to an expression bitwiseXorOperationToExpr :: Syntax.BitwiseXorOperation -> Ast.Expr bitwiseXorOperationToExpr op =@@ -138,22 +158,26 @@ exclusiveOrExpressionToExpr left, (Serialization.cst "^"), (andExpressionToExpr right)])+ -- | Convert a boolean literal to an expression booleanLiteralToExpr :: Syntax.BooleanLiteral -> Ast.Expr booleanLiteralToExpr bl = Logic.ifElse (Syntax.unBooleanLiteral bl) (Serialization.cst "true") (Serialization.cst "false")+ -- | Convert a capture list to an expression captureListToExpr :: Syntax.CaptureList -> Ast.Expr captureListToExpr cl = case cl of Syntax.CaptureListCaptureByValue -> Serialization.cst "[=]" Syntax.CaptureListCaptures v0 -> Serialization.bracketList Serialization.inlineStyle (Lists.map captureToExpr v0)+ -- | Convert a capture to an expression captureToExpr :: Syntax.Capture -> Ast.Expr captureToExpr cap = let name = Syntax.captureName cap byRef = Syntax.captureByReference cap- in (Logic.ifElse byRef (Serialization.cst (Strings.cat2 "&" name)) (Serialization.cst name))+ in (Logic.ifElse byRef (Serialization.cst (Strings.concat2 "&" name)) (Serialization.cst name))+ -- | Convert a case statement to an expression caseStatementToExpr :: Syntax.CaseStatement -> Ast.Expr caseStatementToExpr stmt =@@ -162,6 +186,7 @@ Syntax.CaseStatementDefault v0 -> Serialization.spaceSep [ Serialization.cst "default:", (statementToExpr v0)]+ -- | Convert a case value to an expression caseValueToExpr :: Syntax.CaseValue -> Ast.Expr caseValueToExpr cv =@@ -174,10 +199,12 @@ expressionToExpr value, (Serialization.cst ":")]), (statementToExpr statement)])+ -- | Convert a class body to an expression classBodyToExpr :: Bool -> Syntax.ClassBody -> Ast.Expr classBodyToExpr commas cb = Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.doubleNewlineSep (Lists.map (memberSpecificationToExpr commas) (Syntax.unClassBody cb)))+ -- | Convert a class declaration to an expression classDeclarationToExpr :: Syntax.ClassDeclaration -> Ast.Expr classDeclarationToExpr cd =@@ -186,9 +213,10 @@ mbody = Syntax.classDeclarationBody cd key = Syntax.classSpecifierKey spec isEnum = Logic.or (Equality.equal key Syntax.ClassKeyEnum) (Equality.equal key Syntax.ClassKeyEnumClass)- in (Serialization.withSemi (Serialization.spaceSep (Optionals.cat [+ in (Serialization.withSemi (Serialization.spaceSep (Optionals.givens [ Just (classSpecifierToExpr spec), (Optionals.map (\body -> classBodyToExpr isEnum body) mbody)])))+ -- | Convert a class key to an expression classKeyToExpr :: Syntax.ClassKey -> Ast.Expr classKeyToExpr k =@@ -197,6 +225,7 @@ Syntax.ClassKeyEnum -> Serialization.cst "enum" Syntax.ClassKeyEnumClass -> Serialization.cst "enum class" Syntax.ClassKeyStruct -> Serialization.cst "struct"+ -- | Convert a class specifier to an expression classSpecifierToExpr :: Syntax.ClassSpecifier -> Ast.Expr classSpecifierToExpr cs =@@ -211,6 +240,7 @@ (Logic.ifElse (Lists.null inheritance) [] [ Serialization.cst ":", (Serialization.commaSep Serialization.inlineStyle (Lists.map baseSpecifierToExpr inheritance))])]))+ -- | Convert a comma expression to an expression commaExpressionToExpr :: Syntax.CommaExpression -> Ast.Expr commaExpressionToExpr ce =@@ -221,6 +251,7 @@ expressionToExpr left, (Serialization.cst ","), (assignmentExpressionToExpr right)])+ -- | Convert a comment to an expression commentToExpr :: Syntax.Comment -> Ast.Expr commentToExpr c =@@ -228,16 +259,19 @@ let text = Syntax.commentText c isMultiline = Syntax.commentIsMultiline c in (Serialization.cst (toCppComments text isMultiline))+ -- | Convert a compound statement to an expression compoundStatementToExpr :: Syntax.CompoundStatement -> Ast.Expr compoundStatementToExpr cs = Serialization.curlyBracesList (Just "") Serialization.fullBlockStyle (Lists.map statementToExpr (Syntax.unCompoundStatement cs))+ -- | Convert a conditional expression to an expression conditionalExpressionToExpr :: Syntax.ConditionalExpression -> Ast.Expr conditionalExpressionToExpr c = case c of Syntax.ConditionalExpressionLogicalOr v0 -> logicalOrExpressionToExpr v0 Syntax.ConditionalExpressionTernary v0 -> ternaryExpressionToExpr v0+ -- | Convert a constructor declaration to an expression constructorDeclarationToExpr :: Syntax.ConstructorDeclaration -> Ast.Expr constructorDeclarationToExpr cd =@@ -246,7 +280,7 @@ params = Syntax.constructorDeclarationParameters cd inits = Syntax.constructorDeclarationInitializers cd body = Syntax.constructorDeclarationBody cd- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ Just (Serialization.noSep [ Serialization.cst name, (Serialization.parenListAdaptive (Lists.map parameterToExpr params))]),@@ -254,6 +288,7 @@ Serialization.cst ":", (Serialization.commaSep Serialization.inlineStyle (Lists.map memInitializerToExpr inits))]))), (Just (functionBodyToExpr body))]))+ -- | Convert a declaration to an expression declarationToExpr :: Syntax.Declaration -> Ast.Expr declarationToExpr d =@@ -265,6 +300,7 @@ Syntax.DeclarationTypedef v0 -> typedefDeclarationToExpr v0 Syntax.DeclarationNamespace v0 -> namespaceDeclarationToExpr v0 Syntax.DeclarationTemplate v0 -> templateDeclarationToExpr v0+ -- | Convert a define directive to an expression defineDirectiveToExpr :: Syntax.DefineDirective -> Ast.Expr defineDirectiveToExpr dd =@@ -280,6 +316,7 @@ Serialization.parenListAdaptive (Lists.map (\p -> Serialization.cst p) ps)])), (Optionals.cases replacement [] (\r -> [ Serialization.cst r]))]))+ -- | Convert a destructor declaration to an expression destructorDeclarationToExpr :: Syntax.DestructorDeclaration -> Ast.Expr destructorDeclarationToExpr dd =@@ -292,11 +329,12 @@ Lists.map functionSpecifierPrefixToExpr prefixSpecs, [ Serialization.noSep [- Serialization.cst (Strings.cat2 "~" name),+ Serialization.cst (Strings.concat2 "~" name), (Serialization.parens (Serialization.cst ""))]], (Lists.map functionSpecifierSuffixToExpr suffixSpecs), [ functionBodyToExpr body]]))+ -- | Convert a divide operation to an expression divideOperationToExpr :: Syntax.DivideOperation -> Ast.Expr divideOperationToExpr op =@@ -307,6 +345,7 @@ multiplicativeExpressionToExpr left, (Serialization.cst "/"), (unaryExpressionToExpr right)])+ -- | Convert a do statement to an expression doStatementToExpr :: Syntax.DoStatement -> Ast.Expr doStatementToExpr ds =@@ -319,18 +358,22 @@ (Serialization.withSemi (Serialization.spaceSep [ Serialization.cst "while", (Serialization.parens (expressionToExpr cond))]))])+ -- | Convert an elif directive to an expression elifDirectiveToExpr :: Syntax.ElifDirective -> Ast.Expr elifDirectiveToExpr ed = Serialization.spaceSep [ Serialization.cst "#elif", (Serialization.cst (Syntax.elifDirectiveCondition ed))]+ -- | Convert an else directive to an expression elseDirectiveToExpr :: t0 -> Ast.Expr elseDirectiveToExpr ed = Serialization.cst "#else"+ -- | Convert an endif directive to an expression endifDirectiveToExpr :: t0 -> Ast.Expr endifDirectiveToExpr ed = Serialization.cst "#endif"+ -- | Convert an equal operation to an expression equalOperationToExpr :: Syntax.EqualOperation -> Ast.Expr equalOperationToExpr op =@@ -341,6 +384,7 @@ equalityExpressionToExpr left, (Serialization.cst "=="), (relationalExpressionToExpr right)])+ -- | Convert an equality expression to an expression equalityExpressionToExpr :: Syntax.EqualityExpression -> Ast.Expr equalityExpressionToExpr e =@@ -348,18 +392,21 @@ Syntax.EqualityExpressionRelational v0 -> relationalExpressionToExpr v0 Syntax.EqualityExpressionEqual v0 -> equalOperationToExpr v0 Syntax.EqualityExpressionNotEqual v0 -> notEqualOperationToExpr v0+ -- | Convert an error directive to an expression errorDirectiveToExpr :: Syntax.ErrorDirective -> Ast.Expr errorDirectiveToExpr ed = Serialization.spaceSep [ Serialization.cst "#error", (Serialization.cst (Syntax.errorDirectiveMessage ed))]+ -- | Convert an exclusive or expression to an expression exclusiveOrExpressionToExpr :: Syntax.ExclusiveOrExpression -> Ast.Expr exclusiveOrExpressionToExpr e = case e of Syntax.ExclusiveOrExpressionAnd v0 -> andExpressionToExpr v0 Syntax.ExclusiveOrExpressionBitwiseXor v0 -> bitwiseXorOperationToExpr v0+ -- | Convert an explicit assignment to an expression explicitAssignmentToExpr :: Syntax.ExplicitAssignment -> Ast.Expr explicitAssignmentToExpr ea =@@ -371,12 +418,14 @@ logicalOrExpressionToExpr left, (assignmentOperatorToExpr op), (assignmentExpressionToExpr right)])+ -- | Convert an expression to an expression expressionToExpr :: Syntax.Expression -> Ast.Expr expressionToExpr e = case e of Syntax.ExpressionAssignment v0 -> assignmentExpressionToExpr v0 Syntax.ExpressionComma v0 -> commaExpressionToExpr v0+ -- | Convert a for-init to an expression forInitToExpr :: Syntax.ForInit -> Ast.Expr forInitToExpr i =@@ -384,6 +433,7 @@ Syntax.ForInitExpression v0 -> expressionToExpr v0 Syntax.ForInitDeclaration v0 -> variableDeclarationToExpr False v0 Syntax.ForInitEmpty -> Serialization.cst ""+ -- | Convert a for statement to an expression forStatementToExpr :: Syntax.ForStatement -> Ast.Expr forStatementToExpr fs =@@ -402,6 +452,7 @@ (Serialization.cst ";"), (expressionToExpr inc)]))], (statementToExpr body)])+ -- | Convert a function application to an expression functionApplicationToExpr :: Syntax.FunctionApplication -> Ast.Expr functionApplicationToExpr fa =@@ -411,6 +462,7 @@ in (Serialization.spaceSep [ functionIdentifierToExpr func, (Serialization.parenListAdaptive (Lists.map expressionToExpr args))])+ -- | Convert a function body to an expression functionBodyToExpr :: Syntax.FunctionBody -> Ast.Expr functionBodyToExpr b =@@ -419,6 +471,7 @@ Syntax.FunctionBodyDeclaration -> Serialization.cst ";" Syntax.FunctionBodyPure -> Serialization.withSemi (Serialization.cst "= 0") Syntax.FunctionBodyDefault -> Serialization.withSemi (Serialization.cst "= default")+ -- | Convert a function call operation to an expression functionCallOperationToExpr :: Syntax.FunctionCallOperation -> Ast.Expr functionCallOperationToExpr fco =@@ -428,6 +481,7 @@ in (Serialization.noSep [ postfixExpressionToExpr func, (Serialization.parenListAdaptive (Lists.map expressionToExpr args))])+ -- | Convert a function declaration to an expression functionDeclarationToExpr :: Syntax.FunctionDeclaration -> Ast.Expr functionDeclarationToExpr fd =@@ -448,12 +502,14 @@ (Lists.map functionSpecifierSuffixToExpr suffixSpecs), [ functionBodyToExpr body]]))+ -- | Convert a function identifier to an expression functionIdentifierToExpr :: Syntax.FunctionIdentifier -> Ast.Expr functionIdentifierToExpr f = case f of Syntax.FunctionIdentifierSimple v0 -> Serialization.cst v0 Syntax.FunctionIdentifierQualified v0 -> qualifiedIdentifierToExpr v0+ -- | Convert a function specifier prefix to an expression functionSpecifierPrefixToExpr :: Syntax.FunctionSpecifierPrefix -> Ast.Expr functionSpecifierPrefixToExpr s =@@ -462,6 +518,7 @@ Syntax.FunctionSpecifierPrefixVirtual -> Serialization.cst "virtual" Syntax.FunctionSpecifierPrefixStatic -> Serialization.cst "static" Syntax.FunctionSpecifierPrefixExplicit -> Serialization.cst "explicit"+ -- | Convert a function specifier suffix to an expression functionSpecifierSuffixToExpr :: Syntax.FunctionSpecifierSuffix -> Ast.Expr functionSpecifierSuffixToExpr s =@@ -470,6 +527,7 @@ Syntax.FunctionSpecifierSuffixNoexcept -> Serialization.cst "noexcept" Syntax.FunctionSpecifierSuffixOverride -> Serialization.cst "override" Syntax.FunctionSpecifierSuffixFinal -> Serialization.cst "final"+ -- | Convert a function type to an expression functionTypeToExpr :: Syntax.FunctionType -> Ast.Expr functionTypeToExpr ft =@@ -479,6 +537,7 @@ in (Serialization.spaceSep [ typeExpressionToExpr retType, (Serialization.parenListAdaptive (Lists.map parameterToExpr params))])+ -- | Convert a greater-than-or-equal operation to an expression greaterEqualOperationToExpr :: Syntax.GreaterEqualOperation -> Ast.Expr greaterEqualOperationToExpr op =@@ -489,6 +548,7 @@ relationalExpressionToExpr left, (Serialization.cst ">="), (shiftExpressionToExpr right)])+ -- | Convert a greater-than operation to an expression greaterOperationToExpr :: Syntax.GreaterOperation -> Ast.Expr greaterOperationToExpr op =@@ -499,51 +559,58 @@ relationalExpressionToExpr left, (Serialization.cst ">"), (shiftExpressionToExpr right)])+ -- | Convert an if directive to an expression ifDirectiveToExpr :: Syntax.IfDirective -> Ast.Expr ifDirectiveToExpr ifd = Serialization.spaceSep [ Serialization.cst "#if", (Serialization.cst (Syntax.ifDirectiveCondition ifd))]+ -- | Convert an ifdef directive to an expression ifdefDirectiveToExpr :: Syntax.IfdefDirective -> Ast.Expr ifdefDirectiveToExpr id = Serialization.spaceSep [ Serialization.cst "#ifdef", (Serialization.cst (Syntax.ifdefDirectiveIdentifier id))]+ -- | Convert an ifndef directive to an expression ifndefDirectiveToExpr :: Syntax.IfndefDirective -> Ast.Expr ifndefDirectiveToExpr ind = Serialization.spaceSep [ Serialization.cst "#ifndef", (Serialization.cst (Syntax.ifndefDirectiveIdentifier ind))]+ -- | Convert an include directive to an expression includeDirectiveToExpr :: Syntax.IncludeDirective -> Ast.Expr includeDirectiveToExpr incl = let name = Syntax.includeDirectiveName incl isSystem = Syntax.includeDirectiveIsSystem incl- in (Logic.ifElse isSystem (Serialization.cst (Strings.cat [+ in (Logic.ifElse isSystem (Serialization.cst (Strings.concat [ "#include <", name,- ">"])) (Serialization.cst (Strings.cat [+ ">"])) (Serialization.cst (Strings.concat [ "#include \"", name, "\""])))+ -- | Convert an inclusive or expression to an expression inclusiveOrExpressionToExpr :: Syntax.InclusiveOrExpression -> Ast.Expr inclusiveOrExpressionToExpr e = case e of Syntax.InclusiveOrExpressionExclusiveOr v0 -> exclusiveOrExpressionToExpr v0 Syntax.InclusiveOrExpressionBitwiseOr v0 -> bitwiseOrOperationToExpr v0+ -- | Convert an integer literal to an expression integerLiteralToExpr :: Syntax.IntegerLiteral -> Ast.Expr integerLiteralToExpr i = case i of Syntax.IntegerLiteralDecimal v0 -> Serialization.cst (Literals.showBigint v0)- Syntax.IntegerLiteralHexadecimal v0 -> Serialization.cst (Strings.cat2 "0x" v0)- Syntax.IntegerLiteralOctal v0 -> Serialization.cst (Strings.cat2 "0" v0)- Syntax.IntegerLiteralBinary v0 -> Serialization.cst (Strings.cat2 "0b" v0)+ Syntax.IntegerLiteralHexadecimal v0 -> Serialization.cst (Strings.concat2 "0x" v0)+ Syntax.IntegerLiteralOctal v0 -> Serialization.cst (Strings.concat2 "0" v0)+ Syntax.IntegerLiteralBinary v0 -> Serialization.cst (Strings.concat2 "0b" v0)+ -- | Convert an iteration statement to an expression iterationStatementToExpr :: Syntax.IterationStatement -> Ast.Expr iterationStatementToExpr i =@@ -552,6 +619,7 @@ Syntax.IterationStatementDo v0 -> doStatementToExpr v0 Syntax.IterationStatementFor v0 -> forStatementToExpr v0 Syntax.IterationStatementRangeFor v0 -> rangeForStatementToExpr v0+ -- | Convert a jump statement to an expression jumpStatementToExpr :: Syntax.JumpStatement -> Ast.Expr jumpStatementToExpr j =@@ -565,6 +633,7 @@ Syntax.JumpStatementThrow v0 -> Serialization.withSemi (Serialization.spaceSep [ Serialization.cst "throw", (expressionToExpr v0)])+ -- | Convert a labeled statement to an expression labeledStatementToExpr :: Syntax.LabeledStatement -> Ast.Expr labeledStatementToExpr ls =@@ -572,8 +641,9 @@ let label = Syntax.labeledStatementLabel ls stmt = Syntax.labeledStatementStatement ls in (Serialization.newlineSep [- Serialization.cst (Strings.cat2 label ":"),+ Serialization.cst (Strings.concat2 label ":"), (statementToExpr stmt)])+ -- | Convert a lambda expression to an expression lambdaExpressionToExpr :: Syntax.LambdaExpression -> Ast.Expr lambdaExpressionToExpr le =@@ -589,6 +659,7 @@ Serialization.cst "->", (typeExpressionToExpr t)])), (compoundStatementToExpr body)])+ -- | Convert a left shift operation to an expression leftShiftOperationToExpr :: Syntax.LeftShiftOperation -> Ast.Expr leftShiftOperationToExpr op =@@ -599,6 +670,7 @@ shiftExpressionToExpr left, (Serialization.cst "<<"), (additiveExpressionToExpr right)])+ -- | Convert a less-than-or-equal operation to an expression lessEqualOperationToExpr :: Syntax.LessEqualOperation -> Ast.Expr lessEqualOperationToExpr op =@@ -609,6 +681,7 @@ relationalExpressionToExpr left, (Serialization.cst "<="), (shiftExpressionToExpr right)])+ -- | Convert a less-than operation to an expression lessOperationToExpr :: Syntax.LessOperation -> Ast.Expr lessOperationToExpr op =@@ -619,6 +692,7 @@ relationalExpressionToExpr left, (Serialization.cst "<"), (shiftExpressionToExpr right)])+ -- | Convert a line directive to an expression lineDirectiveToExpr :: Syntax.LineDirective -> Ast.Expr lineDirectiveToExpr ld =@@ -630,32 +704,35 @@ Serialization.cst "#line", (Serialization.cst (Literals.showInt32 lineNumber))], (Optionals.cases filename [] (\f -> [- Serialization.cst (Strings.cat [+ Serialization.cst (Strings.concat [ "\"", f, "\""])]))]))+ -- | Convert a literal to an expression literalToExpr :: Syntax.Literal -> Ast.Expr literalToExpr l = case l of Syntax.LiteralInteger v0 -> integerLiteralToExpr v0 Syntax.LiteralFloating v0 -> Serialization.cst (Literals.showFloat64 (Syntax.unFloatingLiteral v0))- Syntax.LiteralCharacter v0 -> Serialization.cst (Strings.cat [+ Syntax.LiteralCharacter v0 -> Serialization.cst (Strings.concat [ "'", (Syntax.unCharacterLiteral v0), "'"])- Syntax.LiteralString v0 -> Serialization.cst (Strings.cat [+ Syntax.LiteralString v0 -> Serialization.cst (Strings.concat [ "\"", (Syntax.unStringLiteral v0), "\""]) Syntax.LiteralBoolean v0 -> booleanLiteralToExpr v0 Syntax.LiteralNull -> Serialization.cst "nullptr"+ -- | Convert a logical and expression to an expression logicalAndExpressionToExpr :: Syntax.LogicalAndExpression -> Ast.Expr logicalAndExpressionToExpr e = case e of Syntax.LogicalAndExpressionInclusiveOr v0 -> inclusiveOrExpressionToExpr v0 Syntax.LogicalAndExpressionLogicalAnd v0 -> logicalAndOperationToExpr v0+ -- | Convert a logical and operation to an expression logicalAndOperationToExpr :: Syntax.LogicalAndOperation -> Ast.Expr logicalAndOperationToExpr op =@@ -666,12 +743,14 @@ logicalAndExpressionToExpr left, (Serialization.cst "&&"), (inclusiveOrExpressionToExpr right)])+ -- | Convert a logical or expression to an expression logicalOrExpressionToExpr :: Syntax.LogicalOrExpression -> Ast.Expr logicalOrExpressionToExpr e = case e of Syntax.LogicalOrExpressionLogicalAnd v0 -> logicalAndExpressionToExpr v0 Syntax.LogicalOrExpressionLogicalOr v0 -> logicalOrOperationToExpr v0+ -- | Convert a logical or operation to an expression logicalOrOperationToExpr :: Syntax.LogicalOrOperation -> Ast.Expr logicalOrOperationToExpr op =@@ -682,6 +761,7 @@ logicalOrExpressionToExpr left, (Serialization.cst "||"), (logicalAndExpressionToExpr right)])+ -- | Convert a map entry to an expression mapEntryToExpr :: Syntax.MapEntry -> Ast.Expr mapEntryToExpr me =@@ -693,6 +773,7 @@ expressionToExpr key], (Serialization.cst "->"), (expressionToExpr val)])+ -- | Convert a map to an expression mapToExpr :: Syntax.Map -> Ast.Expr mapToExpr m =@@ -707,6 +788,7 @@ (typeExpressionToExpr valType)]), (Serialization.cst ">"), (Serialization.curlyBracesList Nothing Serialization.inlineStyle (Lists.map mapEntryToExpr entries))])+ -- | Convert a member initializer to an expression memInitializerToExpr :: Syntax.MemInitializer -> Ast.Expr memInitializerToExpr mi =@@ -716,6 +798,7 @@ in (Serialization.noSep [ Serialization.cst name, (Serialization.parenListAdaptive (Lists.map expressionToExpr args))])+ -- | Convert a member access operation to an expression memberAccessOperationToExpr :: Syntax.MemberAccessOperation -> Ast.Expr memberAccessOperationToExpr mao =@@ -726,6 +809,7 @@ postfixExpressionToExpr obj, (Serialization.cst "."), (Serialization.cst member)])+ -- | Convert a member declaration to an expression memberDeclarationToExpr :: Bool -> Syntax.MemberDeclaration -> Ast.Expr memberDeclarationToExpr commas m =@@ -736,6 +820,7 @@ Syntax.MemberDeclarationDestructor v0 -> destructorDeclarationToExpr v0 Syntax.MemberDeclarationNestedClass v0 -> classDeclarationToExpr v0 Syntax.MemberDeclarationTemplate v0 -> templateDeclarationToExpr v0+ -- | Convert a member specification to an expression memberSpecificationToExpr :: Bool -> Syntax.MemberSpecification -> Ast.Expr memberSpecificationToExpr commas m =@@ -744,6 +829,7 @@ accessSpecifierToExpr v0, (Serialization.cst ":")] Syntax.MemberSpecificationMember v0 -> memberDeclarationToExpr commas v0+ -- | Convert a modulo operation to an expression moduloOperationToExpr :: Syntax.ModuloOperation -> Ast.Expr moduloOperationToExpr op =@@ -754,6 +840,7 @@ multiplicativeExpressionToExpr left, (Serialization.cst "%"), (unaryExpressionToExpr right)])+ -- | Convert a multiplicative expression to an expression multiplicativeExpressionToExpr :: Syntax.MultiplicativeExpression -> Ast.Expr multiplicativeExpressionToExpr e =@@ -762,6 +849,7 @@ Syntax.MultiplicativeExpressionMultiply v0 -> multiplyOperationToExpr v0 Syntax.MultiplicativeExpressionDivide v0 -> divideOperationToExpr v0 Syntax.MultiplicativeExpressionModulo v0 -> moduloOperationToExpr v0+ -- | Convert a multiply operation to an expression multiplyOperationToExpr :: Syntax.MultiplyOperation -> Ast.Expr multiplyOperationToExpr op =@@ -772,6 +860,7 @@ multiplicativeExpressionToExpr left, (Serialization.cst "*"), (unaryExpressionToExpr right)])+ -- | Convert a namespace declaration to an expression namespaceDeclarationToExpr :: Syntax.NamespaceDeclaration -> Ast.Expr namespaceDeclarationToExpr nd =@@ -779,8 +868,9 @@ let name = Syntax.namespaceDeclarationName nd decls = Syntax.namespaceDeclarationDeclarations nd in (Serialization.spaceSep [- Serialization.cst (Strings.cat2 "namespace " name),+ Serialization.cst (Strings.concat2 "namespace " name), (Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.doubleNewlineSep (Lists.map declarationToExpr decls)))])+ -- | Convert a not-equal operation to an expression notEqualOperationToExpr :: Syntax.NotEqualOperation -> Ast.Expr notEqualOperationToExpr op =@@ -791,6 +881,7 @@ equalityExpressionToExpr left, (Serialization.cst "!="), (relationalExpressionToExpr right)])+ -- | Convert an optional to an expression optionalToExpr :: Syntax.Optional -> Ast.Expr optionalToExpr opt =@@ -803,12 +894,14 @@ (Serialization.cst ">"), (Optionals.cases val (Serialization.cst "{}") (\v -> Serialization.curlyBracesList Nothing Serialization.inlineStyle [ expressionToExpr v]))])+ -- | Convert overloaded lambdas to an expression overloadedLambdasToExpr :: Syntax.OverloadedLambdas -> Ast.Expr overloadedLambdasToExpr ol = Serialization.spaceSep [ Serialization.cst "overloaded", (Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.newlineSep (Lists.map lambdaExpressionToExpr (Syntax.unOverloadedLambdas ol))))]+ -- | Convert a parameter to an expression parameterToExpr :: Syntax.Parameter -> Ast.Expr parameterToExpr p =@@ -818,7 +911,7 @@ unnamed = Syntax.parameterUnnamed p defaultVal = Syntax.parameterDefaultValue p nameExpr =- Serialization.cst (Logic.ifElse unnamed (Strings.cat [+ Serialization.cst (Logic.ifElse unnamed (Strings.concat [ "/*", name, "*/"]) name)@@ -829,6 +922,7 @@ (Optionals.cases defaultVal [] (\expr -> [ Serialization.cst "=", (expressionToExpr expr)]))]))+ -- | Convert a pattern match to an expression patternMatchToExpr :: Syntax.PatternMatch -> Ast.Expr patternMatchToExpr pm =@@ -840,6 +934,7 @@ (Serialization.parenListAdaptive [ visitorToExpr visitor, (expressionToExpr variant)])])+ -- | Convert a pointer member access operation to an expression pointerMemberAccessOperationToExpr :: Syntax.PointerMemberAccessOperation -> Ast.Expr pointerMemberAccessOperationToExpr pmao =@@ -850,6 +945,7 @@ postfixExpressionToExpr ptr, (Serialization.cst "->"), (Serialization.cst member)])+ -- | Convert a postfix expression to an expression postfixExpressionToExpr :: Syntax.PostfixExpression -> Ast.Expr postfixExpressionToExpr e =@@ -866,9 +962,11 @@ Syntax.PostfixExpressionPostDecrement v0 -> Serialization.noSep [ postfixExpressionToExpr v0, (Serialization.cst "--")]+ -- | Convert a pragma directive to an expression pragmaDirectiveToExpr :: Syntax.PragmaDirective -> Ast.Expr-pragmaDirectiveToExpr pd = Serialization.cst (Strings.cat2 "#pragma " (Syntax.pragmaDirectiveContent pd))+pragmaDirectiveToExpr pd = Serialization.cst (Strings.concat2 "#pragma " (Syntax.pragmaDirectiveContent pd))+ -- | Convert a preprocessor directive to an expression preprocessorDirectiveToExpr :: Syntax.PreprocessorDirective -> Ast.Expr preprocessorDirectiveToExpr d =@@ -886,6 +984,7 @@ Syntax.PreprocessorDirectiveLine v0 -> lineDirectiveToExpr v0 Syntax.PreprocessorDirectiveError v0 -> errorDirectiveToExpr v0 Syntax.PreprocessorDirectiveWarning v0 -> warningDirectiveToExpr v0+ -- | Convert a primary expression to an expression primaryExpressionToExpr :: Syntax.PrimaryExpression -> Ast.Expr primaryExpressionToExpr e =@@ -894,6 +993,7 @@ Syntax.PrimaryExpressionLiteral v0 -> literalToExpr v0 Syntax.PrimaryExpressionParenthesized v0 -> Serialization.parens (expressionToExpr v0) Syntax.PrimaryExpressionLambda v0 -> lambdaExpressionToExpr v0+ -- | Convert a program to an expression programToExpr :: Syntax.Program -> Ast.Expr programToExpr prog =@@ -902,20 +1002,22 @@ includes = Syntax.programIncludes prog decls = Syntax.programDeclarations prog separate = \sep -> \defs -> Logic.ifElse (Lists.null defs) Nothing (Just (sep defs))- in (Serialization.doubleNewlineSep (Optionals.cat [+ in (Serialization.doubleNewlineSep (Optionals.givens [ separate Serialization.newlineSep (Lists.map preprocessorDirectiveToExpr preps), (separate Serialization.newlineSep (Lists.map includeDirectiveToExpr includes)), (separate Serialization.doubleNewlineSep (Lists.map declarationToExpr decls))]))+ -- | Convert a qualified identifier to an expression qualifiedIdentifierToExpr :: Syntax.QualifiedIdentifier -> Ast.Expr qualifiedIdentifierToExpr qi = let ns = Syntax.qualifiedIdentifierNamespace qi name = Syntax.qualifiedIdentifierName qi- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ ns, "::", name]))+ -- | Convert a qualified type to an expression qualifiedTypeToExpr :: Syntax.QualifiedType -> Ast.Expr qualifiedTypeToExpr qt =@@ -935,6 +1037,7 @@ Syntax.TypeQualifierPointer -> Serialization.noSep [ typeExpressionToExpr baseType, (Serialization.cst "*")]+ -- | Convert a range-for statement to an expression rangeForStatementToExpr :: Syntax.RangeForStatement -> Ast.Expr rangeForStatementToExpr rfs =@@ -952,6 +1055,7 @@ (Serialization.cst ":"), (expressionToExpr range)]))], (statementToExpr body)])+ -- | Convert a relational expression to an expression relationalExpressionToExpr :: Syntax.RelationalExpression -> Ast.Expr relationalExpressionToExpr e =@@ -961,6 +1065,7 @@ Syntax.RelationalExpressionGreater v0 -> greaterOperationToExpr v0 Syntax.RelationalExpressionLessEqual v0 -> lessEqualOperationToExpr v0 Syntax.RelationalExpressionGreaterEqual v0 -> greaterEqualOperationToExpr v0+ -- | Convert a right shift operation to an expression rightShiftOperationToExpr :: Syntax.RightShiftOperation -> Ast.Expr rightShiftOperationToExpr op =@@ -971,6 +1076,7 @@ shiftExpressionToExpr left, (Serialization.cst ">>"), (additiveExpressionToExpr right)])+ -- | Convert a selection statement to an expression selectionStatementToExpr :: Syntax.SelectionStatement -> Ast.Expr selectionStatementToExpr ss =@@ -986,6 +1092,7 @@ (Optionals.cases elseBranch (Serialization.cst "") (\stmt -> Serialization.newlineSep [ Serialization.cst "else", (statementToExpr stmt)]))])+ -- | Convert a set to an expression setToExpr :: Syntax.Set -> Ast.Expr setToExpr s =@@ -997,6 +1104,7 @@ (typeExpressionToExpr elemType), (Serialization.cst ">"), (Serialization.curlyBracesList Nothing Serialization.inlineStyle (Lists.map expressionToExpr elems))])+ -- | Convert a shift expression to an expression shiftExpressionToExpr :: Syntax.ShiftExpression -> Ast.Expr shiftExpressionToExpr e =@@ -1004,12 +1112,14 @@ Syntax.ShiftExpressionAdditive v0 -> additiveExpressionToExpr v0 Syntax.ShiftExpressionLeftShift v0 -> leftShiftOperationToExpr v0 Syntax.ShiftExpressionRightShift v0 -> rightShiftOperationToExpr v0+ -- | Convert a sizeof expression to an expression sizeofExpressionToExpr :: Syntax.SizeofExpression -> Ast.Expr sizeofExpressionToExpr se = Serialization.spaceSep [ Serialization.cst "sizeof", (Serialization.parens (typeExpressionToExpr (Syntax.unSizeofExpression se)))]+ -- | Convert a statement to an expression statementToExpr :: Syntax.Statement -> Ast.Expr statementToExpr s =@@ -1022,6 +1132,7 @@ Syntax.StatementJump v0 -> jumpStatementToExpr v0 Syntax.StatementDeclaration v0 -> Serialization.withSemi (variableDeclarationToExpr False v0) Syntax.StatementExpression v0 -> Serialization.withSemi (expressionToExpr v0)+ -- | Convert a subscript operation to an expression subscriptOperationToExpr :: Syntax.SubscriptOperation -> Ast.Expr subscriptOperationToExpr so =@@ -1033,6 +1144,7 @@ (Serialization.cst "["), (expressionToExpr index), (Serialization.cst "]")])+ -- | Convert a subtract operation to an expression subtractOperationToExpr :: Syntax.SubtractOperation -> Ast.Expr subtractOperationToExpr op =@@ -1043,6 +1155,7 @@ additiveExpressionToExpr left, (Serialization.cst "-"), (multiplicativeExpressionToExpr right)])+ -- | Convert a switch statement to an expression switchStatementToExpr :: Syntax.SwitchStatement -> Ast.Expr switchStatementToExpr ss =@@ -1053,12 +1166,14 @@ Serialization.cst "switch", (Serialization.parens (expressionToExpr value)), (Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.newlineSep (Lists.map caseStatementToExpr cases)))])+ -- | Convert a template argument to an expression templateArgumentToExpr :: Syntax.TemplateArgument -> Ast.Expr templateArgumentToExpr a = case a of Syntax.TemplateArgumentType v0 -> typeExpressionToExpr v0 Syntax.TemplateArgumentValue v0 -> expressionToExpr v0+ -- | Convert a template declaration to an expression templateDeclarationToExpr :: Syntax.TemplateDeclaration -> Ast.Expr templateDeclarationToExpr td =@@ -1072,6 +1187,7 @@ Serialization.cst "template", (Serialization.angleBracesList Serialization.inlineStyle (Lists.map (\p -> Serialization.cst p) params))], (declarationToExpr declaration)])+ -- | Convert a template function call operation to an expression templateFunctionCallOperationToExpr :: Syntax.TemplateFunctionCallOperation -> Ast.Expr templateFunctionCallOperationToExpr tfco =@@ -1083,6 +1199,7 @@ postfixExpressionToExpr func, (Serialization.angleBracesList Serialization.inlineStyle (Lists.map templateArgumentToExpr templateArgs)), (Serialization.parenListAdaptive (Lists.map expressionToExpr args))])+ -- | Convert a template type to an expression templateTypeToExpr :: Syntax.TemplateType -> Ast.Expr templateTypeToExpr tt =@@ -1092,6 +1209,7 @@ in (Serialization.noSep [ Serialization.cst name, (Serialization.angleBracesList Serialization.inlineStyle (Lists.map templateArgumentToExpr args))])+ -- | Convert a ternary expression to an expression ternaryExpressionToExpr :: Syntax.TernaryExpression -> Ast.Expr ternaryExpressionToExpr te =@@ -1105,13 +1223,15 @@ (expressionToExpr trueExpr), (Serialization.cst ":"), (conditionalExpressionToExpr falseExpr)])+ -- | Convert a string to a C++ comment. Empty single-line comments emit `//` (no trailing space). toCppComments :: String -> Bool -> String toCppComments s isMultiline =- Logic.ifElse isMultiline (Strings.cat [+ Logic.ifElse isMultiline (Strings.concat [ "/* ", s,- " */"]) (Logic.ifElse (Equality.equal s "") "//" (Strings.cat2 "// " s))+ " */"]) (Logic.ifElse (Equality.equal s "") "//" (Strings.concat2 "// " s))+ -- | Convert a type expression to an expression typeExpressionToExpr :: Syntax.TypeExpression -> Ast.Expr typeExpressionToExpr t =@@ -1121,6 +1241,7 @@ Syntax.TypeExpressionTemplate v0 -> templateTypeToExpr v0 Syntax.TypeExpressionFunction v0 -> functionTypeToExpr v0 Syntax.TypeExpressionAuto -> Serialization.cst "auto"+ -- | Convert a typedef declaration to an expression typedefDeclarationToExpr :: Syntax.TypedefDeclaration -> Ast.Expr typedefDeclarationToExpr td =@@ -1129,12 +1250,13 @@ typ = Syntax.typedefDeclarationType td isUsing = Syntax.typedefDeclarationIsUsing td in (Logic.ifElse isUsing (Serialization.withSemi (Serialization.spaceSep [- Serialization.cst (Strings.cat2 "using " name),+ Serialization.cst (Strings.concat2 "using " name), (Serialization.cst "="), (typeExpressionToExpr typ)])) (Serialization.withSemi (Serialization.spaceSep [ Serialization.cst "typedef", (typeExpressionToExpr typ), (Serialization.cst name)])))+ -- | Convert a unary expression to an expression unaryExpressionToExpr :: Syntax.UnaryExpression -> Ast.Expr unaryExpressionToExpr e =@@ -1142,6 +1264,7 @@ Syntax.UnaryExpressionPostfix v0 -> postfixExpressionToExpr v0 Syntax.UnaryExpressionUnaryOp v0 -> unaryOperationToExpr v0 Syntax.UnaryExpressionSizeof v0 -> sizeofExpressionToExpr v0+ -- | Convert a unary operation to an expression unaryOperationToExpr :: Syntax.UnaryOperation -> Ast.Expr unaryOperationToExpr uo =@@ -1151,6 +1274,7 @@ in (Serialization.spaceSep [ unaryOperatorToExpr op, (unaryExpressionToExpr operand)])+ -- | Convert a unary operator to an expression unaryOperatorToExpr :: Syntax.UnaryOperator -> Ast.Expr unaryOperatorToExpr op =@@ -1163,12 +1287,14 @@ Syntax.UnaryOperatorAddressOf -> Serialization.cst "&" Syntax.UnaryOperatorPreIncrement -> Serialization.cst "++" Syntax.UnaryOperatorPreDecrement -> Serialization.cst "--"+ -- | Convert an undef directive to an expression undefDirectiveToExpr :: Syntax.UndefDirective -> Ast.Expr undefDirectiveToExpr ud = Serialization.spaceSep [ Serialization.cst "#undef", (Serialization.cst (Syntax.undefDirectiveName ud))]+ -- | Convert a variable declaration to an expression variableDeclarationToExpr :: Bool -> Syntax.VariableDeclaration -> Ast.Expr variableDeclarationToExpr commas vd =@@ -1187,6 +1313,7 @@ (Optionals.cases init [] (\expr -> [ Serialization.cst "=", (expressionToExpr expr)]))])))+ -- | Convert a vector to an expression vectorToExpr :: Syntax.Vector -> Ast.Expr vectorToExpr v =@@ -1198,18 +1325,21 @@ (typeExpressionToExpr elemType), (Serialization.cst ">"), (Serialization.curlyBracesList Nothing Serialization.inlineStyle (Lists.map expressionToExpr elems))])+ -- | Convert a visitor to an expression visitorToExpr :: Syntax.Visitor -> Ast.Expr visitorToExpr v = case v of Syntax.VisitorLambda v0 -> lambdaExpressionToExpr v0 Syntax.VisitorOverloaded v0 -> overloadedLambdasToExpr v0+ -- | Convert a warning directive to an expression warningDirectiveToExpr :: Syntax.WarningDirective -> Ast.Expr warningDirectiveToExpr wd = Serialization.spaceSep [ Serialization.cst "#warning", (Serialization.cst (Syntax.warningDirectiveMessage wd))]+ -- | Convert a while statement to an expression whileStatementToExpr :: Syntax.WhileStatement -> Ast.Expr whileStatementToExpr ws =
src/main/haskell/Hydra/Cpp/Syntax.hs view
@@ -1,1253 +1,2032 @@ -- Note: this is an automatically generated file. Do not edit.--- | A C++ syntax model, focusing on features for representing algebraic data types and declarative computations--module Hydra.Cpp.Syntax where-import qualified Hydra.Core as Core-import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.Scientific as Sci-data AccessSpecifier =- AccessSpecifierPublic |- AccessSpecifierProtected |- AccessSpecifierPrivate |- AccessSpecifierNone- deriving (Eq, Ord, Read, Show)-_AccessSpecifier = Core.Name "hydra.cpp.syntax.AccessSpecifier"-_AccessSpecifier_public = Core.Name "public"-_AccessSpecifier_protected = Core.Name "protected"-_AccessSpecifier_private = Core.Name "private"-_AccessSpecifier_none = Core.Name "none"-data Program =- Program {- programPreprocessorDirectives :: [PreprocessorDirective],- programIncludes :: [IncludeDirective],- programDeclarations :: [Declaration]}- deriving (Eq, Ord, Read, Show)-_Program = Core.Name "hydra.cpp.syntax.Program"-_Program_preprocessorDirectives = Core.Name "preprocessorDirectives"-_Program_includes = Core.Name "includes"-_Program_declarations = Core.Name "declarations"-data IncludeDirective =- IncludeDirective {- includeDirectiveName :: String,- includeDirectiveIsSystem :: Bool}- deriving (Eq, Ord, Read, Show)-_IncludeDirective = Core.Name "hydra.cpp.syntax.IncludeDirective"-_IncludeDirective_name = Core.Name "name"-_IncludeDirective_isSystem = Core.Name "isSystem"-data Declaration =- DeclarationPreprocessor PreprocessorDirective |- DeclarationClass ClassDeclaration |- DeclarationFunction FunctionDeclaration |- DeclarationVariable VariableDeclaration |- DeclarationTypedef TypedefDeclaration |- DeclarationNamespace NamespaceDeclaration |- DeclarationTemplate TemplateDeclaration- deriving (Eq, Ord, Read, Show)-_Declaration = Core.Name "hydra.cpp.syntax.Declaration"-_Declaration_preprocessor = Core.Name "preprocessor"-_Declaration_class = Core.Name "class"-_Declaration_function = Core.Name "function"-_Declaration_variable = Core.Name "variable"-_Declaration_typedef = Core.Name "typedef"-_Declaration_namespace = Core.Name "namespace"-_Declaration_template = Core.Name "template"-data NamespaceDeclaration =- NamespaceDeclaration {- namespaceDeclarationName :: String,- namespaceDeclarationDeclarations :: [Declaration]}- deriving (Eq, Ord, Read, Show)-_NamespaceDeclaration = Core.Name "hydra.cpp.syntax.NamespaceDeclaration"-_NamespaceDeclaration_name = Core.Name "name"-_NamespaceDeclaration_declarations = Core.Name "declarations"-data TypedefDeclaration =- TypedefDeclaration {- typedefDeclarationName :: String,- typedefDeclarationType :: TypeExpression,- typedefDeclarationIsUsing :: Bool}- deriving (Eq, Ord, Read, Show)-_TypedefDeclaration = Core.Name "hydra.cpp.syntax.TypedefDeclaration"-_TypedefDeclaration_name = Core.Name "name"-_TypedefDeclaration_type = Core.Name "type"-_TypedefDeclaration_isUsing = Core.Name "isUsing"-data ClassDeclaration =- ClassDeclaration {- classDeclarationSpecifier :: ClassSpecifier,- classDeclarationBody :: (Maybe ClassBody)}- deriving (Eq, Ord, Read, Show)-_ClassDeclaration = Core.Name "hydra.cpp.syntax.ClassDeclaration"-_ClassDeclaration_specifier = Core.Name "specifier"-_ClassDeclaration_body = Core.Name "body"-data TemplateDeclaration =- TemplateDeclaration {- templateDeclarationInline :: Bool,- templateDeclarationParameters :: [String],- templateDeclarationDeclaration :: Declaration}- deriving (Eq, Ord, Read, Show)-_TemplateDeclaration = Core.Name "hydra.cpp.syntax.TemplateDeclaration"-_TemplateDeclaration_inline = Core.Name "inline"-_TemplateDeclaration_parameters = Core.Name "parameters"-_TemplateDeclaration_declaration = Core.Name "declaration"-data PreprocessorDirective =- PreprocessorDirectiveInclude IncludeDirective |- PreprocessorDirectivePragma PragmaDirective |- PreprocessorDirectiveDefine DefineDirective |- PreprocessorDirectiveUndef UndefDirective |- PreprocessorDirectiveIfdef IfdefDirective |- PreprocessorDirectiveIfndef IfndefDirective |- PreprocessorDirectiveIf IfDirective |- PreprocessorDirectiveElif ElifDirective |- PreprocessorDirectiveElse ElseDirective |- PreprocessorDirectiveEndif EndifDirective |- PreprocessorDirectiveLine LineDirective |- PreprocessorDirectiveError ErrorDirective |- PreprocessorDirectiveWarning WarningDirective- deriving (Eq, Ord, Read, Show)-_PreprocessorDirective = Core.Name "hydra.cpp.syntax.PreprocessorDirective"-_PreprocessorDirective_include = Core.Name "include"-_PreprocessorDirective_pragma = Core.Name "pragma"-_PreprocessorDirective_define = Core.Name "define"-_PreprocessorDirective_undef = Core.Name "undef"-_PreprocessorDirective_ifdef = Core.Name "ifdef"-_PreprocessorDirective_ifndef = Core.Name "ifndef"-_PreprocessorDirective_if = Core.Name "if"-_PreprocessorDirective_elif = Core.Name "elif"-_PreprocessorDirective_else = Core.Name "else"-_PreprocessorDirective_endif = Core.Name "endif"-_PreprocessorDirective_line = Core.Name "line"-_PreprocessorDirective_error = Core.Name "error"-_PreprocessorDirective_warning = Core.Name "warning"-data PragmaDirective =- PragmaDirective {- pragmaDirectiveContent :: String}- deriving (Eq, Ord, Read, Show)-_PragmaDirective = Core.Name "hydra.cpp.syntax.PragmaDirective"-_PragmaDirective_content = Core.Name "content"-data DefineDirective =- DefineDirective {- defineDirectiveName :: String,- defineDirectiveParameters :: (Maybe [String]),- defineDirectiveReplacement :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_DefineDirective = Core.Name "hydra.cpp.syntax.DefineDirective"-_DefineDirective_name = Core.Name "name"-_DefineDirective_parameters = Core.Name "parameters"-_DefineDirective_replacement = Core.Name "replacement"-data UndefDirective =- UndefDirective {- undefDirectiveName :: String}- deriving (Eq, Ord, Read, Show)-_UndefDirective = Core.Name "hydra.cpp.syntax.UndefDirective"-_UndefDirective_name = Core.Name "name"-data IfdefDirective =- IfdefDirective {- ifdefDirectiveIdentifier :: String}- deriving (Eq, Ord, Read, Show)-_IfdefDirective = Core.Name "hydra.cpp.syntax.IfdefDirective"-_IfdefDirective_identifier = Core.Name "identifier"-data IfndefDirective =- IfndefDirective {- ifndefDirectiveIdentifier :: String}- deriving (Eq, Ord, Read, Show)-_IfndefDirective = Core.Name "hydra.cpp.syntax.IfndefDirective"-_IfndefDirective_identifier = Core.Name "identifier"-data IfDirective =- IfDirective {- ifDirectiveCondition :: String}- deriving (Eq, Ord, Read, Show)-_IfDirective = Core.Name "hydra.cpp.syntax.IfDirective"-_IfDirective_condition = Core.Name "condition"-data ElifDirective =- ElifDirective {- elifDirectiveCondition :: String}- deriving (Eq, Ord, Read, Show)-_ElifDirective = Core.Name "hydra.cpp.syntax.ElifDirective"-_ElifDirective_condition = Core.Name "condition"-type ElseDirective = ()-_ElseDirective = Core.Name "hydra.cpp.syntax.ElseDirective"-type EndifDirective = ()-_EndifDirective = Core.Name "hydra.cpp.syntax.EndifDirective"-data LineDirective =- LineDirective {- lineDirectiveLineNumber :: Int,- lineDirectiveFilename :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_LineDirective = Core.Name "hydra.cpp.syntax.LineDirective"-_LineDirective_lineNumber = Core.Name "lineNumber"-_LineDirective_filename = Core.Name "filename"-data ErrorDirective =- ErrorDirective {- errorDirectiveMessage :: String}- deriving (Eq, Ord, Read, Show)-_ErrorDirective = Core.Name "hydra.cpp.syntax.ErrorDirective"-_ErrorDirective_message = Core.Name "message"-data WarningDirective =- WarningDirective {- warningDirectiveMessage :: String}- deriving (Eq, Ord, Read, Show)-_WarningDirective = Core.Name "hydra.cpp.syntax.WarningDirective"-_WarningDirective_message = Core.Name "message"-data ClassSpecifier =- ClassSpecifier {- classSpecifierKey :: ClassKey,- classSpecifierName :: String,- classSpecifierInheritance :: [BaseSpecifier]}- deriving (Eq, Ord, Read, Show)-_ClassSpecifier = Core.Name "hydra.cpp.syntax.ClassSpecifier"-_ClassSpecifier_key = Core.Name "key"-_ClassSpecifier_name = Core.Name "name"-_ClassSpecifier_inheritance = Core.Name "inheritance"-data ClassKey =- ClassKeyClass |- ClassKeyEnum |- ClassKeyEnumClass |- ClassKeyStruct- deriving (Eq, Ord, Read, Show)-_ClassKey = Core.Name "hydra.cpp.syntax.ClassKey"-_ClassKey_class = Core.Name "class"-_ClassKey_enum = Core.Name "enum"-_ClassKey_enumClass = Core.Name "enumClass"-_ClassKey_struct = Core.Name "struct"-data BaseSpecifier =- BaseSpecifier {- baseSpecifierAccess :: AccessSpecifier,- baseSpecifierName :: String}- deriving (Eq, Ord, Read, Show)-_BaseSpecifier = Core.Name "hydra.cpp.syntax.BaseSpecifier"-_BaseSpecifier_access = Core.Name "access"-_BaseSpecifier_name = Core.Name "name"-newtype ClassBody =- ClassBody {- unClassBody :: [MemberSpecification]}- deriving (Eq, Ord, Read, Show)-_ClassBody = Core.Name "hydra.cpp.syntax.ClassBody"-data MemberSpecification =- MemberSpecificationAccessLabel AccessSpecifier |- MemberSpecificationMember MemberDeclaration- deriving (Eq, Ord, Read, Show)-_MemberSpecification = Core.Name "hydra.cpp.syntax.MemberSpecification"-_MemberSpecification_accessLabel = Core.Name "accessLabel"-_MemberSpecification_member = Core.Name "member"-data MemberDeclaration =- MemberDeclarationFunction FunctionDeclaration |- MemberDeclarationVariable VariableDeclaration |- MemberDeclarationConstructor ConstructorDeclaration |- MemberDeclarationDestructor DestructorDeclaration |- MemberDeclarationNestedClass ClassDeclaration |- MemberDeclarationTemplate TemplateDeclaration- deriving (Eq, Ord, Read, Show)-_MemberDeclaration = Core.Name "hydra.cpp.syntax.MemberDeclaration"-_MemberDeclaration_function = Core.Name "function"-_MemberDeclaration_variable = Core.Name "variable"-_MemberDeclaration_constructor = Core.Name "constructor"-_MemberDeclaration_destructor = Core.Name "destructor"-_MemberDeclaration_nestedClass = Core.Name "nestedClass"-_MemberDeclaration_template = Core.Name "template"-data ConstructorDeclaration =- ConstructorDeclaration {- constructorDeclarationName :: String,- constructorDeclarationParameters :: [Parameter],- constructorDeclarationInitializers :: [MemInitializer],- constructorDeclarationBody :: FunctionBody}- deriving (Eq, Ord, Read, Show)-_ConstructorDeclaration = Core.Name "hydra.cpp.syntax.ConstructorDeclaration"-_ConstructorDeclaration_name = Core.Name "name"-_ConstructorDeclaration_parameters = Core.Name "parameters"-_ConstructorDeclaration_initializers = Core.Name "initializers"-_ConstructorDeclaration_body = Core.Name "body"-data MemInitializer =- MemInitializer {- memInitializerName :: String,- memInitializerArguments :: [Expression]}- deriving (Eq, Ord, Read, Show)-_MemInitializer = Core.Name "hydra.cpp.syntax.MemInitializer"-_MemInitializer_name = Core.Name "name"-_MemInitializer_arguments = Core.Name "arguments"-data DestructorDeclaration =- DestructorDeclaration {- destructorDeclarationPrefixSpecifiers :: [FunctionSpecifierPrefix],- destructorDeclarationName :: String,- destructorDeclarationSuffixSpecifiers :: [FunctionSpecifierSuffix],- destructorDeclarationBody :: FunctionBody}- deriving (Eq, Ord, Read, Show)-_DestructorDeclaration = Core.Name "hydra.cpp.syntax.DestructorDeclaration"-_DestructorDeclaration_prefixSpecifiers = Core.Name "prefixSpecifiers"-_DestructorDeclaration_name = Core.Name "name"-_DestructorDeclaration_suffixSpecifiers = Core.Name "suffixSpecifiers"-_DestructorDeclaration_body = Core.Name "body"-data FunctionDeclaration =- FunctionDeclaration {- functionDeclarationPrefixSpecifiers :: [FunctionSpecifierPrefix],- functionDeclarationReturnType :: TypeExpression,- functionDeclarationName :: String,- functionDeclarationParameters :: [Parameter],- functionDeclarationSuffixSpecifiers :: [FunctionSpecifierSuffix],- functionDeclarationBody :: FunctionBody}- deriving (Eq, Ord, Read, Show)-_FunctionDeclaration = Core.Name "hydra.cpp.syntax.FunctionDeclaration"-_FunctionDeclaration_prefixSpecifiers = Core.Name "prefixSpecifiers"-_FunctionDeclaration_returnType = Core.Name "returnType"-_FunctionDeclaration_name = Core.Name "name"-_FunctionDeclaration_parameters = Core.Name "parameters"-_FunctionDeclaration_suffixSpecifiers = Core.Name "suffixSpecifiers"-_FunctionDeclaration_body = Core.Name "body"-data FunctionSpecifierPrefix =- FunctionSpecifierPrefixInline |- FunctionSpecifierPrefixVirtual |- FunctionSpecifierPrefixStatic |- FunctionSpecifierPrefixExplicit- deriving (Eq, Ord, Read, Show)-_FunctionSpecifierPrefix = Core.Name "hydra.cpp.syntax.FunctionSpecifierPrefix"-_FunctionSpecifierPrefix_inline = Core.Name "inline"-_FunctionSpecifierPrefix_virtual = Core.Name "virtual"-_FunctionSpecifierPrefix_static = Core.Name "static"-_FunctionSpecifierPrefix_explicit = Core.Name "explicit"-data FunctionSpecifierSuffix =- FunctionSpecifierSuffixConst |- FunctionSpecifierSuffixNoexcept |- FunctionSpecifierSuffixOverride |- FunctionSpecifierSuffixFinal- deriving (Eq, Ord, Read, Show)-_FunctionSpecifierSuffix = Core.Name "hydra.cpp.syntax.FunctionSpecifierSuffix"-_FunctionSpecifierSuffix_const = Core.Name "const"-_FunctionSpecifierSuffix_noexcept = Core.Name "noexcept"-_FunctionSpecifierSuffix_override = Core.Name "override"-_FunctionSpecifierSuffix_final = Core.Name "final"-data Parameter =- Parameter {- parameterType :: TypeExpression,- parameterName :: String,- parameterUnnamed :: Bool,- parameterDefaultValue :: (Maybe Expression)}- deriving (Eq, Ord, Read, Show)-_Parameter = Core.Name "hydra.cpp.syntax.Parameter"-_Parameter_type = Core.Name "type"-_Parameter_name = Core.Name "name"-_Parameter_unnamed = Core.Name "unnamed"-_Parameter_defaultValue = Core.Name "defaultValue"-data FunctionBody =- FunctionBodyCompound CompoundStatement |- FunctionBodyDeclaration |- FunctionBodyPure |- FunctionBodyDefault- deriving (Eq, Ord, Read, Show)-_FunctionBody = Core.Name "hydra.cpp.syntax.FunctionBody"-_FunctionBody_compound = Core.Name "compound"-_FunctionBody_declaration = Core.Name "declaration"-_FunctionBody_pure = Core.Name "pure"-_FunctionBody_default = Core.Name "default"-data VariableDeclaration =- VariableDeclaration {- variableDeclarationType :: (Maybe TypeExpression),- variableDeclarationName :: String,- variableDeclarationInitializer :: (Maybe Expression),- variableDeclarationIsAuto :: Bool}- deriving (Eq, Ord, Read, Show)-_VariableDeclaration = Core.Name "hydra.cpp.syntax.VariableDeclaration"-_VariableDeclaration_type = Core.Name "type"-_VariableDeclaration_name = Core.Name "name"-_VariableDeclaration_initializer = Core.Name "initializer"-_VariableDeclaration_isAuto = Core.Name "isAuto"-data VariantDeclaration =- VariantDeclaration {- variantDeclarationTypes :: [TypeExpression],- variantDeclarationName :: String}- deriving (Eq, Ord, Read, Show)-_VariantDeclaration = Core.Name "hydra.cpp.syntax.VariantDeclaration"-_VariantDeclaration_types = Core.Name "types"-_VariantDeclaration_name = Core.Name "name"-data ProductDeclaration =- ProductDeclaration {- productDeclarationName :: String,- productDeclarationFields :: [VariableDeclaration]}- deriving (Eq, Ord, Read, Show)-_ProductDeclaration = Core.Name "hydra.cpp.syntax.ProductDeclaration"-_ProductDeclaration_name = Core.Name "name"-_ProductDeclaration_fields = Core.Name "fields"-data ContainerDeclaration =- ContainerDeclarationList ListDeclaration |- ContainerDeclarationMap MapDeclaration |- ContainerDeclarationSet SetDeclaration |- ContainerDeclarationOptional OptionalDeclaration- deriving (Eq, Ord, Read, Show)-_ContainerDeclaration = Core.Name "hydra.cpp.syntax.ContainerDeclaration"-_ContainerDeclaration_list = Core.Name "list"-_ContainerDeclaration_map = Core.Name "map"-_ContainerDeclaration_set = Core.Name "set"-_ContainerDeclaration_optional = Core.Name "optional"-data ListDeclaration =- ListDeclaration {- listDeclarationElementType :: TypeExpression,- listDeclarationName :: String}- deriving (Eq, Ord, Read, Show)-_ListDeclaration = Core.Name "hydra.cpp.syntax.ListDeclaration"-_ListDeclaration_elementType = Core.Name "elementType"-_ListDeclaration_name = Core.Name "name"-data MapDeclaration =- MapDeclaration {- mapDeclarationKeyType :: TypeExpression,- mapDeclarationValueType :: TypeExpression,- mapDeclarationName :: String}- deriving (Eq, Ord, Read, Show)-_MapDeclaration = Core.Name "hydra.cpp.syntax.MapDeclaration"-_MapDeclaration_keyType = Core.Name "keyType"-_MapDeclaration_valueType = Core.Name "valueType"-_MapDeclaration_name = Core.Name "name"-data SetDeclaration =- SetDeclaration {- setDeclarationElementType :: TypeExpression,- setDeclarationName :: String}- deriving (Eq, Ord, Read, Show)-_SetDeclaration = Core.Name "hydra.cpp.syntax.SetDeclaration"-_SetDeclaration_elementType = Core.Name "elementType"-_SetDeclaration_name = Core.Name "name"-data OptionalDeclaration =- OptionalDeclaration {- optionalDeclarationValueType :: TypeExpression,- optionalDeclarationName :: String}- deriving (Eq, Ord, Read, Show)-_OptionalDeclaration = Core.Name "hydra.cpp.syntax.OptionalDeclaration"-_OptionalDeclaration_valueType = Core.Name "valueType"-_OptionalDeclaration_name = Core.Name "name"-data Expression =- ExpressionAssignment AssignmentExpression |- ExpressionComma CommaExpression- deriving (Eq, Ord, Read, Show)-_Expression = Core.Name "hydra.cpp.syntax.Expression"-_Expression_assignment = Core.Name "assignment"-_Expression_comma = Core.Name "comma"-data CommaExpression =- CommaExpression {- commaExpressionLeft :: Expression,- commaExpressionRight :: AssignmentExpression}- deriving (Eq, Ord, Read, Show)-_CommaExpression = Core.Name "hydra.cpp.syntax.CommaExpression"-_CommaExpression_left = Core.Name "left"-_CommaExpression_right = Core.Name "right"-data AssignmentExpression =- AssignmentExpressionConditional ConditionalExpression |- AssignmentExpressionAssignment ExplicitAssignment- deriving (Eq, Ord, Read, Show)-_AssignmentExpression = Core.Name "hydra.cpp.syntax.AssignmentExpression"-_AssignmentExpression_conditional = Core.Name "conditional"-_AssignmentExpression_assignment = Core.Name "assignment"-data ExplicitAssignment =- ExplicitAssignment {- explicitAssignmentLeft :: LogicalOrExpression,- explicitAssignmentOp :: AssignmentOperator,- explicitAssignmentRight :: AssignmentExpression}- deriving (Eq, Ord, Read, Show)-_ExplicitAssignment = Core.Name "hydra.cpp.syntax.ExplicitAssignment"-_ExplicitAssignment_left = Core.Name "left"-_ExplicitAssignment_op = Core.Name "op"-_ExplicitAssignment_right = Core.Name "right"-data AssignmentOperator =- AssignmentOperatorAssign |- AssignmentOperatorPlusAssign |- AssignmentOperatorMinusAssign |- AssignmentOperatorMultiplyAssign |- AssignmentOperatorDivideAssign |- AssignmentOperatorModuloAssign |- AssignmentOperatorLeftShiftAssign |- AssignmentOperatorRightShiftAssign |- AssignmentOperatorBitwiseAndAssign |- AssignmentOperatorBitwiseXorAssign |- AssignmentOperatorBitwiseOrAssign- deriving (Eq, Ord, Read, Show)-_AssignmentOperator = Core.Name "hydra.cpp.syntax.AssignmentOperator"-_AssignmentOperator_assign = Core.Name "assign"-_AssignmentOperator_plusAssign = Core.Name "plusAssign"-_AssignmentOperator_minusAssign = Core.Name "minusAssign"-_AssignmentOperator_multiplyAssign = Core.Name "multiplyAssign"-_AssignmentOperator_divideAssign = Core.Name "divideAssign"-_AssignmentOperator_moduloAssign = Core.Name "moduloAssign"-_AssignmentOperator_leftShiftAssign = Core.Name "leftShiftAssign"-_AssignmentOperator_rightShiftAssign = Core.Name "rightShiftAssign"-_AssignmentOperator_bitwiseAndAssign = Core.Name "bitwiseAndAssign"-_AssignmentOperator_bitwiseXorAssign = Core.Name "bitwiseXorAssign"-_AssignmentOperator_bitwiseOrAssign = Core.Name "bitwiseOrAssign"-data ConditionalExpression =- ConditionalExpressionLogicalOr LogicalOrExpression |- ConditionalExpressionTernary TernaryExpression- deriving (Eq, Ord, Read, Show)-_ConditionalExpression = Core.Name "hydra.cpp.syntax.ConditionalExpression"-_ConditionalExpression_logicalOr = Core.Name "logicalOr"-_ConditionalExpression_ternary = Core.Name "ternary"-data TernaryExpression =- TernaryExpression {- ternaryExpressionCondition :: LogicalOrExpression,- ternaryExpressionTrueExpr :: Expression,- ternaryExpressionFalseExpr :: ConditionalExpression}- deriving (Eq, Ord, Read, Show)-_TernaryExpression = Core.Name "hydra.cpp.syntax.TernaryExpression"-_TernaryExpression_condition = Core.Name "condition"-_TernaryExpression_trueExpr = Core.Name "trueExpr"-_TernaryExpression_falseExpr = Core.Name "falseExpr"-data LogicalOrExpression =- LogicalOrExpressionLogicalAnd LogicalAndExpression |- LogicalOrExpressionLogicalOr LogicalOrOperation- deriving (Eq, Ord, Read, Show)-_LogicalOrExpression = Core.Name "hydra.cpp.syntax.LogicalOrExpression"-_LogicalOrExpression_logicalAnd = Core.Name "logicalAnd"-_LogicalOrExpression_logicalOr = Core.Name "logicalOr"-data LogicalOrOperation =- LogicalOrOperation {- logicalOrOperationLeft :: LogicalOrExpression,- logicalOrOperationRight :: LogicalAndExpression}- deriving (Eq, Ord, Read, Show)-_LogicalOrOperation = Core.Name "hydra.cpp.syntax.LogicalOrOperation"-_LogicalOrOperation_left = Core.Name "left"-_LogicalOrOperation_right = Core.Name "right"-data LogicalAndExpression =- LogicalAndExpressionInclusiveOr InclusiveOrExpression |- LogicalAndExpressionLogicalAnd LogicalAndOperation- deriving (Eq, Ord, Read, Show)-_LogicalAndExpression = Core.Name "hydra.cpp.syntax.LogicalAndExpression"-_LogicalAndExpression_inclusiveOr = Core.Name "inclusiveOr"-_LogicalAndExpression_logicalAnd = Core.Name "logicalAnd"-data LogicalAndOperation =- LogicalAndOperation {- logicalAndOperationLeft :: LogicalAndExpression,- logicalAndOperationRight :: InclusiveOrExpression}- deriving (Eq, Ord, Read, Show)-_LogicalAndOperation = Core.Name "hydra.cpp.syntax.LogicalAndOperation"-_LogicalAndOperation_left = Core.Name "left"-_LogicalAndOperation_right = Core.Name "right"-data InclusiveOrExpression =- InclusiveOrExpressionExclusiveOr ExclusiveOrExpression |- InclusiveOrExpressionBitwiseOr BitwiseOrOperation- deriving (Eq, Ord, Read, Show)-_InclusiveOrExpression = Core.Name "hydra.cpp.syntax.InclusiveOrExpression"-_InclusiveOrExpression_exclusiveOr = Core.Name "exclusiveOr"-_InclusiveOrExpression_bitwiseOr = Core.Name "bitwiseOr"-data BitwiseOrOperation =- BitwiseOrOperation {- bitwiseOrOperationLeft :: InclusiveOrExpression,- bitwiseOrOperationRight :: ExclusiveOrExpression}- deriving (Eq, Ord, Read, Show)-_BitwiseOrOperation = Core.Name "hydra.cpp.syntax.BitwiseOrOperation"-_BitwiseOrOperation_left = Core.Name "left"-_BitwiseOrOperation_right = Core.Name "right"-data ExclusiveOrExpression =- ExclusiveOrExpressionAnd AndExpression |- ExclusiveOrExpressionBitwiseXor BitwiseXorOperation- deriving (Eq, Ord, Read, Show)-_ExclusiveOrExpression = Core.Name "hydra.cpp.syntax.ExclusiveOrExpression"-_ExclusiveOrExpression_and = Core.Name "and"-_ExclusiveOrExpression_bitwiseXor = Core.Name "bitwiseXor"-data BitwiseXorOperation =- BitwiseXorOperation {- bitwiseXorOperationLeft :: ExclusiveOrExpression,- bitwiseXorOperationRight :: AndExpression}- deriving (Eq, Ord, Read, Show)-_BitwiseXorOperation = Core.Name "hydra.cpp.syntax.BitwiseXorOperation"-_BitwiseXorOperation_left = Core.Name "left"-_BitwiseXorOperation_right = Core.Name "right"-data AndExpression =- AndExpressionEquality EqualityExpression |- AndExpressionBitwiseAnd BitwiseAndOperation- deriving (Eq, Ord, Read, Show)-_AndExpression = Core.Name "hydra.cpp.syntax.AndExpression"-_AndExpression_equality = Core.Name "equality"-_AndExpression_bitwiseAnd = Core.Name "bitwiseAnd"-data BitwiseAndOperation =- BitwiseAndOperation {- bitwiseAndOperationLeft :: AndExpression,- bitwiseAndOperationRight :: EqualityExpression}- deriving (Eq, Ord, Read, Show)-_BitwiseAndOperation = Core.Name "hydra.cpp.syntax.BitwiseAndOperation"-_BitwiseAndOperation_left = Core.Name "left"-_BitwiseAndOperation_right = Core.Name "right"-data EqualityExpression =- EqualityExpressionRelational RelationalExpression |- EqualityExpressionEqual EqualOperation |- EqualityExpressionNotEqual NotEqualOperation- deriving (Eq, Ord, Read, Show)-_EqualityExpression = Core.Name "hydra.cpp.syntax.EqualityExpression"-_EqualityExpression_relational = Core.Name "relational"-_EqualityExpression_equal = Core.Name "equal"-_EqualityExpression_notEqual = Core.Name "notEqual"-data EqualOperation =- EqualOperation {- equalOperationLeft :: EqualityExpression,- equalOperationRight :: RelationalExpression}- deriving (Eq, Ord, Read, Show)-_EqualOperation = Core.Name "hydra.cpp.syntax.EqualOperation"-_EqualOperation_left = Core.Name "left"-_EqualOperation_right = Core.Name "right"-data NotEqualOperation =- NotEqualOperation {- notEqualOperationLeft :: EqualityExpression,- notEqualOperationRight :: RelationalExpression}- deriving (Eq, Ord, Read, Show)-_NotEqualOperation = Core.Name "hydra.cpp.syntax.NotEqualOperation"-_NotEqualOperation_left = Core.Name "left"-_NotEqualOperation_right = Core.Name "right"-data RelationalExpression =- RelationalExpressionShift ShiftExpression |- RelationalExpressionLess LessOperation |- RelationalExpressionGreater GreaterOperation |- RelationalExpressionLessEqual LessEqualOperation |- RelationalExpressionGreaterEqual GreaterEqualOperation- deriving (Eq, Ord, Read, Show)-_RelationalExpression = Core.Name "hydra.cpp.syntax.RelationalExpression"-_RelationalExpression_shift = Core.Name "shift"-_RelationalExpression_less = Core.Name "less"-_RelationalExpression_greater = Core.Name "greater"-_RelationalExpression_lessEqual = Core.Name "lessEqual"-_RelationalExpression_greaterEqual = Core.Name "greaterEqual"-data LessOperation =- LessOperation {- lessOperationLeft :: RelationalExpression,- lessOperationRight :: ShiftExpression}- deriving (Eq, Ord, Read, Show)-_LessOperation = Core.Name "hydra.cpp.syntax.LessOperation"-_LessOperation_left = Core.Name "left"-_LessOperation_right = Core.Name "right"-data GreaterOperation =- GreaterOperation {- greaterOperationLeft :: RelationalExpression,- greaterOperationRight :: ShiftExpression}- deriving (Eq, Ord, Read, Show)-_GreaterOperation = Core.Name "hydra.cpp.syntax.GreaterOperation"-_GreaterOperation_left = Core.Name "left"-_GreaterOperation_right = Core.Name "right"-data LessEqualOperation =- LessEqualOperation {- lessEqualOperationLeft :: RelationalExpression,- lessEqualOperationRight :: ShiftExpression}- deriving (Eq, Ord, Read, Show)-_LessEqualOperation = Core.Name "hydra.cpp.syntax.LessEqualOperation"-_LessEqualOperation_left = Core.Name "left"-_LessEqualOperation_right = Core.Name "right"-data GreaterEqualOperation =- GreaterEqualOperation {- greaterEqualOperationLeft :: RelationalExpression,- greaterEqualOperationRight :: ShiftExpression}- deriving (Eq, Ord, Read, Show)-_GreaterEqualOperation = Core.Name "hydra.cpp.syntax.GreaterEqualOperation"-_GreaterEqualOperation_left = Core.Name "left"-_GreaterEqualOperation_right = Core.Name "right"-data ShiftExpression =- ShiftExpressionAdditive AdditiveExpression |- ShiftExpressionLeftShift LeftShiftOperation |- ShiftExpressionRightShift RightShiftOperation- deriving (Eq, Ord, Read, Show)-_ShiftExpression = Core.Name "hydra.cpp.syntax.ShiftExpression"-_ShiftExpression_additive = Core.Name "additive"-_ShiftExpression_leftShift = Core.Name "leftShift"-_ShiftExpression_rightShift = Core.Name "rightShift"-data LeftShiftOperation =- LeftShiftOperation {- leftShiftOperationLeft :: ShiftExpression,- leftShiftOperationRight :: AdditiveExpression}- deriving (Eq, Ord, Read, Show)-_LeftShiftOperation = Core.Name "hydra.cpp.syntax.LeftShiftOperation"-_LeftShiftOperation_left = Core.Name "left"-_LeftShiftOperation_right = Core.Name "right"-data RightShiftOperation =- RightShiftOperation {- rightShiftOperationLeft :: ShiftExpression,- rightShiftOperationRight :: AdditiveExpression}- deriving (Eq, Ord, Read, Show)-_RightShiftOperation = Core.Name "hydra.cpp.syntax.RightShiftOperation"-_RightShiftOperation_left = Core.Name "left"-_RightShiftOperation_right = Core.Name "right"-data AdditiveExpression =- AdditiveExpressionMultiplicative MultiplicativeExpression |- AdditiveExpressionAdd AddOperation |- AdditiveExpressionSubtract SubtractOperation- deriving (Eq, Ord, Read, Show)-_AdditiveExpression = Core.Name "hydra.cpp.syntax.AdditiveExpression"-_AdditiveExpression_multiplicative = Core.Name "multiplicative"-_AdditiveExpression_add = Core.Name "add"-_AdditiveExpression_subtract = Core.Name "subtract"-data AddOperation =- AddOperation {- addOperationLeft :: AdditiveExpression,- addOperationRight :: MultiplicativeExpression}- deriving (Eq, Ord, Read, Show)-_AddOperation = Core.Name "hydra.cpp.syntax.AddOperation"-_AddOperation_left = Core.Name "left"-_AddOperation_right = Core.Name "right"-data SubtractOperation =- SubtractOperation {- subtractOperationLeft :: AdditiveExpression,- subtractOperationRight :: MultiplicativeExpression}- deriving (Eq, Ord, Read, Show)-_SubtractOperation = Core.Name "hydra.cpp.syntax.SubtractOperation"-_SubtractOperation_left = Core.Name "left"-_SubtractOperation_right = Core.Name "right"-data MultiplicativeExpression =- MultiplicativeExpressionUnary UnaryExpression |- MultiplicativeExpressionMultiply MultiplyOperation |- MultiplicativeExpressionDivide DivideOperation |- MultiplicativeExpressionModulo ModuloOperation- deriving (Eq, Ord, Read, Show)-_MultiplicativeExpression = Core.Name "hydra.cpp.syntax.MultiplicativeExpression"-_MultiplicativeExpression_unary = Core.Name "unary"-_MultiplicativeExpression_multiply = Core.Name "multiply"-_MultiplicativeExpression_divide = Core.Name "divide"-_MultiplicativeExpression_modulo = Core.Name "modulo"-data MultiplyOperation =- MultiplyOperation {- multiplyOperationLeft :: MultiplicativeExpression,- multiplyOperationRight :: UnaryExpression}- deriving (Eq, Ord, Read, Show)-_MultiplyOperation = Core.Name "hydra.cpp.syntax.MultiplyOperation"-_MultiplyOperation_left = Core.Name "left"-_MultiplyOperation_right = Core.Name "right"-data DivideOperation =- DivideOperation {- divideOperationLeft :: MultiplicativeExpression,- divideOperationRight :: UnaryExpression}- deriving (Eq, Ord, Read, Show)-_DivideOperation = Core.Name "hydra.cpp.syntax.DivideOperation"-_DivideOperation_left = Core.Name "left"-_DivideOperation_right = Core.Name "right"-data ModuloOperation =- ModuloOperation {- moduloOperationLeft :: MultiplicativeExpression,- moduloOperationRight :: UnaryExpression}- deriving (Eq, Ord, Read, Show)-_ModuloOperation = Core.Name "hydra.cpp.syntax.ModuloOperation"-_ModuloOperation_left = Core.Name "left"-_ModuloOperation_right = Core.Name "right"-data UnaryExpression =- UnaryExpressionPostfix PostfixExpression |- UnaryExpressionUnaryOp UnaryOperation |- UnaryExpressionSizeof SizeofExpression- deriving (Eq, Ord, Read, Show)-_UnaryExpression = Core.Name "hydra.cpp.syntax.UnaryExpression"-_UnaryExpression_postfix = Core.Name "postfix"-_UnaryExpression_unaryOp = Core.Name "unaryOp"-_UnaryExpression_sizeof = Core.Name "sizeof"-data UnaryOperation =- UnaryOperation {- unaryOperationOperator :: UnaryOperator,- unaryOperationOperand :: UnaryExpression}- deriving (Eq, Ord, Read, Show)-_UnaryOperation = Core.Name "hydra.cpp.syntax.UnaryOperation"-_UnaryOperation_operator = Core.Name "operator"-_UnaryOperation_operand = Core.Name "operand"-data UnaryOperator =- UnaryOperatorPlus |- UnaryOperatorMinus |- UnaryOperatorLogicalNot |- UnaryOperatorBitwiseNot |- UnaryOperatorDereference |- UnaryOperatorAddressOf |- UnaryOperatorPreIncrement |- UnaryOperatorPreDecrement- deriving (Eq, Ord, Read, Show)-_UnaryOperator = Core.Name "hydra.cpp.syntax.UnaryOperator"-_UnaryOperator_plus = Core.Name "plus"-_UnaryOperator_minus = Core.Name "minus"-_UnaryOperator_logicalNot = Core.Name "logicalNot"-_UnaryOperator_bitwiseNot = Core.Name "bitwiseNot"-_UnaryOperator_dereference = Core.Name "dereference"-_UnaryOperator_addressOf = Core.Name "addressOf"-_UnaryOperator_preIncrement = Core.Name "preIncrement"-_UnaryOperator_preDecrement = Core.Name "preDecrement"-newtype SizeofExpression =- SizeofExpression {- unSizeofExpression :: TypeExpression}- deriving (Eq, Ord, Read, Show)-_SizeofExpression = Core.Name "hydra.cpp.syntax.SizeofExpression"-data PostfixExpression =- PostfixExpressionPrimary PrimaryExpression |- PostfixExpressionSubscript SubscriptOperation |- PostfixExpressionFunctionCall FunctionCallOperation |- PostfixExpressionTemplateFunctionCall TemplateFunctionCallOperation |- PostfixExpressionMemberAccess MemberAccessOperation |- PostfixExpressionPointerMemberAccess PointerMemberAccessOperation |- PostfixExpressionPostIncrement PostfixExpression |- PostfixExpressionPostDecrement PostfixExpression- deriving (Eq, Ord, Read, Show)-_PostfixExpression = Core.Name "hydra.cpp.syntax.PostfixExpression"-_PostfixExpression_primary = Core.Name "primary"-_PostfixExpression_subscript = Core.Name "subscript"-_PostfixExpression_functionCall = Core.Name "functionCall"-_PostfixExpression_templateFunctionCall = Core.Name "templateFunctionCall"-_PostfixExpression_memberAccess = Core.Name "memberAccess"-_PostfixExpression_pointerMemberAccess = Core.Name "pointerMemberAccess"-_PostfixExpression_postIncrement = Core.Name "postIncrement"-_PostfixExpression_postDecrement = Core.Name "postDecrement"-data SubscriptOperation =- SubscriptOperation {- subscriptOperationArray :: PostfixExpression,- subscriptOperationIndex :: Expression}- deriving (Eq, Ord, Read, Show)-_SubscriptOperation = Core.Name "hydra.cpp.syntax.SubscriptOperation"-_SubscriptOperation_array = Core.Name "array"-_SubscriptOperation_index = Core.Name "index"-data FunctionCallOperation =- FunctionCallOperation {- functionCallOperationFunction :: PostfixExpression,- functionCallOperationArguments :: [Expression]}- deriving (Eq, Ord, Read, Show)-_FunctionCallOperation = Core.Name "hydra.cpp.syntax.FunctionCallOperation"-_FunctionCallOperation_function = Core.Name "function"-_FunctionCallOperation_arguments = Core.Name "arguments"-data MemberAccessOperation =- MemberAccessOperation {- memberAccessOperationObject :: PostfixExpression,- memberAccessOperationMember :: String}- deriving (Eq, Ord, Read, Show)-_MemberAccessOperation = Core.Name "hydra.cpp.syntax.MemberAccessOperation"-_MemberAccessOperation_object = Core.Name "object"-_MemberAccessOperation_member = Core.Name "member"-data PointerMemberAccessOperation =- PointerMemberAccessOperation {- pointerMemberAccessOperationPointer :: PostfixExpression,- pointerMemberAccessOperationMember :: String}- deriving (Eq, Ord, Read, Show)-_PointerMemberAccessOperation = Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"-_PointerMemberAccessOperation_pointer = Core.Name "pointer"-_PointerMemberAccessOperation_member = Core.Name "member"-data TemplateFunctionCallOperation =- TemplateFunctionCallOperation {- templateFunctionCallOperationFunction :: PostfixExpression,- templateFunctionCallOperationTemplateArguments :: [TemplateArgument],- templateFunctionCallOperationArguments :: [Expression]}- deriving (Eq, Ord, Read, Show)-_TemplateFunctionCallOperation = Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"-_TemplateFunctionCallOperation_function = Core.Name "function"-_TemplateFunctionCallOperation_templateArguments = Core.Name "templateArguments"-_TemplateFunctionCallOperation_arguments = Core.Name "arguments"-data PrimaryExpression =- PrimaryExpressionIdentifier String |- PrimaryExpressionLiteral Literal |- PrimaryExpressionParenthesized Expression |- PrimaryExpressionLambda LambdaExpression- deriving (Eq, Ord, Read, Show)-_PrimaryExpression = Core.Name "hydra.cpp.syntax.PrimaryExpression"-_PrimaryExpression_identifier = Core.Name "identifier"-_PrimaryExpression_literal = Core.Name "literal"-_PrimaryExpression_parenthesized = Core.Name "parenthesized"-_PrimaryExpression_lambda = Core.Name "lambda"-data LambdaExpression =- LambdaExpression {- lambdaExpressionCaptures :: CaptureList,- lambdaExpressionParameters :: [Parameter],- lambdaExpressionReturnType :: (Maybe TypeExpression),- lambdaExpressionBody :: CompoundStatement}- deriving (Eq, Ord, Read, Show)-_LambdaExpression = Core.Name "hydra.cpp.syntax.LambdaExpression"-_LambdaExpression_captures = Core.Name "captures"-_LambdaExpression_parameters = Core.Name "parameters"-_LambdaExpression_returnType = Core.Name "returnType"-_LambdaExpression_body = Core.Name "body"-data CaptureList =- CaptureListCaptureByValue |- CaptureListCaptures [Capture]- deriving (Eq, Ord, Read, Show)-_CaptureList = Core.Name "hydra.cpp.syntax.CaptureList"-_CaptureList_captureByValue = Core.Name "captureByValue"-_CaptureList_captures = Core.Name "captures"-data Capture =- Capture {- captureName :: String,- captureByReference :: Bool}- deriving (Eq, Ord, Read, Show)-_Capture = Core.Name "hydra.cpp.syntax.Capture"-_Capture_name = Core.Name "name"-_Capture_byReference = Core.Name "byReference"-data PatternMatch =- PatternMatch {- patternMatchVisitor :: Visitor,- patternMatchVariant :: Expression}- deriving (Eq, Ord, Read, Show)-_PatternMatch = Core.Name "hydra.cpp.syntax.PatternMatch"-_PatternMatch_visitor = Core.Name "visitor"-_PatternMatch_variant = Core.Name "variant"-data Visitor =- VisitorLambda LambdaExpression |- VisitorOverloaded OverloadedLambdas- deriving (Eq, Ord, Read, Show)-_Visitor = Core.Name "hydra.cpp.syntax.Visitor"-_Visitor_lambda = Core.Name "lambda"-_Visitor_overloaded = Core.Name "overloaded"-newtype OverloadedLambdas =- OverloadedLambdas {- unOverloadedLambdas :: [LambdaExpression]}- deriving (Eq, Ord, Read, Show)-_OverloadedLambdas = Core.Name "hydra.cpp.syntax.OverloadedLambdas"-data FunctionApplication =- FunctionApplication {- functionApplicationFunction :: FunctionIdentifier,- functionApplicationArguments :: [Expression]}- deriving (Eq, Ord, Read, Show)-_FunctionApplication = Core.Name "hydra.cpp.syntax.FunctionApplication"-_FunctionApplication_function = Core.Name "function"-_FunctionApplication_arguments = Core.Name "arguments"-data FunctionIdentifier =- FunctionIdentifierSimple String |- FunctionIdentifierQualified QualifiedIdentifier- deriving (Eq, Ord, Read, Show)-_FunctionIdentifier = Core.Name "hydra.cpp.syntax.FunctionIdentifier"-_FunctionIdentifier_simple = Core.Name "simple"-_FunctionIdentifier_qualified = Core.Name "qualified"-data QualifiedIdentifier =- QualifiedIdentifier {- qualifiedIdentifierNamespace :: String,- qualifiedIdentifierName :: String}- deriving (Eq, Ord, Read, Show)-_QualifiedIdentifier = Core.Name "hydra.cpp.syntax.QualifiedIdentifier"-_QualifiedIdentifier_namespace = Core.Name "namespace"-_QualifiedIdentifier_name = Core.Name "name"-data Statement =- StatementLabeled LabeledStatement |- StatementCompound CompoundStatement |- StatementSelection SelectionStatement |- StatementSwitch SwitchStatement |- StatementIteration IterationStatement |- StatementJump JumpStatement |- StatementDeclaration VariableDeclaration |- StatementExpression Expression- deriving (Eq, Ord, Read, Show)-_Statement = Core.Name "hydra.cpp.syntax.Statement"-_Statement_labeled = Core.Name "labeled"-_Statement_compound = Core.Name "compound"-_Statement_selection = Core.Name "selection"-_Statement_switch = Core.Name "switch"-_Statement_iteration = Core.Name "iteration"-_Statement_jump = Core.Name "jump"-_Statement_declaration = Core.Name "declaration"-_Statement_expression = Core.Name "expression"-data LabeledStatement =- LabeledStatement {- labeledStatementLabel :: String,- labeledStatementStatement :: Statement}- deriving (Eq, Ord, Read, Show)-_LabeledStatement = Core.Name "hydra.cpp.syntax.LabeledStatement"-_LabeledStatement_label = Core.Name "label"-_LabeledStatement_statement = Core.Name "statement"-newtype CompoundStatement =- CompoundStatement {- unCompoundStatement :: [Statement]}- deriving (Eq, Ord, Read, Show)-_CompoundStatement = Core.Name "hydra.cpp.syntax.CompoundStatement"-data SelectionStatement =- SelectionStatement {- selectionStatementCondition :: Expression,- selectionStatementThenBranch :: Statement,- selectionStatementElseBranch :: (Maybe Statement)}- deriving (Eq, Ord, Read, Show)-_SelectionStatement = Core.Name "hydra.cpp.syntax.SelectionStatement"-_SelectionStatement_condition = Core.Name "condition"-_SelectionStatement_thenBranch = Core.Name "thenBranch"-_SelectionStatement_elseBranch = Core.Name "elseBranch"-data SwitchStatement =- SwitchStatement {- switchStatementValue :: Expression,- switchStatementCases :: [CaseStatement]}- deriving (Eq, Ord, Read, Show)-_SwitchStatement = Core.Name "hydra.cpp.syntax.SwitchStatement"-_SwitchStatement_value = Core.Name "value"-_SwitchStatement_cases = Core.Name "cases"-data CaseStatement =- CaseStatementCase CaseValue |- CaseStatementDefault Statement- deriving (Eq, Ord, Read, Show)-_CaseStatement = Core.Name "hydra.cpp.syntax.CaseStatement"-_CaseStatement_case = Core.Name "case"-_CaseStatement_default = Core.Name "default"-data CaseValue =- CaseValue {- caseValueValue :: Expression,- caseValueStatement :: Statement}- deriving (Eq, Ord, Read, Show)-_CaseValue = Core.Name "hydra.cpp.syntax.CaseValue"-_CaseValue_value = Core.Name "value"-_CaseValue_statement = Core.Name "statement"-data IterationStatement =- IterationStatementWhile WhileStatement |- IterationStatementDo DoStatement |- IterationStatementFor ForStatement |- IterationStatementRangeFor RangeForStatement- deriving (Eq, Ord, Read, Show)-_IterationStatement = Core.Name "hydra.cpp.syntax.IterationStatement"-_IterationStatement_while = Core.Name "while"-_IterationStatement_do = Core.Name "do"-_IterationStatement_for = Core.Name "for"-_IterationStatement_rangeFor = Core.Name "rangeFor"-data WhileStatement =- WhileStatement {- whileStatementCondition :: Expression,- whileStatementBody :: Statement}- deriving (Eq, Ord, Read, Show)-_WhileStatement = Core.Name "hydra.cpp.syntax.WhileStatement"-_WhileStatement_condition = Core.Name "condition"-_WhileStatement_body = Core.Name "body"-data DoStatement =- DoStatement {- doStatementBody :: Statement,- doStatementCondition :: Expression}- deriving (Eq, Ord, Read, Show)-_DoStatement = Core.Name "hydra.cpp.syntax.DoStatement"-_DoStatement_body = Core.Name "body"-_DoStatement_condition = Core.Name "condition"-data ForStatement =- ForStatement {- forStatementInit :: ForInit,- forStatementCondition :: Expression,- forStatementIncrement :: Expression,- forStatementBody :: Statement}- deriving (Eq, Ord, Read, Show)-_ForStatement = Core.Name "hydra.cpp.syntax.ForStatement"-_ForStatement_init = Core.Name "init"-_ForStatement_condition = Core.Name "condition"-_ForStatement_increment = Core.Name "increment"-_ForStatement_body = Core.Name "body"-data ForInit =- ForInitExpression Expression |- ForInitDeclaration VariableDeclaration |- ForInitEmpty- deriving (Eq, Ord, Read, Show)-_ForInit = Core.Name "hydra.cpp.syntax.ForInit"-_ForInit_expression = Core.Name "expression"-_ForInit_declaration = Core.Name "declaration"-_ForInit_empty = Core.Name "empty"-data RangeForStatement =- RangeForStatement {- rangeForStatementType :: TypeExpression,- rangeForStatementVariable :: String,- rangeForStatementRange :: Expression,- rangeForStatementBody :: Statement}- deriving (Eq, Ord, Read, Show)-_RangeForStatement = Core.Name "hydra.cpp.syntax.RangeForStatement"-_RangeForStatement_type = Core.Name "type"-_RangeForStatement_variable = Core.Name "variable"-_RangeForStatement_range = Core.Name "range"-_RangeForStatement_body = Core.Name "body"-data JumpStatement =- JumpStatementBreak |- JumpStatementContinue |- JumpStatementReturnValue Expression |- JumpStatementReturnVoid |- JumpStatementThrow Expression- deriving (Eq, Ord, Read, Show)-_JumpStatement = Core.Name "hydra.cpp.syntax.JumpStatement"-_JumpStatement_break = Core.Name "break"-_JumpStatement_continue = Core.Name "continue"-_JumpStatement_returnValue = Core.Name "returnValue"-_JumpStatement_returnVoid = Core.Name "returnVoid"-_JumpStatement_throw = Core.Name "throw"-newtype ExpressionStatement =- ExpressionStatement {- unExpressionStatement :: Expression}- deriving (Eq, Ord, Read, Show)-_ExpressionStatement = Core.Name "hydra.cpp.syntax.ExpressionStatement"-data TypeExpression =- TypeExpressionBasic BasicType |- TypeExpressionQualified QualifiedType |- TypeExpressionTemplate TemplateType |- TypeExpressionFunction FunctionType |- TypeExpressionAuto- deriving (Eq, Ord, Read, Show)-_TypeExpression = Core.Name "hydra.cpp.syntax.TypeExpression"-_TypeExpression_basic = Core.Name "basic"-_TypeExpression_qualified = Core.Name "qualified"-_TypeExpression_template = Core.Name "template"-_TypeExpression_function = Core.Name "function"-_TypeExpression_auto = Core.Name "auto"-data BasicType =- BasicTypeVoid |- BasicTypeBool |- BasicTypeChar |- BasicTypeInt |- BasicTypeFloat |- BasicTypeDouble |- BasicTypeString |- BasicTypeAuto |- BasicTypeNamed String- deriving (Eq, Ord, Read, Show)-_BasicType = Core.Name "hydra.cpp.syntax.BasicType"-_BasicType_void = Core.Name "void"-_BasicType_bool = Core.Name "bool"-_BasicType_char = Core.Name "char"-_BasicType_int = Core.Name "int"-_BasicType_float = Core.Name "float"-_BasicType_double = Core.Name "double"-_BasicType_string = Core.Name "string"-_BasicType_auto = Core.Name "auto"-_BasicType_named = Core.Name "named"-data QualifiedType =- QualifiedType {- qualifiedTypeBaseType :: TypeExpression,- qualifiedTypeQualifier :: TypeQualifier}- deriving (Eq, Ord, Read, Show)-_QualifiedType = Core.Name "hydra.cpp.syntax.QualifiedType"-_QualifiedType_baseType = Core.Name "baseType"-_QualifiedType_qualifier = Core.Name "qualifier"-data TypeQualifier =- TypeQualifierConst |- TypeQualifierLvalueRef |- TypeQualifierRvalueRef |- TypeQualifierPointer- deriving (Eq, Ord, Read, Show)-_TypeQualifier = Core.Name "hydra.cpp.syntax.TypeQualifier"-_TypeQualifier_const = Core.Name "const"-_TypeQualifier_lvalueRef = Core.Name "lvalueRef"-_TypeQualifier_rvalueRef = Core.Name "rvalueRef"-_TypeQualifier_pointer = Core.Name "pointer"-data TemplateType =- TemplateType {- templateTypeName :: String,- templateTypeArguments :: [TemplateArgument]}- deriving (Eq, Ord, Read, Show)-_TemplateType = Core.Name "hydra.cpp.syntax.TemplateType"-_TemplateType_name = Core.Name "name"-_TemplateType_arguments = Core.Name "arguments"-data TemplateArgument =- TemplateArgumentType TypeExpression |- TemplateArgumentValue Expression- deriving (Eq, Ord, Read, Show)-_TemplateArgument = Core.Name "hydra.cpp.syntax.TemplateArgument"-_TemplateArgument_type = Core.Name "type"-_TemplateArgument_value = Core.Name "value"-data FunctionType =- FunctionType {- functionTypeReturnType :: TypeExpression,- functionTypeParameters :: [Parameter]}- deriving (Eq, Ord, Read, Show)-_FunctionType = Core.Name "hydra.cpp.syntax.FunctionType"-_FunctionType_returnType = Core.Name "returnType"-_FunctionType_parameters = Core.Name "parameters"-data Literal =- LiteralInteger IntegerLiteral |- LiteralFloating FloatingLiteral |- LiteralCharacter CharacterLiteral |- LiteralString StringLiteral |- LiteralBoolean BooleanLiteral |- LiteralNull- deriving (Eq, Ord, Read, Show)-_Literal = Core.Name "hydra.cpp.syntax.Literal"-_Literal_integer = Core.Name "integer"-_Literal_floating = Core.Name "floating"-_Literal_character = Core.Name "character"-_Literal_string = Core.Name "string"-_Literal_boolean = Core.Name "boolean"-_Literal_null = Core.Name "null"-data IntegerLiteral =- IntegerLiteralDecimal Integer |- IntegerLiteralHexadecimal String |- IntegerLiteralOctal String |- IntegerLiteralBinary String- deriving (Eq, Ord, Read, Show)-_IntegerLiteral = Core.Name "hydra.cpp.syntax.IntegerLiteral"-_IntegerLiteral_decimal = Core.Name "decimal"-_IntegerLiteral_hexadecimal = Core.Name "hexadecimal"-_IntegerLiteral_octal = Core.Name "octal"-_IntegerLiteral_binary = Core.Name "binary"-newtype FloatingLiteral =- FloatingLiteral {- unFloatingLiteral :: Double}- deriving (Eq, Ord, Read, Show)-_FloatingLiteral = Core.Name "hydra.cpp.syntax.FloatingLiteral"-newtype CharacterLiteral =- CharacterLiteral {- unCharacterLiteral :: String}- deriving (Eq, Ord, Read, Show)-_CharacterLiteral = Core.Name "hydra.cpp.syntax.CharacterLiteral"-newtype StringLiteral =- StringLiteral {- unStringLiteral :: String}- deriving (Eq, Ord, Read, Show)-_StringLiteral = Core.Name "hydra.cpp.syntax.StringLiteral"-newtype BooleanLiteral =- BooleanLiteral {- unBooleanLiteral :: Bool}- deriving (Eq, Ord, Read, Show)-_BooleanLiteral = Core.Name "hydra.cpp.syntax.BooleanLiteral"-data Vector =- Vector {- vectorElementType :: TypeExpression,- vectorElements :: [Expression]}- deriving (Eq, Ord, Read, Show)-_Vector = Core.Name "hydra.cpp.syntax.Vector"-_Vector_elementType = Core.Name "elementType"-_Vector_elements = Core.Name "elements"-data Map =- Map {- mapKeyType :: TypeExpression,- mapValueType :: TypeExpression,- mapEntries :: [MapEntry]}- deriving (Eq, Ord, Read, Show)-_Map = Core.Name "hydra.cpp.syntax.Map"-_Map_keyType = Core.Name "keyType"-_Map_valueType = Core.Name "valueType"-_Map_entries = Core.Name "entries"-data MapEntry =- MapEntry {- mapEntryKey :: Expression,- mapEntryValue :: Expression}- deriving (Eq, Ord, Read, Show)-_MapEntry = Core.Name "hydra.cpp.syntax.MapEntry"-_MapEntry_key = Core.Name "key"-_MapEntry_value = Core.Name "value"-data Set =- Set {- setElementType :: TypeExpression,- setElements :: [Expression]}- deriving (Eq, Ord, Read, Show)-_Set = Core.Name "hydra.cpp.syntax.Set"-_Set_elementType = Core.Name "elementType"-_Set_elements = Core.Name "elements"-data Optional =- Optional {- optionalValueType :: TypeExpression,- optionalValue :: (Maybe Expression)}- deriving (Eq, Ord, Read, Show)-_Optional = Core.Name "hydra.cpp.syntax.Optional"-_Optional_valueType = Core.Name "valueType"-_Optional_value = Core.Name "value"-type Identifier = String-_Identifier = Core.Name "hydra.cpp.syntax.Identifier"-data Comment =- Comment {- commentText :: String,- commentIsMultiline :: Bool}- deriving (Eq, Ord, Read, Show)-_Comment = Core.Name "hydra.cpp.syntax.Comment"-_Comment_text = Core.Name "text"-_Comment_isMultiline = Core.Name "isMultiline"-data BinaryOperator =- BinaryOperatorPlus |- BinaryOperatorMinus |- BinaryOperatorMultiply |- BinaryOperatorDivide |- BinaryOperatorModulo |- BinaryOperatorBitwiseAnd |- BinaryOperatorBitwiseOr |- BinaryOperatorBitwiseXor |- BinaryOperatorLogicalAnd |- BinaryOperatorLogicalOr |- BinaryOperatorEqual |- BinaryOperatorNotEqual |- BinaryOperatorLess |- BinaryOperatorGreater |- BinaryOperatorLessEqual |- BinaryOperatorGreaterEqual |- BinaryOperatorLeftShift |- BinaryOperatorRightShift- deriving (Eq, Ord, Read, Show)-_BinaryOperator = Core.Name "hydra.cpp.syntax.BinaryOperator"-_BinaryOperator_plus = Core.Name "plus"-_BinaryOperator_minus = Core.Name "minus"-_BinaryOperator_multiply = Core.Name "multiply"-_BinaryOperator_divide = Core.Name "divide"-_BinaryOperator_modulo = Core.Name "modulo"-_BinaryOperator_bitwiseAnd = Core.Name "bitwiseAnd"-_BinaryOperator_bitwiseOr = Core.Name "bitwiseOr"-_BinaryOperator_bitwiseXor = Core.Name "bitwiseXor"-_BinaryOperator_logicalAnd = Core.Name "logicalAnd"-_BinaryOperator_logicalOr = Core.Name "logicalOr"-_BinaryOperator_equal = Core.Name "equal"-_BinaryOperator_notEqual = Core.Name "notEqual"-_BinaryOperator_less = Core.Name "less"-_BinaryOperator_greater = Core.Name "greater"-_BinaryOperator_lessEqual = Core.Name "lessEqual"-_BinaryOperator_greaterEqual = Core.Name "greaterEqual"-_BinaryOperator_leftShift = Core.Name "leftShift"-_BinaryOperator_rightShift = Core.Name "rightShift"++-- | A C++ syntax model, focusing on features for representing algebraic data types and declarative computations++module Hydra.Cpp.Syntax where++import qualified Hydra.Core as Core+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci++-- | A C++ member or base-class access specifier: public, protected, or private+data AccessSpecifier =+ AccessSpecifierPublic |+ AccessSpecifierProtected |+ AccessSpecifierPrivate |+ AccessSpecifierNone+ deriving (Eq, Ord, Read, Show)++_AccessSpecifier = Core.Name "hydra.cpp.syntax.AccessSpecifier"++_AccessSpecifier_public = Core.Name "public"++_AccessSpecifier_protected = Core.Name "protected"++_AccessSpecifier_private = Core.Name "private"++_AccessSpecifier_none = Core.Name "none"++-- | A C++ binary addition expression (left + right)+data AddOperation =+ AddOperation {+ addOperationLeft :: AdditiveExpression,+ addOperationRight :: MultiplicativeExpression}+ deriving (Eq, Ord, Read, Show)++_AddOperation = Core.Name "hydra.cpp.syntax.AddOperation"++_AddOperation_left = Core.Name "left"++_AddOperation_right = Core.Name "right"++-- | A C++ additive-expression: a multiplicative expression, an addition, or a subtraction+data AdditiveExpression =+ AdditiveExpressionMultiplicative MultiplicativeExpression |+ AdditiveExpressionAdd AddOperation |+ AdditiveExpressionSubtract SubtractOperation+ deriving (Eq, Ord, Read, Show)++_AdditiveExpression = Core.Name "hydra.cpp.syntax.AdditiveExpression"++_AdditiveExpression_multiplicative = Core.Name "multiplicative"++_AdditiveExpression_add = Core.Name "add"++_AdditiveExpression_subtract = Core.Name "subtract"++-- | A C++ and-expression: an equality expression or a bitwise AND operation+data AndExpression =+ AndExpressionEquality EqualityExpression |+ AndExpressionBitwiseAnd BitwiseAndOperation+ deriving (Eq, Ord, Read, Show)++_AndExpression = Core.Name "hydra.cpp.syntax.AndExpression"++_AndExpression_equality = Core.Name "equality"++_AndExpression_bitwiseAnd = Core.Name "bitwiseAnd"++-- | A C++ assignment-expression: a conditional expression or an explicit assignment+data AssignmentExpression =+ AssignmentExpressionConditional ConditionalExpression |+ AssignmentExpressionAssignment ExplicitAssignment+ deriving (Eq, Ord, Read, Show)++_AssignmentExpression = Core.Name "hydra.cpp.syntax.AssignmentExpression"++_AssignmentExpression_conditional = Core.Name "conditional"++_AssignmentExpression_assignment = Core.Name "assignment"++-- | A C++ assignment operator, such as =, +=, or <<=+data AssignmentOperator =+ AssignmentOperatorAssign |+ AssignmentOperatorPlusAssign |+ AssignmentOperatorMinusAssign |+ AssignmentOperatorMultiplyAssign |+ AssignmentOperatorDivideAssign |+ AssignmentOperatorModuloAssign |+ AssignmentOperatorLeftShiftAssign |+ AssignmentOperatorRightShiftAssign |+ AssignmentOperatorBitwiseAndAssign |+ AssignmentOperatorBitwiseXorAssign |+ AssignmentOperatorBitwiseOrAssign+ deriving (Eq, Ord, Read, Show)++_AssignmentOperator = Core.Name "hydra.cpp.syntax.AssignmentOperator"++_AssignmentOperator_assign = Core.Name "assign"++_AssignmentOperator_plusAssign = Core.Name "plusAssign"++_AssignmentOperator_minusAssign = Core.Name "minusAssign"++_AssignmentOperator_multiplyAssign = Core.Name "multiplyAssign"++_AssignmentOperator_divideAssign = Core.Name "divideAssign"++_AssignmentOperator_moduloAssign = Core.Name "moduloAssign"++_AssignmentOperator_leftShiftAssign = Core.Name "leftShiftAssign"++_AssignmentOperator_rightShiftAssign = Core.Name "rightShiftAssign"++_AssignmentOperator_bitwiseAndAssign = Core.Name "bitwiseAndAssign"++_AssignmentOperator_bitwiseXorAssign = Core.Name "bitwiseXorAssign"++_AssignmentOperator_bitwiseOrAssign = Core.Name "bitwiseOrAssign"++-- | A C++ base class specifier within a class's inheritance list+data BaseSpecifier =+ BaseSpecifier {+ baseSpecifierAccess :: AccessSpecifier,+ baseSpecifierName :: String}+ deriving (Eq, Ord, Read, Show)++_BaseSpecifier = Core.Name "hydra.cpp.syntax.BaseSpecifier"++_BaseSpecifier_access = Core.Name "access"++_BaseSpecifier_name = Core.Name "name"++-- | A C++ built-in or named basic type+data BasicType =+ BasicTypeVoid |+ BasicTypeBool |+ BasicTypeChar |+ BasicTypeInt |+ BasicTypeFloat |+ BasicTypeDouble |+ BasicTypeString |+ BasicTypeAuto |+ BasicTypeNamed String+ deriving (Eq, Ord, Read, Show)++_BasicType = Core.Name "hydra.cpp.syntax.BasicType"++_BasicType_void = Core.Name "void"++_BasicType_bool = Core.Name "bool"++_BasicType_char = Core.Name "char"++_BasicType_int = Core.Name "int"++_BasicType_float = Core.Name "float"++_BasicType_double = Core.Name "double"++_BasicType_string = Core.Name "string"++_BasicType_auto = Core.Name "auto"++_BasicType_named = Core.Name "named"++-- | A C++ binary operator+data BinaryOperator =+ BinaryOperatorPlus |+ BinaryOperatorMinus |+ BinaryOperatorMultiply |+ BinaryOperatorDivide |+ BinaryOperatorModulo |+ BinaryOperatorBitwiseAnd |+ BinaryOperatorBitwiseOr |+ BinaryOperatorBitwiseXor |+ BinaryOperatorLogicalAnd |+ BinaryOperatorLogicalOr |+ BinaryOperatorEqual |+ BinaryOperatorNotEqual |+ BinaryOperatorLess |+ BinaryOperatorGreater |+ BinaryOperatorLessEqual |+ BinaryOperatorGreaterEqual |+ BinaryOperatorLeftShift |+ BinaryOperatorRightShift+ deriving (Eq, Ord, Read, Show)++_BinaryOperator = Core.Name "hydra.cpp.syntax.BinaryOperator"++_BinaryOperator_plus = Core.Name "plus"++_BinaryOperator_minus = Core.Name "minus"++_BinaryOperator_multiply = Core.Name "multiply"++_BinaryOperator_divide = Core.Name "divide"++_BinaryOperator_modulo = Core.Name "modulo"++_BinaryOperator_bitwiseAnd = Core.Name "bitwiseAnd"++_BinaryOperator_bitwiseOr = Core.Name "bitwiseOr"++_BinaryOperator_bitwiseXor = Core.Name "bitwiseXor"++_BinaryOperator_logicalAnd = Core.Name "logicalAnd"++_BinaryOperator_logicalOr = Core.Name "logicalOr"++_BinaryOperator_equal = Core.Name "equal"++_BinaryOperator_notEqual = Core.Name "notEqual"++_BinaryOperator_less = Core.Name "less"++_BinaryOperator_greater = Core.Name "greater"++_BinaryOperator_lessEqual = Core.Name "lessEqual"++_BinaryOperator_greaterEqual = Core.Name "greaterEqual"++_BinaryOperator_leftShift = Core.Name "leftShift"++_BinaryOperator_rightShift = Core.Name "rightShift"++-- | A C++ bitwise AND expression (left & right)+data BitwiseAndOperation =+ BitwiseAndOperation {+ bitwiseAndOperationLeft :: AndExpression,+ bitwiseAndOperationRight :: EqualityExpression}+ deriving (Eq, Ord, Read, Show)++_BitwiseAndOperation = Core.Name "hydra.cpp.syntax.BitwiseAndOperation"++_BitwiseAndOperation_left = Core.Name "left"++_BitwiseAndOperation_right = Core.Name "right"++-- | A C++ bitwise OR expression (left | right)+data BitwiseOrOperation =+ BitwiseOrOperation {+ bitwiseOrOperationLeft :: InclusiveOrExpression,+ bitwiseOrOperationRight :: ExclusiveOrExpression}+ deriving (Eq, Ord, Read, Show)++_BitwiseOrOperation = Core.Name "hydra.cpp.syntax.BitwiseOrOperation"++_BitwiseOrOperation_left = Core.Name "left"++_BitwiseOrOperation_right = Core.Name "right"++-- | A C++ bitwise XOR expression (left ^ right)+data BitwiseXorOperation =+ BitwiseXorOperation {+ bitwiseXorOperationLeft :: ExclusiveOrExpression,+ bitwiseXorOperationRight :: AndExpression}+ deriving (Eq, Ord, Read, Show)++_BitwiseXorOperation = Core.Name "hydra.cpp.syntax.BitwiseXorOperation"++_BitwiseXorOperation_left = Core.Name "left"++_BitwiseXorOperation_right = Core.Name "right"++-- | A C++ boolean literal (true or false)+newtype BooleanLiteral =+ BooleanLiteral {+ unBooleanLiteral :: Bool}+ deriving (Eq, Ord, Read, Show)++_BooleanLiteral = Core.Name "hydra.cpp.syntax.BooleanLiteral"++-- | A single variable captured by a C++ lambda expression+data Capture =+ Capture {+ captureName :: String,+ captureByReference :: Bool}+ deriving (Eq, Ord, Read, Show)++_Capture = Core.Name "hydra.cpp.syntax.Capture"++_Capture_name = Core.Name "name"++_Capture_byReference = Core.Name "byReference"++-- | A C++ lambda capture list: capture-by-value ([=]) or an explicit list of captures+data CaptureList =+ CaptureListCaptureByValue |+ CaptureListCaptures [Capture]+ deriving (Eq, Ord, Read, Show)++_CaptureList = Core.Name "hydra.cpp.syntax.CaptureList"++_CaptureList_captureByValue = Core.Name "captureByValue"++_CaptureList_captures = Core.Name "captures"++-- | A single case or default branch of a C++ switch statement+data CaseStatement =+ CaseStatementCase CaseValue |+ CaseStatementDefault Statement+ deriving (Eq, Ord, Read, Show)++_CaseStatement = Core.Name "hydra.cpp.syntax.CaseStatement"++_CaseStatement_case = Core.Name "case"++_CaseStatement_default = Core.Name "default"++-- | A C++ switch case label together with its associated statement+data CaseValue =+ CaseValue {+ caseValueValue :: Expression,+ caseValueStatement :: Statement}+ deriving (Eq, Ord, Read, Show)++_CaseValue = Core.Name "hydra.cpp.syntax.CaseValue"++_CaseValue_value = Core.Name "value"++_CaseValue_statement = Core.Name "statement"++-- | A C++ character literal+newtype CharacterLiteral =+ CharacterLiteral {+ unCharacterLiteral :: String}+ deriving (Eq, Ord, Read, Show)++_CharacterLiteral = Core.Name "hydra.cpp.syntax.CharacterLiteral"++-- | The body of a C++ class, struct, or enum declaration: a list of member specifications+newtype ClassBody =+ ClassBody {+ unClassBody :: [MemberSpecification]}+ deriving (Eq, Ord, Read, Show)++_ClassBody = Core.Name "hydra.cpp.syntax.ClassBody"++-- | A C++ class, struct, or enum declaration, with an optional body+data ClassDeclaration =+ ClassDeclaration {+ classDeclarationSpecifier :: ClassSpecifier,+ classDeclarationBody :: (Maybe ClassBody)}+ deriving (Eq, Ord, Read, Show)++_ClassDeclaration = Core.Name "hydra.cpp.syntax.ClassDeclaration"++_ClassDeclaration_specifier = Core.Name "specifier"++_ClassDeclaration_body = Core.Name "body"++-- | The keyword introducing a C++ class-like declaration: class, enum, enum class, or struct+data ClassKey =+ ClassKeyClass |+ ClassKeyEnum |+ ClassKeyEnumClass |+ ClassKeyStruct+ deriving (Eq, Ord, Read, Show)++_ClassKey = Core.Name "hydra.cpp.syntax.ClassKey"++_ClassKey_class = Core.Name "class"++_ClassKey_enum = Core.Name "enum"++_ClassKey_enumClass = Core.Name "enumClass"++_ClassKey_struct = Core.Name "struct"++-- | The head of a C++ class declaration: its key, name, and base class list+data ClassSpecifier =+ ClassSpecifier {+ classSpecifierKey :: ClassKey,+ classSpecifierName :: String,+ classSpecifierInheritance :: [BaseSpecifier]}+ deriving (Eq, Ord, Read, Show)++_ClassSpecifier = Core.Name "hydra.cpp.syntax.ClassSpecifier"++_ClassSpecifier_key = Core.Name "key"++_ClassSpecifier_name = Core.Name "name"++_ClassSpecifier_inheritance = Core.Name "inheritance"++-- | A C++ comma expression (left, right)+data CommaExpression =+ CommaExpression {+ commaExpressionLeft :: Expression,+ commaExpressionRight :: AssignmentExpression}+ deriving (Eq, Ord, Read, Show)++_CommaExpression = Core.Name "hydra.cpp.syntax.CommaExpression"++_CommaExpression_left = Core.Name "left"++_CommaExpression_right = Core.Name "right"++-- | A C++ line or block comment+data Comment =+ Comment {+ commentText :: String,+ commentIsMultiline :: Bool}+ deriving (Eq, Ord, Read, Show)++_Comment = Core.Name "hydra.cpp.syntax.Comment"++_Comment_text = Core.Name "text"++_Comment_isMultiline = Core.Name "isMultiline"++-- | A C++ compound statement: a brace-enclosed block of statements+newtype CompoundStatement =+ CompoundStatement {+ unCompoundStatement :: [Statement]}+ deriving (Eq, Ord, Read, Show)++_CompoundStatement = Core.Name "hydra.cpp.syntax.CompoundStatement"++-- | A C++ conditional-expression: a logical-or expression or a ternary expression+data ConditionalExpression =+ ConditionalExpressionLogicalOr LogicalOrExpression |+ ConditionalExpressionTernary TernaryExpression+ deriving (Eq, Ord, Read, Show)++_ConditionalExpression = Core.Name "hydra.cpp.syntax.ConditionalExpression"++_ConditionalExpression_logicalOr = Core.Name "logicalOr"++_ConditionalExpression_ternary = Core.Name "ternary"++-- | A C++ constructor declaration, with parameters, member initializers, and a body+data ConstructorDeclaration =+ ConstructorDeclaration {+ constructorDeclarationName :: String,+ constructorDeclarationParameters :: [Parameter],+ constructorDeclarationInitializers :: [MemInitializer],+ constructorDeclarationBody :: FunctionBody}+ deriving (Eq, Ord, Read, Show)++_ConstructorDeclaration = Core.Name "hydra.cpp.syntax.ConstructorDeclaration"++_ConstructorDeclaration_name = Core.Name "name"++_ConstructorDeclaration_parameters = Core.Name "parameters"++_ConstructorDeclaration_initializers = Core.Name "initializers"++_ConstructorDeclaration_body = Core.Name "body"++-- | A declaration of a standard-library container type alias: list, map, set, or optional+data ContainerDeclaration =+ ContainerDeclarationList ListDeclaration |+ ContainerDeclarationMap MapDeclaration |+ ContainerDeclarationSet SetDeclaration |+ ContainerDeclarationOptional OptionalDeclaration+ deriving (Eq, Ord, Read, Show)++_ContainerDeclaration = Core.Name "hydra.cpp.syntax.ContainerDeclaration"++_ContainerDeclaration_list = Core.Name "list"++_ContainerDeclaration_map = Core.Name "map"++_ContainerDeclaration_set = Core.Name "set"++_ContainerDeclaration_optional = Core.Name "optional"++-- | A top-level C++ declaration+data Declaration =+ DeclarationPreprocessor PreprocessorDirective |+ DeclarationClass ClassDeclaration |+ DeclarationFunction FunctionDeclaration |+ DeclarationVariable VariableDeclaration |+ DeclarationTypedef TypedefDeclaration |+ DeclarationNamespace NamespaceDeclaration |+ DeclarationTemplate TemplateDeclaration+ deriving (Eq, Ord, Read, Show)++_Declaration = Core.Name "hydra.cpp.syntax.Declaration"++_Declaration_preprocessor = Core.Name "preprocessor"++_Declaration_class = Core.Name "class"++_Declaration_function = Core.Name "function"++_Declaration_variable = Core.Name "variable"++_Declaration_typedef = Core.Name "typedef"++_Declaration_namespace = Core.Name "namespace"++_Declaration_template = Core.Name "template"++-- | A C preprocessor #define directive, optionally function-like+data DefineDirective =+ DefineDirective {+ defineDirectiveName :: String,+ defineDirectiveParameters :: (Maybe [String]),+ defineDirectiveReplacement :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_DefineDirective = Core.Name "hydra.cpp.syntax.DefineDirective"++_DefineDirective_name = Core.Name "name"++_DefineDirective_parameters = Core.Name "parameters"++_DefineDirective_replacement = Core.Name "replacement"++-- | A C++ destructor declaration+data DestructorDeclaration =+ DestructorDeclaration {+ destructorDeclarationPrefixSpecifiers :: [FunctionSpecifierPrefix],+ destructorDeclarationName :: String,+ destructorDeclarationSuffixSpecifiers :: [FunctionSpecifierSuffix],+ destructorDeclarationBody :: FunctionBody}+ deriving (Eq, Ord, Read, Show)++_DestructorDeclaration = Core.Name "hydra.cpp.syntax.DestructorDeclaration"++_DestructorDeclaration_prefixSpecifiers = Core.Name "prefixSpecifiers"++_DestructorDeclaration_name = Core.Name "name"++_DestructorDeclaration_suffixSpecifiers = Core.Name "suffixSpecifiers"++_DestructorDeclaration_body = Core.Name "body"++-- | A C++ division expression (left / right)+data DivideOperation =+ DivideOperation {+ divideOperationLeft :: MultiplicativeExpression,+ divideOperationRight :: UnaryExpression}+ deriving (Eq, Ord, Read, Show)++_DivideOperation = Core.Name "hydra.cpp.syntax.DivideOperation"++_DivideOperation_left = Core.Name "left"++_DivideOperation_right = Core.Name "right"++-- | A C++ do-while statement+data DoStatement =+ DoStatement {+ doStatementBody :: Statement,+ doStatementCondition :: Expression}+ deriving (Eq, Ord, Read, Show)++_DoStatement = Core.Name "hydra.cpp.syntax.DoStatement"++_DoStatement_body = Core.Name "body"++_DoStatement_condition = Core.Name "condition"++-- | A C preprocessor #elif directive+data ElifDirective =+ ElifDirective {+ elifDirectiveCondition :: String}+ deriving (Eq, Ord, Read, Show)++_ElifDirective = Core.Name "hydra.cpp.syntax.ElifDirective"++_ElifDirective_condition = Core.Name "condition"++-- | A C preprocessor #else directive+type ElseDirective = ()++_ElseDirective = Core.Name "hydra.cpp.syntax.ElseDirective"++-- | A C preprocessor #endif directive+type EndifDirective = ()++_EndifDirective = Core.Name "hydra.cpp.syntax.EndifDirective"++-- | A C++ equality comparison expression (left == right)+data EqualOperation =+ EqualOperation {+ equalOperationLeft :: EqualityExpression,+ equalOperationRight :: RelationalExpression}+ deriving (Eq, Ord, Read, Show)++_EqualOperation = Core.Name "hydra.cpp.syntax.EqualOperation"++_EqualOperation_left = Core.Name "left"++_EqualOperation_right = Core.Name "right"++-- | A C++ equality-expression: a relational expression, an equality, or an inequality+data EqualityExpression =+ EqualityExpressionRelational RelationalExpression |+ EqualityExpressionEqual EqualOperation |+ EqualityExpressionNotEqual NotEqualOperation+ deriving (Eq, Ord, Read, Show)++_EqualityExpression = Core.Name "hydra.cpp.syntax.EqualityExpression"++_EqualityExpression_relational = Core.Name "relational"++_EqualityExpression_equal = Core.Name "equal"++_EqualityExpression_notEqual = Core.Name "notEqual"++-- | A C preprocessor #error directive+data ErrorDirective =+ ErrorDirective {+ errorDirectiveMessage :: String}+ deriving (Eq, Ord, Read, Show)++_ErrorDirective = Core.Name "hydra.cpp.syntax.ErrorDirective"++_ErrorDirective_message = Core.Name "message"++-- | A C++ exclusive-or-expression: an and expression or a bitwise XOR operation+data ExclusiveOrExpression =+ ExclusiveOrExpressionAnd AndExpression |+ ExclusiveOrExpressionBitwiseXor BitwiseXorOperation+ deriving (Eq, Ord, Read, Show)++_ExclusiveOrExpression = Core.Name "hydra.cpp.syntax.ExclusiveOrExpression"++_ExclusiveOrExpression_and = Core.Name "and"++_ExclusiveOrExpression_bitwiseXor = Core.Name "bitwiseXor"++-- | A C++ assignment expression with an explicit operator (e.g. left += right)+data ExplicitAssignment =+ ExplicitAssignment {+ explicitAssignmentLeft :: LogicalOrExpression,+ explicitAssignmentOp :: AssignmentOperator,+ explicitAssignmentRight :: AssignmentExpression}+ deriving (Eq, Ord, Read, Show)++_ExplicitAssignment = Core.Name "hydra.cpp.syntax.ExplicitAssignment"++_ExplicitAssignment_left = Core.Name "left"++_ExplicitAssignment_op = Core.Name "op"++_ExplicitAssignment_right = Core.Name "right"++-- | A C++ expression: an assignment expression or a comma expression+data Expression =+ ExpressionAssignment AssignmentExpression |+ ExpressionComma CommaExpression+ deriving (Eq, Ord, Read, Show)++_Expression = Core.Name "hydra.cpp.syntax.Expression"++_Expression_assignment = Core.Name "assignment"++_Expression_comma = Core.Name "comma"++-- | A C++ expression statement: an expression followed by a semicolon+newtype ExpressionStatement =+ ExpressionStatement {+ unExpressionStatement :: Expression}+ deriving (Eq, Ord, Read, Show)++_ExpressionStatement = Core.Name "hydra.cpp.syntax.ExpressionStatement"++-- | A C++ floating-point literal+newtype FloatingLiteral =+ FloatingLiteral {+ unFloatingLiteral :: Double}+ deriving (Eq, Ord, Read, Show)++_FloatingLiteral = Core.Name "hydra.cpp.syntax.FloatingLiteral"++-- | The initializer clause of a C++ for statement: an expression, a declaration, or empty+data ForInit =+ ForInitExpression Expression |+ ForInitDeclaration VariableDeclaration |+ ForInitEmpty+ deriving (Eq, Ord, Read, Show)++_ForInit = Core.Name "hydra.cpp.syntax.ForInit"++_ForInit_expression = Core.Name "expression"++_ForInit_declaration = Core.Name "declaration"++_ForInit_empty = Core.Name "empty"++-- | A C++ for statement+data ForStatement =+ ForStatement {+ forStatementInit :: ForInit,+ forStatementCondition :: Expression,+ forStatementIncrement :: Expression,+ forStatementBody :: Statement}+ deriving (Eq, Ord, Read, Show)++_ForStatement = Core.Name "hydra.cpp.syntax.ForStatement"++_ForStatement_init = Core.Name "init"++_ForStatement_condition = Core.Name "condition"++_ForStatement_increment = Core.Name "increment"++_ForStatement_body = Core.Name "body"++-- | A simplified function call: a function identifier applied to a list of arguments+data FunctionApplication =+ FunctionApplication {+ functionApplicationFunction :: FunctionIdentifier,+ functionApplicationArguments :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_FunctionApplication = Core.Name "hydra.cpp.syntax.FunctionApplication"++_FunctionApplication_function = Core.Name "function"++_FunctionApplication_arguments = Core.Name "arguments"++-- | The body of a C++ function: a compound statement, or a declaration-only/pure/default marker+data FunctionBody =+ FunctionBodyCompound CompoundStatement |+ FunctionBodyDeclaration |+ FunctionBodyPure |+ FunctionBodyDefault+ deriving (Eq, Ord, Read, Show)++_FunctionBody = Core.Name "hydra.cpp.syntax.FunctionBody"++_FunctionBody_compound = Core.Name "compound"++_FunctionBody_declaration = Core.Name "declaration"++_FunctionBody_pure = Core.Name "pure"++_FunctionBody_default = Core.Name "default"++-- | A C++ function call expression: a postfix expression applied to arguments+data FunctionCallOperation =+ FunctionCallOperation {+ functionCallOperationFunction :: PostfixExpression,+ functionCallOperationArguments :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_FunctionCallOperation = Core.Name "hydra.cpp.syntax.FunctionCallOperation"++_FunctionCallOperation_function = Core.Name "function"++_FunctionCallOperation_arguments = Core.Name "arguments"++-- | A C++ function declaration or definition+data FunctionDeclaration =+ FunctionDeclaration {+ functionDeclarationPrefixSpecifiers :: [FunctionSpecifierPrefix],+ functionDeclarationReturnType :: TypeExpression,+ functionDeclarationName :: String,+ functionDeclarationParameters :: [Parameter],+ functionDeclarationSuffixSpecifiers :: [FunctionSpecifierSuffix],+ functionDeclarationBody :: FunctionBody}+ deriving (Eq, Ord, Read, Show)++_FunctionDeclaration = Core.Name "hydra.cpp.syntax.FunctionDeclaration"++_FunctionDeclaration_prefixSpecifiers = Core.Name "prefixSpecifiers"++_FunctionDeclaration_returnType = Core.Name "returnType"++_FunctionDeclaration_name = Core.Name "name"++_FunctionDeclaration_parameters = Core.Name "parameters"++_FunctionDeclaration_suffixSpecifiers = Core.Name "suffixSpecifiers"++_FunctionDeclaration_body = Core.Name "body"++-- | The identifier of a called function: a simple name or a qualified name+data FunctionIdentifier =+ FunctionIdentifierSimple String |+ FunctionIdentifierQualified QualifiedIdentifier+ deriving (Eq, Ord, Read, Show)++_FunctionIdentifier = Core.Name "hydra.cpp.syntax.FunctionIdentifier"++_FunctionIdentifier_simple = Core.Name "simple"++_FunctionIdentifier_qualified = Core.Name "qualified"++-- | A C++ function specifier that appears before the declaration: inline, virtual, static, or explicit+data FunctionSpecifierPrefix =+ FunctionSpecifierPrefixInline |+ FunctionSpecifierPrefixVirtual |+ FunctionSpecifierPrefixStatic |+ FunctionSpecifierPrefixExplicit+ deriving (Eq, Ord, Read, Show)++_FunctionSpecifierPrefix = Core.Name "hydra.cpp.syntax.FunctionSpecifierPrefix"++_FunctionSpecifierPrefix_inline = Core.Name "inline"++_FunctionSpecifierPrefix_virtual = Core.Name "virtual"++_FunctionSpecifierPrefix_static = Core.Name "static"++_FunctionSpecifierPrefix_explicit = Core.Name "explicit"++-- | A C++ function specifier that appears after the parameter list: const, noexcept, override, or final+data FunctionSpecifierSuffix =+ FunctionSpecifierSuffixConst |+ FunctionSpecifierSuffixNoexcept |+ FunctionSpecifierSuffixOverride |+ FunctionSpecifierSuffixFinal+ deriving (Eq, Ord, Read, Show)++_FunctionSpecifierSuffix = Core.Name "hydra.cpp.syntax.FunctionSpecifierSuffix"++_FunctionSpecifierSuffix_const = Core.Name "const"++_FunctionSpecifierSuffix_noexcept = Core.Name "noexcept"++_FunctionSpecifierSuffix_override = Core.Name "override"++_FunctionSpecifierSuffix_final = Core.Name "final"++-- | A C++ function type: a return type together with parameter types+data FunctionType =+ FunctionType {+ functionTypeReturnType :: TypeExpression,+ functionTypeParameters :: [Parameter]}+ deriving (Eq, Ord, Read, Show)++_FunctionType = Core.Name "hydra.cpp.syntax.FunctionType"++_FunctionType_returnType = Core.Name "returnType"++_FunctionType_parameters = Core.Name "parameters"++-- | A C++ greater-than-or-equal comparison expression (left >= right)+data GreaterEqualOperation =+ GreaterEqualOperation {+ greaterEqualOperationLeft :: RelationalExpression,+ greaterEqualOperationRight :: ShiftExpression}+ deriving (Eq, Ord, Read, Show)++_GreaterEqualOperation = Core.Name "hydra.cpp.syntax.GreaterEqualOperation"++_GreaterEqualOperation_left = Core.Name "left"++_GreaterEqualOperation_right = Core.Name "right"++-- | A C++ greater-than comparison expression (left > right)+data GreaterOperation =+ GreaterOperation {+ greaterOperationLeft :: RelationalExpression,+ greaterOperationRight :: ShiftExpression}+ deriving (Eq, Ord, Read, Show)++_GreaterOperation = Core.Name "hydra.cpp.syntax.GreaterOperation"++_GreaterOperation_left = Core.Name "left"++_GreaterOperation_right = Core.Name "right"++-- | A C++ identifier+type Identifier = String++_Identifier = Core.Name "hydra.cpp.syntax.Identifier"++-- | A C preprocessor #if directive+data IfDirective =+ IfDirective {+ ifDirectiveCondition :: String}+ deriving (Eq, Ord, Read, Show)++_IfDirective = Core.Name "hydra.cpp.syntax.IfDirective"++_IfDirective_condition = Core.Name "condition"++-- | A C preprocessor #ifdef directive+data IfdefDirective =+ IfdefDirective {+ ifdefDirectiveIdentifier :: String}+ deriving (Eq, Ord, Read, Show)++_IfdefDirective = Core.Name "hydra.cpp.syntax.IfdefDirective"++_IfdefDirective_identifier = Core.Name "identifier"++-- | A C preprocessor #ifndef directive+data IfndefDirective =+ IfndefDirective {+ ifndefDirectiveIdentifier :: String}+ deriving (Eq, Ord, Read, Show)++_IfndefDirective = Core.Name "hydra.cpp.syntax.IfndefDirective"++_IfndefDirective_identifier = Core.Name "identifier"++-- | A C preprocessor #include directive, for a system or local header+data IncludeDirective =+ IncludeDirective {+ includeDirectiveName :: String,+ includeDirectiveIsSystem :: Bool}+ deriving (Eq, Ord, Read, Show)++_IncludeDirective = Core.Name "hydra.cpp.syntax.IncludeDirective"++_IncludeDirective_name = Core.Name "name"++_IncludeDirective_isSystem = Core.Name "isSystem"++-- | A C++ inclusive-or-expression: an exclusive-or expression or a bitwise OR operation+data InclusiveOrExpression =+ InclusiveOrExpressionExclusiveOr ExclusiveOrExpression |+ InclusiveOrExpressionBitwiseOr BitwiseOrOperation+ deriving (Eq, Ord, Read, Show)++_InclusiveOrExpression = Core.Name "hydra.cpp.syntax.InclusiveOrExpression"++_InclusiveOrExpression_exclusiveOr = Core.Name "exclusiveOr"++_InclusiveOrExpression_bitwiseOr = Core.Name "bitwiseOr"++-- | A C++ integer literal, in decimal, hexadecimal, octal, or binary form+data IntegerLiteral =+ IntegerLiteralDecimal Integer |+ IntegerLiteralHexadecimal String |+ IntegerLiteralOctal String |+ IntegerLiteralBinary String+ deriving (Eq, Ord, Read, Show)++_IntegerLiteral = Core.Name "hydra.cpp.syntax.IntegerLiteral"++_IntegerLiteral_decimal = Core.Name "decimal"++_IntegerLiteral_hexadecimal = Core.Name "hexadecimal"++_IntegerLiteral_octal = Core.Name "octal"++_IntegerLiteral_binary = Core.Name "binary"++-- | A C++ iteration statement: while, do-while, for, or range-based for+data IterationStatement =+ IterationStatementWhile WhileStatement |+ IterationStatementDo DoStatement |+ IterationStatementFor ForStatement |+ IterationStatementRangeFor RangeForStatement+ deriving (Eq, Ord, Read, Show)++_IterationStatement = Core.Name "hydra.cpp.syntax.IterationStatement"++_IterationStatement_while = Core.Name "while"++_IterationStatement_do = Core.Name "do"++_IterationStatement_for = Core.Name "for"++_IterationStatement_rangeFor = Core.Name "rangeFor"++-- | A C++ jump statement: break, continue, return (with or without a value), or throw+data JumpStatement =+ JumpStatementBreak |+ JumpStatementContinue |+ JumpStatementReturnValue Expression |+ JumpStatementReturnVoid |+ JumpStatementThrow Expression+ deriving (Eq, Ord, Read, Show)++_JumpStatement = Core.Name "hydra.cpp.syntax.JumpStatement"++_JumpStatement_break = Core.Name "break"++_JumpStatement_continue = Core.Name "continue"++_JumpStatement_returnValue = Core.Name "returnValue"++_JumpStatement_returnVoid = Core.Name "returnVoid"++_JumpStatement_throw = Core.Name "throw"++-- | A C++ labeled statement+data LabeledStatement =+ LabeledStatement {+ labeledStatementLabel :: String,+ labeledStatementStatement :: Statement}+ deriving (Eq, Ord, Read, Show)++_LabeledStatement = Core.Name "hydra.cpp.syntax.LabeledStatement"++_LabeledStatement_label = Core.Name "label"++_LabeledStatement_statement = Core.Name "statement"++-- | A C++ lambda expression+data LambdaExpression =+ LambdaExpression {+ lambdaExpressionCaptures :: CaptureList,+ lambdaExpressionParameters :: [Parameter],+ lambdaExpressionReturnType :: (Maybe TypeExpression),+ lambdaExpressionBody :: CompoundStatement}+ deriving (Eq, Ord, Read, Show)++_LambdaExpression = Core.Name "hydra.cpp.syntax.LambdaExpression"++_LambdaExpression_captures = Core.Name "captures"++_LambdaExpression_parameters = Core.Name "parameters"++_LambdaExpression_returnType = Core.Name "returnType"++_LambdaExpression_body = Core.Name "body"++-- | A C++ left shift expression (left << right)+data LeftShiftOperation =+ LeftShiftOperation {+ leftShiftOperationLeft :: ShiftExpression,+ leftShiftOperationRight :: AdditiveExpression}+ deriving (Eq, Ord, Read, Show)++_LeftShiftOperation = Core.Name "hydra.cpp.syntax.LeftShiftOperation"++_LeftShiftOperation_left = Core.Name "left"++_LeftShiftOperation_right = Core.Name "right"++-- | A C++ less-than-or-equal comparison expression (left <= right)+data LessEqualOperation =+ LessEqualOperation {+ lessEqualOperationLeft :: RelationalExpression,+ lessEqualOperationRight :: ShiftExpression}+ deriving (Eq, Ord, Read, Show)++_LessEqualOperation = Core.Name "hydra.cpp.syntax.LessEqualOperation"++_LessEqualOperation_left = Core.Name "left"++_LessEqualOperation_right = Core.Name "right"++-- | A C++ less-than comparison expression (left < right)+data LessOperation =+ LessOperation {+ lessOperationLeft :: RelationalExpression,+ lessOperationRight :: ShiftExpression}+ deriving (Eq, Ord, Read, Show)++_LessOperation = Core.Name "hydra.cpp.syntax.LessOperation"++_LessOperation_left = Core.Name "left"++_LessOperation_right = Core.Name "right"++-- | A C preprocessor #line directive+data LineDirective =+ LineDirective {+ lineDirectiveLineNumber :: Int,+ lineDirectiveFilename :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_LineDirective = Core.Name "hydra.cpp.syntax.LineDirective"++_LineDirective_lineNumber = Core.Name "lineNumber"++_LineDirective_filename = Core.Name "filename"++-- | A declaration of a named std::vector type alias+data ListDeclaration =+ ListDeclaration {+ listDeclarationElementType :: TypeExpression,+ listDeclarationName :: String}+ deriving (Eq, Ord, Read, Show)++_ListDeclaration = Core.Name "hydra.cpp.syntax.ListDeclaration"++_ListDeclaration_elementType = Core.Name "elementType"++_ListDeclaration_name = Core.Name "name"++-- | A C++ literal value+data Literal =+ LiteralInteger IntegerLiteral |+ LiteralFloating FloatingLiteral |+ LiteralCharacter CharacterLiteral |+ LiteralString StringLiteral |+ LiteralBoolean BooleanLiteral |+ LiteralNull+ deriving (Eq, Ord, Read, Show)++_Literal = Core.Name "hydra.cpp.syntax.Literal"++_Literal_integer = Core.Name "integer"++_Literal_floating = Core.Name "floating"++_Literal_character = Core.Name "character"++_Literal_string = Core.Name "string"++_Literal_boolean = Core.Name "boolean"++_Literal_null = Core.Name "null"++-- | A C++ logical-and-expression: an inclusive-or expression or a logical AND operation+data LogicalAndExpression =+ LogicalAndExpressionInclusiveOr InclusiveOrExpression |+ LogicalAndExpressionLogicalAnd LogicalAndOperation+ deriving (Eq, Ord, Read, Show)++_LogicalAndExpression = Core.Name "hydra.cpp.syntax.LogicalAndExpression"++_LogicalAndExpression_inclusiveOr = Core.Name "inclusiveOr"++_LogicalAndExpression_logicalAnd = Core.Name "logicalAnd"++-- | A C++ logical AND expression (left && right)+data LogicalAndOperation =+ LogicalAndOperation {+ logicalAndOperationLeft :: LogicalAndExpression,+ logicalAndOperationRight :: InclusiveOrExpression}+ deriving (Eq, Ord, Read, Show)++_LogicalAndOperation = Core.Name "hydra.cpp.syntax.LogicalAndOperation"++_LogicalAndOperation_left = Core.Name "left"++_LogicalAndOperation_right = Core.Name "right"++-- | A C++ logical-or-expression: a logical-and expression or a logical OR operation+data LogicalOrExpression =+ LogicalOrExpressionLogicalAnd LogicalAndExpression |+ LogicalOrExpressionLogicalOr LogicalOrOperation+ deriving (Eq, Ord, Read, Show)++_LogicalOrExpression = Core.Name "hydra.cpp.syntax.LogicalOrExpression"++_LogicalOrExpression_logicalAnd = Core.Name "logicalAnd"++_LogicalOrExpression_logicalOr = Core.Name "logicalOr"++-- | A C++ logical OR expression (left || right)+data LogicalOrOperation =+ LogicalOrOperation {+ logicalOrOperationLeft :: LogicalOrExpression,+ logicalOrOperationRight :: LogicalAndExpression}+ deriving (Eq, Ord, Read, Show)++_LogicalOrOperation = Core.Name "hydra.cpp.syntax.LogicalOrOperation"++_LogicalOrOperation_left = Core.Name "left"++_LogicalOrOperation_right = Core.Name "right"++-- | A C++ std::map literal, with a key type, a value type, and entries+data Map =+ Map {+ mapKeyType :: TypeExpression,+ mapValueType :: TypeExpression,+ mapEntries :: [MapEntry]}+ deriving (Eq, Ord, Read, Show)++_Map = Core.Name "hydra.cpp.syntax.Map"++_Map_keyType = Core.Name "keyType"++_Map_valueType = Core.Name "valueType"++_Map_entries = Core.Name "entries"++-- | A declaration of a named std::map type alias+data MapDeclaration =+ MapDeclaration {+ mapDeclarationKeyType :: TypeExpression,+ mapDeclarationValueType :: TypeExpression,+ mapDeclarationName :: String}+ deriving (Eq, Ord, Read, Show)++_MapDeclaration = Core.Name "hydra.cpp.syntax.MapDeclaration"++_MapDeclaration_keyType = Core.Name "keyType"++_MapDeclaration_valueType = Core.Name "valueType"++_MapDeclaration_name = Core.Name "name"++-- | A single key/value entry in a C++ map literal+data MapEntry =+ MapEntry {+ mapEntryKey :: Expression,+ mapEntryValue :: Expression}+ deriving (Eq, Ord, Read, Show)++_MapEntry = Core.Name "hydra.cpp.syntax.MapEntry"++_MapEntry_key = Core.Name "key"++_MapEntry_value = Core.Name "value"++-- | A C++ member initializer in a constructor's initializer list+data MemInitializer =+ MemInitializer {+ memInitializerName :: String,+ memInitializerArguments :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_MemInitializer = Core.Name "hydra.cpp.syntax.MemInitializer"++_MemInitializer_name = Core.Name "name"++_MemInitializer_arguments = Core.Name "arguments"++-- | A C++ member access expression (object.member)+data MemberAccessOperation =+ MemberAccessOperation {+ memberAccessOperationObject :: PostfixExpression,+ memberAccessOperationMember :: String}+ deriving (Eq, Ord, Read, Show)++_MemberAccessOperation = Core.Name "hydra.cpp.syntax.MemberAccessOperation"++_MemberAccessOperation_object = Core.Name "object"++_MemberAccessOperation_member = Core.Name "member"++-- | A single member declaration within a C++ class body+data MemberDeclaration =+ MemberDeclarationFunction FunctionDeclaration |+ MemberDeclarationVariable VariableDeclaration |+ MemberDeclarationConstructor ConstructorDeclaration |+ MemberDeclarationDestructor DestructorDeclaration |+ MemberDeclarationNestedClass ClassDeclaration |+ MemberDeclarationTemplate TemplateDeclaration+ deriving (Eq, Ord, Read, Show)++_MemberDeclaration = Core.Name "hydra.cpp.syntax.MemberDeclaration"++_MemberDeclaration_function = Core.Name "function"++_MemberDeclaration_variable = Core.Name "variable"++_MemberDeclaration_constructor = Core.Name "constructor"++_MemberDeclaration_destructor = Core.Name "destructor"++_MemberDeclaration_nestedClass = Core.Name "nestedClass"++_MemberDeclaration_template = Core.Name "template"++-- | An entry in a C++ class body: an access-level label or a member declaration+data MemberSpecification =+ MemberSpecificationAccessLabel AccessSpecifier |+ MemberSpecificationMember MemberDeclaration+ deriving (Eq, Ord, Read, Show)++_MemberSpecification = Core.Name "hydra.cpp.syntax.MemberSpecification"++_MemberSpecification_accessLabel = Core.Name "accessLabel"++_MemberSpecification_member = Core.Name "member"++-- | A C++ modulo expression (left % right)+data ModuloOperation =+ ModuloOperation {+ moduloOperationLeft :: MultiplicativeExpression,+ moduloOperationRight :: UnaryExpression}+ deriving (Eq, Ord, Read, Show)++_ModuloOperation = Core.Name "hydra.cpp.syntax.ModuloOperation"++_ModuloOperation_left = Core.Name "left"++_ModuloOperation_right = Core.Name "right"++-- | A C++ multiplicative-expression: a unary expression, a multiplication, a division, or a modulo+data MultiplicativeExpression =+ MultiplicativeExpressionUnary UnaryExpression |+ MultiplicativeExpressionMultiply MultiplyOperation |+ MultiplicativeExpressionDivide DivideOperation |+ MultiplicativeExpressionModulo ModuloOperation+ deriving (Eq, Ord, Read, Show)++_MultiplicativeExpression = Core.Name "hydra.cpp.syntax.MultiplicativeExpression"++_MultiplicativeExpression_unary = Core.Name "unary"++_MultiplicativeExpression_multiply = Core.Name "multiply"++_MultiplicativeExpression_divide = Core.Name "divide"++_MultiplicativeExpression_modulo = Core.Name "modulo"++-- | A C++ multiplication expression (left * right)+data MultiplyOperation =+ MultiplyOperation {+ multiplyOperationLeft :: MultiplicativeExpression,+ multiplyOperationRight :: UnaryExpression}+ deriving (Eq, Ord, Read, Show)++_MultiplyOperation = Core.Name "hydra.cpp.syntax.MultiplyOperation"++_MultiplyOperation_left = Core.Name "left"++_MultiplyOperation_right = Core.Name "right"++-- | A C++ namespace declaration enclosing a list of declarations+data NamespaceDeclaration =+ NamespaceDeclaration {+ namespaceDeclarationName :: String,+ namespaceDeclarationDeclarations :: [Declaration]}+ deriving (Eq, Ord, Read, Show)++_NamespaceDeclaration = Core.Name "hydra.cpp.syntax.NamespaceDeclaration"++_NamespaceDeclaration_name = Core.Name "name"++_NamespaceDeclaration_declarations = Core.Name "declarations"++-- | A C++ inequality comparison expression (left != right)+data NotEqualOperation =+ NotEqualOperation {+ notEqualOperationLeft :: EqualityExpression,+ notEqualOperationRight :: RelationalExpression}+ deriving (Eq, Ord, Read, Show)++_NotEqualOperation = Core.Name "hydra.cpp.syntax.NotEqualOperation"++_NotEqualOperation_left = Core.Name "left"++_NotEqualOperation_right = Core.Name "right"++-- | A C++ std::optional literal, with a value type and an optional contained value+data Optional =+ Optional {+ optionalValueType :: TypeExpression,+ optionalValue :: (Maybe Expression)}+ deriving (Eq, Ord, Read, Show)++_Optional = Core.Name "hydra.cpp.syntax.Optional"++_Optional_valueType = Core.Name "valueType"++_Optional_value = Core.Name "value"++-- | A declaration of a named std::optional type alias+data OptionalDeclaration =+ OptionalDeclaration {+ optionalDeclarationValueType :: TypeExpression,+ optionalDeclarationName :: String}+ deriving (Eq, Ord, Read, Show)++_OptionalDeclaration = Core.Name "hydra.cpp.syntax.OptionalDeclaration"++_OptionalDeclaration_valueType = Core.Name "valueType"++_OptionalDeclaration_name = Core.Name "name"++-- | A set of lambda expressions combined via an overload pattern (e.g. a visitor helper)+newtype OverloadedLambdas =+ OverloadedLambdas {+ unOverloadedLambdas :: [LambdaExpression]}+ deriving (Eq, Ord, Read, Show)++_OverloadedLambdas = Core.Name "hydra.cpp.syntax.OverloadedLambdas"++-- | A C++ function or lambda parameter+data Parameter =+ Parameter {+ parameterType :: TypeExpression,+ parameterName :: String,+ parameterUnnamed :: Bool,+ parameterDefaultValue :: (Maybe Expression)}+ deriving (Eq, Ord, Read, Show)++_Parameter = Core.Name "hydra.cpp.syntax.Parameter"++_Parameter_type = Core.Name "type"++_Parameter_name = Core.Name "name"++_Parameter_unnamed = Core.Name "unnamed"++_Parameter_defaultValue = Core.Name "defaultValue"++-- | A std::visit-style pattern match: a visitor applied to a variant expression+data PatternMatch =+ PatternMatch {+ patternMatchVisitor :: Visitor,+ patternMatchVariant :: Expression}+ deriving (Eq, Ord, Read, Show)++_PatternMatch = Core.Name "hydra.cpp.syntax.PatternMatch"++_PatternMatch_visitor = Core.Name "visitor"++_PatternMatch_variant = Core.Name "variant"++-- | A C++ pointer member access expression (pointer->member)+data PointerMemberAccessOperation =+ PointerMemberAccessOperation {+ pointerMemberAccessOperationPointer :: PostfixExpression,+ pointerMemberAccessOperationMember :: String}+ deriving (Eq, Ord, Read, Show)++_PointerMemberAccessOperation = Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"++_PointerMemberAccessOperation_pointer = Core.Name "pointer"++_PointerMemberAccessOperation_member = Core.Name "member"++-- | A C++ postfix-expression: a primary expression optionally followed by a postfix operation+data PostfixExpression =+ PostfixExpressionPrimary PrimaryExpression |+ PostfixExpressionSubscript SubscriptOperation |+ PostfixExpressionFunctionCall FunctionCallOperation |+ PostfixExpressionTemplateFunctionCall TemplateFunctionCallOperation |+ PostfixExpressionMemberAccess MemberAccessOperation |+ PostfixExpressionPointerMemberAccess PointerMemberAccessOperation |+ PostfixExpressionPostIncrement PostfixExpression |+ PostfixExpressionPostDecrement PostfixExpression+ deriving (Eq, Ord, Read, Show)++_PostfixExpression = Core.Name "hydra.cpp.syntax.PostfixExpression"++_PostfixExpression_primary = Core.Name "primary"++_PostfixExpression_subscript = Core.Name "subscript"++_PostfixExpression_functionCall = Core.Name "functionCall"++_PostfixExpression_templateFunctionCall = Core.Name "templateFunctionCall"++_PostfixExpression_memberAccess = Core.Name "memberAccess"++_PostfixExpression_pointerMemberAccess = Core.Name "pointerMemberAccess"++_PostfixExpression_postIncrement = Core.Name "postIncrement"++_PostfixExpression_postDecrement = Core.Name "postDecrement"++-- | A C preprocessor #pragma directive+data PragmaDirective =+ PragmaDirective {+ pragmaDirectiveContent :: String}+ deriving (Eq, Ord, Read, Show)++_PragmaDirective = Core.Name "hydra.cpp.syntax.PragmaDirective"++_PragmaDirective_content = Core.Name "content"++-- | A C preprocessor directive+data PreprocessorDirective =+ PreprocessorDirectiveInclude IncludeDirective |+ PreprocessorDirectivePragma PragmaDirective |+ PreprocessorDirectiveDefine DefineDirective |+ PreprocessorDirectiveUndef UndefDirective |+ PreprocessorDirectiveIfdef IfdefDirective |+ PreprocessorDirectiveIfndef IfndefDirective |+ PreprocessorDirectiveIf IfDirective |+ PreprocessorDirectiveElif ElifDirective |+ PreprocessorDirectiveElse ElseDirective |+ PreprocessorDirectiveEndif EndifDirective |+ PreprocessorDirectiveLine LineDirective |+ PreprocessorDirectiveError ErrorDirective |+ PreprocessorDirectiveWarning WarningDirective+ deriving (Eq, Ord, Read, Show)++_PreprocessorDirective = Core.Name "hydra.cpp.syntax.PreprocessorDirective"++_PreprocessorDirective_include = Core.Name "include"++_PreprocessorDirective_pragma = Core.Name "pragma"++_PreprocessorDirective_define = Core.Name "define"++_PreprocessorDirective_undef = Core.Name "undef"++_PreprocessorDirective_ifdef = Core.Name "ifdef"++_PreprocessorDirective_ifndef = Core.Name "ifndef"++_PreprocessorDirective_if = Core.Name "if"++_PreprocessorDirective_elif = Core.Name "elif"++_PreprocessorDirective_else = Core.Name "else"++_PreprocessorDirective_endif = Core.Name "endif"++_PreprocessorDirective_line = Core.Name "line"++_PreprocessorDirective_error = Core.Name "error"++_PreprocessorDirective_warning = Core.Name "warning"++-- | A C++ primary-expression: an identifier, a literal, a parenthesized expression, or a lambda+data PrimaryExpression =+ PrimaryExpressionIdentifier String |+ PrimaryExpressionLiteral Literal |+ PrimaryExpressionParenthesized Expression |+ PrimaryExpressionLambda LambdaExpression+ deriving (Eq, Ord, Read, Show)++_PrimaryExpression = Core.Name "hydra.cpp.syntax.PrimaryExpression"++_PrimaryExpression_identifier = Core.Name "identifier"++_PrimaryExpression_literal = Core.Name "literal"++_PrimaryExpression_parenthesized = Core.Name "parenthesized"++_PrimaryExpression_lambda = Core.Name "lambda"++-- | A declaration of a product type as a C++ struct with named fields+data ProductDeclaration =+ ProductDeclaration {+ productDeclarationName :: String,+ productDeclarationFields :: [VariableDeclaration]}+ deriving (Eq, Ord, Read, Show)++_ProductDeclaration = Core.Name "hydra.cpp.syntax.ProductDeclaration"++_ProductDeclaration_name = Core.Name "name"++_ProductDeclaration_fields = Core.Name "fields"++-- | A complete C++ source or header file: preprocessor directives, includes, and declarations+data Program =+ Program {+ programPreprocessorDirectives :: [PreprocessorDirective],+ programIncludes :: [IncludeDirective],+ programDeclarations :: [Declaration]}+ deriving (Eq, Ord, Read, Show)++_Program = Core.Name "hydra.cpp.syntax.Program"++_Program_preprocessorDirectives = Core.Name "preprocessorDirectives"++_Program_includes = Core.Name "includes"++_Program_declarations = Core.Name "declarations"++-- | A C++ namespace-qualified identifier (namespace::name)+data QualifiedIdentifier =+ QualifiedIdentifier {+ qualifiedIdentifierNamespace :: String,+ qualifiedIdentifierName :: String}+ deriving (Eq, Ord, Read, Show)++_QualifiedIdentifier = Core.Name "hydra.cpp.syntax.QualifiedIdentifier"++_QualifiedIdentifier_namespace = Core.Name "namespace"++_QualifiedIdentifier_name = Core.Name "name"++-- | A C++ type expression qualified by const, a reference, or a pointer+data QualifiedType =+ QualifiedType {+ qualifiedTypeBaseType :: TypeExpression,+ qualifiedTypeQualifier :: TypeQualifier}+ deriving (Eq, Ord, Read, Show)++_QualifiedType = Core.Name "hydra.cpp.syntax.QualifiedType"++_QualifiedType_baseType = Core.Name "baseType"++_QualifiedType_qualifier = Core.Name "qualifier"++-- | A C++ range-based for statement+data RangeForStatement =+ RangeForStatement {+ rangeForStatementType :: TypeExpression,+ rangeForStatementVariable :: String,+ rangeForStatementRange :: Expression,+ rangeForStatementBody :: Statement}+ deriving (Eq, Ord, Read, Show)++_RangeForStatement = Core.Name "hydra.cpp.syntax.RangeForStatement"++_RangeForStatement_type = Core.Name "type"++_RangeForStatement_variable = Core.Name "variable"++_RangeForStatement_range = Core.Name "range"++_RangeForStatement_body = Core.Name "body"++-- | A C++ relational-expression: a shift expression or a relational comparison+data RelationalExpression =+ RelationalExpressionShift ShiftExpression |+ RelationalExpressionLess LessOperation |+ RelationalExpressionGreater GreaterOperation |+ RelationalExpressionLessEqual LessEqualOperation |+ RelationalExpressionGreaterEqual GreaterEqualOperation+ deriving (Eq, Ord, Read, Show)++_RelationalExpression = Core.Name "hydra.cpp.syntax.RelationalExpression"++_RelationalExpression_shift = Core.Name "shift"++_RelationalExpression_less = Core.Name "less"++_RelationalExpression_greater = Core.Name "greater"++_RelationalExpression_lessEqual = Core.Name "lessEqual"++_RelationalExpression_greaterEqual = Core.Name "greaterEqual"++-- | A C++ right shift expression (left >> right)+data RightShiftOperation =+ RightShiftOperation {+ rightShiftOperationLeft :: ShiftExpression,+ rightShiftOperationRight :: AdditiveExpression}+ deriving (Eq, Ord, Read, Show)++_RightShiftOperation = Core.Name "hydra.cpp.syntax.RightShiftOperation"++_RightShiftOperation_left = Core.Name "left"++_RightShiftOperation_right = Core.Name "right"++-- | A C++ if statement, with an optional else branch+data SelectionStatement =+ SelectionStatement {+ selectionStatementCondition :: Expression,+ selectionStatementThenBranch :: Statement,+ selectionStatementElseBranch :: (Maybe Statement)}+ deriving (Eq, Ord, Read, Show)++_SelectionStatement = Core.Name "hydra.cpp.syntax.SelectionStatement"++_SelectionStatement_condition = Core.Name "condition"++_SelectionStatement_thenBranch = Core.Name "thenBranch"++_SelectionStatement_elseBranch = Core.Name "elseBranch"++-- | A C++ std::set literal, with an element type and elements+data Set =+ Set {+ setElementType :: TypeExpression,+ setElements :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_Set = Core.Name "hydra.cpp.syntax.Set"++_Set_elementType = Core.Name "elementType"++_Set_elements = Core.Name "elements"++-- | A declaration of a named std::set type alias+data SetDeclaration =+ SetDeclaration {+ setDeclarationElementType :: TypeExpression,+ setDeclarationName :: String}+ deriving (Eq, Ord, Read, Show)++_SetDeclaration = Core.Name "hydra.cpp.syntax.SetDeclaration"++_SetDeclaration_elementType = Core.Name "elementType"++_SetDeclaration_name = Core.Name "name"++-- | A C++ shift-expression: an additive expression, a left shift, or a right shift+data ShiftExpression =+ ShiftExpressionAdditive AdditiveExpression |+ ShiftExpressionLeftShift LeftShiftOperation |+ ShiftExpressionRightShift RightShiftOperation+ deriving (Eq, Ord, Read, Show)++_ShiftExpression = Core.Name "hydra.cpp.syntax.ShiftExpression"++_ShiftExpression_additive = Core.Name "additive"++_ShiftExpression_leftShift = Core.Name "leftShift"++_ShiftExpression_rightShift = Core.Name "rightShift"++-- | A C++ sizeof expression applied to a type+newtype SizeofExpression =+ SizeofExpression {+ unSizeofExpression :: TypeExpression}+ deriving (Eq, Ord, Read, Show)++_SizeofExpression = Core.Name "hydra.cpp.syntax.SizeofExpression"++-- | A C++ statement+data Statement =+ StatementLabeled LabeledStatement |+ StatementCompound CompoundStatement |+ StatementSelection SelectionStatement |+ StatementSwitch SwitchStatement |+ StatementIteration IterationStatement |+ StatementJump JumpStatement |+ StatementDeclaration VariableDeclaration |+ StatementExpression Expression+ deriving (Eq, Ord, Read, Show)++_Statement = Core.Name "hydra.cpp.syntax.Statement"++_Statement_labeled = Core.Name "labeled"++_Statement_compound = Core.Name "compound"++_Statement_selection = Core.Name "selection"++_Statement_switch = Core.Name "switch"++_Statement_iteration = Core.Name "iteration"++_Statement_jump = Core.Name "jump"++_Statement_declaration = Core.Name "declaration"++_Statement_expression = Core.Name "expression"++-- | A C++ string literal+newtype StringLiteral =+ StringLiteral {+ unStringLiteral :: String}+ deriving (Eq, Ord, Read, Show)++_StringLiteral = Core.Name "hydra.cpp.syntax.StringLiteral"++-- | A C++ array subscript expression (array[index])+data SubscriptOperation =+ SubscriptOperation {+ subscriptOperationArray :: PostfixExpression,+ subscriptOperationIndex :: Expression}+ deriving (Eq, Ord, Read, Show)++_SubscriptOperation = Core.Name "hydra.cpp.syntax.SubscriptOperation"++_SubscriptOperation_array = Core.Name "array"++_SubscriptOperation_index = Core.Name "index"++-- | A C++ subtraction expression (left - right)+data SubtractOperation =+ SubtractOperation {+ subtractOperationLeft :: AdditiveExpression,+ subtractOperationRight :: MultiplicativeExpression}+ deriving (Eq, Ord, Read, Show)++_SubtractOperation = Core.Name "hydra.cpp.syntax.SubtractOperation"++_SubtractOperation_left = Core.Name "left"++_SubtractOperation_right = Core.Name "right"++-- | A C++ switch statement+data SwitchStatement =+ SwitchStatement {+ switchStatementValue :: Expression,+ switchStatementCases :: [CaseStatement]}+ deriving (Eq, Ord, Read, Show)++_SwitchStatement = Core.Name "hydra.cpp.syntax.SwitchStatement"++_SwitchStatement_value = Core.Name "value"++_SwitchStatement_cases = Core.Name "cases"++-- | A single argument to a C++ template instantiation: a type or a value+data TemplateArgument =+ TemplateArgumentType TypeExpression |+ TemplateArgumentValue Expression+ deriving (Eq, Ord, Read, Show)++_TemplateArgument = Core.Name "hydra.cpp.syntax.TemplateArgument"++_TemplateArgument_type = Core.Name "type"++_TemplateArgument_value = Core.Name "value"++-- | A C++ template declaration wrapping a class or function declaration+data TemplateDeclaration =+ TemplateDeclaration {+ templateDeclarationInline :: Bool,+ templateDeclarationParameters :: [String],+ templateDeclarationDeclaration :: Declaration}+ deriving (Eq, Ord, Read, Show)++_TemplateDeclaration = Core.Name "hydra.cpp.syntax.TemplateDeclaration"++_TemplateDeclaration_inline = Core.Name "inline"++_TemplateDeclaration_parameters = Core.Name "parameters"++_TemplateDeclaration_declaration = Core.Name "declaration"++-- | A C++ explicit template function call (func<Args...>(arguments))+data TemplateFunctionCallOperation =+ TemplateFunctionCallOperation {+ templateFunctionCallOperationFunction :: PostfixExpression,+ templateFunctionCallOperationTemplateArguments :: [TemplateArgument],+ templateFunctionCallOperationArguments :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_TemplateFunctionCallOperation = Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"++_TemplateFunctionCallOperation_function = Core.Name "function"++_TemplateFunctionCallOperation_templateArguments = Core.Name "templateArguments"++_TemplateFunctionCallOperation_arguments = Core.Name "arguments"++-- | A C++ template instantiation type (e.g. std::vector<int>)+data TemplateType =+ TemplateType {+ templateTypeName :: String,+ templateTypeArguments :: [TemplateArgument]}+ deriving (Eq, Ord, Read, Show)++_TemplateType = Core.Name "hydra.cpp.syntax.TemplateType"++_TemplateType_name = Core.Name "name"++_TemplateType_arguments = Core.Name "arguments"++-- | A C++ ternary conditional expression (condition ? trueExpr : falseExpr)+data TernaryExpression =+ TernaryExpression {+ ternaryExpressionCondition :: LogicalOrExpression,+ ternaryExpressionTrueExpr :: Expression,+ ternaryExpressionFalseExpr :: ConditionalExpression}+ deriving (Eq, Ord, Read, Show)++_TernaryExpression = Core.Name "hydra.cpp.syntax.TernaryExpression"++_TernaryExpression_condition = Core.Name "condition"++_TernaryExpression_trueExpr = Core.Name "trueExpr"++_TernaryExpression_falseExpr = Core.Name "falseExpr"++-- | A C++ type expression+data TypeExpression =+ TypeExpressionBasic BasicType |+ TypeExpressionQualified QualifiedType |+ TypeExpressionTemplate TemplateType |+ TypeExpressionFunction FunctionType |+ TypeExpressionAuto+ deriving (Eq, Ord, Read, Show)++_TypeExpression = Core.Name "hydra.cpp.syntax.TypeExpression"++_TypeExpression_basic = Core.Name "basic"++_TypeExpression_qualified = Core.Name "qualified"++_TypeExpression_template = Core.Name "template"++_TypeExpression_function = Core.Name "function"++_TypeExpression_auto = Core.Name "auto"++-- | A C++ type qualifier: const, lvalue reference, rvalue reference, or pointer+data TypeQualifier =+ TypeQualifierConst |+ TypeQualifierLvalueRef |+ TypeQualifierRvalueRef |+ TypeQualifierPointer+ deriving (Eq, Ord, Read, Show)++_TypeQualifier = Core.Name "hydra.cpp.syntax.TypeQualifier"++_TypeQualifier_const = Core.Name "const"++_TypeQualifier_lvalueRef = Core.Name "lvalueRef"++_TypeQualifier_rvalueRef = Core.Name "rvalueRef"++_TypeQualifier_pointer = Core.Name "pointer"++-- | A C++ typedef or using type alias declaration+data TypedefDeclaration =+ TypedefDeclaration {+ typedefDeclarationName :: String,+ typedefDeclarationType :: TypeExpression,+ typedefDeclarationIsUsing :: Bool}+ deriving (Eq, Ord, Read, Show)++_TypedefDeclaration = Core.Name "hydra.cpp.syntax.TypedefDeclaration"++_TypedefDeclaration_name = Core.Name "name"++_TypedefDeclaration_type = Core.Name "type"++_TypedefDeclaration_isUsing = Core.Name "isUsing"++-- | A C++ unary-expression: a postfix expression, a unary operation, or a sizeof expression+data UnaryExpression =+ UnaryExpressionPostfix PostfixExpression |+ UnaryExpressionUnaryOp UnaryOperation |+ UnaryExpressionSizeof SizeofExpression+ deriving (Eq, Ord, Read, Show)++_UnaryExpression = Core.Name "hydra.cpp.syntax.UnaryExpression"++_UnaryExpression_postfix = Core.Name "postfix"++_UnaryExpression_unaryOp = Core.Name "unaryOp"++_UnaryExpression_sizeof = Core.Name "sizeof"++-- | A C++ unary operation applied to an operand (e.g. -x, !x, *x)+data UnaryOperation =+ UnaryOperation {+ unaryOperationOperator :: UnaryOperator,+ unaryOperationOperand :: UnaryExpression}+ deriving (Eq, Ord, Read, Show)++_UnaryOperation = Core.Name "hydra.cpp.syntax.UnaryOperation"++_UnaryOperation_operator = Core.Name "operator"++_UnaryOperation_operand = Core.Name "operand"++-- | A C++ unary operator+data UnaryOperator =+ UnaryOperatorPlus |+ UnaryOperatorMinus |+ UnaryOperatorLogicalNot |+ UnaryOperatorBitwiseNot |+ UnaryOperatorDereference |+ UnaryOperatorAddressOf |+ UnaryOperatorPreIncrement |+ UnaryOperatorPreDecrement+ deriving (Eq, Ord, Read, Show)++_UnaryOperator = Core.Name "hydra.cpp.syntax.UnaryOperator"++_UnaryOperator_plus = Core.Name "plus"++_UnaryOperator_minus = Core.Name "minus"++_UnaryOperator_logicalNot = Core.Name "logicalNot"++_UnaryOperator_bitwiseNot = Core.Name "bitwiseNot"++_UnaryOperator_dereference = Core.Name "dereference"++_UnaryOperator_addressOf = Core.Name "addressOf"++_UnaryOperator_preIncrement = Core.Name "preIncrement"++_UnaryOperator_preDecrement = Core.Name "preDecrement"++-- | A C preprocessor #undef directive+data UndefDirective =+ UndefDirective {+ undefDirectiveName :: String}+ deriving (Eq, Ord, Read, Show)++_UndefDirective = Core.Name "hydra.cpp.syntax.UndefDirective"++_UndefDirective_name = Core.Name "name"++-- | A C++ variable declaration, with an optional type (for auto) and initializer+data VariableDeclaration =+ VariableDeclaration {+ variableDeclarationType :: (Maybe TypeExpression),+ variableDeclarationName :: String,+ variableDeclarationInitializer :: (Maybe Expression),+ variableDeclarationIsAuto :: Bool}+ deriving (Eq, Ord, Read, Show)++_VariableDeclaration = Core.Name "hydra.cpp.syntax.VariableDeclaration"++_VariableDeclaration_type = Core.Name "type"++_VariableDeclaration_name = Core.Name "name"++_VariableDeclaration_initializer = Core.Name "initializer"++_VariableDeclaration_isAuto = Core.Name "isAuto"++-- | A declaration of a named std::variant type alias over a list of member types+data VariantDeclaration =+ VariantDeclaration {+ variantDeclarationTypes :: [TypeExpression],+ variantDeclarationName :: String}+ deriving (Eq, Ord, Read, Show)++_VariantDeclaration = Core.Name "hydra.cpp.syntax.VariantDeclaration"++_VariantDeclaration_types = Core.Name "types"++_VariantDeclaration_name = Core.Name "name"++-- | A C++ std::vector literal, with an element type and elements+data Vector =+ Vector {+ vectorElementType :: TypeExpression,+ vectorElements :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_Vector = Core.Name "hydra.cpp.syntax.Vector"++_Vector_elementType = Core.Name "elementType"++_Vector_elements = Core.Name "elements"++-- | A C++ visitor used in a pattern match: a single lambda or a set of overloaded lambdas+data Visitor =+ VisitorLambda LambdaExpression |+ VisitorOverloaded OverloadedLambdas+ deriving (Eq, Ord, Read, Show)++_Visitor = Core.Name "hydra.cpp.syntax.Visitor"++_Visitor_lambda = Core.Name "lambda"++_Visitor_overloaded = Core.Name "overloaded"++-- | A C preprocessor #warning directive+data WarningDirective =+ WarningDirective {+ warningDirectiveMessage :: String}+ deriving (Eq, Ord, Read, Show)++_WarningDirective = Core.Name "hydra.cpp.syntax.WarningDirective"++_WarningDirective_message = Core.Name "message"++-- | A C++ while statement+data WhileStatement =+ WhileStatement {+ whileStatementCondition :: Expression,+ whileStatementBody :: Statement}+ deriving (Eq, Ord, Read, Show)++_WhileStatement = Core.Name "hydra.cpp.syntax.WhileStatement"++_WhileStatement_condition = Core.Name "condition"++_WhileStatement_body = Core.Name "body"
src/main/haskell/Hydra/Cpp/Utils.hs view
@@ -1,15 +1,21 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | C++ utilities for constructing C++ syntax trees module Hydra.Cpp.Utils where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core import qualified Hydra.Cpp.Syntax as Syntax+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists@@ -18,9 +24,12 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -29,6 +38,7 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Create a const reference parameter constParameter :: String -> Syntax.TypeExpression -> Syntax.Parameter constParameter name typ =@@ -41,6 +51,7 @@ Syntax.parameterName = name, Syntax.parameterUnnamed = False, Syntax.parameterDefaultValue = Nothing}+ -- | Create a C++ class declaration cppClassDeclaration :: String -> [Syntax.BaseSpecifier] -> Maybe Syntax.ClassBody -> Syntax.Declaration cppClassDeclaration name baseSpecs mbody =@@ -50,6 +61,7 @@ Syntax.classSpecifierName = name, Syntax.classSpecifierInheritance = baseSpecs}, Syntax.classDeclarationBody = mbody})+ -- | Create a C++ enum class declaration cppEnumDeclaration :: String -> Maybe Syntax.ClassBody -> Syntax.Declaration cppEnumDeclaration name mbody =@@ -59,6 +71,7 @@ Syntax.classSpecifierName = name, Syntax.classSpecifierInheritance = []}, Syntax.classDeclarationBody = mbody})+ -- | Create a C++ enum class forward declaration cppEnumForwardDeclaration :: String -> Syntax.Declaration cppEnumForwardDeclaration name =@@ -68,48 +81,60 @@ Syntax.classSpecifierName = name, Syntax.classSpecifierInheritance = []}, Syntax.classDeclarationBody = Nothing})+ -- | Convert a PostfixExpression to an Expression cppPostfixExpressionToCppExpression :: Syntax.PostfixExpression -> Syntax.Expression cppPostfixExpressionToCppExpression pf = cppUnaryExpressionToCppExpression (Syntax.UnaryExpressionPostfix pf)+ -- | Convert a PrimaryExpression to an Expression cppPrimaryExpressionToCppExpression :: Syntax.PrimaryExpression -> Syntax.Expression cppPrimaryExpressionToCppExpression prim = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary prim)+ -- | Convert a UnaryExpression to an Expression cppUnaryExpressionToCppExpression :: Syntax.UnaryExpression -> Syntax.Expression cppUnaryExpressionToCppExpression ue = Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionLogicalOr (cppUnaryExpressionToCppLogicalOrExpression ue)))+ -- | Convert a UnaryExpression to a LogicalOrExpression cppUnaryExpressionToCppLogicalOrExpression :: Syntax.UnaryExpression -> Syntax.LogicalOrExpression cppUnaryExpressionToCppLogicalOrExpression ue = Syntax.LogicalOrExpressionLogicalAnd (Syntax.LogicalAndExpressionInclusiveOr (Syntax.InclusiveOrExpressionExclusiveOr (Syntax.ExclusiveOrExpressionAnd (Syntax.AndExpressionEquality (Syntax.EqualityExpressionRelational (Syntax.RelationalExpressionShift (Syntax.ShiftExpressionAdditive (Syntax.AdditiveExpressionMultiplicative (Syntax.MultiplicativeExpressionUnary ue)))))))))+ -- | Create a cast expression createCastExpr :: t0 -> Syntax.Expression -> Syntax.Expression createCastExpr targetType expr = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionParenthesized (cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionParenthesized expr)))+ -- | Create a compound statement createCompoundStmt :: [Syntax.Statement] -> Syntax.CompoundStatement createCompoundStmt stmts = Syntax.CompoundStatement stmts+ -- | Create a const reference type createConstRefType :: Syntax.TypeExpression -> Syntax.TypeExpression createConstRefType baseType = createReferenceType (createConstType baseType)+ -- | Create a const-qualified type createConstType :: Syntax.TypeExpression -> Syntax.TypeExpression createConstType baseType = createQualifiedType baseType Syntax.TypeQualifierConst+ -- | Create a constructor body (default if no params, empty otherwise) createConstructorBody :: [t0] -> Syntax.FunctionBody createConstructorBody params = Logic.ifElse (Lists.null params) Syntax.FunctionBodyDefault emptyFunctionBody+ -- | Create an enum access expression createEnumAccessExpr :: String -> String -> Syntax.Expression createEnumAccessExpr enumName valueName = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionMemberAccess (Syntax.MemberAccessOperation { Syntax.memberAccessOperationObject = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier enumName)), Syntax.memberAccessOperationMember = valueName}))+ -- | Create a function call expression createFunctionCallExpr :: String -> [Syntax.Expression] -> Syntax.Expression createFunctionCallExpr funcName args = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation { Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier funcName)), Syntax.functionCallOperationArguments = args}))+ -- | Create a header file with pragma once createHeaderFile :: [Syntax.IncludeDirective] -> [Syntax.Declaration] -> Syntax.Program createHeaderFile includes decls =@@ -119,9 +144,11 @@ Syntax.pragmaDirectiveContent = "once"})], Syntax.programIncludes = includes, Syntax.programDeclarations = decls}+ -- | Create an identifier expression createIdentifierExpr :: String -> Syntax.Expression createIdentifierExpr name = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionIdentifier name)+ -- | Create a lambda expression createLambdaExpr :: [Syntax.Parameter] -> Syntax.Expression -> Syntax.Expression createLambdaExpr params body =@@ -131,54 +158,66 @@ Syntax.lambdaExpressionReturnType = Nothing, Syntax.lambdaExpressionBody = (Syntax.CompoundStatement [ Syntax.StatementExpression body])})))+ -- | Create a boolean literal expression createLiteralBoolExpr :: Bool -> Syntax.Expression createLiteralBoolExpr val = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralBoolean (Syntax.BooleanLiteral val)))+ -- | Create an integer literal expression createLiteralIntExpr :: Integer -> Syntax.Expression createLiteralIntExpr val = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteralDecimal val)))+ -- | Create a string literal expression createLiteralStringExpr :: String -> Syntax.Expression createLiteralStringExpr val = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral val)))+ -- | Create a member access expression createMemberAccessExpr :: Syntax.Expression -> String -> Syntax.Expression createMemberAccessExpr objExpr member = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionMemberAccess (Syntax.MemberAccessOperation { Syntax.memberAccessOperationObject = (extractPostfixExpression objExpr), Syntax.memberAccessOperationMember = member}))+ -- | Create a qualified type with a qualifier createQualifiedType :: Syntax.TypeExpression -> Syntax.TypeQualifier -> Syntax.TypeExpression createQualifiedType baseType qualifier = Syntax.TypeExpressionQualified (Syntax.QualifiedType { Syntax.qualifiedTypeBaseType = baseType, Syntax.qualifiedTypeQualifier = qualifier})+ -- | Create a reference type createReferenceType :: Syntax.TypeExpression -> Syntax.TypeExpression createReferenceType baseType = createQualifiedType baseType Syntax.TypeQualifierLvalueRef+ -- | Create a return statement with a value createReturnStmt :: Syntax.Expression -> Syntax.Statement createReturnStmt expr = Syntax.StatementJump (Syntax.JumpStatementReturnValue expr)+ -- | Create a void return statement createReturnVoidStmt :: Syntax.Statement createReturnVoidStmt = Syntax.StatementJump Syntax.JumpStatementReturnVoid+ -- | Create a template type createTemplateType :: String -> [Syntax.TypeExpression] -> Syntax.TypeExpression createTemplateType name args = Syntax.TypeExpressionTemplate (Syntax.TemplateType { Syntax.templateTypeName = name, Syntax.templateTypeArguments = (Lists.map (\a -> Syntax.TemplateArgumentType a) args)})+ -- | Create a *this expression createThisExpr :: Syntax.Expression createThisExpr = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "*this"))+ -- | Create a throw statement createThrowStmt :: String -> Syntax.Expression -> Syntax.Statement createThrowStmt exceptionType arg = Syntax.StatementJump (Syntax.JumpStatementThrow (createFunctionCallExpr exceptionType [ arg]))+ -- | Create a typeid(...).name() call expression createTypeIdNameCall :: Syntax.Expression createTypeIdNameCall =@@ -190,17 +229,21 @@ cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionParenthesized createThisExpr)]})), Syntax.memberAccessOperationMember = "name"})), Syntax.functionCallOperationArguments = []}))+ -- | Create a type name expression createTypeNameExpr :: String -> Syntax.Expression createTypeNameExpr typeName = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier typeName))+ -- | Create a variant expression createVariantExpr :: Syntax.Expression createVariantExpr = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "variant"))+ -- | An empty function body emptyFunctionBody :: Syntax.FunctionBody emptyFunctionBody = Syntax.FunctionBodyCompound (Syntax.CompoundStatement [])+ -- | Extract the PostfixExpression from a fully-wrapped Expression extractPostfixExpression :: Syntax.Expression -> Syntax.PostfixExpression extractPostfixExpression expr =@@ -233,22 +276,27 @@ _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error") _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error") _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")+ -- | Protected access specifier member specification memberSpecificationProtected :: Syntax.MemberSpecification memberSpecificationProtected = Syntax.MemberSpecificationAccessLabel Syntax.AccessSpecifierProtected+ -- | Public access specifier member specification memberSpecificationPublic :: Syntax.MemberSpecification memberSpecificationPublic = Syntax.MemberSpecificationAccessLabel Syntax.AccessSpecifierPublic+ -- | Create a string expression stringExpression :: String -> Syntax.Expression stringExpression s = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral s)))+ -- | Add const qualifier to a type toConstType :: Syntax.TypeExpression -> Syntax.TypeExpression toConstType baseType = Syntax.TypeExpressionQualified (Syntax.QualifiedType { Syntax.qualifiedTypeBaseType = baseType, Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierConst})+ -- | Create an unnamed parameter unnamedParameter :: String -> Syntax.TypeExpression -> Syntax.Parameter unnamedParameter name typ =
src/main/haskell/Hydra/Csharp/Language.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Language constraints and reserved words for C Sharp (C#) module Hydra.Csharp.Language where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Lexical as Lexical@@ -18,9 +24,12 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -30,6 +39,7 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Set as S+ -- | Language constraints for C Sharp (C#) csharpLanguage :: Coders.Language csharpLanguage =@@ -41,7 +51,23 @@ Coders.languageConstraintsIntegerTypes = integerTypes, Coders.languageConstraintsTermVariants = termVariants, Coders.languageConstraintsTypeVariants = typeVariants,- Coders.languageConstraintsTypes = typePredicate}}+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeaturePartialApplication,+ Coders.LanguageFeatureNestedCaseStatements,+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "cs")} where literalVariants = Sets.fromList [@@ -99,6 +125,7 @@ Variants.TypeVariantVariable, Variants.TypeVariantWrap] typePredicate = \_ -> True+ -- | A set of reserved words in C#. Both the "keywords" and "contextual keywords" are drawn from section 6.4.4 of the C# documentation: -- | https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#64-tokens csharpReservedWords :: S.Set String
src/main/haskell/Hydra/Csharp/Syntax.hs view
@@ -1,3276 +1,5296 @@ -- Note: this is an automatically generated file. Do not edit.--- | A C# syntax module based on the ANTLR grammar dated 02/07/2024 and available at:--- | https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/grammar--module Hydra.Csharp.Syntax where-import qualified Hydra.Core as Core-import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.Scientific as Sci-newtype Identifier =- Identifier {- unIdentifier :: String}- deriving (Eq, Ord, Read, Show)-_Identifier = Core.Name "hydra.csharp.syntax.Identifier"-newtype Keyword =- Keyword {- unKeyword :: String}- deriving (Eq, Ord, Read, Show)-_Keyword = Core.Name "hydra.csharp.syntax.Keyword"-data Literal =- LiteralBoolean Bool |- LiteralInteger IntegerLiteral |- LiteralReal Double |- LiteralCharacter String |- LiteralString String |- LiteralNull- deriving (Eq, Ord, Read, Show)-_Literal = Core.Name "hydra.csharp.syntax.Literal"-_Literal_boolean = Core.Name "boolean"-_Literal_integer = Core.Name "integer"-_Literal_real = Core.Name "real"-_Literal_character = Core.Name "character"-_Literal_string = Core.Name "string"-_Literal_null = Core.Name "null"-data IntegerLiteral =- IntegerLiteralDecimal String |- IntegerLiteralHexadecimal String |- IntegerLiteralBinary Integer- deriving (Eq, Ord, Read, Show)-_IntegerLiteral = Core.Name "hydra.csharp.syntax.IntegerLiteral"-_IntegerLiteral_decimal = Core.Name "decimal"-_IntegerLiteral_hexadecimal = Core.Name "hexadecimal"-_IntegerLiteral_binary = Core.Name "binary"-newtype NamespaceName =- NamespaceName {- unNamespaceName :: NamespaceOrTypeName}- deriving (Eq, Ord, Read, Show)-_NamespaceName = Core.Name "hydra.csharp.syntax.NamespaceName"-newtype TypeName =- TypeName {- unTypeName :: NamespaceOrTypeName}- deriving (Eq, Ord, Read, Show)-_TypeName = Core.Name "hydra.csharp.syntax.TypeName"-data NamespaceOrTypeName =- NamespaceOrTypeNameIdentifier IdentifierNamespaceOrTypeName |- NamespaceOrTypeNameQualified QualifiedNamespaceOrTypeName |- NamespaceOrTypeNameAlias QualifiedAliasMember- deriving (Eq, Ord, Read, Show)-_NamespaceOrTypeName = Core.Name "hydra.csharp.syntax.NamespaceOrTypeName"-_NamespaceOrTypeName_identifier = Core.Name "identifier"-_NamespaceOrTypeName_qualified = Core.Name "qualified"-_NamespaceOrTypeName_alias = Core.Name "alias"-data IdentifierNamespaceOrTypeName =- IdentifierNamespaceOrTypeName {- identifierNamespaceOrTypeNameIdentifier :: Identifier,- identifierNamespaceOrTypeNameArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_IdentifierNamespaceOrTypeName = Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"-_IdentifierNamespaceOrTypeName_identifier = Core.Name "identifier"-_IdentifierNamespaceOrTypeName_arguments = Core.Name "arguments"-data QualifiedNamespaceOrTypeName =- QualifiedNamespaceOrTypeName {- qualifiedNamespaceOrTypeNameNamespaceOrType :: NamespaceOrTypeName,- qualifiedNamespaceOrTypeNameIdentifier :: Identifier,- qualifiedNamespaceOrTypeNameArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_QualifiedNamespaceOrTypeName = Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"-_QualifiedNamespaceOrTypeName_namespaceOrType = Core.Name "namespaceOrType"-_QualifiedNamespaceOrTypeName_identifier = Core.Name "identifier"-_QualifiedNamespaceOrTypeName_arguments = Core.Name "arguments"-data Type =- TypeReference ReferenceType |- TypeValue ValueType |- TypeParam TypeParameter |- TypePointer PointerType- deriving (Eq, Ord, Read, Show)-_Type = Core.Name "hydra.csharp.syntax.Type"-_Type_reference = Core.Name "reference"-_Type_value = Core.Name "value"-_Type_param = Core.Name "param"-_Type_pointer = Core.Name "pointer"-data ReferenceType =- ReferenceTypeClass ClassType |- ReferenceTypeInterface InterfaceType |- ReferenceTypeArray ArrayType |- ReferenceTypeDelegate DelegateType |- ReferenceTypeDynamic- deriving (Eq, Ord, Read, Show)-_ReferenceType = Core.Name "hydra.csharp.syntax.ReferenceType"-_ReferenceType_class = Core.Name "class"-_ReferenceType_interface = Core.Name "interface"-_ReferenceType_array = Core.Name "array"-_ReferenceType_delegate = Core.Name "delegate"-_ReferenceType_dynamic = Core.Name "dynamic"-data ClassType =- ClassTypeTypeName TypeName |- ClassTypeObject |- ClassTypeString- deriving (Eq, Ord, Read, Show)-_ClassType = Core.Name "hydra.csharp.syntax.ClassType"-_ClassType_typeName = Core.Name "typeName"-_ClassType_object = Core.Name "object"-_ClassType_string = Core.Name "string"-newtype InterfaceType =- InterfaceType {- unInterfaceType :: TypeName}- deriving (Eq, Ord, Read, Show)-_InterfaceType = Core.Name "hydra.csharp.syntax.InterfaceType"-data ArrayType =- ArrayType {- arrayTypeType :: NonArrayType,- arrayTypeRank :: [RankSpecifier]}- deriving (Eq, Ord, Read, Show)-_ArrayType = Core.Name "hydra.csharp.syntax.ArrayType"-_ArrayType_type = Core.Name "type"-_ArrayType_rank = Core.Name "rank"-data NonArrayType =- NonArrayTypeValue ValueType |- NonArrayTypeClass ClassType |- NonArrayTypeInterface InterfaceType |- NonArrayTypeDelegate DelegateType |- NonArrayTypeDynamic |- NonArrayTypeParameter TypeParameter |- NonArrayTypePointer PointerType- deriving (Eq, Ord, Read, Show)-_NonArrayType = Core.Name "hydra.csharp.syntax.NonArrayType"-_NonArrayType_value = Core.Name "value"-_NonArrayType_class = Core.Name "class"-_NonArrayType_interface = Core.Name "interface"-_NonArrayType_delegate = Core.Name "delegate"-_NonArrayType_dynamic = Core.Name "dynamic"-_NonArrayType_parameter = Core.Name "parameter"-_NonArrayType_pointer = Core.Name "pointer"-newtype RankSpecifier =- RankSpecifier {- unRankSpecifier :: Int}- deriving (Eq, Ord, Read, Show)-_RankSpecifier = Core.Name "hydra.csharp.syntax.RankSpecifier"-newtype DelegateType =- DelegateType {- unDelegateType :: TypeName}- deriving (Eq, Ord, Read, Show)-_DelegateType = Core.Name "hydra.csharp.syntax.DelegateType"-data ValueType =- ValueTypeNonNullable StructOrEnumType |- ValueTypeNullable StructOrEnumType- deriving (Eq, Ord, Read, Show)-_ValueType = Core.Name "hydra.csharp.syntax.ValueType"-_ValueType_nonNullable = Core.Name "nonNullable"-_ValueType_nullable = Core.Name "nullable"-data StructOrEnumType =- StructOrEnumTypeStruct StructType |- StructOrEnumTypeEnum EnumType- deriving (Eq, Ord, Read, Show)-_StructOrEnumType = Core.Name "hydra.csharp.syntax.StructOrEnumType"-_StructOrEnumType_struct = Core.Name "struct"-_StructOrEnumType_enum = Core.Name "enum"-data StructType =- StructTypeTypeName TypeName |- StructTypeSimple SimpleType |- StructTypeTuple TupleType- deriving (Eq, Ord, Read, Show)-_StructType = Core.Name "hydra.csharp.syntax.StructType"-_StructType_typeName = Core.Name "typeName"-_StructType_simple = Core.Name "simple"-_StructType_tuple = Core.Name "tuple"-data SimpleType =- SimpleTypeNumeric NumericType |- SimpleTypeBool- deriving (Eq, Ord, Read, Show)-_SimpleType = Core.Name "hydra.csharp.syntax.SimpleType"-_SimpleType_numeric = Core.Name "numeric"-_SimpleType_bool = Core.Name "bool"-data NumericType =- NumericTypeIntegral IntegralType |- NumericTypeFloatingPoint FloatingPointType |- NumericTypeDecimal- deriving (Eq, Ord, Read, Show)-_NumericType = Core.Name "hydra.csharp.syntax.NumericType"-_NumericType_integral = Core.Name "integral"-_NumericType_floatingPoint = Core.Name "floatingPoint"-_NumericType_decimal = Core.Name "decimal"-data IntegralType =- IntegralTypeSbyte |- IntegralTypeByte |- IntegralTypeShort |- IntegralTypeUshort |- IntegralTypeInt |- IntegralTypeUint |- IntegralTypeLong |- IntegralTypeUlong |- IntegralTypeChar- deriving (Eq, Ord, Read, Show)-_IntegralType = Core.Name "hydra.csharp.syntax.IntegralType"-_IntegralType_sbyte = Core.Name "sbyte"-_IntegralType_byte = Core.Name "byte"-_IntegralType_short = Core.Name "short"-_IntegralType_ushort = Core.Name "ushort"-_IntegralType_int = Core.Name "int"-_IntegralType_uint = Core.Name "uint"-_IntegralType_long = Core.Name "long"-_IntegralType_ulong = Core.Name "ulong"-_IntegralType_char = Core.Name "char"-data FloatingPointType =- FloatingPointTypeFloat |- FloatingPointTypeDouble- deriving (Eq, Ord, Read, Show)-_FloatingPointType = Core.Name "hydra.csharp.syntax.FloatingPointType"-_FloatingPointType_float = Core.Name "float"-_FloatingPointType_double = Core.Name "double"-newtype TupleType =- TupleType {- unTupleType :: [TupleTypeElement]}- deriving (Eq, Ord, Read, Show)-_TupleType = Core.Name "hydra.csharp.syntax.TupleType"-data TupleTypeElement =- TupleTypeElement {- tupleTypeElementType :: Type,- tupleTypeElementIdentifier :: (Maybe Identifier)}- deriving (Eq, Ord, Read, Show)-_TupleTypeElement = Core.Name "hydra.csharp.syntax.TupleTypeElement"-_TupleTypeElement_type = Core.Name "type"-_TupleTypeElement_identifier = Core.Name "identifier"-newtype EnumType =- EnumType {- unEnumType :: TypeName}- deriving (Eq, Ord, Read, Show)-_EnumType = Core.Name "hydra.csharp.syntax.EnumType"-newtype TypeArgumentList =- TypeArgumentList {- unTypeArgumentList :: [Type]}- deriving (Eq, Ord, Read, Show)-_TypeArgumentList = Core.Name "hydra.csharp.syntax.TypeArgumentList"-newtype TypeParameter =- TypeParameter {- unTypeParameter :: Identifier}- deriving (Eq, Ord, Read, Show)-_TypeParameter = Core.Name "hydra.csharp.syntax.TypeParameter"-data UnmanagedType =- UnmanagedTypeValue ValueType |- UnmanagedTypePointer PointerType- deriving (Eq, Ord, Read, Show)-_UnmanagedType = Core.Name "hydra.csharp.syntax.UnmanagedType"-_UnmanagedType_value = Core.Name "value"-_UnmanagedType_pointer = Core.Name "pointer"-newtype VariableReference =- VariableReference {- unVariableReference :: Expression}- deriving (Eq, Ord, Read, Show)-_VariableReference = Core.Name "hydra.csharp.syntax.VariableReference"-data Pattern =- PatternDeclaration DeclarationPattern |- PatternConstant Expression |- PatternVar Designation- deriving (Eq, Ord, Read, Show)-_Pattern = Core.Name "hydra.csharp.syntax.Pattern"-_Pattern_declaration = Core.Name "declaration"-_Pattern_constant = Core.Name "constant"-_Pattern_var = Core.Name "var"-data DeclarationPattern =- DeclarationPattern {- declarationPatternType :: Type,- declarationPatternDesignation :: Designation}- deriving (Eq, Ord, Read, Show)-_DeclarationPattern = Core.Name "hydra.csharp.syntax.DeclarationPattern"-_DeclarationPattern_type = Core.Name "type"-_DeclarationPattern_designation = Core.Name "designation"-newtype Designation =- Designation {- unDesignation :: Identifier}- deriving (Eq, Ord, Read, Show)-_Designation = Core.Name "hydra.csharp.syntax.Designation"-newtype ArgumentList =- ArgumentList {- unArgumentList :: [Argument]}- deriving (Eq, Ord, Read, Show)-_ArgumentList = Core.Name "hydra.csharp.syntax.ArgumentList"-data Argument =- Argument {- argumentName :: (Maybe Identifier),- argumentValue :: ArgumentValue}- deriving (Eq, Ord, Read, Show)-_Argument = Core.Name "hydra.csharp.syntax.Argument"-_Argument_name = Core.Name "name"-_Argument_value = Core.Name "value"-data ArgumentValue =- ArgumentValueExpression Expression |- ArgumentValueIn VariableReference |- ArgumentValueRef VariableReference |- ArgumentValueOut VariableReference- deriving (Eq, Ord, Read, Show)-_ArgumentValue = Core.Name "hydra.csharp.syntax.ArgumentValue"-_ArgumentValue_expression = Core.Name "expression"-_ArgumentValue_in = Core.Name "in"-_ArgumentValue_ref = Core.Name "ref"-_ArgumentValue_out = Core.Name "out"-data PrimaryExpression =- PrimaryExpressionNoArray PrimaryNoArrayCreationExpression |- PrimaryExpressionArray ArrayCreationExpression- deriving (Eq, Ord, Read, Show)-_PrimaryExpression = Core.Name "hydra.csharp.syntax.PrimaryExpression"-_PrimaryExpression_noArray = Core.Name "noArray"-_PrimaryExpression_array = Core.Name "array"-data PrimaryNoArrayCreationExpression =- PrimaryNoArrayCreationExpressionLiteral Literal |- PrimaryNoArrayCreationExpressionInterpolatedString InterpolatedStringExpression |- PrimaryNoArrayCreationExpressionSimpleName SimpleName |- PrimaryNoArrayCreationExpressionParenthesized Expression |- PrimaryNoArrayCreationExpressionTuple TupleExpression |- PrimaryNoArrayCreationExpressionMemberAccess MemberAccess |- PrimaryNoArrayCreationExpressionNullConditionalMemberAccess NullConditionalMemberAccess |- PrimaryNoArrayCreationExpressionInvocation InvocationExpression |- PrimaryNoArrayCreationExpressionElementAccess ElementAccess |- PrimaryNoArrayCreationExpressionNullConditionalElementAccess NullConditionalElementAccess |- PrimaryNoArrayCreationExpressionThisAccess |- PrimaryNoArrayCreationExpressionBaseAccess BaseAccess |- PrimaryNoArrayCreationExpressionPostIncrement PrimaryExpression |- PrimaryNoArrayCreationExpressionPostDecrement PrimaryExpression |- PrimaryNoArrayCreationExpressionObjectCreation ObjectCreationExpression |- PrimaryNoArrayCreationExpressionDelegateCreation DelegateCreationExpression |- PrimaryNoArrayCreationExpressionAnonymousObjectCreation (Maybe MemberDeclaratorList) |- PrimaryNoArrayCreationExpressionTypeof TypeofExpression |- PrimaryNoArrayCreationExpressionSizeof UnmanagedType |- PrimaryNoArrayCreationExpressionChecked Expression |- PrimaryNoArrayCreationExpressionUnchecked Expression |- PrimaryNoArrayCreationExpressionDefaultValue DefaultValueExpression |- PrimaryNoArrayCreationExpressionNameof NamedEntity |- PrimaryNoArrayCreationExpressionAnonymousMethod AnonymousMethodExpression |- PrimaryNoArrayCreationExpressionPointerMemberAccess PointerMemberAccess |- PrimaryNoArrayCreationExpressionPointerElementAccess PointerElementAccess |- PrimaryNoArrayCreationExpressionStackalloc StackallocExpression- deriving (Eq, Ord, Read, Show)-_PrimaryNoArrayCreationExpression = Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"-_PrimaryNoArrayCreationExpression_literal = Core.Name "literal"-_PrimaryNoArrayCreationExpression_interpolatedString = Core.Name "interpolatedString"-_PrimaryNoArrayCreationExpression_simpleName = Core.Name "simpleName"-_PrimaryNoArrayCreationExpression_parenthesized = Core.Name "parenthesized"-_PrimaryNoArrayCreationExpression_tuple = Core.Name "tuple"-_PrimaryNoArrayCreationExpression_memberAccess = Core.Name "memberAccess"-_PrimaryNoArrayCreationExpression_nullConditionalMemberAccess = Core.Name "nullConditionalMemberAccess"-_PrimaryNoArrayCreationExpression_invocation = Core.Name "invocation"-_PrimaryNoArrayCreationExpression_elementAccess = Core.Name "elementAccess"-_PrimaryNoArrayCreationExpression_nullConditionalElementAccess = Core.Name "nullConditionalElementAccess"-_PrimaryNoArrayCreationExpression_thisAccess = Core.Name "thisAccess"-_PrimaryNoArrayCreationExpression_baseAccess = Core.Name "baseAccess"-_PrimaryNoArrayCreationExpression_postIncrement = Core.Name "postIncrement"-_PrimaryNoArrayCreationExpression_postDecrement = Core.Name "postDecrement"-_PrimaryNoArrayCreationExpression_objectCreation = Core.Name "objectCreation"-_PrimaryNoArrayCreationExpression_delegateCreation = Core.Name "delegateCreation"-_PrimaryNoArrayCreationExpression_anonymousObjectCreation = Core.Name "anonymousObjectCreation"-_PrimaryNoArrayCreationExpression_typeof = Core.Name "typeof"-_PrimaryNoArrayCreationExpression_sizeof = Core.Name "sizeof"-_PrimaryNoArrayCreationExpression_checked = Core.Name "checked"-_PrimaryNoArrayCreationExpression_unchecked = Core.Name "unchecked"-_PrimaryNoArrayCreationExpression_defaultValue = Core.Name "defaultValue"-_PrimaryNoArrayCreationExpression_nameof = Core.Name "nameof"-_PrimaryNoArrayCreationExpression_anonymousMethod = Core.Name "anonymousMethod"-_PrimaryNoArrayCreationExpression_pointerMemberAccess = Core.Name "pointerMemberAccess"-_PrimaryNoArrayCreationExpression_pointerElementAccess = Core.Name "pointerElementAccess"-_PrimaryNoArrayCreationExpression_stackalloc = Core.Name "stackalloc"-data InterpolatedStringExpression =- InterpolatedStringExpressionRegular InterpolatedRegularStringExpression |- InterpolatedStringExpressionVerbatim InterpolatedVerbatimStringExpression- deriving (Eq, Ord, Read, Show)-_InterpolatedStringExpression = Core.Name "hydra.csharp.syntax.InterpolatedStringExpression"-_InterpolatedStringExpression_regular = Core.Name "regular"-_InterpolatedStringExpression_verbatim = Core.Name "verbatim"-newtype InterpolatedRegularStringExpression =- InterpolatedRegularStringExpression {- unInterpolatedRegularStringExpression :: String}- deriving (Eq, Ord, Read, Show)-_InterpolatedRegularStringExpression = Core.Name "hydra.csharp.syntax.InterpolatedRegularStringExpression"-data RegularInterpolation =- RegularInterpolation {- regularInterpolationExpression :: Expression,- regularInterpolationWidth :: (Maybe Expression),- regularInterpolationFormat :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_RegularInterpolation = Core.Name "hydra.csharp.syntax.RegularInterpolation"-_RegularInterpolation_expression = Core.Name "expression"-_RegularInterpolation_width = Core.Name "width"-_RegularInterpolation_format = Core.Name "format"-newtype InterpolatedVerbatimStringExpression =- InterpolatedVerbatimStringExpression {- unInterpolatedVerbatimStringExpression :: String}- deriving (Eq, Ord, Read, Show)-_InterpolatedVerbatimStringExpression = Core.Name "hydra.csharp.syntax.InterpolatedVerbatimStringExpression"-data VerbatimInterpolation =- VerbatimInterpolation {- verbatimInterpolationExpression :: Expression,- verbatimInterpolationWidth :: (Maybe ConstantExpression),- verbatimInterpolationFormat :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_VerbatimInterpolation = Core.Name "hydra.csharp.syntax.VerbatimInterpolation"-_VerbatimInterpolation_expression = Core.Name "expression"-_VerbatimInterpolation_width = Core.Name "width"-_VerbatimInterpolation_format = Core.Name "format"-data SimpleName =- SimpleName {- simpleNameIdentifier :: Identifier,- simpleNameTypeArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_SimpleName = Core.Name "hydra.csharp.syntax.SimpleName"-_SimpleName_identifier = Core.Name "identifier"-_SimpleName_typeArguments = Core.Name "typeArguments"-data TupleExpression =- TupleExpressionElements [TupleElement] |- TupleExpressionDeconstruction DeconstructionTuple- deriving (Eq, Ord, Read, Show)-_TupleExpression = Core.Name "hydra.csharp.syntax.TupleExpression"-_TupleExpression_elements = Core.Name "elements"-_TupleExpression_deconstruction = Core.Name "deconstruction"-data TupleElement =- TupleElement {- tupleElementName :: (Maybe Identifier),- tupleElementExpression :: Expression}- deriving (Eq, Ord, Read, Show)-_TupleElement = Core.Name "hydra.csharp.syntax.TupleElement"-_TupleElement_name = Core.Name "name"-_TupleElement_expression = Core.Name "expression"-newtype DeconstructionTuple =- DeconstructionTuple {- unDeconstructionTuple :: [DeconstructionElement]}- deriving (Eq, Ord, Read, Show)-_DeconstructionTuple = Core.Name "hydra.csharp.syntax.DeconstructionTuple"-data DeconstructionElement =- DeconstructionElementTuple DeconstructionTuple |- DeconstructionElementIdentifier Identifier- deriving (Eq, Ord, Read, Show)-_DeconstructionElement = Core.Name "hydra.csharp.syntax.DeconstructionElement"-_DeconstructionElement_tuple = Core.Name "tuple"-_DeconstructionElement_identifier = Core.Name "identifier"-data MemberAccess =- MemberAccess {- memberAccessHead :: MemberAccessHead,- memberAccessIdentifier :: Identifier,- memberAccessTypeArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_MemberAccess = Core.Name "hydra.csharp.syntax.MemberAccess"-_MemberAccess_head = Core.Name "head"-_MemberAccess_identifier = Core.Name "identifier"-_MemberAccess_typeArguments = Core.Name "typeArguments"-data MemberAccessHead =- MemberAccessHeadPrimary PrimaryExpression |- MemberAccessHeadPredefined PredefinedType |- MemberAccessHeadQualifiedAlias QualifiedAliasMember- deriving (Eq, Ord, Read, Show)-_MemberAccessHead = Core.Name "hydra.csharp.syntax.MemberAccessHead"-_MemberAccessHead_primary = Core.Name "primary"-_MemberAccessHead_predefined = Core.Name "predefined"-_MemberAccessHead_qualifiedAlias = Core.Name "qualifiedAlias"-data PredefinedType =- PredefinedTypeBool |- PredefinedTypeByte |- PredefinedTypeChar |- PredefinedTypeDecimal |- PredefinedTypeDouble |- PredefinedTypeFloat |- PredefinedTypeInt |- PredefinedTypeLong |- PredefinedTypeObject |- PredefinedTypeSbyte |- PredefinedTypeShort |- PredefinedTypeString |- PredefinedTypeUint |- PredefinedTypeUlong |- PredefinedTypeUshort- deriving (Eq, Ord, Read, Show)-_PredefinedType = Core.Name "hydra.csharp.syntax.PredefinedType"-_PredefinedType_bool = Core.Name "bool"-_PredefinedType_byte = Core.Name "byte"-_PredefinedType_char = Core.Name "char"-_PredefinedType_decimal = Core.Name "decimal"-_PredefinedType_double = Core.Name "double"-_PredefinedType_float = Core.Name "float"-_PredefinedType_int = Core.Name "int"-_PredefinedType_long = Core.Name "long"-_PredefinedType_object = Core.Name "object"-_PredefinedType_sbyte = Core.Name "sbyte"-_PredefinedType_short = Core.Name "short"-_PredefinedType_string = Core.Name "string"-_PredefinedType_uint = Core.Name "uint"-_PredefinedType_ulong = Core.Name "ulong"-_PredefinedType_ushort = Core.Name "ushort"-data NullConditionalMemberAccess =- NullConditionalMemberAccess {- nullConditionalMemberAccessExpression :: PrimaryExpression,- nullConditionalMemberAccessIdentifier :: Identifier,- nullConditionalMemberAccessTypeArguments :: (Maybe TypeArgumentList),- nullConditionalMemberAccessDependentAccess :: [DependentAccess]}- deriving (Eq, Ord, Read, Show)-_NullConditionalMemberAccess = Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"-_NullConditionalMemberAccess_expression = Core.Name "expression"-_NullConditionalMemberAccess_identifier = Core.Name "identifier"-_NullConditionalMemberAccess_typeArguments = Core.Name "typeArguments"-_NullConditionalMemberAccess_dependentAccess = Core.Name "dependentAccess"-data DependentAccess =- DependentAccessMemberAccess DependentAccessForMember |- DependentAccessElementAccess ArgumentList |- DependentAccessInvocation (Maybe ArgumentList)- deriving (Eq, Ord, Read, Show)-_DependentAccess = Core.Name "hydra.csharp.syntax.DependentAccess"-_DependentAccess_memberAccess = Core.Name "memberAccess"-_DependentAccess_elementAccess = Core.Name "elementAccess"-_DependentAccess_invocation = Core.Name "invocation"-data DependentAccessForMember =- DependentAccessForMember {- dependentAccessForMemberIdentifier :: Identifier,- dependentAccessForMemberTypeArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_DependentAccessForMember = Core.Name "hydra.csharp.syntax.DependentAccessForMember"-_DependentAccessForMember_identifier = Core.Name "identifier"-_DependentAccessForMember_typeArguments = Core.Name "typeArguments"-data NullConditionalProjectionInitializer =- NullConditionalProjectionInitializer {- nullConditionalProjectionInitializerExpression :: PrimaryExpression,- nullConditionalProjectionInitializerIdentifier :: Identifier,- nullConditionalProjectionInitializerTypeArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_NullConditionalProjectionInitializer = Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"-_NullConditionalProjectionInitializer_expression = Core.Name "expression"-_NullConditionalProjectionInitializer_identifier = Core.Name "identifier"-_NullConditionalProjectionInitializer_typeArguments = Core.Name "typeArguments"-data InvocationExpression =- InvocationExpression {- invocationExpressionExpression :: PrimaryExpression,- invocationExpressionArguments :: (Maybe ArgumentList)}- deriving (Eq, Ord, Read, Show)-_InvocationExpression = Core.Name "hydra.csharp.syntax.InvocationExpression"-_InvocationExpression_expression = Core.Name "expression"-_InvocationExpression_arguments = Core.Name "arguments"-data NullConditionalInvocationExpression =- NullConditionalInvocationExpression {- nullConditionalInvocationExpressionHead :: NullConditionalInvocationExpressionHead,- nullConditionalInvocationExpressionArguments :: (Maybe ArgumentList)}- deriving (Eq, Ord, Read, Show)-_NullConditionalInvocationExpression = Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"-_NullConditionalInvocationExpression_head = Core.Name "head"-_NullConditionalInvocationExpression_arguments = Core.Name "arguments"-data NullConditionalInvocationExpressionHead =- NullConditionalInvocationExpressionHeadMember NullConditionalMemberAccess |- NullConditionalInvocationExpressionHeadElement NullConditionalElementAccess- deriving (Eq, Ord, Read, Show)-_NullConditionalInvocationExpressionHead = Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpressionHead"-_NullConditionalInvocationExpressionHead_member = Core.Name "member"-_NullConditionalInvocationExpressionHead_element = Core.Name "element"-data ElementAccess =- ElementAccess {- elementAccessExpression :: PrimaryNoArrayCreationExpression,- elementAccessArguments :: ArgumentList}- deriving (Eq, Ord, Read, Show)-_ElementAccess = Core.Name "hydra.csharp.syntax.ElementAccess"-_ElementAccess_expression = Core.Name "expression"-_ElementAccess_arguments = Core.Name "arguments"-data NullConditionalElementAccess =- NullConditionalElementAccess {- nullConditionalElementAccessExpression :: PrimaryNoArrayCreationExpression,- nullConditionalElementAccessArguments :: ArgumentList,- nullConditionalElementAccessDependentAccess :: [DependentAccess]}- deriving (Eq, Ord, Read, Show)-_NullConditionalElementAccess = Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"-_NullConditionalElementAccess_expression = Core.Name "expression"-_NullConditionalElementAccess_arguments = Core.Name "arguments"-_NullConditionalElementAccess_dependentAccess = Core.Name "dependentAccess"-data BaseAccess =- BaseAccessIdentifier BaseAccessWithIdentifier |- BaseAccessArguments ArgumentList- deriving (Eq, Ord, Read, Show)-_BaseAccess = Core.Name "hydra.csharp.syntax.BaseAccess"-_BaseAccess_identifier = Core.Name "identifier"-_BaseAccess_arguments = Core.Name "arguments"-data BaseAccessWithIdentifier =- BaseAccessWithIdentifier {- baseAccessWithIdentifierIdentifier :: Identifier,- baseAccessWithIdentifierTypeArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_BaseAccessWithIdentifier = Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"-_BaseAccessWithIdentifier_identifier = Core.Name "identifier"-_BaseAccessWithIdentifier_typeArguments = Core.Name "typeArguments"-data ObjectCreationExpression =- ObjectCreationExpression {- objectCreationExpressionType :: Type,- objectCreationExpressionArguments :: (Maybe ArgumentList),- objectCreationExpressionInitializer :: (Maybe ObjectOrCollectionInitializer)}- deriving (Eq, Ord, Read, Show)-_ObjectCreationExpression = Core.Name "hydra.csharp.syntax.ObjectCreationExpression"-_ObjectCreationExpression_type = Core.Name "type"-_ObjectCreationExpression_arguments = Core.Name "arguments"-_ObjectCreationExpression_initializer = Core.Name "initializer"-data ObjectOrCollectionInitializer =- ObjectOrCollectionInitializerObject [MemberInitializer] |- ObjectOrCollectionInitializerCollection [ElementInitializer]- deriving (Eq, Ord, Read, Show)-_ObjectOrCollectionInitializer = Core.Name "hydra.csharp.syntax.ObjectOrCollectionInitializer"-_ObjectOrCollectionInitializer_object = Core.Name "object"-_ObjectOrCollectionInitializer_collection = Core.Name "collection"-data MemberInitializer =- MemberInitializer {- memberInitializerTarget :: InitializerTarget,- memberInitializerValue :: InitializerValue}- deriving (Eq, Ord, Read, Show)-_MemberInitializer = Core.Name "hydra.csharp.syntax.MemberInitializer"-_MemberInitializer_target = Core.Name "target"-_MemberInitializer_value = Core.Name "value"-data InitializerTarget =- InitializerTargetIdentifier Identifier |- InitializerTargetArguments ArgumentList- deriving (Eq, Ord, Read, Show)-_InitializerTarget = Core.Name "hydra.csharp.syntax.InitializerTarget"-_InitializerTarget_identifier = Core.Name "identifier"-_InitializerTarget_arguments = Core.Name "arguments"-data InitializerValue =- InitializerValueExpression Expression |- InitializerValueObjectOrCollection ObjectOrCollectionInitializer- deriving (Eq, Ord, Read, Show)-_InitializerValue = Core.Name "hydra.csharp.syntax.InitializerValue"-_InitializerValue_expression = Core.Name "expression"-_InitializerValue_objectOrCollection = Core.Name "objectOrCollection"-data ElementInitializer =- ElementInitializerSingle NonAssignmentExpression |- ElementInitializerList ExpressionList- deriving (Eq, Ord, Read, Show)-_ElementInitializer = Core.Name "hydra.csharp.syntax.ElementInitializer"-_ElementInitializer_single = Core.Name "single"-_ElementInitializer_list = Core.Name "list"-newtype ExpressionList =- ExpressionList {- unExpressionList :: [Expression]}- deriving (Eq, Ord, Read, Show)-_ExpressionList = Core.Name "hydra.csharp.syntax.ExpressionList"-data ArrayCreationExpression =- ArrayCreationExpressionNonArrayType NonArrayTypeArrayCreationExpression |- ArrayCreationExpressionArrayType ArrayTypeArrayCreationExpression |- ArrayCreationExpressionRankSpecifier RankSpecifierArrayCreationExpression- deriving (Eq, Ord, Read, Show)-_ArrayCreationExpression = Core.Name "hydra.csharp.syntax.ArrayCreationExpression"-_ArrayCreationExpression_nonArrayType = Core.Name "nonArrayType"-_ArrayCreationExpression_arrayType = Core.Name "arrayType"-_ArrayCreationExpression_rankSpecifier = Core.Name "rankSpecifier"-data NonArrayTypeArrayCreationExpression =- NonArrayTypeArrayCreationExpression {- nonArrayTypeArrayCreationExpressionType :: NonArrayType,- nonArrayTypeArrayCreationExpressionExpressions :: ExpressionList,- nonArrayTypeArrayCreationExpressionRankSpecifiers :: [RankSpecifier],- nonArrayTypeArrayCreationExpressionInitializer :: (Maybe ArrayInitializer)}- deriving (Eq, Ord, Read, Show)-_NonArrayTypeArrayCreationExpression = Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"-_NonArrayTypeArrayCreationExpression_type = Core.Name "type"-_NonArrayTypeArrayCreationExpression_expressions = Core.Name "expressions"-_NonArrayTypeArrayCreationExpression_rankSpecifiers = Core.Name "rankSpecifiers"-_NonArrayTypeArrayCreationExpression_initializer = Core.Name "initializer"-data ArrayTypeArrayCreationExpression =- ArrayTypeArrayCreationExpression {- arrayTypeArrayCreationExpressionType :: ArrayType,- arrayTypeArrayCreationExpressionInitializer :: ArrayInitializer}- deriving (Eq, Ord, Read, Show)-_ArrayTypeArrayCreationExpression = Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"-_ArrayTypeArrayCreationExpression_type = Core.Name "type"-_ArrayTypeArrayCreationExpression_initializer = Core.Name "initializer"-data RankSpecifierArrayCreationExpression =- RankSpecifierArrayCreationExpression {- rankSpecifierArrayCreationExpressionRankSpecifier :: RankSpecifier,- rankSpecifierArrayCreationExpressionInitializer :: ArrayInitializer}- deriving (Eq, Ord, Read, Show)-_RankSpecifierArrayCreationExpression = Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"-_RankSpecifierArrayCreationExpression_rankSpecifier = Core.Name "rankSpecifier"-_RankSpecifierArrayCreationExpression_initializer = Core.Name "initializer"-data DelegateCreationExpression =- DelegateCreationExpression {- delegateCreationExpressionType :: DelegateType,- delegateCreationExpressionExpression :: Expression}- deriving (Eq, Ord, Read, Show)-_DelegateCreationExpression = Core.Name "hydra.csharp.syntax.DelegateCreationExpression"-_DelegateCreationExpression_type = Core.Name "type"-_DelegateCreationExpression_expression = Core.Name "expression"-newtype MemberDeclaratorList =- MemberDeclaratorList {- unMemberDeclaratorList :: [MemberDeclarator]}- deriving (Eq, Ord, Read, Show)-_MemberDeclaratorList = Core.Name "hydra.csharp.syntax.MemberDeclaratorList"-data MemberDeclarator =- MemberDeclaratorName SimpleName |- MemberDeclaratorMemberAccess MemberAccess |- MemberDeclaratorNullConditionalProjectionInitializer NullConditionalProjectionInitializer |- MemberDeclaratorBaseAccess BaseAccess |- MemberDeclaratorAssignment AssignmentMemberDeclarator- deriving (Eq, Ord, Read, Show)-_MemberDeclarator = Core.Name "hydra.csharp.syntax.MemberDeclarator"-_MemberDeclarator_name = Core.Name "name"-_MemberDeclarator_memberAccess = Core.Name "memberAccess"-_MemberDeclarator_nullConditionalProjectionInitializer = Core.Name "nullConditionalProjectionInitializer"-_MemberDeclarator_baseAccess = Core.Name "baseAccess"-_MemberDeclarator_assignment = Core.Name "assignment"-data AssignmentMemberDeclarator =- AssignmentMemberDeclarator {- assignmentMemberDeclaratorIdentifier :: Identifier,- assignmentMemberDeclaratorExpression :: Expression}- deriving (Eq, Ord, Read, Show)-_AssignmentMemberDeclarator = Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"-_AssignmentMemberDeclarator_identifier = Core.Name "identifier"-_AssignmentMemberDeclarator_expression = Core.Name "expression"-data TypeofExpression =- TypeofExpressionType Type |- TypeofExpressionUnboundTypeName UnboundTypeName |- TypeofExpressionVoid- deriving (Eq, Ord, Read, Show)-_TypeofExpression = Core.Name "hydra.csharp.syntax.TypeofExpression"-_TypeofExpression_type = Core.Name "type"-_TypeofExpression_unboundTypeName = Core.Name "unboundTypeName"-_TypeofExpression_void = Core.Name "void"-newtype UnboundTypeName =- UnboundTypeName {- unUnboundTypeName :: [UnboundTypeNamePart]}- deriving (Eq, Ord, Read, Show)-_UnboundTypeName = Core.Name "hydra.csharp.syntax.UnboundTypeName"-data UnboundTypeNamePart =- UnboundTypeNamePart {- unboundTypeNamePartIdentifier :: Identifier,- unboundTypeNamePartAliased :: Bool,- unboundTypeNamePartDimension :: (Maybe Int)}- deriving (Eq, Ord, Read, Show)-_UnboundTypeNamePart = Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"-_UnboundTypeNamePart_identifier = Core.Name "identifier"-_UnboundTypeNamePart_aliased = Core.Name "aliased"-_UnboundTypeNamePart_dimension = Core.Name "dimension"-data DefaultValueExpression =- DefaultValueExpressionExplicitlyTyped Type |- DefaultValueExpressionDefaultLiteral- deriving (Eq, Ord, Read, Show)-_DefaultValueExpression = Core.Name "hydra.csharp.syntax.DefaultValueExpression"-_DefaultValueExpression_explicitlyTyped = Core.Name "explicitlyTyped"-_DefaultValueExpression_defaultLiteral = Core.Name "defaultLiteral"-data StackallocExpression =- StackallocExpression {- stackallocExpressionType :: (Maybe UnmanagedType),- stackallocExpressionExpression :: (Maybe ConstantExpression),- stackallocExpressionInitializer :: [Expression]}- deriving (Eq, Ord, Read, Show)-_StackallocExpression = Core.Name "hydra.csharp.syntax.StackallocExpression"-_StackallocExpression_type = Core.Name "type"-_StackallocExpression_expression = Core.Name "expression"-_StackallocExpression_initializer = Core.Name "initializer"-data NamedEntity =- NamedEntity {- namedEntityTarget :: NamedEntityTarget,- namedEntityParts :: [NamedEntityPart]}- deriving (Eq, Ord, Read, Show)-_NamedEntity = Core.Name "hydra.csharp.syntax.NamedEntity"-_NamedEntity_target = Core.Name "target"-_NamedEntity_parts = Core.Name "parts"-data NamedEntityPart =- NamedEntityPart {- namedEntityPartIdentifier :: Identifier,- namedEntityPartTypeArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_NamedEntityPart = Core.Name "hydra.csharp.syntax.NamedEntityPart"-_NamedEntityPart_identifier = Core.Name "identifier"-_NamedEntityPart_typeArguments = Core.Name "typeArguments"-data NamedEntityTarget =- NamedEntityTargetName SimpleName |- NamedEntityTargetThis |- NamedEntityTargetBase |- NamedEntityTargetPredefinedType PredefinedType |- NamedEntityTargetQualifiedAliasMember QualifiedAliasMember- deriving (Eq, Ord, Read, Show)-_NamedEntityTarget = Core.Name "hydra.csharp.syntax.NamedEntityTarget"-_NamedEntityTarget_name = Core.Name "name"-_NamedEntityTarget_this = Core.Name "this"-_NamedEntityTarget_base = Core.Name "base"-_NamedEntityTarget_predefinedType = Core.Name "predefinedType"-_NamedEntityTarget_qualifiedAliasMember = Core.Name "qualifiedAliasMember"-data UnaryExpression =- UnaryExpressionPrimary PrimaryExpression |- UnaryExpressionPlus UnaryExpression |- UnaryExpressionMinus UnaryExpression |- UnaryExpressionNot UnaryExpression |- UnaryExpressionBitwiseComplement UnaryExpression |- UnaryExpressionPreIncrement UnaryExpression |- UnaryExpressionPreDecrement UnaryExpression |- UnaryExpressionCast CastExpression |- UnaryExpressionAwait UnaryExpression |- UnaryExpressionPointerIndirection UnaryExpression |- UnaryExpressionAddressOf UnaryExpression- deriving (Eq, Ord, Read, Show)-_UnaryExpression = Core.Name "hydra.csharp.syntax.UnaryExpression"-_UnaryExpression_primary = Core.Name "primary"-_UnaryExpression_plus = Core.Name "plus"-_UnaryExpression_minus = Core.Name "minus"-_UnaryExpression_not = Core.Name "not"-_UnaryExpression_bitwiseComplement = Core.Name "bitwiseComplement"-_UnaryExpression_preIncrement = Core.Name "preIncrement"-_UnaryExpression_preDecrement = Core.Name "preDecrement"-_UnaryExpression_cast = Core.Name "cast"-_UnaryExpression_await = Core.Name "await"-_UnaryExpression_pointerIndirection = Core.Name "pointerIndirection"-_UnaryExpression_addressOf = Core.Name "addressOf"-data CastExpression =- CastExpression {- castExpressionType :: Type,- castExpressionExpression :: UnaryExpression}- deriving (Eq, Ord, Read, Show)-_CastExpression = Core.Name "hydra.csharp.syntax.CastExpression"-_CastExpression_type = Core.Name "type"-_CastExpression_expression = Core.Name "expression"-data MultiplicativeExpression =- MultiplicativeExpressionSimple UnaryExpression |- MultiplicativeExpressionBinary BinaryMultiplicativeExpression- deriving (Eq, Ord, Read, Show)-_MultiplicativeExpression = Core.Name "hydra.csharp.syntax.MultiplicativeExpression"-_MultiplicativeExpression_simple = Core.Name "simple"-_MultiplicativeExpression_binary = Core.Name "binary"-data BinaryMultiplicativeExpression =- BinaryMultiplicativeExpression {- binaryMultiplicativeExpressionLeft :: MultiplicativeExpression,- binaryMultiplicativeExpressionOperator :: MultiplicativeOperator,- binaryMultiplicativeExpressionRight :: UnaryExpression}- deriving (Eq, Ord, Read, Show)-_BinaryMultiplicativeExpression = Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"-_BinaryMultiplicativeExpression_left = Core.Name "left"-_BinaryMultiplicativeExpression_operator = Core.Name "operator"-_BinaryMultiplicativeExpression_right = Core.Name "right"-data MultiplicativeOperator =- MultiplicativeOperatorTimes |- MultiplicativeOperatorDivide |- MultiplicativeOperatorModulo- deriving (Eq, Ord, Read, Show)-_MultiplicativeOperator = Core.Name "hydra.csharp.syntax.MultiplicativeOperator"-_MultiplicativeOperator_times = Core.Name "times"-_MultiplicativeOperator_divide = Core.Name "divide"-_MultiplicativeOperator_modulo = Core.Name "modulo"-data AdditiveExpression =- AdditiveExpressionSimple MultiplicativeExpression |- AdditiveExpressionBinary BinaryAdditiveExpression- deriving (Eq, Ord, Read, Show)-_AdditiveExpression = Core.Name "hydra.csharp.syntax.AdditiveExpression"-_AdditiveExpression_simple = Core.Name "simple"-_AdditiveExpression_binary = Core.Name "binary"-data BinaryAdditiveExpression =- BinaryAdditiveExpression {- binaryAdditiveExpressionLeft :: AdditiveExpression,- binaryAdditiveExpressionOperator :: AdditiveOperator,- binaryAdditiveExpressionRight :: MultiplicativeExpression}- deriving (Eq, Ord, Read, Show)-_BinaryAdditiveExpression = Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"-_BinaryAdditiveExpression_left = Core.Name "left"-_BinaryAdditiveExpression_operator = Core.Name "operator"-_BinaryAdditiveExpression_right = Core.Name "right"-data AdditiveOperator =- AdditiveOperatorPlus |- AdditiveOperatorMinus- deriving (Eq, Ord, Read, Show)-_AdditiveOperator = Core.Name "hydra.csharp.syntax.AdditiveOperator"-_AdditiveOperator_plus = Core.Name "plus"-_AdditiveOperator_minus = Core.Name "minus"-data ShiftExpression =- ShiftExpressionSimple AdditiveExpression |- ShiftExpressionBinary BinaryShiftExpression- deriving (Eq, Ord, Read, Show)-_ShiftExpression = Core.Name "hydra.csharp.syntax.ShiftExpression"-_ShiftExpression_simple = Core.Name "simple"-_ShiftExpression_binary = Core.Name "binary"-data BinaryShiftExpression =- BinaryShiftExpression {- binaryShiftExpressionLeft :: ShiftExpression,- binaryShiftExpressionOperator :: ShiftOperator,- binaryShiftExpressionRight :: AdditiveExpression}- deriving (Eq, Ord, Read, Show)-_BinaryShiftExpression = Core.Name "hydra.csharp.syntax.BinaryShiftExpression"-_BinaryShiftExpression_left = Core.Name "left"-_BinaryShiftExpression_operator = Core.Name "operator"-_BinaryShiftExpression_right = Core.Name "right"-data ShiftOperator =- ShiftOperatorLeft |- ShiftOperatorRight- deriving (Eq, Ord, Read, Show)-_ShiftOperator = Core.Name "hydra.csharp.syntax.ShiftOperator"-_ShiftOperator_left = Core.Name "left"-_ShiftOperator_right = Core.Name "right"-data RelationalExpression =- RelationalExpressionSimple ShiftExpression |- RelationalExpressionBinary BinaryRelationalExpression |- RelationalExpressionIsType IsTypeExpression |- RelationalExpressionIsPattern IsPatternExpression |- RelationalExpressionAsType AsTypeExpression- deriving (Eq, Ord, Read, Show)-_RelationalExpression = Core.Name "hydra.csharp.syntax.RelationalExpression"-_RelationalExpression_simple = Core.Name "simple"-_RelationalExpression_binary = Core.Name "binary"-_RelationalExpression_isType = Core.Name "isType"-_RelationalExpression_isPattern = Core.Name "isPattern"-_RelationalExpression_asType = Core.Name "asType"-data BinaryRelationalExpression =- BinaryRelationalExpression {- binaryRelationalExpressionLeft :: RelationalExpression,- binaryRelationalExpressionOperator :: RelationalOperator,- binaryRelationalExpressionRight :: ShiftExpression}- deriving (Eq, Ord, Read, Show)-_BinaryRelationalExpression = Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"-_BinaryRelationalExpression_left = Core.Name "left"-_BinaryRelationalExpression_operator = Core.Name "operator"-_BinaryRelationalExpression_right = Core.Name "right"-data RelationalOperator =- RelationalOperatorLessThan |- RelationalOperatorGreaterThan |- RelationalOperatorLessThanOrEqual |- RelationalOperatorGreaterThanOrEqual- deriving (Eq, Ord, Read, Show)-_RelationalOperator = Core.Name "hydra.csharp.syntax.RelationalOperator"-_RelationalOperator_lessThan = Core.Name "lessThan"-_RelationalOperator_greaterThan = Core.Name "greaterThan"-_RelationalOperator_lessThanOrEqual = Core.Name "lessThanOrEqual"-_RelationalOperator_greaterThanOrEqual = Core.Name "greaterThanOrEqual"-data IsTypeExpression =- IsTypeExpression {- isTypeExpressionExpression :: RelationalExpression,- isTypeExpressionType :: Type}- deriving (Eq, Ord, Read, Show)-_IsTypeExpression = Core.Name "hydra.csharp.syntax.IsTypeExpression"-_IsTypeExpression_expression = Core.Name "expression"-_IsTypeExpression_type = Core.Name "type"-data IsPatternExpression =- IsPatternExpression {- isPatternExpressionExpression :: RelationalExpression,- isPatternExpressionPattern :: Pattern}- deriving (Eq, Ord, Read, Show)-_IsPatternExpression = Core.Name "hydra.csharp.syntax.IsPatternExpression"-_IsPatternExpression_expression = Core.Name "expression"-_IsPatternExpression_pattern = Core.Name "pattern"-data AsTypeExpression =- AsTypeExpression {- asTypeExpressionExpression :: RelationalExpression,- asTypeExpressionType :: Type}- deriving (Eq, Ord, Read, Show)-_AsTypeExpression = Core.Name "hydra.csharp.syntax.AsTypeExpression"-_AsTypeExpression_expression = Core.Name "expression"-_AsTypeExpression_type = Core.Name "type"-data EqualityExpression =- EqualityExpressionSimple RelationalExpression |- EqualityExpressionBinary BinaryEqualityExpression- deriving (Eq, Ord, Read, Show)-_EqualityExpression = Core.Name "hydra.csharp.syntax.EqualityExpression"-_EqualityExpression_simple = Core.Name "simple"-_EqualityExpression_binary = Core.Name "binary"-data BinaryEqualityExpression =- BinaryEqualityExpression {- binaryEqualityExpressionLeft :: EqualityExpression,- binaryEqualityExpressionOperator :: EqualityOperator,- binaryEqualityExpressionRight :: RelationalExpression}- deriving (Eq, Ord, Read, Show)-_BinaryEqualityExpression = Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"-_BinaryEqualityExpression_left = Core.Name "left"-_BinaryEqualityExpression_operator = Core.Name "operator"-_BinaryEqualityExpression_right = Core.Name "right"-data EqualityOperator =- EqualityOperatorEqual |- EqualityOperatorNotEqual- deriving (Eq, Ord, Read, Show)-_EqualityOperator = Core.Name "hydra.csharp.syntax.EqualityOperator"-_EqualityOperator_equal = Core.Name "equal"-_EqualityOperator_notEqual = Core.Name "notEqual"-data AndExpression =- AndExpressionSimple EqualityExpression |- AndExpressionBinary BinaryAndExpression- deriving (Eq, Ord, Read, Show)-_AndExpression = Core.Name "hydra.csharp.syntax.AndExpression"-_AndExpression_simple = Core.Name "simple"-_AndExpression_binary = Core.Name "binary"-data BinaryAndExpression =- BinaryAndExpression {- binaryAndExpressionLeft :: AndExpression,- binaryAndExpressionRight :: EqualityExpression}- deriving (Eq, Ord, Read, Show)-_BinaryAndExpression = Core.Name "hydra.csharp.syntax.BinaryAndExpression"-_BinaryAndExpression_left = Core.Name "left"-_BinaryAndExpression_right = Core.Name "right"-data ExclusiveOrExpression =- ExclusiveOrExpressionSimple AndExpression |- ExclusiveOrExpressionBinary BinaryExclusiveOrExpression- deriving (Eq, Ord, Read, Show)-_ExclusiveOrExpression = Core.Name "hydra.csharp.syntax.ExclusiveOrExpression"-_ExclusiveOrExpression_simple = Core.Name "simple"-_ExclusiveOrExpression_binary = Core.Name "binary"-data BinaryExclusiveOrExpression =- BinaryExclusiveOrExpression {- binaryExclusiveOrExpressionLeft :: ExclusiveOrExpression,- binaryExclusiveOrExpressionRight :: AndExpression}- deriving (Eq, Ord, Read, Show)-_BinaryExclusiveOrExpression = Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"-_BinaryExclusiveOrExpression_left = Core.Name "left"-_BinaryExclusiveOrExpression_right = Core.Name "right"-data InclusiveOrExpression =- InclusiveOrExpressionSimple ExclusiveOrExpression |- InclusiveOrExpressionBinary BinaryInclusiveOrExpression- deriving (Eq, Ord, Read, Show)-_InclusiveOrExpression = Core.Name "hydra.csharp.syntax.InclusiveOrExpression"-_InclusiveOrExpression_simple = Core.Name "simple"-_InclusiveOrExpression_binary = Core.Name "binary"-data BinaryInclusiveOrExpression =- BinaryInclusiveOrExpression {- binaryInclusiveOrExpressionLeft :: InclusiveOrExpression,- binaryInclusiveOrExpressionRight :: ExclusiveOrExpression}- deriving (Eq, Ord, Read, Show)-_BinaryInclusiveOrExpression = Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"-_BinaryInclusiveOrExpression_left = Core.Name "left"-_BinaryInclusiveOrExpression_right = Core.Name "right"-data ConditionalAndExpression =- ConditionalAndExpressionSimple InclusiveOrExpression |- ConditionalAndExpressionBinary BinaryConditionalAndExpression- deriving (Eq, Ord, Read, Show)-_ConditionalAndExpression = Core.Name "hydra.csharp.syntax.ConditionalAndExpression"-_ConditionalAndExpression_simple = Core.Name "simple"-_ConditionalAndExpression_binary = Core.Name "binary"-data BinaryConditionalAndExpression =- BinaryConditionalAndExpression {- binaryConditionalAndExpressionLeft :: ConditionalAndExpression,- binaryConditionalAndExpressionRight :: InclusiveOrExpression}- deriving (Eq, Ord, Read, Show)-_BinaryConditionalAndExpression = Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"-_BinaryConditionalAndExpression_left = Core.Name "left"-_BinaryConditionalAndExpression_right = Core.Name "right"-data ConditionalOrExpression =- ConditionalOrExpressionSimple ConditionalAndExpression |- ConditionalOrExpressionBinary BinaryConditionalOrExpression- deriving (Eq, Ord, Read, Show)-_ConditionalOrExpression = Core.Name "hydra.csharp.syntax.ConditionalOrExpression"-_ConditionalOrExpression_simple = Core.Name "simple"-_ConditionalOrExpression_binary = Core.Name "binary"-data BinaryConditionalOrExpression =- BinaryConditionalOrExpression {- binaryConditionalOrExpressionLeft :: ConditionalOrExpression,- binaryConditionalOrExpressionRight :: ConditionalAndExpression}- deriving (Eq, Ord, Read, Show)-_BinaryConditionalOrExpression = Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"-_BinaryConditionalOrExpression_left = Core.Name "left"-_BinaryConditionalOrExpression_right = Core.Name "right"-data NullCoalescingExpression =- NullCoalescingExpressionSimple ConditionalOrExpression |- NullCoalescingExpressionBinary BinaryNullCoalescingExpression |- NullCoalescingExpressionThrow NullCoalescingExpression- deriving (Eq, Ord, Read, Show)-_NullCoalescingExpression = Core.Name "hydra.csharp.syntax.NullCoalescingExpression"-_NullCoalescingExpression_simple = Core.Name "simple"-_NullCoalescingExpression_binary = Core.Name "binary"-_NullCoalescingExpression_throw = Core.Name "throw"-data BinaryNullCoalescingExpression =- BinaryNullCoalescingExpression {- binaryNullCoalescingExpressionLeft :: ConditionalOrExpression,- binaryNullCoalescingExpressionRight :: NullCoalescingExpression}- deriving (Eq, Ord, Read, Show)-_BinaryNullCoalescingExpression = Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"-_BinaryNullCoalescingExpression_left = Core.Name "left"-_BinaryNullCoalescingExpression_right = Core.Name "right"-data DeclarationExpression =- DeclarationExpression {- declarationExpressionType :: LocalVariableType,- declarationExpressionIdentifier :: Identifier}- deriving (Eq, Ord, Read, Show)-_DeclarationExpression = Core.Name "hydra.csharp.syntax.DeclarationExpression"-_DeclarationExpression_type = Core.Name "type"-_DeclarationExpression_identifier = Core.Name "identifier"-data LocalVariableType =- LocalVariableTypeType Type |- LocalVariableTypeVar- deriving (Eq, Ord, Read, Show)-_LocalVariableType = Core.Name "hydra.csharp.syntax.LocalVariableType"-_LocalVariableType_type = Core.Name "type"-_LocalVariableType_var = Core.Name "var"-data ConditionalExpression =- ConditionalExpressionSimple NullCoalescingExpression |- ConditionalExpressionSimpleConditional SimpleConditionalExpression |- ConditionalExpressionRefConditional RefConditionalExpression- deriving (Eq, Ord, Read, Show)-_ConditionalExpression = Core.Name "hydra.csharp.syntax.ConditionalExpression"-_ConditionalExpression_simple = Core.Name "simple"-_ConditionalExpression_simpleConditional = Core.Name "simpleConditional"-_ConditionalExpression_refConditional = Core.Name "refConditional"-data SimpleConditionalExpression =- SimpleConditionalExpression {- simpleConditionalExpressionCondition :: NullCoalescingExpression,- simpleConditionalExpressionTrue :: Expression,- simpleConditionalExpressionFalse :: Expression}- deriving (Eq, Ord, Read, Show)-_SimpleConditionalExpression = Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"-_SimpleConditionalExpression_condition = Core.Name "condition"-_SimpleConditionalExpression_true = Core.Name "true"-_SimpleConditionalExpression_false = Core.Name "false"-data RefConditionalExpression =- RefConditionalExpression {- refConditionalExpressionCondition :: NullCoalescingExpression,- refConditionalExpressionTrue :: VariableReference,- refConditionalExpressionFalse :: VariableReference}- deriving (Eq, Ord, Read, Show)-_RefConditionalExpression = Core.Name "hydra.csharp.syntax.RefConditionalExpression"-_RefConditionalExpression_condition = Core.Name "condition"-_RefConditionalExpression_true = Core.Name "true"-_RefConditionalExpression_false = Core.Name "false"-data LambdaExpression =- LambdaExpression {- lambdaExpressionAsync :: Bool,- lambdaExpressionSignature :: AnonymousFunctionSignature,- lambdaExpressionBody :: AnonymousFunctionBody}- deriving (Eq, Ord, Read, Show)-_LambdaExpression = Core.Name "hydra.csharp.syntax.LambdaExpression"-_LambdaExpression_async = Core.Name "async"-_LambdaExpression_signature = Core.Name "signature"-_LambdaExpression_body = Core.Name "body"-data AnonymousMethodExpression =- AnonymousMethodExpression {- anonymousMethodExpressionAsync :: Bool,- anonymousMethodExpressionSignature :: [ExplicitAnonymousFunctionParameter],- anonymousMethodExpressionBody :: Block}- deriving (Eq, Ord, Read, Show)-_AnonymousMethodExpression = Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"-_AnonymousMethodExpression_async = Core.Name "async"-_AnonymousMethodExpression_signature = Core.Name "signature"-_AnonymousMethodExpression_body = Core.Name "body"-data AnonymousFunctionSignature =- AnonymousFunctionSignatureExplicit [ExplicitAnonymousFunctionParameter] |- AnonymousFunctionSignatureImplicit [Identifier]- deriving (Eq, Ord, Read, Show)-_AnonymousFunctionSignature = Core.Name "hydra.csharp.syntax.AnonymousFunctionSignature"-_AnonymousFunctionSignature_explicit = Core.Name "explicit"-_AnonymousFunctionSignature_implicit = Core.Name "implicit"-data ExplicitAnonymousFunctionParameter =- ExplicitAnonymousFunctionParameter {- explicitAnonymousFunctionParameterModifier :: (Maybe AnonymousFunctionParameterModifier),- explicitAnonymousFunctionParameterType :: Type,- explicitAnonymousFunctionParameterIdentifier :: Identifier}- deriving (Eq, Ord, Read, Show)-_ExplicitAnonymousFunctionParameter = Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"-_ExplicitAnonymousFunctionParameter_modifier = Core.Name "modifier"-_ExplicitAnonymousFunctionParameter_type = Core.Name "type"-_ExplicitAnonymousFunctionParameter_identifier = Core.Name "identifier"-data AnonymousFunctionParameterModifier =- AnonymousFunctionParameterModifierRef |- AnonymousFunctionParameterModifierOut |- AnonymousFunctionParameterModifierIn- deriving (Eq, Ord, Read, Show)-_AnonymousFunctionParameterModifier = Core.Name "hydra.csharp.syntax.AnonymousFunctionParameterModifier"-_AnonymousFunctionParameterModifier_ref = Core.Name "ref"-_AnonymousFunctionParameterModifier_out = Core.Name "out"-_AnonymousFunctionParameterModifier_in = Core.Name "in"-data AnonymousFunctionBody =- AnonymousFunctionBodyNullConditionalInvocation NullConditionalInvocationExpression |- AnonymousFunctionBodyExpression Expression |- AnonymousFunctionBodyRef VariableReference |- AnonymousFunctionBodyBlock Block- deriving (Eq, Ord, Read, Show)-_AnonymousFunctionBody = Core.Name "hydra.csharp.syntax.AnonymousFunctionBody"-_AnonymousFunctionBody_nullConditionalInvocation = Core.Name "nullConditionalInvocation"-_AnonymousFunctionBody_expression = Core.Name "expression"-_AnonymousFunctionBody_ref = Core.Name "ref"-_AnonymousFunctionBody_block = Core.Name "block"-data QueryExpression =- QueryExpression {- queryExpressionFrom :: FromClause,- queryExpressionBody :: QueryBody}- deriving (Eq, Ord, Read, Show)-_QueryExpression = Core.Name "hydra.csharp.syntax.QueryExpression"-_QueryExpression_from = Core.Name "from"-_QueryExpression_body = Core.Name "body"-data FromClause =- FromClause {- fromClauseType :: (Maybe Type),- fromClauseIdentifier :: Identifier,- fromClauseIn :: Expression}- deriving (Eq, Ord, Read, Show)-_FromClause = Core.Name "hydra.csharp.syntax.FromClause"-_FromClause_type = Core.Name "type"-_FromClause_identifier = Core.Name "identifier"-_FromClause_in = Core.Name "in"-data QueryBody =- QueryBody {- queryBodyClauses :: [QueryBodyClause],- queryBodySelectOrGroup :: SelectOrGroupClause,- queryBodyContinuation :: (Maybe QueryContinuation)}- deriving (Eq, Ord, Read, Show)-_QueryBody = Core.Name "hydra.csharp.syntax.QueryBody"-_QueryBody_clauses = Core.Name "clauses"-_QueryBody_selectOrGroup = Core.Name "selectOrGroup"-_QueryBody_continuation = Core.Name "continuation"-data QueryBodyClause =- QueryBodyClauseFrom FromClause |- QueryBodyClauseLet LetClause |- QueryBodyClauseWhere BooleanExpression |- QueryBodyClauseJoin JoinClause |- QueryBodyClauseOrderby [Ordering]- deriving (Eq, Ord, Read, Show)-_QueryBodyClause = Core.Name "hydra.csharp.syntax.QueryBodyClause"-_QueryBodyClause_from = Core.Name "from"-_QueryBodyClause_let = Core.Name "let"-_QueryBodyClause_where = Core.Name "where"-_QueryBodyClause_join = Core.Name "join"-_QueryBodyClause_orderby = Core.Name "orderby"-data LetClause =- LetClause {- letClauseLeft :: Identifier,- letClauseRight :: Expression}- deriving (Eq, Ord, Read, Show)-_LetClause = Core.Name "hydra.csharp.syntax.LetClause"-_LetClause_left = Core.Name "left"-_LetClause_right = Core.Name "right"-data JoinClause =- JoinClause {- joinClauseType :: (Maybe Type),- joinClauseIdentifier :: Identifier,- joinClauseIn :: Expression,- joinClauseOn :: Expression,- joinClauseEquals :: Expression,- joinClauseInto :: (Maybe Identifier)}- deriving (Eq, Ord, Read, Show)-_JoinClause = Core.Name "hydra.csharp.syntax.JoinClause"-_JoinClause_type = Core.Name "type"-_JoinClause_identifier = Core.Name "identifier"-_JoinClause_in = Core.Name "in"-_JoinClause_on = Core.Name "on"-_JoinClause_equals = Core.Name "equals"-_JoinClause_into = Core.Name "into"-data Ordering =- Ordering {- orderingExpression :: Expression,- orderingDirection :: (Maybe OrderingDirection)}- deriving (Eq, Ord, Read, Show)-_Ordering = Core.Name "hydra.csharp.syntax.Ordering"-_Ordering_expression = Core.Name "expression"-_Ordering_direction = Core.Name "direction"-data OrderingDirection =- OrderingDirectionAscending |- OrderingDirectionDescending- deriving (Eq, Ord, Read, Show)-_OrderingDirection = Core.Name "hydra.csharp.syntax.OrderingDirection"-_OrderingDirection_ascending = Core.Name "ascending"-_OrderingDirection_descending = Core.Name "descending"-data SelectOrGroupClause =- SelectOrGroupClauseSelect Expression |- SelectOrGroupClauseGroup GroupClause- deriving (Eq, Ord, Read, Show)-_SelectOrGroupClause = Core.Name "hydra.csharp.syntax.SelectOrGroupClause"-_SelectOrGroupClause_select = Core.Name "select"-_SelectOrGroupClause_group = Core.Name "group"-data GroupClause =- GroupClause {- groupClauseGrouped :: Expression,- groupClauseBy :: Expression}- deriving (Eq, Ord, Read, Show)-_GroupClause = Core.Name "hydra.csharp.syntax.GroupClause"-_GroupClause_grouped = Core.Name "grouped"-_GroupClause_by = Core.Name "by"-data QueryContinuation =- QueryContinuation {- queryContinuationInto :: Identifier,- queryContinuationBody :: QueryBody}- deriving (Eq, Ord, Read, Show)-_QueryContinuation = Core.Name "hydra.csharp.syntax.QueryContinuation"-_QueryContinuation_into = Core.Name "into"-_QueryContinuation_body = Core.Name "body"-data Assignment =- Assignment {- assignmentLeft :: UnaryExpression,- assignmentOperator :: AssignmentOperator,- assignmentRight :: Expression}- deriving (Eq, Ord, Read, Show)-_Assignment = Core.Name "hydra.csharp.syntax.Assignment"-_Assignment_left = Core.Name "left"-_Assignment_operator = Core.Name "operator"-_Assignment_right = Core.Name "right"-data AssignmentOperator =- AssignmentOperatorSimple Bool |- AssignmentOperatorPlusEquals |- AssignmentOperatorMinusEquals |- AssignmentOperatorTimesEquals |- AssignmentOperatorDivideEquals |- AssignmentOperatorModEquals |- AssignmentOperatorAndEquals |- AssignmentOperatorOrEquals |- AssignmentOperatorXorEquals |- AssignmentOperatorLeftShiftEquals |- AssignmentOperatorRightShiftEquals- deriving (Eq, Ord, Read, Show)-_AssignmentOperator = Core.Name "hydra.csharp.syntax.AssignmentOperator"-_AssignmentOperator_simple = Core.Name "simple"-_AssignmentOperator_plusEquals = Core.Name "plusEquals"-_AssignmentOperator_minusEquals = Core.Name "minusEquals"-_AssignmentOperator_timesEquals = Core.Name "timesEquals"-_AssignmentOperator_divideEquals = Core.Name "divideEquals"-_AssignmentOperator_modEquals = Core.Name "modEquals"-_AssignmentOperator_andEquals = Core.Name "andEquals"-_AssignmentOperator_orEquals = Core.Name "orEquals"-_AssignmentOperator_xorEquals = Core.Name "xorEquals"-_AssignmentOperator_leftShiftEquals = Core.Name "leftShiftEquals"-_AssignmentOperator_rightShiftEquals = Core.Name "rightShiftEquals"-data Expression =- ExpressionNonAssignment NonAssignmentExpression |- ExpressionAssignment Assignment- deriving (Eq, Ord, Read, Show)-_Expression = Core.Name "hydra.csharp.syntax.Expression"-_Expression_nonAssignment = Core.Name "nonAssignment"-_Expression_assignment = Core.Name "assignment"-data NonAssignmentExpression =- NonAssignmentExpressionDeclaration DeclarationExpression |- NonAssignmentExpressionConditional ConditionalExpression |- NonAssignmentExpressionLambda LambdaExpression |- NonAssignmentExpressionQuery QueryExpression- deriving (Eq, Ord, Read, Show)-_NonAssignmentExpression = Core.Name "hydra.csharp.syntax.NonAssignmentExpression"-_NonAssignmentExpression_declaration = Core.Name "declaration"-_NonAssignmentExpression_conditional = Core.Name "conditional"-_NonAssignmentExpression_lambda = Core.Name "lambda"-_NonAssignmentExpression_query = Core.Name "query"-newtype ConstantExpression =- ConstantExpression {- unConstantExpression :: Expression}- deriving (Eq, Ord, Read, Show)-_ConstantExpression = Core.Name "hydra.csharp.syntax.ConstantExpression"-newtype BooleanExpression =- BooleanExpression {- unBooleanExpression :: Expression}- deriving (Eq, Ord, Read, Show)-_BooleanExpression = Core.Name "hydra.csharp.syntax.BooleanExpression"-data Statement =- StatementLabeled LabeledStatement |- StatementDeclaration DeclarationStatement |- StatementEmbedded EmbeddedStatement- deriving (Eq, Ord, Read, Show)-_Statement = Core.Name "hydra.csharp.syntax.Statement"-_Statement_labeled = Core.Name "labeled"-_Statement_declaration = Core.Name "declaration"-_Statement_embedded = Core.Name "embedded"-data EmbeddedStatement =- EmbeddedStatementBlock Block |- EmbeddedStatementEmpty |- EmbeddedStatementExpression StatementExpression |- EmbeddedStatementSelection SelectionStatement |- EmbeddedStatementIteration IterationStatement |- EmbeddedStatementJump JumpStatement |- EmbeddedStatementTry TryStatement |- EmbeddedStatementChecked Block |- EmbeddedStatementUnchecked Block |- EmbeddedStatementLock LockStatement |- EmbeddedStatementUsing UsingStatement |- EmbeddedStatementYield YieldStatement |- EmbeddedStatementUnsafe Block |- EmbeddedStatementFixed FixedStatement- deriving (Eq, Ord, Read, Show)-_EmbeddedStatement = Core.Name "hydra.csharp.syntax.EmbeddedStatement"-_EmbeddedStatement_block = Core.Name "block"-_EmbeddedStatement_empty = Core.Name "empty"-_EmbeddedStatement_expression = Core.Name "expression"-_EmbeddedStatement_selection = Core.Name "selection"-_EmbeddedStatement_iteration = Core.Name "iteration"-_EmbeddedStatement_jump = Core.Name "jump"-_EmbeddedStatement_try = Core.Name "try"-_EmbeddedStatement_checked = Core.Name "checked"-_EmbeddedStatement_unchecked = Core.Name "unchecked"-_EmbeddedStatement_lock = Core.Name "lock"-_EmbeddedStatement_using = Core.Name "using"-_EmbeddedStatement_yield = Core.Name "yield"-_EmbeddedStatement_unsafe = Core.Name "unsafe"-_EmbeddedStatement_fixed = Core.Name "fixed"-newtype Block =- Block {- unBlock :: [Statement]}- deriving (Eq, Ord, Read, Show)-_Block = Core.Name "hydra.csharp.syntax.Block"-data LabeledStatement =- LabeledStatement {- labeledStatementLabel :: Identifier,- labeledStatementStatement :: Statement}- deriving (Eq, Ord, Read, Show)-_LabeledStatement = Core.Name "hydra.csharp.syntax.LabeledStatement"-_LabeledStatement_label = Core.Name "label"-_LabeledStatement_statement = Core.Name "statement"-data DeclarationStatement =- DeclarationStatementVariable LocalVariableDeclaration |- DeclarationStatementConstant LocalConstantDeclaration |- DeclarationStatementFunction LocalFunctionDeclaration- deriving (Eq, Ord, Read, Show)-_DeclarationStatement = Core.Name "hydra.csharp.syntax.DeclarationStatement"-_DeclarationStatement_variable = Core.Name "variable"-_DeclarationStatement_constant = Core.Name "constant"-_DeclarationStatement_function = Core.Name "function"-data LocalVariableDeclaration =- LocalVariableDeclarationImplicitlyTyped ImplicitlyTypedLocalVariableDeclaration |- LocalVariableDeclarationExplicitlyTyped ExplicitlyTypedLocalVariableDeclaration |- LocalVariableDeclarationRef RefLocalVariableDeclaration- deriving (Eq, Ord, Read, Show)-_LocalVariableDeclaration = Core.Name "hydra.csharp.syntax.LocalVariableDeclaration"-_LocalVariableDeclaration_implicitlyTyped = Core.Name "implicitlyTyped"-_LocalVariableDeclaration_explicitlyTyped = Core.Name "explicitlyTyped"-_LocalVariableDeclaration_ref = Core.Name "ref"-data ImplicitlyTypedLocalVariableDeclaration =- ImplicitlyTypedLocalVariableDeclarationVar ImplicitlyTypedLocalVariableDeclarator |- ImplicitlyTypedLocalVariableDeclarationRefVar RefVarImplicitlyTypedLocalVariableDeclaration- deriving (Eq, Ord, Read, Show)-_ImplicitlyTypedLocalVariableDeclaration = Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclaration"-_ImplicitlyTypedLocalVariableDeclaration_var = Core.Name "var"-_ImplicitlyTypedLocalVariableDeclaration_refVar = Core.Name "refVar"-data RefVarImplicitlyTypedLocalVariableDeclaration =- RefVarImplicitlyTypedLocalVariableDeclaration {- refVarImplicitlyTypedLocalVariableDeclarationRefKind :: RefKind,- refVarImplicitlyTypedLocalVariableDeclarationDeclarator :: RefLocalVariableDeclarator}- deriving (Eq, Ord, Read, Show)-_RefVarImplicitlyTypedLocalVariableDeclaration =- Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"-_RefVarImplicitlyTypedLocalVariableDeclaration_refKind = Core.Name "refKind"-_RefVarImplicitlyTypedLocalVariableDeclaration_declarator = Core.Name "declarator"-data ImplicitlyTypedLocalVariableDeclarator =- ImplicitlyTypedLocalVariableDeclarator {- implicitlyTypedLocalVariableDeclaratorIdentifier :: Identifier,- implicitlyTypedLocalVariableDeclaratorExpression :: Expression}- deriving (Eq, Ord, Read, Show)-_ImplicitlyTypedLocalVariableDeclarator = Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"-_ImplicitlyTypedLocalVariableDeclarator_identifier = Core.Name "identifier"-_ImplicitlyTypedLocalVariableDeclarator_expression = Core.Name "expression"-data ExplicitlyTypedLocalVariableDeclaration =- ExplicitlyTypedLocalVariableDeclaration {- explicitlyTypedLocalVariableDeclarationType :: Type,- explicitlyTypedLocalVariableDeclarationDeclarators :: [ExplicitlyTypedLocalVariableDeclarator]}- deriving (Eq, Ord, Read, Show)-_ExplicitlyTypedLocalVariableDeclaration = Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"-_ExplicitlyTypedLocalVariableDeclaration_type = Core.Name "type"-_ExplicitlyTypedLocalVariableDeclaration_declarators = Core.Name "declarators"-data ExplicitlyTypedLocalVariableDeclarator =- ExplicitlyTypedLocalVariableDeclarator {- explicitlyTypedLocalVariableDeclaratorIdentifier :: Identifier,- explicitlyTypedLocalVariableDeclaratorInitializer :: (Maybe LocalVariableInitializer)}- deriving (Eq, Ord, Read, Show)-_ExplicitlyTypedLocalVariableDeclarator = Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"-_ExplicitlyTypedLocalVariableDeclarator_identifier = Core.Name "identifier"-_ExplicitlyTypedLocalVariableDeclarator_initializer = Core.Name "initializer"-data LocalVariableInitializer =- LocalVariableInitializerExpression Expression |- LocalVariableInitializerInitializer ArrayInitializer- deriving (Eq, Ord, Read, Show)-_LocalVariableInitializer = Core.Name "hydra.csharp.syntax.LocalVariableInitializer"-_LocalVariableInitializer_expression = Core.Name "expression"-_LocalVariableInitializer_initializer = Core.Name "initializer"-data RefLocalVariableDeclaration =- RefLocalVariableDeclaration {- refLocalVariableDeclarationRefKind :: RefKind,- refLocalVariableDeclarationType :: Type,- refLocalVariableDeclarationDeclarators :: [RefLocalVariableDeclarator]}- deriving (Eq, Ord, Read, Show)-_RefLocalVariableDeclaration = Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"-_RefLocalVariableDeclaration_refKind = Core.Name "refKind"-_RefLocalVariableDeclaration_type = Core.Name "type"-_RefLocalVariableDeclaration_declarators = Core.Name "declarators"-data RefLocalVariableDeclarator =- RefLocalVariableDeclarator {- refLocalVariableDeclaratorLeft :: Identifier,- refLocalVariableDeclaratorRight :: VariableReference}- deriving (Eq, Ord, Read, Show)-_RefLocalVariableDeclarator = Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"-_RefLocalVariableDeclarator_left = Core.Name "left"-_RefLocalVariableDeclarator_right = Core.Name "right"-data LocalConstantDeclaration =- LocalConstantDeclaration {- localConstantDeclarationType :: Type,- localConstantDeclarationDeclarators :: [ConstantDeclarator]}- deriving (Eq, Ord, Read, Show)-_LocalConstantDeclaration = Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"-_LocalConstantDeclaration_type = Core.Name "type"-_LocalConstantDeclaration_declarators = Core.Name "declarators"-data ConstantDeclarator =- ConstantDeclarator {- constantDeclaratorIdentifier :: Identifier,- constantDeclaratorExpression :: ConstantExpression}- deriving (Eq, Ord, Read, Show)-_ConstantDeclarator = Core.Name "hydra.csharp.syntax.ConstantDeclarator"-_ConstantDeclarator_identifier = Core.Name "identifier"-_ConstantDeclarator_expression = Core.Name "expression"-data LocalFunctionDeclaration =- LocalFunctionDeclarationStandard StandardLocalFunctionDeclaration |- LocalFunctionDeclarationRef RefLocalFunctionDeclaration- deriving (Eq, Ord, Read, Show)-_LocalFunctionDeclaration = Core.Name "hydra.csharp.syntax.LocalFunctionDeclaration"-_LocalFunctionDeclaration_standard = Core.Name "standard"-_LocalFunctionDeclaration_ref = Core.Name "ref"-data StandardLocalFunctionDeclaration =- StandardLocalFunctionDeclaration {- standardLocalFunctionDeclarationModifiers :: [LocalFunctionModifier],- standardLocalFunctionDeclarationReturnType :: ReturnType,- standardLocalFunctionDeclarationHeader :: LocalFunctionHeader,- standardLocalFunctionDeclarationBody :: LocalFunctionBody}- deriving (Eq, Ord, Read, Show)-_StandardLocalFunctionDeclaration = Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"-_StandardLocalFunctionDeclaration_modifiers = Core.Name "modifiers"-_StandardLocalFunctionDeclaration_returnType = Core.Name "returnType"-_StandardLocalFunctionDeclaration_header = Core.Name "header"-_StandardLocalFunctionDeclaration_body = Core.Name "body"-data RefLocalFunctionDeclaration =- RefLocalFunctionDeclaration {- refLocalFunctionDeclarationModifiers :: [RefLocalFunctionModifier],- refLocalFunctionDeclarationRefKind :: RefKind,- refLocalFunctionDeclarationReturnType :: Type,- refLocalFunctionDeclarationHeader :: LocalFunctionHeader,- refLocalFunctionDeclarationBody :: RefLocalFunctionBody}- deriving (Eq, Ord, Read, Show)-_RefLocalFunctionDeclaration = Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"-_RefLocalFunctionDeclaration_modifiers = Core.Name "modifiers"-_RefLocalFunctionDeclaration_refKind = Core.Name "refKind"-_RefLocalFunctionDeclaration_returnType = Core.Name "returnType"-_RefLocalFunctionDeclaration_header = Core.Name "header"-_RefLocalFunctionDeclaration_body = Core.Name "body"-data LocalFunctionHeader =- LocalFunctionHeader {- localFunctionHeaderIdentifier :: Identifier,- localFunctionHeaderTypeParameters :: (Maybe TypeParameterList),- localFunctionHeaderParameters :: FormalParameterList,- localFunctionHeaderConstraints :: [TypeParameterConstraintsClause]}- deriving (Eq, Ord, Read, Show)-_LocalFunctionHeader = Core.Name "hydra.csharp.syntax.LocalFunctionHeader"-_LocalFunctionHeader_identifier = Core.Name "identifier"-_LocalFunctionHeader_typeParameters = Core.Name "typeParameters"-_LocalFunctionHeader_parameters = Core.Name "parameters"-_LocalFunctionHeader_constraints = Core.Name "constraints"-data LocalFunctionModifier =- LocalFunctionModifierRef RefLocalFunctionModifier |- LocalFunctionModifierAsync- deriving (Eq, Ord, Read, Show)-_LocalFunctionModifier = Core.Name "hydra.csharp.syntax.LocalFunctionModifier"-_LocalFunctionModifier_ref = Core.Name "ref"-_LocalFunctionModifier_async = Core.Name "async"-data RefLocalFunctionModifier =- RefLocalFunctionModifierStatic |- RefLocalFunctionModifierUnsafe- deriving (Eq, Ord, Read, Show)-_RefLocalFunctionModifier = Core.Name "hydra.csharp.syntax.RefLocalFunctionModifier"-_RefLocalFunctionModifier_static = Core.Name "static"-_RefLocalFunctionModifier_unsafe = Core.Name "unsafe"-data LocalFunctionBody =- LocalFunctionBodyBlock Block |- LocalFunctionBodyNullConditionalInvocation NullConditionalInvocationExpression |- LocalFunctionBodyExpression Expression- deriving (Eq, Ord, Read, Show)-_LocalFunctionBody = Core.Name "hydra.csharp.syntax.LocalFunctionBody"-_LocalFunctionBody_block = Core.Name "block"-_LocalFunctionBody_nullConditionalInvocation = Core.Name "nullConditionalInvocation"-_LocalFunctionBody_expression = Core.Name "expression"-data RefLocalFunctionBody =- RefLocalFunctionBodyBlock Block |- RefLocalFunctionBodyRef VariableReference- deriving (Eq, Ord, Read, Show)-_RefLocalFunctionBody = Core.Name "hydra.csharp.syntax.RefLocalFunctionBody"-_RefLocalFunctionBody_block = Core.Name "block"-_RefLocalFunctionBody_ref = Core.Name "ref"-data StatementExpression =- StatementExpressionNullConditionalInvocation NullConditionalInvocationExpression |- StatementExpressionInvocation InvocationExpression |- StatementExpressionObjectCreation ObjectCreationExpression |- StatementExpressionAssignment Assignment |- StatementExpressionPostIncrement PrimaryExpression |- StatementExpressionPostDecrement PrimaryExpression |- StatementExpressionPreIncrement UnaryExpression |- StatementExpressionPreDecrement UnaryExpression |- StatementExpressionAwait UnaryExpression- deriving (Eq, Ord, Read, Show)-_StatementExpression = Core.Name "hydra.csharp.syntax.StatementExpression"-_StatementExpression_nullConditionalInvocation = Core.Name "nullConditionalInvocation"-_StatementExpression_invocation = Core.Name "invocation"-_StatementExpression_objectCreation = Core.Name "objectCreation"-_StatementExpression_assignment = Core.Name "assignment"-_StatementExpression_postIncrement = Core.Name "postIncrement"-_StatementExpression_postDecrement = Core.Name "postDecrement"-_StatementExpression_preIncrement = Core.Name "preIncrement"-_StatementExpression_preDecrement = Core.Name "preDecrement"-_StatementExpression_await = Core.Name "await"-data SelectionStatement =- SelectionStatementIf IfStatement |- SelectionStatementSwitch SwitchStatement- deriving (Eq, Ord, Read, Show)-_SelectionStatement = Core.Name "hydra.csharp.syntax.SelectionStatement"-_SelectionStatement_if = Core.Name "if"-_SelectionStatement_switch = Core.Name "switch"-data IfStatement =- IfStatement {- ifStatementCondition :: BooleanExpression,- ifStatementIfBranch :: EmbeddedStatement,- ifStatementElseBranch :: EmbeddedStatement}- deriving (Eq, Ord, Read, Show)-_IfStatement = Core.Name "hydra.csharp.syntax.IfStatement"-_IfStatement_condition = Core.Name "condition"-_IfStatement_ifBranch = Core.Name "ifBranch"-_IfStatement_elseBranch = Core.Name "elseBranch"-data SwitchStatement =- SwitchStatement {- switchStatementExpression :: Expression,- switchStatementBranches :: [SwitchSection]}- deriving (Eq, Ord, Read, Show)-_SwitchStatement = Core.Name "hydra.csharp.syntax.SwitchStatement"-_SwitchStatement_expression = Core.Name "expression"-_SwitchStatement_branches = Core.Name "branches"-data SwitchSection =- SwitchSection {- switchSectionLabels :: [SwitchLabel],- switchSectionStatements :: [Statement]}- deriving (Eq, Ord, Read, Show)-_SwitchSection = Core.Name "hydra.csharp.syntax.SwitchSection"-_SwitchSection_labels = Core.Name "labels"-_SwitchSection_statements = Core.Name "statements"-data SwitchLabel =- SwitchLabelBranch SwitchBranch |- SwitchLabelDefault- deriving (Eq, Ord, Read, Show)-_SwitchLabel = Core.Name "hydra.csharp.syntax.SwitchLabel"-_SwitchLabel_branch = Core.Name "branch"-_SwitchLabel_default = Core.Name "default"-data SwitchBranch =- SwitchBranch {- switchBranchPattern :: Pattern,- switchBranchGuard :: (Maybe Expression)}- deriving (Eq, Ord, Read, Show)-_SwitchBranch = Core.Name "hydra.csharp.syntax.SwitchBranch"-_SwitchBranch_pattern = Core.Name "pattern"-_SwitchBranch_guard = Core.Name "guard"-data IterationStatement =- IterationStatementWhile WhileStatement |- IterationStatementDo DoStatement |- IterationStatementFor ForStatement |- IterationStatementForeach ForeachStatement- deriving (Eq, Ord, Read, Show)-_IterationStatement = Core.Name "hydra.csharp.syntax.IterationStatement"-_IterationStatement_while = Core.Name "while"-_IterationStatement_do = Core.Name "do"-_IterationStatement_for = Core.Name "for"-_IterationStatement_foreach = Core.Name "foreach"-data WhileStatement =- WhileStatement {- whileStatementCondition :: BooleanExpression,- whileStatementBody :: EmbeddedStatement}- deriving (Eq, Ord, Read, Show)-_WhileStatement = Core.Name "hydra.csharp.syntax.WhileStatement"-_WhileStatement_condition = Core.Name "condition"-_WhileStatement_body = Core.Name "body"-data DoStatement =- DoStatement {- doStatementBody :: EmbeddedStatement,- doStatementWhile :: BooleanExpression}- deriving (Eq, Ord, Read, Show)-_DoStatement = Core.Name "hydra.csharp.syntax.DoStatement"-_DoStatement_body = Core.Name "body"-_DoStatement_while = Core.Name "while"-data ForStatement =- ForStatement {- forStatementInitializer :: (Maybe ForInitializer),- forStatementCondition :: (Maybe BooleanExpression),- forStatementIterator :: (Maybe StatementExpressionList),- forStatementBody :: EmbeddedStatement}- deriving (Eq, Ord, Read, Show)-_ForStatement = Core.Name "hydra.csharp.syntax.ForStatement"-_ForStatement_initializer = Core.Name "initializer"-_ForStatement_condition = Core.Name "condition"-_ForStatement_iterator = Core.Name "iterator"-_ForStatement_body = Core.Name "body"-data ForInitializer =- ForInitializerVariable LocalVariableDeclaration |- ForInitializerStatements StatementExpressionList- deriving (Eq, Ord, Read, Show)-_ForInitializer = Core.Name "hydra.csharp.syntax.ForInitializer"-_ForInitializer_variable = Core.Name "variable"-_ForInitializer_statements = Core.Name "statements"-newtype StatementExpressionList =- StatementExpressionList {- unStatementExpressionList :: [StatementExpression]}- deriving (Eq, Ord, Read, Show)-_StatementExpressionList = Core.Name "hydra.csharp.syntax.StatementExpressionList"-data ForeachStatement =- ForeachStatement {- foreachStatementKind :: (Maybe RefKind),- foreachStatementType :: LocalVariableType,- foreachStatementIdentifier :: Identifier,- foreachStatementExpression :: Expression,- foreachStatementBody :: EmbeddedStatement}- deriving (Eq, Ord, Read, Show)-_ForeachStatement = Core.Name "hydra.csharp.syntax.ForeachStatement"-_ForeachStatement_kind = Core.Name "kind"-_ForeachStatement_type = Core.Name "type"-_ForeachStatement_identifier = Core.Name "identifier"-_ForeachStatement_expression = Core.Name "expression"-_ForeachStatement_body = Core.Name "body"-data JumpStatement =- JumpStatementBreak |- JumpStatementContinue |- JumpStatementGoto GotoStatement |- JumpStatementReturn ReturnStatement |- JumpStatementThrow (Maybe Expression)- deriving (Eq, Ord, Read, Show)-_JumpStatement = Core.Name "hydra.csharp.syntax.JumpStatement"-_JumpStatement_break = Core.Name "break"-_JumpStatement_continue = Core.Name "continue"-_JumpStatement_goto = Core.Name "goto"-_JumpStatement_return = Core.Name "return"-_JumpStatement_throw = Core.Name "throw"-data GotoStatement =- GotoStatementIdentifier Identifier |- GotoStatementCase ConstantExpression |- GotoStatementDefault- deriving (Eq, Ord, Read, Show)-_GotoStatement = Core.Name "hydra.csharp.syntax.GotoStatement"-_GotoStatement_identifier = Core.Name "identifier"-_GotoStatement_case = Core.Name "case"-_GotoStatement_default = Core.Name "default"-data ReturnStatement =- ReturnStatementSimple |- ReturnStatementValue Expression |- ReturnStatementRef VariableReference- deriving (Eq, Ord, Read, Show)-_ReturnStatement = Core.Name "hydra.csharp.syntax.ReturnStatement"-_ReturnStatement_simple = Core.Name "simple"-_ReturnStatement_value = Core.Name "value"-_ReturnStatement_ref = Core.Name "ref"-data TryStatement =- TryStatement {- tryStatementBody :: Block,- tryStatementCatches :: CatchClauses,- tryStatementFinally :: (Maybe Block)}- deriving (Eq, Ord, Read, Show)-_TryStatement = Core.Name "hydra.csharp.syntax.TryStatement"-_TryStatement_body = Core.Name "body"-_TryStatement_catches = Core.Name "catches"-_TryStatement_finally = Core.Name "finally"-data CatchClauses =- CatchClausesSpecific [SpecificCatchClause] |- CatchClausesGeneral Block- deriving (Eq, Ord, Read, Show)-_CatchClauses = Core.Name "hydra.csharp.syntax.CatchClauses"-_CatchClauses_specific = Core.Name "specific"-_CatchClauses_general = Core.Name "general"-data SpecificCatchClause =- SpecificCatchClause {- specificCatchClauseSpecifier :: (Maybe ExceptionSpecifier),- specificCatchClauseFilter :: (Maybe BooleanExpression),- specificCatchClauseBody :: Block}- deriving (Eq, Ord, Read, Show)-_SpecificCatchClause = Core.Name "hydra.csharp.syntax.SpecificCatchClause"-_SpecificCatchClause_specifier = Core.Name "specifier"-_SpecificCatchClause_filter = Core.Name "filter"-_SpecificCatchClause_body = Core.Name "body"-data ExceptionSpecifier =- ExceptionSpecifier {- exceptionSpecifierType :: Type,- exceptionSpecifierIdentifier :: (Maybe Identifier)}- deriving (Eq, Ord, Read, Show)-_ExceptionSpecifier = Core.Name "hydra.csharp.syntax.ExceptionSpecifier"-_ExceptionSpecifier_type = Core.Name "type"-_ExceptionSpecifier_identifier = Core.Name "identifier"-data LockStatement =- LockStatement {- lockStatementExpression :: Expression,- lockStatementBody :: EmbeddedStatement}- deriving (Eq, Ord, Read, Show)-_LockStatement = Core.Name "hydra.csharp.syntax.LockStatement"-_LockStatement_expression = Core.Name "expression"-_LockStatement_body = Core.Name "body"-data UsingStatement =- UsingStatement {- usingStatementAcquisition :: ResourceAcquisition,- usingStatementBody :: EmbeddedStatement}- deriving (Eq, Ord, Read, Show)-_UsingStatement = Core.Name "hydra.csharp.syntax.UsingStatement"-_UsingStatement_acquisition = Core.Name "acquisition"-_UsingStatement_body = Core.Name "body"-data ResourceAcquisition =- ResourceAcquisitionLocal LocalVariableDeclaration |- ResourceAcquisitionExpression Expression- deriving (Eq, Ord, Read, Show)-_ResourceAcquisition = Core.Name "hydra.csharp.syntax.ResourceAcquisition"-_ResourceAcquisition_local = Core.Name "local"-_ResourceAcquisition_expression = Core.Name "expression"-data YieldStatement =- YieldStatementReturn Expression |- YieldStatementBreak- deriving (Eq, Ord, Read, Show)-_YieldStatement = Core.Name "hydra.csharp.syntax.YieldStatement"-_YieldStatement_return = Core.Name "return"-_YieldStatement_break = Core.Name "break"-data CompilationUnit =- CompilationUnit {- compilationUnitExterns :: [ExternAliasDirective],- compilationUnitUsings :: [UsingDirective],- compilationUnitAttributes :: [GlobalAttributeSection],- compilationUnitMembers :: [NamespaceMemberDeclaration]}- deriving (Eq, Ord, Read, Show)-_CompilationUnit = Core.Name "hydra.csharp.syntax.CompilationUnit"-_CompilationUnit_externs = Core.Name "externs"-_CompilationUnit_usings = Core.Name "usings"-_CompilationUnit_attributes = Core.Name "attributes"-_CompilationUnit_members = Core.Name "members"-data NamespaceDeclaration =- NamespaceDeclaration {- namespaceDeclarationName :: QualifiedIdentifier,- namespaceDeclarationBody :: NamespaceBody}- deriving (Eq, Ord, Read, Show)-_NamespaceDeclaration = Core.Name "hydra.csharp.syntax.NamespaceDeclaration"-_NamespaceDeclaration_name = Core.Name "name"-_NamespaceDeclaration_body = Core.Name "body"-newtype QualifiedIdentifier =- QualifiedIdentifier {- unQualifiedIdentifier :: [Identifier]}- deriving (Eq, Ord, Read, Show)-_QualifiedIdentifier = Core.Name "hydra.csharp.syntax.QualifiedIdentifier"-data NamespaceBody =- NamespaceBody {- namespaceBodyExterns :: [ExternAliasDirective],- namespaceBodyUsings :: [UsingDirective],- namespaceBodyMembers :: [NamespaceMemberDeclaration]}- deriving (Eq, Ord, Read, Show)-_NamespaceBody = Core.Name "hydra.csharp.syntax.NamespaceBody"-_NamespaceBody_externs = Core.Name "externs"-_NamespaceBody_usings = Core.Name "usings"-_NamespaceBody_members = Core.Name "members"-newtype ExternAliasDirective =- ExternAliasDirective {- unExternAliasDirective :: Identifier}- deriving (Eq, Ord, Read, Show)-_ExternAliasDirective = Core.Name "hydra.csharp.syntax.ExternAliasDirective"-data UsingDirective =- UsingDirectiveAlias UsingAliasDirective |- UsingDirectiveNamespace NamespaceName |- UsingDirectiveStatic TypeName- deriving (Eq, Ord, Read, Show)-_UsingDirective = Core.Name "hydra.csharp.syntax.UsingDirective"-_UsingDirective_alias = Core.Name "alias"-_UsingDirective_namespace = Core.Name "namespace"-_UsingDirective_static = Core.Name "static"-data UsingAliasDirective =- UsingAliasDirective {- usingAliasDirectiveAlias :: Identifier,- usingAliasDirectiveName :: NamespaceOrTypeName}- deriving (Eq, Ord, Read, Show)-_UsingAliasDirective = Core.Name "hydra.csharp.syntax.UsingAliasDirective"-_UsingAliasDirective_alias = Core.Name "alias"-_UsingAliasDirective_name = Core.Name "name"-data NamespaceMemberDeclaration =- NamespaceMemberDeclarationNamespace NamespaceDeclaration |- NamespaceMemberDeclarationType TypeDeclaration- deriving (Eq, Ord, Read, Show)-_NamespaceMemberDeclaration = Core.Name "hydra.csharp.syntax.NamespaceMemberDeclaration"-_NamespaceMemberDeclaration_namespace = Core.Name "namespace"-_NamespaceMemberDeclaration_type = Core.Name "type"-data TypeDeclaration =- TypeDeclarationClass ClassDeclaration |- TypeDeclarationStruct StructDeclaration |- TypeDeclarationInterface InterfaceDeclaration |- TypeDeclarationEnum EnumDeclaration |- TypeDeclarationDelegate DelegateDeclaration- deriving (Eq, Ord, Read, Show)-_TypeDeclaration = Core.Name "hydra.csharp.syntax.TypeDeclaration"-_TypeDeclaration_class = Core.Name "class"-_TypeDeclaration_struct = Core.Name "struct"-_TypeDeclaration_interface = Core.Name "interface"-_TypeDeclaration_enum = Core.Name "enum"-_TypeDeclaration_delegate = Core.Name "delegate"-data QualifiedAliasMember =- QualifiedAliasMember {- qualifiedAliasMemberAlias :: Identifier,- qualifiedAliasMemberMember :: Identifier,- qualifiedAliasMemberArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_QualifiedAliasMember = Core.Name "hydra.csharp.syntax.QualifiedAliasMember"-_QualifiedAliasMember_alias = Core.Name "alias"-_QualifiedAliasMember_member = Core.Name "member"-_QualifiedAliasMember_arguments = Core.Name "arguments"-data ClassDeclaration =- ClassDeclaration {- classDeclarationAttributes :: [AttributeSection],- classDeclarationModifiers :: [ClassModifier],- classDeclarationPartial :: Bool,- classDeclarationName :: Identifier,- classDeclarationParameters :: (Maybe TypeParameterList),- classDeclarationBase :: (Maybe ClassBase),- classDeclarationConstraints :: [TypeParameterConstraintsClause],- classDeclarationBody :: ClassBody}- deriving (Eq, Ord, Read, Show)-_ClassDeclaration = Core.Name "hydra.csharp.syntax.ClassDeclaration"-_ClassDeclaration_attributes = Core.Name "attributes"-_ClassDeclaration_modifiers = Core.Name "modifiers"-_ClassDeclaration_partial = Core.Name "partial"-_ClassDeclaration_name = Core.Name "name"-_ClassDeclaration_parameters = Core.Name "parameters"-_ClassDeclaration_base = Core.Name "base"-_ClassDeclaration_constraints = Core.Name "constraints"-_ClassDeclaration_body = Core.Name "body"-data ClassModifier =- ClassModifierNew |- ClassModifierPublic |- ClassModifierProtected |- ClassModifierInternal |- ClassModifierPrivate |- ClassModifierAbstract |- ClassModifierSealed |- ClassModifierStatic |- ClassModifierUnsafe- deriving (Eq, Ord, Read, Show)-_ClassModifier = Core.Name "hydra.csharp.syntax.ClassModifier"-_ClassModifier_new = Core.Name "new"-_ClassModifier_public = Core.Name "public"-_ClassModifier_protected = Core.Name "protected"-_ClassModifier_internal = Core.Name "internal"-_ClassModifier_private = Core.Name "private"-_ClassModifier_abstract = Core.Name "abstract"-_ClassModifier_sealed = Core.Name "sealed"-_ClassModifier_static = Core.Name "static"-_ClassModifier_unsafe = Core.Name "unsafe"-newtype TypeParameterList =- TypeParameterList {- unTypeParameterList :: [TypeParameterPart]}- deriving (Eq, Ord, Read, Show)-_TypeParameterList = Core.Name "hydra.csharp.syntax.TypeParameterList"-data TypeParameterPart =- TypeParameterPart {- typeParameterPartAttributes :: (Maybe Attributes),- typeParameterPartName :: TypeParameter}- deriving (Eq, Ord, Read, Show)-_TypeParameterPart = Core.Name "hydra.csharp.syntax.TypeParameterPart"-_TypeParameterPart_attributes = Core.Name "attributes"-_TypeParameterPart_name = Core.Name "name"-data ClassBase =- ClassBaseClass (Maybe ClassType) |- ClassBaseInterfaces [InterfaceType]- deriving (Eq, Ord, Read, Show)-_ClassBase = Core.Name "hydra.csharp.syntax.ClassBase"-_ClassBase_class = Core.Name "class"-_ClassBase_interfaces = Core.Name "interfaces"-data TypeParameterConstraintsClause =- TypeParameterConstraintsClause {- typeParameterConstraintsClauseParameter :: TypeParameter,- typeParameterConstraintsClauseConstraints :: [TypeParameterConstraints]}- deriving (Eq, Ord, Read, Show)-_TypeParameterConstraintsClause = Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"-_TypeParameterConstraintsClause_parameter = Core.Name "parameter"-_TypeParameterConstraintsClause_constraints = Core.Name "constraints"-data TypeParameterConstraints =- TypeParameterConstraints {- typeParameterConstraintsPrimary :: (Maybe PrimaryConstraint),- typeParameterConstraintsSecondary :: (Maybe SecondaryConstraints),- typeParameterConstraintsConstructor :: Bool}- deriving (Eq, Ord, Read, Show)-_TypeParameterConstraints = Core.Name "hydra.csharp.syntax.TypeParameterConstraints"-_TypeParameterConstraints_primary = Core.Name "primary"-_TypeParameterConstraints_secondary = Core.Name "secondary"-_TypeParameterConstraints_constructor = Core.Name "constructor"-data PrimaryConstraint =- PrimaryConstraintClassType ClassType |- PrimaryConstraintClass |- PrimaryConstraintStruct |- PrimaryConstraintUnmanaged- deriving (Eq, Ord, Read, Show)-_PrimaryConstraint = Core.Name "hydra.csharp.syntax.PrimaryConstraint"-_PrimaryConstraint_classType = Core.Name "classType"-_PrimaryConstraint_class = Core.Name "class"-_PrimaryConstraint_struct = Core.Name "struct"-_PrimaryConstraint_unmanaged = Core.Name "unmanaged"-newtype SecondaryConstraints =- SecondaryConstraints {- unSecondaryConstraints :: [SecondaryConstraint]}- deriving (Eq, Ord, Read, Show)-_SecondaryConstraints = Core.Name "hydra.csharp.syntax.SecondaryConstraints"-data SecondaryConstraint =- SecondaryConstraintInterface InterfaceType |- SecondaryConstraintParameter TypeParameter- deriving (Eq, Ord, Read, Show)-_SecondaryConstraint = Core.Name "hydra.csharp.syntax.SecondaryConstraint"-_SecondaryConstraint_interface = Core.Name "interface"-_SecondaryConstraint_parameter = Core.Name "parameter"-newtype ClassBody =- ClassBody {- unClassBody :: [ClassMemberDeclaration]}- deriving (Eq, Ord, Read, Show)-_ClassBody = Core.Name "hydra.csharp.syntax.ClassBody"-data ClassMemberDeclaration =- ClassMemberDeclarationConstant ConstantDeclaration |- ClassMemberDeclarationField FieldDeclaration |- ClassMemberDeclarationMethod MethodDeclaration |- ClassMemberDeclarationProperty PropertyDeclaration |- ClassMemberDeclarationEvent EventDeclaration |- ClassMemberDeclarationIndexer IndexerDeclaration |- ClassMemberDeclarationOperator OperatorDeclaration |- ClassMemberDeclarationConstructor ConstructorDeclaration |- ClassMemberDeclarationFinalizer FinalizerDeclaration |- ClassMemberDeclarationStaticConstructor StaticConstructorDeclaration |- ClassMemberDeclarationType TypeDeclaration- deriving (Eq, Ord, Read, Show)-_ClassMemberDeclaration = Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"-_ClassMemberDeclaration_constant = Core.Name "constant"-_ClassMemberDeclaration_field = Core.Name "field"-_ClassMemberDeclaration_method = Core.Name "method"-_ClassMemberDeclaration_property = Core.Name "property"-_ClassMemberDeclaration_event = Core.Name "event"-_ClassMemberDeclaration_indexer = Core.Name "indexer"-_ClassMemberDeclaration_operator = Core.Name "operator"-_ClassMemberDeclaration_constructor = Core.Name "constructor"-_ClassMemberDeclaration_finalizer = Core.Name "finalizer"-_ClassMemberDeclaration_staticConstructor = Core.Name "staticConstructor"-_ClassMemberDeclaration_type = Core.Name "type"-data ConstantDeclaration =- ConstantDeclaration {- constantDeclarationAttributes :: (Maybe Attributes),- constantDeclarationModifiers :: [ConstantModifier],- constantDeclarationType :: Type,- constantDeclarationDeclarators :: [ConstantDeclarator]}- deriving (Eq, Ord, Read, Show)-_ConstantDeclaration = Core.Name "hydra.csharp.syntax.ConstantDeclaration"-_ConstantDeclaration_attributes = Core.Name "attributes"-_ConstantDeclaration_modifiers = Core.Name "modifiers"-_ConstantDeclaration_type = Core.Name "type"-_ConstantDeclaration_declarators = Core.Name "declarators"-data ConstantModifier =- ConstantModifierNew |- ConstantModifierPublic |- ConstantModifierProtected |- ConstantModifierInternal |- ConstantModifierPrivate- deriving (Eq, Ord, Read, Show)-_ConstantModifier = Core.Name "hydra.csharp.syntax.ConstantModifier"-_ConstantModifier_new = Core.Name "new"-_ConstantModifier_public = Core.Name "public"-_ConstantModifier_protected = Core.Name "protected"-_ConstantModifier_internal = Core.Name "internal"-_ConstantModifier_private = Core.Name "private"-data FieldDeclaration =- FieldDeclaration {- fieldDeclarationAttributes :: (Maybe Attributes),- fieldDeclarationModifiers :: [FieldModifier],- fieldDeclarationType :: Type,- fieldDeclarationDeclarators :: [VariableDeclarator]}- deriving (Eq, Ord, Read, Show)-_FieldDeclaration = Core.Name "hydra.csharp.syntax.FieldDeclaration"-_FieldDeclaration_attributes = Core.Name "attributes"-_FieldDeclaration_modifiers = Core.Name "modifiers"-_FieldDeclaration_type = Core.Name "type"-_FieldDeclaration_declarators = Core.Name "declarators"-data FieldModifier =- FieldModifierNew |- FieldModifierPublic |- FieldModifierProtected |- FieldModifierInternal |- FieldModifierPrivate |- FieldModifierStatic |- FieldModifierReadonly |- FieldModifierVolatile |- FieldModifierUnsafe- deriving (Eq, Ord, Read, Show)-_FieldModifier = Core.Name "hydra.csharp.syntax.FieldModifier"-_FieldModifier_new = Core.Name "new"-_FieldModifier_public = Core.Name "public"-_FieldModifier_protected = Core.Name "protected"-_FieldModifier_internal = Core.Name "internal"-_FieldModifier_private = Core.Name "private"-_FieldModifier_static = Core.Name "static"-_FieldModifier_readonly = Core.Name "readonly"-_FieldModifier_volatile = Core.Name "volatile"-_FieldModifier_unsafe = Core.Name "unsafe"-newtype VariableDeclarators =- VariableDeclarators {- unVariableDeclarators :: [VariableDeclarator]}- deriving (Eq, Ord, Read, Show)-_VariableDeclarators = Core.Name "hydra.csharp.syntax.VariableDeclarators"-data VariableDeclarator =- VariableDeclarator {- variableDeclaratorIdentifier :: Identifier,- variableDeclaratorInitializer :: (Maybe VariableInitializer)}- deriving (Eq, Ord, Read, Show)-_VariableDeclarator = Core.Name "hydra.csharp.syntax.VariableDeclarator"-_VariableDeclarator_identifier = Core.Name "identifier"-_VariableDeclarator_initializer = Core.Name "initializer"-data MethodDeclaration =- MethodDeclarationStandard StandardMethodDeclaration |- MethodDeclarationRefReturn RefReturnMethodDeclaration- deriving (Eq, Ord, Read, Show)-_MethodDeclaration = Core.Name "hydra.csharp.syntax.MethodDeclaration"-_MethodDeclaration_standard = Core.Name "standard"-_MethodDeclaration_refReturn = Core.Name "refReturn"-data StandardMethodDeclaration =- StandardMethodDeclaration {- standardMethodDeclarationAttributes :: (Maybe Attributes),- standardMethodDeclarationModifiers :: [MethodModifier],- standardMethodDeclarationReturnType :: ReturnType,- standardMethodDeclarationHeader :: MethodHeader,- standardMethodDeclarationBody :: MethodBody}- deriving (Eq, Ord, Read, Show)-_StandardMethodDeclaration = Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"-_StandardMethodDeclaration_attributes = Core.Name "attributes"-_StandardMethodDeclaration_modifiers = Core.Name "modifiers"-_StandardMethodDeclaration_returnType = Core.Name "returnType"-_StandardMethodDeclaration_header = Core.Name "header"-_StandardMethodDeclaration_body = Core.Name "body"-data RefReturnMethodDeclaration =- RefReturnMethodDeclaration {- refReturnMethodDeclarationAttributes :: (Maybe Attributes),- refReturnMethodDeclarationModifiers :: [RefMethodModifier],- refReturnMethodDeclarationKind :: RefKind,- refReturnMethodDeclarationReturnType :: ReturnType,- refReturnMethodDeclarationHeader :: MethodHeader,- refReturnMethodDeclarationBody :: RefMethodBody}- deriving (Eq, Ord, Read, Show)-_RefReturnMethodDeclaration = Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"-_RefReturnMethodDeclaration_attributes = Core.Name "attributes"-_RefReturnMethodDeclaration_modifiers = Core.Name "modifiers"-_RefReturnMethodDeclaration_kind = Core.Name "kind"-_RefReturnMethodDeclaration_returnType = Core.Name "returnType"-_RefReturnMethodDeclaration_header = Core.Name "header"-_RefReturnMethodDeclaration_body = Core.Name "body"-data MethodModifiers =- MethodModifiers {- methodModifiersModifiers :: [MethodModifier],- methodModifiersPartial :: Bool}- deriving (Eq, Ord, Read, Show)-_MethodModifiers = Core.Name "hydra.csharp.syntax.MethodModifiers"-_MethodModifiers_modifiers = Core.Name "modifiers"-_MethodModifiers_partial = Core.Name "partial"-data RefKind =- RefKindRef |- RefKindRefReadonly- deriving (Eq, Ord, Read, Show)-_RefKind = Core.Name "hydra.csharp.syntax.RefKind"-_RefKind_ref = Core.Name "ref"-_RefKind_refReadonly = Core.Name "refReadonly"-data MethodHeader =- MethodHeader {- methodHeaderName :: MemberName,- methodHeaderTypeParameters :: (Maybe TypeParameterList),- methodHeaderParameters :: (Maybe FormalParameterList),- methodHeaderConstraints :: [TypeParameterConstraintsClause]}- deriving (Eq, Ord, Read, Show)-_MethodHeader = Core.Name "hydra.csharp.syntax.MethodHeader"-_MethodHeader_name = Core.Name "name"-_MethodHeader_typeParameters = Core.Name "typeParameters"-_MethodHeader_parameters = Core.Name "parameters"-_MethodHeader_constraints = Core.Name "constraints"-data MethodModifier =- MethodModifierRef RefMethodModifier |- MethodModifierAsync- deriving (Eq, Ord, Read, Show)-_MethodModifier = Core.Name "hydra.csharp.syntax.MethodModifier"-_MethodModifier_ref = Core.Name "ref"-_MethodModifier_async = Core.Name "async"-data RefMethodModifier =- RefMethodModifierNew |- RefMethodModifierPublic |- RefMethodModifierProtected |- RefMethodModifierInternal |- RefMethodModifierPrivate |- RefMethodModifierStatic |- RefMethodModifierVirtual |- RefMethodModifierSealed |- RefMethodModifierOverride |- RefMethodModifierAbstract |- RefMethodModifierExtern |- RefMethodModifierUnsafe- deriving (Eq, Ord, Read, Show)-_RefMethodModifier = Core.Name "hydra.csharp.syntax.RefMethodModifier"-_RefMethodModifier_new = Core.Name "new"-_RefMethodModifier_public = Core.Name "public"-_RefMethodModifier_protected = Core.Name "protected"-_RefMethodModifier_internal = Core.Name "internal"-_RefMethodModifier_private = Core.Name "private"-_RefMethodModifier_static = Core.Name "static"-_RefMethodModifier_virtual = Core.Name "virtual"-_RefMethodModifier_sealed = Core.Name "sealed"-_RefMethodModifier_override = Core.Name "override"-_RefMethodModifier_abstract = Core.Name "abstract"-_RefMethodModifier_extern = Core.Name "extern"-_RefMethodModifier_unsafe = Core.Name "unsafe"-data ReturnType =- ReturnTypeRef Type |- ReturnTypeVoid- deriving (Eq, Ord, Read, Show)-_ReturnType = Core.Name "hydra.csharp.syntax.ReturnType"-_ReturnType_ref = Core.Name "ref"-_ReturnType_void = Core.Name "void"-data MemberName =- MemberName {- memberNameInterfaceType :: (Maybe TypeName),- memberNameIdentifier :: Identifier}- deriving (Eq, Ord, Read, Show)-_MemberName = Core.Name "hydra.csharp.syntax.MemberName"-_MemberName_interfaceType = Core.Name "interfaceType"-_MemberName_identifier = Core.Name "identifier"-data MethodBody =- MethodBodyBlock Block |- MethodBodyNullConditionalInvocation NullConditionalInvocationExpression |- MethodBodyExpression Expression |- MethodBodyEmpty- deriving (Eq, Ord, Read, Show)-_MethodBody = Core.Name "hydra.csharp.syntax.MethodBody"-_MethodBody_block = Core.Name "block"-_MethodBody_nullConditionalInvocation = Core.Name "nullConditionalInvocation"-_MethodBody_expression = Core.Name "expression"-_MethodBody_empty = Core.Name "empty"-data RefMethodBody =- RefMethodBodyBlock Block |- RefMethodBodyRef VariableReference |- RefMethodBodyEmpty- deriving (Eq, Ord, Read, Show)-_RefMethodBody = Core.Name "hydra.csharp.syntax.RefMethodBody"-_RefMethodBody_block = Core.Name "block"-_RefMethodBody_ref = Core.Name "ref"-_RefMethodBody_empty = Core.Name "empty"-data FormalParameterList =- FormalParameterList {- formalParameterListFixed :: [FixedParameter],- formalParameterListArray :: (Maybe ParameterArray)}- deriving (Eq, Ord, Read, Show)-_FormalParameterList = Core.Name "hydra.csharp.syntax.FormalParameterList"-_FormalParameterList_fixed = Core.Name "fixed"-_FormalParameterList_array = Core.Name "array"-data FixedParameter =- FixedParameter {- fixedParameterAttributes :: (Maybe Attributes),- fixedParameterModifier :: (Maybe ParameterModifier),- fixedParameterType :: Type,- fixedParameterIdentifier :: Identifier,- fixedParameterDefaultArgument :: (Maybe Expression)}- deriving (Eq, Ord, Read, Show)-_FixedParameter = Core.Name "hydra.csharp.syntax.FixedParameter"-_FixedParameter_attributes = Core.Name "attributes"-_FixedParameter_modifier = Core.Name "modifier"-_FixedParameter_type = Core.Name "type"-_FixedParameter_identifier = Core.Name "identifier"-_FixedParameter_defaultArgument = Core.Name "defaultArgument"-data ParameterModifier =- ParameterModifierMode ParameterModeModifier |- ParameterModifierThis- deriving (Eq, Ord, Read, Show)-_ParameterModifier = Core.Name "hydra.csharp.syntax.ParameterModifier"-_ParameterModifier_mode = Core.Name "mode"-_ParameterModifier_this = Core.Name "this"-data ParameterModeModifier =- ParameterModeModifierRef |- ParameterModeModifierOut |- ParameterModeModifierIn- deriving (Eq, Ord, Read, Show)-_ParameterModeModifier = Core.Name "hydra.csharp.syntax.ParameterModeModifier"-_ParameterModeModifier_ref = Core.Name "ref"-_ParameterModeModifier_out = Core.Name "out"-_ParameterModeModifier_in = Core.Name "in"-data ParameterArray =- ParameterArray {- parameterArrayAttributes :: (Maybe Attributes),- parameterArrayType :: ArrayType,- parameterArrayIdentifier :: Identifier}- deriving (Eq, Ord, Read, Show)-_ParameterArray = Core.Name "hydra.csharp.syntax.ParameterArray"-_ParameterArray_attributes = Core.Name "attributes"-_ParameterArray_type = Core.Name "type"-_ParameterArray_identifier = Core.Name "identifier"-data PropertyDeclaration =- PropertyDeclarationStandard StandardPropertyDeclaration |- PropertyDeclarationRefReturn RefReturnPropertyDeclaration- deriving (Eq, Ord, Read, Show)-_PropertyDeclaration = Core.Name "hydra.csharp.syntax.PropertyDeclaration"-_PropertyDeclaration_standard = Core.Name "standard"-_PropertyDeclaration_refReturn = Core.Name "refReturn"-data StandardPropertyDeclaration =- StandardPropertyDeclaration {- standardPropertyDeclarationAttributes :: (Maybe Attributes),- standardPropertyDeclarationModifiers :: [PropertyModifier],- standardPropertyDeclarationType :: Type,- standardPropertyDeclarationName :: MemberName,- standardPropertyDeclarationBody :: PropertyBody}- deriving (Eq, Ord, Read, Show)-_StandardPropertyDeclaration = Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"-_StandardPropertyDeclaration_attributes = Core.Name "attributes"-_StandardPropertyDeclaration_modifiers = Core.Name "modifiers"-_StandardPropertyDeclaration_type = Core.Name "type"-_StandardPropertyDeclaration_name = Core.Name "name"-_StandardPropertyDeclaration_body = Core.Name "body"-data RefReturnPropertyDeclaration =- RefReturnPropertyDeclaration {- refReturnPropertyDeclarationAttributes :: (Maybe Attributes),- refReturnPropertyDeclarationModifiers :: [PropertyModifier],- refReturnPropertyDeclarationRefKind :: RefKind,- refReturnPropertyDeclarationType :: Type,- refReturnPropertyDeclarationName :: MemberName,- refReturnPropertyDeclarationBody :: RefPropertyBody}- deriving (Eq, Ord, Read, Show)-_RefReturnPropertyDeclaration = Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"-_RefReturnPropertyDeclaration_attributes = Core.Name "attributes"-_RefReturnPropertyDeclaration_modifiers = Core.Name "modifiers"-_RefReturnPropertyDeclaration_refKind = Core.Name "refKind"-_RefReturnPropertyDeclaration_type = Core.Name "type"-_RefReturnPropertyDeclaration_name = Core.Name "name"-_RefReturnPropertyDeclaration_body = Core.Name "body"-data PropertyModifier =- PropertyModifierNew |- PropertyModifierPublic |- PropertyModifierProtected |- PropertyModifierInternal |- PropertyModifierPrivate |- PropertyModifierStatic |- PropertyModifierVirtual |- PropertyModifierSealed |- PropertyModifierOverride |- PropertyModifierAbstract |- PropertyModifierExtern |- PropertyModifierUnsafe- deriving (Eq, Ord, Read, Show)-_PropertyModifier = Core.Name "hydra.csharp.syntax.PropertyModifier"-_PropertyModifier_new = Core.Name "new"-_PropertyModifier_public = Core.Name "public"-_PropertyModifier_protected = Core.Name "protected"-_PropertyModifier_internal = Core.Name "internal"-_PropertyModifier_private = Core.Name "private"-_PropertyModifier_static = Core.Name "static"-_PropertyModifier_virtual = Core.Name "virtual"-_PropertyModifier_sealed = Core.Name "sealed"-_PropertyModifier_override = Core.Name "override"-_PropertyModifier_abstract = Core.Name "abstract"-_PropertyModifier_extern = Core.Name "extern"-_PropertyModifier_unsafe = Core.Name "unsafe"-data PropertyBody =- PropertyBodyBlock BlockPropertyBody |- PropertyBodyExpression Expression- deriving (Eq, Ord, Read, Show)-_PropertyBody = Core.Name "hydra.csharp.syntax.PropertyBody"-_PropertyBody_block = Core.Name "block"-_PropertyBody_expression = Core.Name "expression"-data BlockPropertyBody =- BlockPropertyBody {- blockPropertyBodyAccessors :: AccessorDeclarations,- blockPropertyBodyInitializer :: (Maybe VariableInitializer)}- deriving (Eq, Ord, Read, Show)-_BlockPropertyBody = Core.Name "hydra.csharp.syntax.BlockPropertyBody"-_BlockPropertyBody_accessors = Core.Name "accessors"-_BlockPropertyBody_initializer = Core.Name "initializer"-data RefPropertyBody =- RefPropertyBodyBlock RefGetAccessorDeclaration |- RefPropertyBodyRef VariableReference- deriving (Eq, Ord, Read, Show)-_RefPropertyBody = Core.Name "hydra.csharp.syntax.RefPropertyBody"-_RefPropertyBody_block = Core.Name "block"-_RefPropertyBody_ref = Core.Name "ref"-data AccessorDeclarations =- AccessorDeclarationsGet (Maybe AccessorDeclaration) |- AccessorDeclarationsSet (Maybe AccessorDeclaration)- deriving (Eq, Ord, Read, Show)-_AccessorDeclarations = Core.Name "hydra.csharp.syntax.AccessorDeclarations"-_AccessorDeclarations_get = Core.Name "get"-_AccessorDeclarations_set = Core.Name "set"-data AccessorDeclaration =- AccessorDeclaration {- accessorDeclarationAttributes :: (Maybe Attributes),- accessorDeclarationModifier :: (Maybe AccessorModifier),- accessorDeclarationBody :: AccessorBody}- deriving (Eq, Ord, Read, Show)-_AccessorDeclaration = Core.Name "hydra.csharp.syntax.AccessorDeclaration"-_AccessorDeclaration_attributes = Core.Name "attributes"-_AccessorDeclaration_modifier = Core.Name "modifier"-_AccessorDeclaration_body = Core.Name "body"-data AccessorModifier =- AccessorModifierProtected |- AccessorModifierInternal |- AccessorModifierPrivate |- AccessorModifierProtectedInternal |- AccessorModifierInternalProtected |- AccessorModifierProtectedPrivate |- AccessorModifierPrivateProtected- deriving (Eq, Ord, Read, Show)-_AccessorModifier = Core.Name "hydra.csharp.syntax.AccessorModifier"-_AccessorModifier_protected = Core.Name "protected"-_AccessorModifier_internal = Core.Name "internal"-_AccessorModifier_private = Core.Name "private"-_AccessorModifier_protectedInternal = Core.Name "protectedInternal"-_AccessorModifier_internalProtected = Core.Name "internalProtected"-_AccessorModifier_protectedPrivate = Core.Name "protectedPrivate"-_AccessorModifier_privateProtected = Core.Name "privateProtected"-data AccessorBody =- AccessorBodyBlock Block |- AccessorBodyExpression Expression |- AccessorBodyEmpty- deriving (Eq, Ord, Read, Show)-_AccessorBody = Core.Name "hydra.csharp.syntax.AccessorBody"-_AccessorBody_block = Core.Name "block"-_AccessorBody_expression = Core.Name "expression"-_AccessorBody_empty = Core.Name "empty"-data RefGetAccessorDeclaration =- RefGetAccessorDeclaration {- refGetAccessorDeclarationAttributes :: (Maybe Attributes),- refGetAccessorDeclarationModifier :: (Maybe AccessorModifier),- refGetAccessorDeclarationBody :: RefAccessorBody}- deriving (Eq, Ord, Read, Show)-_RefGetAccessorDeclaration = Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"-_RefGetAccessorDeclaration_attributes = Core.Name "attributes"-_RefGetAccessorDeclaration_modifier = Core.Name "modifier"-_RefGetAccessorDeclaration_body = Core.Name "body"-data RefAccessorBody =- RefAccessorBodyBlock Block |- RefAccessorBodyRef VariableReference |- RefAccessorBodyEmpty- deriving (Eq, Ord, Read, Show)-_RefAccessorBody = Core.Name "hydra.csharp.syntax.RefAccessorBody"-_RefAccessorBody_block = Core.Name "block"-_RefAccessorBody_ref = Core.Name "ref"-_RefAccessorBody_empty = Core.Name "empty"-data EventDeclaration =- EventDeclarationStandard StandardEventDeclaration |- EventDeclarationAccessors AccessorsEventDeclaration- deriving (Eq, Ord, Read, Show)-_EventDeclaration = Core.Name "hydra.csharp.syntax.EventDeclaration"-_EventDeclaration_standard = Core.Name "standard"-_EventDeclaration_accessors = Core.Name "accessors"-data StandardEventDeclaration =- StandardEventDeclaration {- standardEventDeclarationAttributes :: (Maybe Attributes),- standardEventDeclarationModifiers :: [EventModifier],- standardEventDeclarationType :: Type,- standardEventDeclarationDeclarators :: VariableDeclarators}- deriving (Eq, Ord, Read, Show)-_StandardEventDeclaration = Core.Name "hydra.csharp.syntax.StandardEventDeclaration"-_StandardEventDeclaration_attributes = Core.Name "attributes"-_StandardEventDeclaration_modifiers = Core.Name "modifiers"-_StandardEventDeclaration_type = Core.Name "type"-_StandardEventDeclaration_declarators = Core.Name "declarators"-data AccessorsEventDeclaration =- AccessorsEventDeclaration {- accessorsEventDeclarationAttributes :: (Maybe Attributes),- accessorsEventDeclarationModifiers :: [EventModifier],- accessorsEventDeclarationType :: Type,- accessorsEventDeclarationName :: MemberName,- accessorsEventDeclarationAccessors :: EventAccessorDeclarations}- deriving (Eq, Ord, Read, Show)-_AccessorsEventDeclaration = Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"-_AccessorsEventDeclaration_attributes = Core.Name "attributes"-_AccessorsEventDeclaration_modifiers = Core.Name "modifiers"-_AccessorsEventDeclaration_type = Core.Name "type"-_AccessorsEventDeclaration_name = Core.Name "name"-_AccessorsEventDeclaration_accessors = Core.Name "accessors"-data EventModifier =- EventModifierNew |- EventModifierPublic |- EventModifierProtected |- EventModifierInternal |- EventModifierPrivate |- EventModifierStatic |- EventModifierVirtual |- EventModifierSealed |- EventModifierOverride |- EventModifierAbstract |- EventModifierExtern |- EventModifierUnsafe- deriving (Eq, Ord, Read, Show)-_EventModifier = Core.Name "hydra.csharp.syntax.EventModifier"-_EventModifier_new = Core.Name "new"-_EventModifier_public = Core.Name "public"-_EventModifier_protected = Core.Name "protected"-_EventModifier_internal = Core.Name "internal"-_EventModifier_private = Core.Name "private"-_EventModifier_static = Core.Name "static"-_EventModifier_virtual = Core.Name "virtual"-_EventModifier_sealed = Core.Name "sealed"-_EventModifier_override = Core.Name "override"-_EventModifier_abstract = Core.Name "abstract"-_EventModifier_extern = Core.Name "extern"-_EventModifier_unsafe = Core.Name "unsafe"-data EventAccessorDeclarations =- EventAccessorDeclarationsAdd AddRemoveAccessorDeclaration |- EventAccessorDeclarationsRemove AddRemoveAccessorDeclaration- deriving (Eq, Ord, Read, Show)-_EventAccessorDeclarations = Core.Name "hydra.csharp.syntax.EventAccessorDeclarations"-_EventAccessorDeclarations_add = Core.Name "add"-_EventAccessorDeclarations_remove = Core.Name "remove"-data AddRemoveAccessorDeclaration =- AddRemoveAccessorDeclaration {- addRemoveAccessorDeclarationAttributes :: (Maybe Attributes),- addRemoveAccessorDeclarationBody :: Block}- deriving (Eq, Ord, Read, Show)-_AddRemoveAccessorDeclaration = Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"-_AddRemoveAccessorDeclaration_attributes = Core.Name "attributes"-_AddRemoveAccessorDeclaration_body = Core.Name "body"-data IndexerDeclaration =- IndexerDeclarationStandard StandardIndexerDeclaration |- IndexerDeclarationRef RefIndexerDeclaration- deriving (Eq, Ord, Read, Show)-_IndexerDeclaration = Core.Name "hydra.csharp.syntax.IndexerDeclaration"-_IndexerDeclaration_standard = Core.Name "standard"-_IndexerDeclaration_ref = Core.Name "ref"-data StandardIndexerDeclaration =- StandardIndexerDeclaration {- standardIndexerDeclarationAttributes :: (Maybe Attributes),- standardIndexerDeclarationModifiers :: [IndexerModifier],- standardIndexerDeclarationDeclarator :: IndexerDeclarator,- standardIndexerDeclarationBody :: IndexerBody}- deriving (Eq, Ord, Read, Show)-_StandardIndexerDeclaration = Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"-_StandardIndexerDeclaration_attributes = Core.Name "attributes"-_StandardIndexerDeclaration_modifiers = Core.Name "modifiers"-_StandardIndexerDeclaration_declarator = Core.Name "declarator"-_StandardIndexerDeclaration_body = Core.Name "body"-data RefIndexerDeclaration =- RefIndexerDeclaration {- refIndexerDeclarationAttributes :: (Maybe Attributes),- refIndexerDeclarationModifiers :: [IndexerModifier],- refIndexerDeclarationRefKind :: RefKind,- refIndexerDeclarationDeclarator :: IndexerDeclarator,- refIndexerDeclarationBody :: RefIndexerBody}- deriving (Eq, Ord, Read, Show)-_RefIndexerDeclaration = Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"-_RefIndexerDeclaration_attributes = Core.Name "attributes"-_RefIndexerDeclaration_modifiers = Core.Name "modifiers"-_RefIndexerDeclaration_refKind = Core.Name "refKind"-_RefIndexerDeclaration_declarator = Core.Name "declarator"-_RefIndexerDeclaration_body = Core.Name "body"-data IndexerModifier =- IndexerModifierNew |- IndexerModifierPublic |- IndexerModifierProtected |- IndexerModifierInternal |- IndexerModifierPrivate |- IndexerModifierVirtual |- IndexerModifierSealed |- IndexerModifierOverride |- IndexerModifierAbstract |- IndexerModifierExtern |- IndexerModifierUnsafe- deriving (Eq, Ord, Read, Show)-_IndexerModifier = Core.Name "hydra.csharp.syntax.IndexerModifier"-_IndexerModifier_new = Core.Name "new"-_IndexerModifier_public = Core.Name "public"-_IndexerModifier_protected = Core.Name "protected"-_IndexerModifier_internal = Core.Name "internal"-_IndexerModifier_private = Core.Name "private"-_IndexerModifier_virtual = Core.Name "virtual"-_IndexerModifier_sealed = Core.Name "sealed"-_IndexerModifier_override = Core.Name "override"-_IndexerModifier_abstract = Core.Name "abstract"-_IndexerModifier_extern = Core.Name "extern"-_IndexerModifier_unsafe = Core.Name "unsafe"-data IndexerDeclarator =- IndexerDeclarator {- indexerDeclaratorType :: Type,- indexerDeclaratorInterface :: (Maybe InterfaceType),- indexerDeclaratorParameters :: FormalParameterList}- deriving (Eq, Ord, Read, Show)-_IndexerDeclarator = Core.Name "hydra.csharp.syntax.IndexerDeclarator"-_IndexerDeclarator_type = Core.Name "type"-_IndexerDeclarator_interface = Core.Name "interface"-_IndexerDeclarator_parameters = Core.Name "parameters"-data IndexerBody =- IndexerBodyBlock AccessorDeclarations |- IndexerBodyExpression Expression- deriving (Eq, Ord, Read, Show)-_IndexerBody = Core.Name "hydra.csharp.syntax.IndexerBody"-_IndexerBody_block = Core.Name "block"-_IndexerBody_expression = Core.Name "expression"-data RefIndexerBody =- RefIndexerBodyBlock RefGetAccessorDeclaration |- RefIndexerBodyRef VariableReference- deriving (Eq, Ord, Read, Show)-_RefIndexerBody = Core.Name "hydra.csharp.syntax.RefIndexerBody"-_RefIndexerBody_block = Core.Name "block"-_RefIndexerBody_ref = Core.Name "ref"-data OperatorDeclaration =- OperatorDeclaration {- operatorDeclarationAttributes :: (Maybe Attributes),- operatorDeclarationModifiers :: [OperatorModifier],- operatorDeclarationDeclarator :: OperatorDeclarator,- operatorDeclarationBody :: OperatorBody}- deriving (Eq, Ord, Read, Show)-_OperatorDeclaration = Core.Name "hydra.csharp.syntax.OperatorDeclaration"-_OperatorDeclaration_attributes = Core.Name "attributes"-_OperatorDeclaration_modifiers = Core.Name "modifiers"-_OperatorDeclaration_declarator = Core.Name "declarator"-_OperatorDeclaration_body = Core.Name "body"-data OperatorModifier =- OperatorModifierPublic |- OperatorModifierStatic |- OperatorModifierExtern |- OperatorModifierUnsafe- deriving (Eq, Ord, Read, Show)-_OperatorModifier = Core.Name "hydra.csharp.syntax.OperatorModifier"-_OperatorModifier_public = Core.Name "public"-_OperatorModifier_static = Core.Name "static"-_OperatorModifier_extern = Core.Name "extern"-_OperatorModifier_unsafe = Core.Name "unsafe"-data OperatorDeclarator =- OperatorDeclaratorUnary UnaryOperatorDeclarator |- OperatorDeclaratorBinary BinaryOperatorDeclarator |- OperatorDeclaratorConversion ConversionOperatorDeclarator- deriving (Eq, Ord, Read, Show)-_OperatorDeclarator = Core.Name "hydra.csharp.syntax.OperatorDeclarator"-_OperatorDeclarator_unary = Core.Name "unary"-_OperatorDeclarator_binary = Core.Name "binary"-_OperatorDeclarator_conversion = Core.Name "conversion"-data UnaryOperatorDeclarator =- UnaryOperatorDeclarator {- unaryOperatorDeclaratorType :: Type,- unaryOperatorDeclaratorOperator :: OverloadableUnaryOperator,- unaryOperatorDeclaratorParameter :: FixedParameter}- deriving (Eq, Ord, Read, Show)-_UnaryOperatorDeclarator = Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"-_UnaryOperatorDeclarator_type = Core.Name "type"-_UnaryOperatorDeclarator_operator = Core.Name "operator"-_UnaryOperatorDeclarator_parameter = Core.Name "parameter"-data OverloadableUnaryOperator =- OverloadableUnaryOperatorPlus |- OverloadableUnaryOperatorMinus |- OverloadableUnaryOperatorNot |- OverloadableUnaryOperatorComplement |- OverloadableUnaryOperatorIncrement |- OverloadableUnaryOperatorDecrement |- OverloadableUnaryOperatorTrue |- OverloadableUnaryOperatorFalse- deriving (Eq, Ord, Read, Show)-_OverloadableUnaryOperator = Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"-_OverloadableUnaryOperator_plus = Core.Name "plus"-_OverloadableUnaryOperator_minus = Core.Name "minus"-_OverloadableUnaryOperator_not = Core.Name "not"-_OverloadableUnaryOperator_complement = Core.Name "complement"-_OverloadableUnaryOperator_increment = Core.Name "increment"-_OverloadableUnaryOperator_decrement = Core.Name "decrement"-_OverloadableUnaryOperator_true = Core.Name "true"-_OverloadableUnaryOperator_false = Core.Name "false"-data BinaryOperatorDeclarator =- BinaryOperatorDeclarator {- binaryOperatorDeclaratorType :: Type,- binaryOperatorDeclaratorOperator :: OverloadableBinaryOperator,- binaryOperatorDeclaratorLeft :: FixedParameter,- binaryOperatorDeclaratorRight :: FixedParameter}- deriving (Eq, Ord, Read, Show)-_BinaryOperatorDeclarator = Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"-_BinaryOperatorDeclarator_type = Core.Name "type"-_BinaryOperatorDeclarator_operator = Core.Name "operator"-_BinaryOperatorDeclarator_left = Core.Name "left"-_BinaryOperatorDeclarator_right = Core.Name "right"-data OverloadableBinaryOperator =- OverloadableBinaryOperatorAdd |- OverloadableBinaryOperatorSubtract |- OverloadableBinaryOperatorMultiply |- OverloadableBinaryOperatorDivide |- OverloadableBinaryOperatorModulus |- OverloadableBinaryOperatorAnd |- OverloadableBinaryOperatorOr |- OverloadableBinaryOperatorXor |- OverloadableBinaryOperatorLeftShift |- OverloadableBinaryOperatorRightShift |- OverloadableBinaryOperatorEqual |- OverloadableBinaryOperatorNotEqual |- OverloadableBinaryOperatorGreaterThan |- OverloadableBinaryOperatorLessThan |- OverloadableBinaryOperatorGreaterThanOrEqual |- OverloadableBinaryOperatorLessThanOrEqual- deriving (Eq, Ord, Read, Show)-_OverloadableBinaryOperator = Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"-_OverloadableBinaryOperator_add = Core.Name "add"-_OverloadableBinaryOperator_subtract = Core.Name "subtract"-_OverloadableBinaryOperator_multiply = Core.Name "multiply"-_OverloadableBinaryOperator_divide = Core.Name "divide"-_OverloadableBinaryOperator_modulus = Core.Name "modulus"-_OverloadableBinaryOperator_and = Core.Name "and"-_OverloadableBinaryOperator_or = Core.Name "or"-_OverloadableBinaryOperator_xor = Core.Name "xor"-_OverloadableBinaryOperator_leftShift = Core.Name "leftShift"-_OverloadableBinaryOperator_rightShift = Core.Name "rightShift"-_OverloadableBinaryOperator_equal = Core.Name "equal"-_OverloadableBinaryOperator_notEqual = Core.Name "notEqual"-_OverloadableBinaryOperator_greaterThan = Core.Name "greaterThan"-_OverloadableBinaryOperator_lessThan = Core.Name "lessThan"-_OverloadableBinaryOperator_greaterThanOrEqual = Core.Name "greaterThanOrEqual"-_OverloadableBinaryOperator_lessThanOrEqual = Core.Name "lessThanOrEqual"-data ConversionOperatorDeclarator =- ConversionOperatorDeclarator {- conversionOperatorDeclaratorKind :: ConversionKind,- conversionOperatorDeclaratorType :: Type,- conversionOperatorDeclaratorParameter :: FixedParameter}- deriving (Eq, Ord, Read, Show)-_ConversionOperatorDeclarator = Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"-_ConversionOperatorDeclarator_kind = Core.Name "kind"-_ConversionOperatorDeclarator_type = Core.Name "type"-_ConversionOperatorDeclarator_parameter = Core.Name "parameter"-data ConversionKind =- ConversionKindImplicit |- ConversionKindExplicit- deriving (Eq, Ord, Read, Show)-_ConversionKind = Core.Name "hydra.csharp.syntax.ConversionKind"-_ConversionKind_implicit = Core.Name "implicit"-_ConversionKind_explicit = Core.Name "explicit"-data OperatorBody =- OperatorBodyBlock Block |- OperatorBodyExpression Expression |- OperatorBodyEmpty- deriving (Eq, Ord, Read, Show)-_OperatorBody = Core.Name "hydra.csharp.syntax.OperatorBody"-_OperatorBody_block = Core.Name "block"-_OperatorBody_expression = Core.Name "expression"-_OperatorBody_empty = Core.Name "empty"-data ConstructorDeclaration =- ConstructorDeclaration {- constructorDeclarationAttributes :: (Maybe Attributes),- constructorDeclarationModifiers :: [ConstructorModifier],- constructorDeclarationDeclarator :: ConstructorDeclarator,- constructorDeclarationBody :: ConstructorBody}- deriving (Eq, Ord, Read, Show)-_ConstructorDeclaration = Core.Name "hydra.csharp.syntax.ConstructorDeclaration"-_ConstructorDeclaration_attributes = Core.Name "attributes"-_ConstructorDeclaration_modifiers = Core.Name "modifiers"-_ConstructorDeclaration_declarator = Core.Name "declarator"-_ConstructorDeclaration_body = Core.Name "body"-data ConstructorModifier =- ConstructorModifierPublic |- ConstructorModifierProtected |- ConstructorModifierInternal |- ConstructorModifierPrivate |- ConstructorModifierExtern |- ConstructorModifierUnsafe- deriving (Eq, Ord, Read, Show)-_ConstructorModifier = Core.Name "hydra.csharp.syntax.ConstructorModifier"-_ConstructorModifier_public = Core.Name "public"-_ConstructorModifier_protected = Core.Name "protected"-_ConstructorModifier_internal = Core.Name "internal"-_ConstructorModifier_private = Core.Name "private"-_ConstructorModifier_extern = Core.Name "extern"-_ConstructorModifier_unsafe = Core.Name "unsafe"-data ConstructorDeclarator =- ConstructorDeclarator {- constructorDeclaratorName :: Identifier,- constructorDeclaratorParameters :: (Maybe FormalParameterList),- constructorDeclaratorInitializer :: (Maybe ConstructorInitializer)}- deriving (Eq, Ord, Read, Show)-_ConstructorDeclarator = Core.Name "hydra.csharp.syntax.ConstructorDeclarator"-_ConstructorDeclarator_name = Core.Name "name"-_ConstructorDeclarator_parameters = Core.Name "parameters"-_ConstructorDeclarator_initializer = Core.Name "initializer"-data ConstructorInitializer =- ConstructorInitializerBase (Maybe ArgumentList) |- ConstructorInitializerThis (Maybe ArgumentList)- deriving (Eq, Ord, Read, Show)-_ConstructorInitializer = Core.Name "hydra.csharp.syntax.ConstructorInitializer"-_ConstructorInitializer_base = Core.Name "base"-_ConstructorInitializer_this = Core.Name "this"-data ConstructorBody =- ConstructorBodyBlock Block |- ConstructorBodyExpression Expression |- ConstructorBodyEmpty- deriving (Eq, Ord, Read, Show)-_ConstructorBody = Core.Name "hydra.csharp.syntax.ConstructorBody"-_ConstructorBody_block = Core.Name "block"-_ConstructorBody_expression = Core.Name "expression"-_ConstructorBody_empty = Core.Name "empty"-data StaticConstructorDeclaration =- StaticConstructorDeclaration {- staticConstructorDeclarationAttributes :: (Maybe Attributes),- staticConstructorDeclarationModifiers :: StaticConstructorModifiers,- staticConstructorDeclarationName :: Identifier,- staticConstructorDeclarationBody :: StaticConstructorBody}- deriving (Eq, Ord, Read, Show)-_StaticConstructorDeclaration = Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"-_StaticConstructorDeclaration_attributes = Core.Name "attributes"-_StaticConstructorDeclaration_modifiers = Core.Name "modifiers"-_StaticConstructorDeclaration_name = Core.Name "name"-_StaticConstructorDeclaration_body = Core.Name "body"-data StaticConstructorModifiers =- StaticConstructorModifiers {- staticConstructorModifiersExtern :: Bool,- staticConstructorModifiersUnsafe :: Bool}- deriving (Eq, Ord, Read, Show)-_StaticConstructorModifiers = Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"-_StaticConstructorModifiers_extern = Core.Name "extern"-_StaticConstructorModifiers_unsafe = Core.Name "unsafe"-data StaticConstructorBody =- StaticConstructorBodyBlock Block |- StaticConstructorBodyExpression Expression |- StaticConstructorBodyEmpty- deriving (Eq, Ord, Read, Show)-_StaticConstructorBody = Core.Name "hydra.csharp.syntax.StaticConstructorBody"-_StaticConstructorBody_block = Core.Name "block"-_StaticConstructorBody_expression = Core.Name "expression"-_StaticConstructorBody_empty = Core.Name "empty"-data FinalizerDeclaration =- FinalizerDeclaration {- finalizerDeclarationAttributes :: (Maybe Attributes),- finalizerDeclarationExtern :: Bool,- finalizerDeclarationUnsafe :: Bool,- finalizerDeclarationName :: Identifier,- finalizerDeclarationBody :: FinalizerBody}- deriving (Eq, Ord, Read, Show)-_FinalizerDeclaration = Core.Name "hydra.csharp.syntax.FinalizerDeclaration"-_FinalizerDeclaration_attributes = Core.Name "attributes"-_FinalizerDeclaration_extern = Core.Name "extern"-_FinalizerDeclaration_unsafe = Core.Name "unsafe"-_FinalizerDeclaration_name = Core.Name "name"-_FinalizerDeclaration_body = Core.Name "body"-data FinalizerBody =- FinalizerBodyBlock Block |- FinalizerBodyExpression Expression |- FinalizerBodyEmpty- deriving (Eq, Ord, Read, Show)-_FinalizerBody = Core.Name "hydra.csharp.syntax.FinalizerBody"-_FinalizerBody_block = Core.Name "block"-_FinalizerBody_expression = Core.Name "expression"-_FinalizerBody_empty = Core.Name "empty"-data StructDeclaration =- StructDeclaration {- structDeclarationAttributes :: (Maybe Attributes),- structDeclarationModifiers :: [StructModifier],- structDeclarationRef :: Bool,- structDeclarationPartial :: Bool,- structDeclarationName :: Identifier,- structDeclarationParameters :: (Maybe TypeParameterList),- structDeclarationInterfaces :: [InterfaceType],- structDeclarationConstraints :: [TypeParameterConstraintsClause],- structDeclarationBody :: [StructMemberDeclaration]}- deriving (Eq, Ord, Read, Show)-_StructDeclaration = Core.Name "hydra.csharp.syntax.StructDeclaration"-_StructDeclaration_attributes = Core.Name "attributes"-_StructDeclaration_modifiers = Core.Name "modifiers"-_StructDeclaration_ref = Core.Name "ref"-_StructDeclaration_partial = Core.Name "partial"-_StructDeclaration_name = Core.Name "name"-_StructDeclaration_parameters = Core.Name "parameters"-_StructDeclaration_interfaces = Core.Name "interfaces"-_StructDeclaration_constraints = Core.Name "constraints"-_StructDeclaration_body = Core.Name "body"-data StructModifier =- StructModifierNew |- StructModifierPublic |- StructModifierProtected |- StructModifierInternal |- StructModifierPrivate |- StructModifierReadonly |- StructModifierUnsafe- deriving (Eq, Ord, Read, Show)-_StructModifier = Core.Name "hydra.csharp.syntax.StructModifier"-_StructModifier_new = Core.Name "new"-_StructModifier_public = Core.Name "public"-_StructModifier_protected = Core.Name "protected"-_StructModifier_internal = Core.Name "internal"-_StructModifier_private = Core.Name "private"-_StructModifier_readonly = Core.Name "readonly"-_StructModifier_unsafe = Core.Name "unsafe"-data StructMemberDeclaration =- StructMemberDeclarationConstant ConstantDeclaration |- StructMemberDeclarationField FieldDeclaration |- StructMemberDeclarationMethod MethodDeclaration |- StructMemberDeclarationProperty PropertyDeclaration |- StructMemberDeclarationEvent EventDeclaration |- StructMemberDeclarationIndexer IndexerDeclaration |- StructMemberDeclarationOperator OperatorDeclaration |- StructMemberDeclarationConstructor ConstructorDeclaration |- StructMemberDeclarationStaticConstructor StaticConstructorDeclaration |- StructMemberDeclarationType TypeDeclaration |- StructMemberDeclarationFixedSizeBuffer FixedSizeBufferDeclaration- deriving (Eq, Ord, Read, Show)-_StructMemberDeclaration = Core.Name "hydra.csharp.syntax.StructMemberDeclaration"-_StructMemberDeclaration_constant = Core.Name "constant"-_StructMemberDeclaration_field = Core.Name "field"-_StructMemberDeclaration_method = Core.Name "method"-_StructMemberDeclaration_property = Core.Name "property"-_StructMemberDeclaration_event = Core.Name "event"-_StructMemberDeclaration_indexer = Core.Name "indexer"-_StructMemberDeclaration_operator = Core.Name "operator"-_StructMemberDeclaration_constructor = Core.Name "constructor"-_StructMemberDeclaration_staticConstructor = Core.Name "staticConstructor"-_StructMemberDeclaration_type = Core.Name "type"-_StructMemberDeclaration_fixedSizeBuffer = Core.Name "fixedSizeBuffer"-newtype ArrayInitializer =- ArrayInitializer {- unArrayInitializer :: [VariableInitializer]}- deriving (Eq, Ord, Read, Show)-_ArrayInitializer = Core.Name "hydra.csharp.syntax.ArrayInitializer"-data VariableInitializer =- VariableInitializerExpression Expression |- VariableInitializerArray ArrayInitializer- deriving (Eq, Ord, Read, Show)-_VariableInitializer = Core.Name "hydra.csharp.syntax.VariableInitializer"-_VariableInitializer_expression = Core.Name "expression"-_VariableInitializer_array = Core.Name "array"-data InterfaceDeclaration =- InterfaceDeclaration {- interfaceDeclarationAttributes :: (Maybe Attributes),- interfaceDeclarationModifiers :: [InterfaceModifier],- interfaceDeclarationPartial :: Bool,- interfaceDeclarationName :: Identifier,- interfaceDeclarationParameters :: (Maybe VariantTypeParameters),- interfaceDeclarationBase :: [InterfaceType],- interfaceDeclarationConstraints :: [TypeParameterConstraintsClause],- interfaceDeclarationBody :: [InterfaceMemberDeclaration]}- deriving (Eq, Ord, Read, Show)-_InterfaceDeclaration = Core.Name "hydra.csharp.syntax.InterfaceDeclaration"-_InterfaceDeclaration_attributes = Core.Name "attributes"-_InterfaceDeclaration_modifiers = Core.Name "modifiers"-_InterfaceDeclaration_partial = Core.Name "partial"-_InterfaceDeclaration_name = Core.Name "name"-_InterfaceDeclaration_parameters = Core.Name "parameters"-_InterfaceDeclaration_base = Core.Name "base"-_InterfaceDeclaration_constraints = Core.Name "constraints"-_InterfaceDeclaration_body = Core.Name "body"-data InterfaceModifier =- InterfaceModifierNew |- InterfaceModifierPublic |- InterfaceModifierProtected |- InterfaceModifierInternal |- InterfaceModifierPrivate |- InterfaceModifierUnsafe- deriving (Eq, Ord, Read, Show)-_InterfaceModifier = Core.Name "hydra.csharp.syntax.InterfaceModifier"-_InterfaceModifier_new = Core.Name "new"-_InterfaceModifier_public = Core.Name "public"-_InterfaceModifier_protected = Core.Name "protected"-_InterfaceModifier_internal = Core.Name "internal"-_InterfaceModifier_private = Core.Name "private"-_InterfaceModifier_unsafe = Core.Name "unsafe"-newtype VariantTypeParameters =- VariantTypeParameters {- unVariantTypeParameters :: [VariantTypeParameter]}- deriving (Eq, Ord, Read, Show)-_VariantTypeParameters = Core.Name "hydra.csharp.syntax.VariantTypeParameters"-data VariantTypeParameter =- VariantTypeParameter {- variantTypeParameterAttributes :: (Maybe Attributes),- variantTypeParameterVariance :: (Maybe VarianceAnnotation),- variantTypeParameterParameter :: TypeParameter}- deriving (Eq, Ord, Read, Show)-_VariantTypeParameter = Core.Name "hydra.csharp.syntax.VariantTypeParameter"-_VariantTypeParameter_attributes = Core.Name "attributes"-_VariantTypeParameter_variance = Core.Name "variance"-_VariantTypeParameter_parameter = Core.Name "parameter"-data VarianceAnnotation =- VarianceAnnotationIn |- VarianceAnnotationOut- deriving (Eq, Ord, Read, Show)-_VarianceAnnotation = Core.Name "hydra.csharp.syntax.VarianceAnnotation"-_VarianceAnnotation_in = Core.Name "in"-_VarianceAnnotation_out = Core.Name "out"-data InterfaceMemberDeclaration =- InterfaceMemberDeclarationMethod InterfaceMethodDeclaration |- InterfaceMemberDeclarationProperty InterfacePropertyDeclaration |- InterfaceMemberDeclarationEvent InterfaceEventDeclaration |- InterfaceMemberDeclarationIndexer InterfaceIndexerDeclaration- deriving (Eq, Ord, Read, Show)-_InterfaceMemberDeclaration = Core.Name "hydra.csharp.syntax.InterfaceMemberDeclaration"-_InterfaceMemberDeclaration_method = Core.Name "method"-_InterfaceMemberDeclaration_property = Core.Name "property"-_InterfaceMemberDeclaration_event = Core.Name "event"-_InterfaceMemberDeclaration_indexer = Core.Name "indexer"-data InterfaceMethodDeclaration =- InterfaceMethodDeclaration {- interfaceMethodDeclarationAttributes :: (Maybe Attributes),- interfaceMethodDeclarationNew :: Bool,- interfaceMethodDeclarationReturnType :: ReturnType,- interfaceMethodDeclarationRefKind :: (Maybe RefKind),- interfaceMethodDeclarationHeader :: InterfaceMethodHeader}- deriving (Eq, Ord, Read, Show)-_InterfaceMethodDeclaration = Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"-_InterfaceMethodDeclaration_attributes = Core.Name "attributes"-_InterfaceMethodDeclaration_new = Core.Name "new"-_InterfaceMethodDeclaration_returnType = Core.Name "returnType"-_InterfaceMethodDeclaration_refKind = Core.Name "refKind"-_InterfaceMethodDeclaration_header = Core.Name "header"-data InterfaceMethodHeader =- InterfaceMethodHeader {- interfaceMethodHeaderName :: Identifier,- interfaceMethodHeaderParameters :: (Maybe FormalParameterList),- interfaceMethodHeaderTypeParameters :: (Maybe TypeParameterList),- interfaceMethodHeaderConstraints :: [TypeParameterConstraintsClause]}- deriving (Eq, Ord, Read, Show)-_InterfaceMethodHeader = Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"-_InterfaceMethodHeader_name = Core.Name "name"-_InterfaceMethodHeader_parameters = Core.Name "parameters"-_InterfaceMethodHeader_typeParameters = Core.Name "typeParameters"-_InterfaceMethodHeader_constraints = Core.Name "constraints"-data InterfacePropertyDeclaration =- InterfacePropertyDeclaration {- interfacePropertyDeclarationAttributes :: (Maybe Attributes),- interfacePropertyDeclarationNew :: Bool,- interfacePropertyDeclarationRefKind :: (Maybe RefKind),- interfacePropertyDeclarationType :: Type,- interfacePropertyDeclarationName :: Identifier,- interfacePropertyDeclarationAccessors :: InterfaceAccessors}- deriving (Eq, Ord, Read, Show)-_InterfacePropertyDeclaration = Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"-_InterfacePropertyDeclaration_attributes = Core.Name "attributes"-_InterfacePropertyDeclaration_new = Core.Name "new"-_InterfacePropertyDeclaration_refKind = Core.Name "refKind"-_InterfacePropertyDeclaration_type = Core.Name "type"-_InterfacePropertyDeclaration_name = Core.Name "name"-_InterfacePropertyDeclaration_accessors = Core.Name "accessors"-data InterfaceAccessors =- InterfaceAccessors {- interfaceAccessorsAttributes :: (Maybe Attributes),- interfaceAccessorsGet :: (Maybe Attributes),- interfaceAccessorsSet :: (Maybe Attributes)}- deriving (Eq, Ord, Read, Show)-_InterfaceAccessors = Core.Name "hydra.csharp.syntax.InterfaceAccessors"-_InterfaceAccessors_attributes = Core.Name "attributes"-_InterfaceAccessors_get = Core.Name "get"-_InterfaceAccessors_set = Core.Name "set"-data InterfaceEventDeclaration =- InterfaceEventDeclaration {- interfaceEventDeclarationAttributes :: (Maybe Attributes),- interfaceEventDeclarationNew :: Bool,- interfaceEventDeclarationType :: Type,- interfaceEventDeclarationName :: Identifier}- deriving (Eq, Ord, Read, Show)-_InterfaceEventDeclaration = Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"-_InterfaceEventDeclaration_attributes = Core.Name "attributes"-_InterfaceEventDeclaration_new = Core.Name "new"-_InterfaceEventDeclaration_type = Core.Name "type"-_InterfaceEventDeclaration_name = Core.Name "name"-data InterfaceIndexerDeclaration =- InterfaceIndexerDeclaration {- interfaceIndexerDeclarationAttributes :: (Maybe Attributes),- interfaceIndexerDeclarationNew :: Bool,- interfaceIndexerDeclarationRefKind :: (Maybe RefKind),- interfaceIndexerDeclarationType :: Type,- interfaceIndexerDeclarationParameters :: FormalParameterList,- interfaceIndexerDeclarationAccessors :: InterfaceAccessors}- deriving (Eq, Ord, Read, Show)-_InterfaceIndexerDeclaration = Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"-_InterfaceIndexerDeclaration_attributes = Core.Name "attributes"-_InterfaceIndexerDeclaration_new = Core.Name "new"-_InterfaceIndexerDeclaration_refKind = Core.Name "refKind"-_InterfaceIndexerDeclaration_type = Core.Name "type"-_InterfaceIndexerDeclaration_parameters = Core.Name "parameters"-_InterfaceIndexerDeclaration_accessors = Core.Name "accessors"-data EnumDeclaration =- EnumDeclaration {- enumDeclarationAttributes :: (Maybe Attributes),- enumDeclarationModifiers :: [EnumModifier],- enumDeclarationName :: Identifier,- enumDeclarationBase :: (Maybe EnumBase),- enumDeclarationBody :: (Maybe EnumBody)}- deriving (Eq, Ord, Read, Show)-_EnumDeclaration = Core.Name "hydra.csharp.syntax.EnumDeclaration"-_EnumDeclaration_attributes = Core.Name "attributes"-_EnumDeclaration_modifiers = Core.Name "modifiers"-_EnumDeclaration_name = Core.Name "name"-_EnumDeclaration_base = Core.Name "base"-_EnumDeclaration_body = Core.Name "body"-data EnumBase =- EnumBaseType IntegralType |- EnumBaseName TypeName- deriving (Eq, Ord, Read, Show)-_EnumBase = Core.Name "hydra.csharp.syntax.EnumBase"-_EnumBase_type = Core.Name "type"-_EnumBase_name = Core.Name "name"-newtype EnumBody =- EnumBody {- unEnumBody :: [EnumMemberDeclaration]}- deriving (Eq, Ord, Read, Show)-_EnumBody = Core.Name "hydra.csharp.syntax.EnumBody"-data EnumModifier =- EnumModifierNew |- EnumModifierPublic |- EnumModifierProtected |- EnumModifierInternal |- EnumModifierPrivate- deriving (Eq, Ord, Read, Show)-_EnumModifier = Core.Name "hydra.csharp.syntax.EnumModifier"-_EnumModifier_new = Core.Name "new"-_EnumModifier_public = Core.Name "public"-_EnumModifier_protected = Core.Name "protected"-_EnumModifier_internal = Core.Name "internal"-_EnumModifier_private = Core.Name "private"-data EnumMemberDeclaration =- EnumMemberDeclaration {- enumMemberDeclarationAttributes :: (Maybe Attributes),- enumMemberDeclarationName :: Identifier,- enumMemberDeclarationValue :: (Maybe ConstantExpression)}- deriving (Eq, Ord, Read, Show)-_EnumMemberDeclaration = Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"-_EnumMemberDeclaration_attributes = Core.Name "attributes"-_EnumMemberDeclaration_name = Core.Name "name"-_EnumMemberDeclaration_value = Core.Name "value"-data DelegateDeclaration =- DelegateDeclaration {- delegateDeclarationAttributes :: (Maybe Attributes),- delegateDeclarationModifiers :: [DelegateModifier],- delegateDeclarationReturnType :: ReturnType,- delegateDeclarationRefKind :: (Maybe RefKind),- delegateDeclarationRefReturnType :: (Maybe Type),- delegateDeclarationHeader :: DelegateHeader}- deriving (Eq, Ord, Read, Show)-_DelegateDeclaration = Core.Name "hydra.csharp.syntax.DelegateDeclaration"-_DelegateDeclaration_attributes = Core.Name "attributes"-_DelegateDeclaration_modifiers = Core.Name "modifiers"-_DelegateDeclaration_returnType = Core.Name "returnType"-_DelegateDeclaration_refKind = Core.Name "refKind"-_DelegateDeclaration_refReturnType = Core.Name "refReturnType"-_DelegateDeclaration_header = Core.Name "header"-data DelegateHeader =- DelegateHeader {- delegateHeaderName :: Identifier,- delegateHeaderTypeParameters :: (Maybe VariantTypeParameters),- delegateHeaderParameters :: (Maybe FormalParameterList),- delegateHeaderConstraints :: [TypeParameterConstraintsClause]}- deriving (Eq, Ord, Read, Show)-_DelegateHeader = Core.Name "hydra.csharp.syntax.DelegateHeader"-_DelegateHeader_name = Core.Name "name"-_DelegateHeader_typeParameters = Core.Name "typeParameters"-_DelegateHeader_parameters = Core.Name "parameters"-_DelegateHeader_constraints = Core.Name "constraints"-data DelegateModifier =- DelegateModifierNew |- DelegateModifierPublic |- DelegateModifierProtected |- DelegateModifierInternal |- DelegateModifierPrivate |- DelegateModifierUnsafe- deriving (Eq, Ord, Read, Show)-_DelegateModifier = Core.Name "hydra.csharp.syntax.DelegateModifier"-_DelegateModifier_new = Core.Name "new"-_DelegateModifier_public = Core.Name "public"-_DelegateModifier_protected = Core.Name "protected"-_DelegateModifier_internal = Core.Name "internal"-_DelegateModifier_private = Core.Name "private"-_DelegateModifier_unsafe = Core.Name "unsafe"-data GlobalAttributeSection =- GlobalAttributeSection {- globalAttributeSectionTarget :: Identifier,- globalAttributeSectionAttributes :: AttributeList}- deriving (Eq, Ord, Read, Show)-_GlobalAttributeSection = Core.Name "hydra.csharp.syntax.GlobalAttributeSection"-_GlobalAttributeSection_target = Core.Name "target"-_GlobalAttributeSection_attributes = Core.Name "attributes"-newtype Attributes =- Attributes {- unAttributes :: [AttributeSection]}- deriving (Eq, Ord, Read, Show)-_Attributes = Core.Name "hydra.csharp.syntax.Attributes"-data AttributeSection =- AttributeSection {- attributeSectionTarget :: (Maybe AttributeTarget),- attributeSectionAttributes :: AttributeList}- deriving (Eq, Ord, Read, Show)-_AttributeSection = Core.Name "hydra.csharp.syntax.AttributeSection"-_AttributeSection_target = Core.Name "target"-_AttributeSection_attributes = Core.Name "attributes"-data AttributeTarget =- AttributeTargetIdentifier Identifier |- AttributeTargetKeyword Keyword- deriving (Eq, Ord, Read, Show)-_AttributeTarget = Core.Name "hydra.csharp.syntax.AttributeTarget"-_AttributeTarget_identifier = Core.Name "identifier"-_AttributeTarget_keyword = Core.Name "keyword"-newtype AttributeList =- AttributeList {- unAttributeList :: [Attribute]}- deriving (Eq, Ord, Read, Show)-_AttributeList = Core.Name "hydra.csharp.syntax.AttributeList"-data Attribute =- Attribute {- attributeName :: AttributeName,- attributeArguments :: (Maybe AttributeArguments)}- deriving (Eq, Ord, Read, Show)-_Attribute = Core.Name "hydra.csharp.syntax.Attribute"-_Attribute_name = Core.Name "name"-_Attribute_arguments = Core.Name "arguments"-newtype AttributeName =- AttributeName {- unAttributeName :: TypeName}- deriving (Eq, Ord, Read, Show)-_AttributeName = Core.Name "hydra.csharp.syntax.AttributeName"-data AttributeArguments =- AttributeArguments {- attributeArgumentsPositonal :: (Maybe PositionalArgumentList),- attributeArgumentsNamed :: (Maybe NamedArgumentList)}- deriving (Eq, Ord, Read, Show)-_AttributeArguments = Core.Name "hydra.csharp.syntax.AttributeArguments"-_AttributeArguments_positonal = Core.Name "positonal"-_AttributeArguments_named = Core.Name "named"-newtype PositionalArgumentList =- PositionalArgumentList {- unPositionalArgumentList :: [PositionalArgument]}- deriving (Eq, Ord, Read, Show)-_PositionalArgumentList = Core.Name "hydra.csharp.syntax.PositionalArgumentList"-data PositionalArgument =- PositionalArgument {- positionalArgumentName :: (Maybe Identifier),- positionalArgumentValue :: AttributeArgumentExpression}- deriving (Eq, Ord, Read, Show)-_PositionalArgument = Core.Name "hydra.csharp.syntax.PositionalArgument"-_PositionalArgument_name = Core.Name "name"-_PositionalArgument_value = Core.Name "value"-newtype NamedArgumentList =- NamedArgumentList {- unNamedArgumentList :: [NamedArgument]}- deriving (Eq, Ord, Read, Show)-_NamedArgumentList = Core.Name "hydra.csharp.syntax.NamedArgumentList"-data NamedArgument =- NamedArgument {- namedArgumentName :: Identifier,- namedArgumentValue :: AttributeArgumentExpression}- deriving (Eq, Ord, Read, Show)-_NamedArgument = Core.Name "hydra.csharp.syntax.NamedArgument"-_NamedArgument_name = Core.Name "name"-_NamedArgument_value = Core.Name "value"-newtype AttributeArgumentExpression =- AttributeArgumentExpression {- unAttributeArgumentExpression :: NonAssignmentExpression}- deriving (Eq, Ord, Read, Show)-_AttributeArgumentExpression = Core.Name "hydra.csharp.syntax.AttributeArgumentExpression"-data PointerType =- PointerTypeValueType (Maybe ValueType) |- PointerTypePointerDepth Int- deriving (Eq, Ord, Read, Show)-_PointerType = Core.Name "hydra.csharp.syntax.PointerType"-_PointerType_valueType = Core.Name "valueType"-_PointerType_pointerDepth = Core.Name "pointerDepth"-data PointerMemberAccess =- PointerMemberAccess {- pointerMemberAccessPointer :: PrimaryExpression,- pointerMemberAccessMember :: Identifier,- pointerMemberAccessTypeArguments :: (Maybe TypeArgumentList)}- deriving (Eq, Ord, Read, Show)-_PointerMemberAccess = Core.Name "hydra.csharp.syntax.PointerMemberAccess"-_PointerMemberAccess_pointer = Core.Name "pointer"-_PointerMemberAccess_member = Core.Name "member"-_PointerMemberAccess_typeArguments = Core.Name "typeArguments"-data PointerElementAccess =- PointerElementAccess {- pointerElementAccessPointer :: PrimaryNoArrayCreationExpression,- pointerElementAccessIndex :: Expression}- deriving (Eq, Ord, Read, Show)-_PointerElementAccess = Core.Name "hydra.csharp.syntax.PointerElementAccess"-_PointerElementAccess_pointer = Core.Name "pointer"-_PointerElementAccess_index = Core.Name "index"-data FixedStatement =- FixedStatement {- fixedStatementPointerType :: PointerType,- fixedStatementDeclarators :: [FixedPointerDeclarator],- fixedStatementStatement :: EmbeddedStatement}- deriving (Eq, Ord, Read, Show)-_FixedStatement = Core.Name "hydra.csharp.syntax.FixedStatement"-_FixedStatement_pointerType = Core.Name "pointerType"-_FixedStatement_declarators = Core.Name "declarators"-_FixedStatement_statement = Core.Name "statement"-data FixedPointerDeclarator =- FixedPointerDeclaratorReference VariableReference |- FixedPointerDeclaratorExpression Expression- deriving (Eq, Ord, Read, Show)-_FixedPointerDeclarator = Core.Name "hydra.csharp.syntax.FixedPointerDeclarator"-_FixedPointerDeclarator_reference = Core.Name "reference"-_FixedPointerDeclarator_expression = Core.Name "expression"-data FixedSizeBufferDeclaration =- FixedSizeBufferDeclaration {- fixedSizeBufferDeclarationAttributes :: (Maybe Attributes),- fixedSizeBufferDeclarationModifiers :: [FixedSizeBufferModifier],- fixedSizeBufferDeclarationElementType :: Type,- fixedSizeBufferDeclarationDeclarators :: [FixedSizeBufferDeclarator]}- deriving (Eq, Ord, Read, Show)-_FixedSizeBufferDeclaration = Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"-_FixedSizeBufferDeclaration_attributes = Core.Name "attributes"-_FixedSizeBufferDeclaration_modifiers = Core.Name "modifiers"-_FixedSizeBufferDeclaration_elementType = Core.Name "elementType"-_FixedSizeBufferDeclaration_declarators = Core.Name "declarators"-data FixedSizeBufferModifier =- FixedSizeBufferModifierNew |- FixedSizeBufferModifierPublic |- FixedSizeBufferModifierInternal |- FixedSizeBufferModifierPrivate |- FixedSizeBufferModifierUnsafe- deriving (Eq, Ord, Read, Show)-_FixedSizeBufferModifier = Core.Name "hydra.csharp.syntax.FixedSizeBufferModifier"-_FixedSizeBufferModifier_new = Core.Name "new"-_FixedSizeBufferModifier_public = Core.Name "public"-_FixedSizeBufferModifier_internal = Core.Name "internal"-_FixedSizeBufferModifier_private = Core.Name "private"-_FixedSizeBufferModifier_unsafe = Core.Name "unsafe"-data FixedSizeBufferDeclarator =- FixedSizeBufferDeclarator {- fixedSizeBufferDeclaratorName :: Identifier,- fixedSizeBufferDeclaratorSize :: ConstantExpression}- deriving (Eq, Ord, Read, Show)-_FixedSizeBufferDeclarator = Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"-_FixedSizeBufferDeclarator_name = Core.Name "name"-_FixedSizeBufferDeclarator_size = Core.Name "size"++-- | A C# syntax module based on the ANTLR grammar dated 02/07/2024 and available at:+-- | https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/grammar++module Hydra.Csharp.Syntax where++import qualified Hydra.Core as Core+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci++-- | The body of a property or indexer accessor: a block, an expression, or empty (abstract).+data AccessorBody =+ AccessorBodyBlock Block |+ AccessorBodyExpression Expression |+ AccessorBodyEmpty+ deriving (Eq, Ord, Read, Show)++_AccessorBody = Core.Name "hydra.csharp.syntax.AccessorBody"++_AccessorBody_block = Core.Name "block"++_AccessorBody_expression = Core.Name "expression"++_AccessorBody_empty = Core.Name "empty"++-- | A single get or set accessor, with optional attributes and an access modifier.+data AccessorDeclaration =+ AccessorDeclaration {+ accessorDeclarationAttributes :: (Maybe Attributes),+ accessorDeclarationModifier :: (Maybe AccessorModifier),+ accessorDeclarationBody :: AccessorBody}+ deriving (Eq, Ord, Read, Show)++_AccessorDeclaration = Core.Name "hydra.csharp.syntax.AccessorDeclaration"++_AccessorDeclaration_attributes = Core.Name "attributes"++_AccessorDeclaration_modifier = Core.Name "modifier"++_AccessorDeclaration_body = Core.Name "body"++-- | The get and/or set accessors of a standard (non-ref-returning) property.+data AccessorDeclarations =+ AccessorDeclarationsGet (Maybe AccessorDeclaration) |+ AccessorDeclarationsSet (Maybe AccessorDeclaration)+ deriving (Eq, Ord, Read, Show)++_AccessorDeclarations = Core.Name "hydra.csharp.syntax.AccessorDeclarations"++_AccessorDeclarations_get = Core.Name "get"++_AccessorDeclarations_set = Core.Name "set"++-- | An access modifier restricting a get or set accessor beyond the property's own accessibility.+data AccessorModifier =+ AccessorModifierProtected |+ AccessorModifierInternal |+ AccessorModifierPrivate |+ AccessorModifierProtectedInternal |+ AccessorModifierInternalProtected |+ AccessorModifierProtectedPrivate |+ AccessorModifierPrivateProtected+ deriving (Eq, Ord, Read, Show)++_AccessorModifier = Core.Name "hydra.csharp.syntax.AccessorModifier"++_AccessorModifier_protected = Core.Name "protected"++_AccessorModifier_internal = Core.Name "internal"++_AccessorModifier_private = Core.Name "private"++_AccessorModifier_protectedInternal = Core.Name "protectedInternal"++_AccessorModifier_internalProtected = Core.Name "internalProtected"++_AccessorModifier_protectedPrivate = Core.Name "protectedPrivate"++_AccessorModifier_privateProtected = Core.Name "privateProtected"++-- | An event declaration using explicit add/remove accessor syntax.+data AccessorsEventDeclaration =+ AccessorsEventDeclaration {+ accessorsEventDeclarationAttributes :: (Maybe Attributes),+ accessorsEventDeclarationModifiers :: [EventModifier],+ accessorsEventDeclarationType :: Type,+ accessorsEventDeclarationName :: MemberName,+ accessorsEventDeclarationAccessors :: EventAccessorDeclarations}+ deriving (Eq, Ord, Read, Show)++_AccessorsEventDeclaration = Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"++_AccessorsEventDeclaration_attributes = Core.Name "attributes"++_AccessorsEventDeclaration_modifiers = Core.Name "modifiers"++_AccessorsEventDeclaration_type = Core.Name "type"++_AccessorsEventDeclaration_name = Core.Name "name"++_AccessorsEventDeclaration_accessors = Core.Name "accessors"++-- | The add or remove accessor body of an event declaration.+data AddRemoveAccessorDeclaration =+ AddRemoveAccessorDeclaration {+ addRemoveAccessorDeclarationAttributes :: (Maybe Attributes),+ addRemoveAccessorDeclarationBody :: Block}+ deriving (Eq, Ord, Read, Show)++_AddRemoveAccessorDeclaration = Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"++_AddRemoveAccessorDeclaration_attributes = Core.Name "attributes"++_AddRemoveAccessorDeclaration_body = Core.Name "body"++-- | A simple multiplicative expression or a binary addition/subtraction expression.+data AdditiveExpression =+ AdditiveExpressionSimple MultiplicativeExpression |+ AdditiveExpressionBinary BinaryAdditiveExpression+ deriving (Eq, Ord, Read, Show)++_AdditiveExpression = Core.Name "hydra.csharp.syntax.AdditiveExpression"++_AdditiveExpression_simple = Core.Name "simple"++_AdditiveExpression_binary = Core.Name "binary"++-- | The plus or minus operator used in an additive expression.+data AdditiveOperator =+ AdditiveOperatorPlus |+ AdditiveOperatorMinus+ deriving (Eq, Ord, Read, Show)++_AdditiveOperator = Core.Name "hydra.csharp.syntax.AdditiveOperator"++_AdditiveOperator_plus = Core.Name "plus"++_AdditiveOperator_minus = Core.Name "minus"++-- | A simple equality expression or a binary bitwise-AND expression.+data AndExpression =+ AndExpressionSimple EqualityExpression |+ AndExpressionBinary BinaryAndExpression+ deriving (Eq, Ord, Read, Show)++_AndExpression = Core.Name "hydra.csharp.syntax.AndExpression"++_AndExpression_simple = Core.Name "simple"++_AndExpression_binary = Core.Name "binary"++-- | The body of an anonymous function: a null-conditional invocation, expression, ref, or block.+data AnonymousFunctionBody =+ AnonymousFunctionBodyNullConditionalInvocation NullConditionalInvocationExpression |+ AnonymousFunctionBodyExpression Expression |+ AnonymousFunctionBodyRef VariableReference |+ AnonymousFunctionBodyBlock Block+ deriving (Eq, Ord, Read, Show)++_AnonymousFunctionBody = Core.Name "hydra.csharp.syntax.AnonymousFunctionBody"++_AnonymousFunctionBody_nullConditionalInvocation = Core.Name "nullConditionalInvocation"++_AnonymousFunctionBody_expression = Core.Name "expression"++_AnonymousFunctionBody_ref = Core.Name "ref"++_AnonymousFunctionBody_block = Core.Name "block"++-- | A ref, out, or in modifier on an explicit anonymous function parameter.+data AnonymousFunctionParameterModifier =+ AnonymousFunctionParameterModifierRef |+ AnonymousFunctionParameterModifierOut |+ AnonymousFunctionParameterModifierIn+ deriving (Eq, Ord, Read, Show)++_AnonymousFunctionParameterModifier = Core.Name "hydra.csharp.syntax.AnonymousFunctionParameterModifier"++_AnonymousFunctionParameterModifier_ref = Core.Name "ref"++_AnonymousFunctionParameterModifier_out = Core.Name "out"++_AnonymousFunctionParameterModifier_in = Core.Name "in"++-- | The parameter list of a lambda expression, either explicitly or implicitly typed.+data AnonymousFunctionSignature =+ AnonymousFunctionSignatureExplicit [ExplicitAnonymousFunctionParameter] |+ AnonymousFunctionSignatureImplicit [Identifier]+ deriving (Eq, Ord, Read, Show)++_AnonymousFunctionSignature = Core.Name "hydra.csharp.syntax.AnonymousFunctionSignature"++_AnonymousFunctionSignature_explicit = Core.Name "explicit"++_AnonymousFunctionSignature_implicit = Core.Name "implicit"++-- | A delegate expression created with the anonymous method syntax (delegate(...) { ... }).+data AnonymousMethodExpression =+ AnonymousMethodExpression {+ anonymousMethodExpressionAsync :: Bool,+ anonymousMethodExpressionSignature :: [ExplicitAnonymousFunctionParameter],+ anonymousMethodExpressionBody :: Block}+ deriving (Eq, Ord, Read, Show)++_AnonymousMethodExpression = Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"++_AnonymousMethodExpression_async = Core.Name "async"++_AnonymousMethodExpression_signature = Core.Name "signature"++_AnonymousMethodExpression_body = Core.Name "body"++-- | A single argument in an argument list, with an optional name for named arguments.+data Argument =+ Argument {+ argumentName :: (Maybe Identifier),+ argumentValue :: ArgumentValue}+ deriving (Eq, Ord, Read, Show)++_Argument = Core.Name "hydra.csharp.syntax.Argument"++_Argument_name = Core.Name "name"++_Argument_value = Core.Name "value"++-- | A non-empty, comma-separated list of arguments passed to a member or delegate invocation.+newtype ArgumentList =+ ArgumentList {+ unArgumentList :: [Argument]}+ deriving (Eq, Ord, Read, Show)++_ArgumentList = Core.Name "hydra.csharp.syntax.ArgumentList"++-- | The value portion of an argument: an expression, or a ref/in/out variable reference.+data ArgumentValue =+ ArgumentValueExpression Expression |+ ArgumentValueIn VariableReference |+ ArgumentValueRef VariableReference |+ ArgumentValueOut VariableReference+ deriving (Eq, Ord, Read, Show)++_ArgumentValue = Core.Name "hydra.csharp.syntax.ArgumentValue"++_ArgumentValue_expression = Core.Name "expression"++_ArgumentValue_in = Core.Name "in"++_ArgumentValue_ref = Core.Name "ref"++_ArgumentValue_out = Core.Name "out"++-- | An expression that creates a new array, in any of its three creation-syntax forms.+data ArrayCreationExpression =+ ArrayCreationExpressionNonArrayType NonArrayTypeArrayCreationExpression |+ ArrayCreationExpressionArrayType ArrayTypeArrayCreationExpression |+ ArrayCreationExpressionRankSpecifier RankSpecifierArrayCreationExpression+ deriving (Eq, Ord, Read, Show)++_ArrayCreationExpression = Core.Name "hydra.csharp.syntax.ArrayCreationExpression"++_ArrayCreationExpression_nonArrayType = Core.Name "nonArrayType"++_ArrayCreationExpression_arrayType = Core.Name "arrayType"++_ArrayCreationExpression_rankSpecifier = Core.Name "rankSpecifier"++-- | A brace-delimited list of variable initializers used to populate an array.+newtype ArrayInitializer =+ ArrayInitializer {+ unArrayInitializer :: [VariableInitializer]}+ deriving (Eq, Ord, Read, Show)++_ArrayInitializer = Core.Name "hydra.csharp.syntax.ArrayInitializer"++-- | An array type formed from a non-array element type and one or more rank specifiers.+data ArrayType =+ ArrayType {+ arrayTypeType :: NonArrayType,+ arrayTypeRank :: [RankSpecifier]}+ deriving (Eq, Ord, Read, Show)++_ArrayType = Core.Name "hydra.csharp.syntax.ArrayType"++_ArrayType_type = Core.Name "type"++_ArrayType_rank = Core.Name "rank"++-- | Array creation using an explicit array type together with an array initializer.+data ArrayTypeArrayCreationExpression =+ ArrayTypeArrayCreationExpression {+ arrayTypeArrayCreationExpressionType :: ArrayType,+ arrayTypeArrayCreationExpressionInitializer :: ArrayInitializer}+ deriving (Eq, Ord, Read, Show)++_ArrayTypeArrayCreationExpression = Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"++_ArrayTypeArrayCreationExpression_type = Core.Name "type"++_ArrayTypeArrayCreationExpression_initializer = Core.Name "initializer"++-- | An 'as' expression that attempts a type conversion, yielding null on failure.+data AsTypeExpression =+ AsTypeExpression {+ asTypeExpressionExpression :: RelationalExpression,+ asTypeExpressionType :: Type}+ deriving (Eq, Ord, Read, Show)++_AsTypeExpression = Core.Name "hydra.csharp.syntax.AsTypeExpression"++_AsTypeExpression_expression = Core.Name "expression"++_AsTypeExpression_type = Core.Name "type"++-- | An assignment expression: a target, an assignment operator, and a right-hand expression.+data Assignment =+ Assignment {+ assignmentLeft :: UnaryExpression,+ assignmentOperator :: AssignmentOperator,+ assignmentRight :: Expression}+ deriving (Eq, Ord, Read, Show)++_Assignment = Core.Name "hydra.csharp.syntax.Assignment"++_Assignment_left = Core.Name "left"++_Assignment_operator = Core.Name "operator"++_Assignment_right = Core.Name "right"++-- | A member declarator of the form 'name = expression' in an anonymous object creation.+data AssignmentMemberDeclarator =+ AssignmentMemberDeclarator {+ assignmentMemberDeclaratorIdentifier :: Identifier,+ assignmentMemberDeclaratorExpression :: Expression}+ deriving (Eq, Ord, Read, Show)++_AssignmentMemberDeclarator = Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"++_AssignmentMemberDeclarator_identifier = Core.Name "identifier"++_AssignmentMemberDeclarator_expression = Core.Name "expression"++-- | The simple assignment operator or one of the compound assignment operators.+data AssignmentOperator =+ AssignmentOperatorSimple Bool |+ AssignmentOperatorPlusEquals |+ AssignmentOperatorMinusEquals |+ AssignmentOperatorTimesEquals |+ AssignmentOperatorDivideEquals |+ AssignmentOperatorModEquals |+ AssignmentOperatorAndEquals |+ AssignmentOperatorOrEquals |+ AssignmentOperatorXorEquals |+ AssignmentOperatorLeftShiftEquals |+ AssignmentOperatorRightShiftEquals+ deriving (Eq, Ord, Read, Show)++_AssignmentOperator = Core.Name "hydra.csharp.syntax.AssignmentOperator"++_AssignmentOperator_simple = Core.Name "simple"++_AssignmentOperator_plusEquals = Core.Name "plusEquals"++_AssignmentOperator_minusEquals = Core.Name "minusEquals"++_AssignmentOperator_timesEquals = Core.Name "timesEquals"++_AssignmentOperator_divideEquals = Core.Name "divideEquals"++_AssignmentOperator_modEquals = Core.Name "modEquals"++_AssignmentOperator_andEquals = Core.Name "andEquals"++_AssignmentOperator_orEquals = Core.Name "orEquals"++_AssignmentOperator_xorEquals = Core.Name "xorEquals"++_AssignmentOperator_leftShiftEquals = Core.Name "leftShiftEquals"++_AssignmentOperator_rightShiftEquals = Core.Name "rightShiftEquals"++-- | A single attribute, consisting of an attribute name and optional constructor/named arguments.+data Attribute =+ Attribute {+ attributeName :: AttributeName,+ attributeArguments :: (Maybe AttributeArguments)}+ deriving (Eq, Ord, Read, Show)++_Attribute = Core.Name "hydra.csharp.syntax.Attribute"++_Attribute_name = Core.Name "name"++_Attribute_arguments = Core.Name "arguments"++-- | An expression usable as an attribute argument (a compile-time constant expression).+newtype AttributeArgumentExpression =+ AttributeArgumentExpression {+ unAttributeArgumentExpression :: NonAssignmentExpression}+ deriving (Eq, Ord, Read, Show)++_AttributeArgumentExpression = Core.Name "hydra.csharp.syntax.AttributeArgumentExpression"++-- | The positional and named argument lists supplied to an attribute.+data AttributeArguments =+ AttributeArguments {+ attributeArgumentsPositonal :: (Maybe PositionalArgumentList),+ attributeArgumentsNamed :: (Maybe NamedArgumentList)}+ deriving (Eq, Ord, Read, Show)++_AttributeArguments = Core.Name "hydra.csharp.syntax.AttributeArguments"++_AttributeArguments_positonal = Core.Name "positonal"++_AttributeArguments_named = Core.Name "named"++-- | A non-empty, comma-separated list of attributes within a single attribute section.+newtype AttributeList =+ AttributeList {+ unAttributeList :: [Attribute]}+ deriving (Eq, Ord, Read, Show)++_AttributeList = Core.Name "hydra.csharp.syntax.AttributeList"++-- | The type name referenced by an attribute, resolved against types ending in the suffix Attribute.+newtype AttributeName =+ AttributeName {+ unAttributeName :: TypeName}+ deriving (Eq, Ord, Read, Show)++_AttributeName = Core.Name "hydra.csharp.syntax.AttributeName"++-- | A bracketed attribute section, with an optional target specifier, attached to a declaration.+data AttributeSection =+ AttributeSection {+ attributeSectionTarget :: (Maybe AttributeTarget),+ attributeSectionAttributes :: AttributeList}+ deriving (Eq, Ord, Read, Show)++_AttributeSection = Core.Name "hydra.csharp.syntax.AttributeSection"++_AttributeSection_target = Core.Name "target"++_AttributeSection_attributes = Core.Name "attributes"++-- | The target specifier of an attribute section (e.g. assembly, module, return, field).+data AttributeTarget =+ AttributeTargetIdentifier Identifier |+ AttributeTargetKeyword Keyword+ deriving (Eq, Ord, Read, Show)++_AttributeTarget = Core.Name "hydra.csharp.syntax.AttributeTarget"++_AttributeTarget_identifier = Core.Name "identifier"++_AttributeTarget_keyword = Core.Name "keyword"++-- | A non-empty sequence of attribute sections attached to a single declaration.+newtype Attributes =+ Attributes {+ unAttributes :: [AttributeSection]}+ deriving (Eq, Ord, Read, Show)++_Attributes = Core.Name "hydra.csharp.syntax.Attributes"++-- | A 'base' access expression, either invoking a base member or indexing via base[args].+data BaseAccess =+ BaseAccessIdentifier BaseAccessWithIdentifier |+ BaseAccessArguments ArgumentList+ deriving (Eq, Ord, Read, Show)++_BaseAccess = Core.Name "hydra.csharp.syntax.BaseAccess"++_BaseAccess_identifier = Core.Name "identifier"++_BaseAccess_arguments = Core.Name "arguments"++-- | A 'base.member' access, with an optional list of type arguments.+data BaseAccessWithIdentifier =+ BaseAccessWithIdentifier {+ baseAccessWithIdentifierIdentifier :: Identifier,+ baseAccessWithIdentifierTypeArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_BaseAccessWithIdentifier = Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"++_BaseAccessWithIdentifier_identifier = Core.Name "identifier"++_BaseAccessWithIdentifier_typeArguments = Core.Name "typeArguments"++-- | A binary addition or subtraction expression with a left operand, operator, and right operand.+data BinaryAdditiveExpression =+ BinaryAdditiveExpression {+ binaryAdditiveExpressionLeft :: AdditiveExpression,+ binaryAdditiveExpressionOperator :: AdditiveOperator,+ binaryAdditiveExpressionRight :: MultiplicativeExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryAdditiveExpression = Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"++_BinaryAdditiveExpression_left = Core.Name "left"++_BinaryAdditiveExpression_operator = Core.Name "operator"++_BinaryAdditiveExpression_right = Core.Name "right"++-- | A binary bitwise-AND expression (&) over two operand expressions.+data BinaryAndExpression =+ BinaryAndExpression {+ binaryAndExpressionLeft :: AndExpression,+ binaryAndExpressionRight :: EqualityExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryAndExpression = Core.Name "hydra.csharp.syntax.BinaryAndExpression"++_BinaryAndExpression_left = Core.Name "left"++_BinaryAndExpression_right = Core.Name "right"++-- | A binary conditional-AND expression (&&) over two operand expressions.+data BinaryConditionalAndExpression =+ BinaryConditionalAndExpression {+ binaryConditionalAndExpressionLeft :: ConditionalAndExpression,+ binaryConditionalAndExpressionRight :: InclusiveOrExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryConditionalAndExpression = Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"++_BinaryConditionalAndExpression_left = Core.Name "left"++_BinaryConditionalAndExpression_right = Core.Name "right"++-- | A binary conditional-OR expression (||) over two operand expressions.+data BinaryConditionalOrExpression =+ BinaryConditionalOrExpression {+ binaryConditionalOrExpressionLeft :: ConditionalOrExpression,+ binaryConditionalOrExpressionRight :: ConditionalAndExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryConditionalOrExpression = Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"++_BinaryConditionalOrExpression_left = Core.Name "left"++_BinaryConditionalOrExpression_right = Core.Name "right"++-- | A binary equality or inequality comparison expression.+data BinaryEqualityExpression =+ BinaryEqualityExpression {+ binaryEqualityExpressionLeft :: EqualityExpression,+ binaryEqualityExpressionOperator :: EqualityOperator,+ binaryEqualityExpressionRight :: RelationalExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryEqualityExpression = Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"++_BinaryEqualityExpression_left = Core.Name "left"++_BinaryEqualityExpression_operator = Core.Name "operator"++_BinaryEqualityExpression_right = Core.Name "right"++-- | A binary bitwise exclusive-OR expression (^) over two operand expressions.+data BinaryExclusiveOrExpression =+ BinaryExclusiveOrExpression {+ binaryExclusiveOrExpressionLeft :: ExclusiveOrExpression,+ binaryExclusiveOrExpressionRight :: AndExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryExclusiveOrExpression = Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"++_BinaryExclusiveOrExpression_left = Core.Name "left"++_BinaryExclusiveOrExpression_right = Core.Name "right"++-- | A binary bitwise inclusive-OR expression (|) over two operand expressions.+data BinaryInclusiveOrExpression =+ BinaryInclusiveOrExpression {+ binaryInclusiveOrExpressionLeft :: InclusiveOrExpression,+ binaryInclusiveOrExpressionRight :: ExclusiveOrExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryInclusiveOrExpression = Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"++_BinaryInclusiveOrExpression_left = Core.Name "left"++_BinaryInclusiveOrExpression_right = Core.Name "right"++-- | A binary multiplication, division, or remainder expression.+data BinaryMultiplicativeExpression =+ BinaryMultiplicativeExpression {+ binaryMultiplicativeExpressionLeft :: MultiplicativeExpression,+ binaryMultiplicativeExpressionOperator :: MultiplicativeOperator,+ binaryMultiplicativeExpressionRight :: UnaryExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryMultiplicativeExpression = Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"++_BinaryMultiplicativeExpression_left = Core.Name "left"++_BinaryMultiplicativeExpression_operator = Core.Name "operator"++_BinaryMultiplicativeExpression_right = Core.Name "right"++-- | A binary null-coalescing expression (??) over two operand expressions.+data BinaryNullCoalescingExpression =+ BinaryNullCoalescingExpression {+ binaryNullCoalescingExpressionLeft :: ConditionalOrExpression,+ binaryNullCoalescingExpressionRight :: NullCoalescingExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryNullCoalescingExpression = Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"++_BinaryNullCoalescingExpression_left = Core.Name "left"++_BinaryNullCoalescingExpression_right = Core.Name "right"++-- | The declarator for a user-defined binary operator overload, naming its two parameters.+data BinaryOperatorDeclarator =+ BinaryOperatorDeclarator {+ binaryOperatorDeclaratorType :: Type,+ binaryOperatorDeclaratorOperator :: OverloadableBinaryOperator,+ binaryOperatorDeclaratorLeft :: FixedParameter,+ binaryOperatorDeclaratorRight :: FixedParameter}+ deriving (Eq, Ord, Read, Show)++_BinaryOperatorDeclarator = Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"++_BinaryOperatorDeclarator_type = Core.Name "type"++_BinaryOperatorDeclarator_operator = Core.Name "operator"++_BinaryOperatorDeclarator_left = Core.Name "left"++_BinaryOperatorDeclarator_right = Core.Name "right"++-- | A binary relational comparison expression (<, >, <=, or >=).+data BinaryRelationalExpression =+ BinaryRelationalExpression {+ binaryRelationalExpressionLeft :: RelationalExpression,+ binaryRelationalExpressionOperator :: RelationalOperator,+ binaryRelationalExpressionRight :: ShiftExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryRelationalExpression = Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"++_BinaryRelationalExpression_left = Core.Name "left"++_BinaryRelationalExpression_operator = Core.Name "operator"++_BinaryRelationalExpression_right = Core.Name "right"++-- | A binary left-shift or right-shift expression.+data BinaryShiftExpression =+ BinaryShiftExpression {+ binaryShiftExpressionLeft :: ShiftExpression,+ binaryShiftExpressionOperator :: ShiftOperator,+ binaryShiftExpressionRight :: AdditiveExpression}+ deriving (Eq, Ord, Read, Show)++_BinaryShiftExpression = Core.Name "hydra.csharp.syntax.BinaryShiftExpression"++_BinaryShiftExpression_left = Core.Name "left"++_BinaryShiftExpression_operator = Core.Name "operator"++_BinaryShiftExpression_right = Core.Name "right"++-- | A brace-delimited sequence of statements forming a single compound statement.+newtype Block =+ Block {+ unBlock :: [Statement]}+ deriving (Eq, Ord, Read, Show)++_Block = Core.Name "hydra.csharp.syntax.Block"++-- | A property body given as get/set accessor declarations, with an optional initializer.+data BlockPropertyBody =+ BlockPropertyBody {+ blockPropertyBodyAccessors :: AccessorDeclarations,+ blockPropertyBodyInitializer :: (Maybe VariableInitializer)}+ deriving (Eq, Ord, Read, Show)++_BlockPropertyBody = Core.Name "hydra.csharp.syntax.BlockPropertyBody"++_BlockPropertyBody_accessors = Core.Name "accessors"++_BlockPropertyBody_initializer = Core.Name "initializer"++-- | An expression required to have (or be convertible to) type bool, such as an if condition.+newtype BooleanExpression =+ BooleanExpression {+ unBooleanExpression :: Expression}+ deriving (Eq, Ord, Read, Show)++_BooleanExpression = Core.Name "hydra.csharp.syntax.BooleanExpression"++-- | An explicit type-cast expression applied to a unary expression.+data CastExpression =+ CastExpression {+ castExpressionType :: Type,+ castExpressionExpression :: UnaryExpression}+ deriving (Eq, Ord, Read, Show)++_CastExpression = Core.Name "hydra.csharp.syntax.CastExpression"++_CastExpression_type = Core.Name "type"++_CastExpression_expression = Core.Name "expression"++-- | The catch clauses of a try statement: one or more specific clauses, or a single general clause.+data CatchClauses =+ CatchClausesSpecific [SpecificCatchClause] |+ CatchClausesGeneral Block+ deriving (Eq, Ord, Read, Show)++_CatchClauses = Core.Name "hydra.csharp.syntax.CatchClauses"++_CatchClauses_specific = Core.Name "specific"++_CatchClauses_general = Core.Name "general"++-- | The base class and/or implemented interfaces listed in a class declaration's base-list.+data ClassBase =+ ClassBaseClass (Maybe ClassType) |+ ClassBaseInterfaces [InterfaceType]+ deriving (Eq, Ord, Read, Show)++_ClassBase = Core.Name "hydra.csharp.syntax.ClassBase"++_ClassBase_class = Core.Name "class"++_ClassBase_interfaces = Core.Name "interfaces"++-- | The brace-delimited sequence of member declarations that make up a class.+newtype ClassBody =+ ClassBody {+ unClassBody :: [ClassMemberDeclaration]}+ deriving (Eq, Ord, Read, Show)++_ClassBody = Core.Name "hydra.csharp.syntax.ClassBody"++-- | A C# class declaration, including its modifiers, type parameters, base list, and body.+data ClassDeclaration =+ ClassDeclaration {+ classDeclarationAttributes :: [AttributeSection],+ classDeclarationModifiers :: [ClassModifier],+ classDeclarationPartial :: Bool,+ classDeclarationName :: Identifier,+ classDeclarationParameters :: (Maybe TypeParameterList),+ classDeclarationBase :: (Maybe ClassBase),+ classDeclarationConstraints :: [TypeParameterConstraintsClause],+ classDeclarationBody :: ClassBody}+ deriving (Eq, Ord, Read, Show)++_ClassDeclaration = Core.Name "hydra.csharp.syntax.ClassDeclaration"++_ClassDeclaration_attributes = Core.Name "attributes"++_ClassDeclaration_modifiers = Core.Name "modifiers"++_ClassDeclaration_partial = Core.Name "partial"++_ClassDeclaration_name = Core.Name "name"++_ClassDeclaration_parameters = Core.Name "parameters"++_ClassDeclaration_base = Core.Name "base"++_ClassDeclaration_constraints = Core.Name "constraints"++_ClassDeclaration_body = Core.Name "body"++-- | Any member that can appear in a class body: field, method, property, event, and so on.+data ClassMemberDeclaration =+ ClassMemberDeclarationConstant ConstantDeclaration |+ ClassMemberDeclarationField FieldDeclaration |+ ClassMemberDeclarationMethod MethodDeclaration |+ ClassMemberDeclarationProperty PropertyDeclaration |+ ClassMemberDeclarationEvent EventDeclaration |+ ClassMemberDeclarationIndexer IndexerDeclaration |+ ClassMemberDeclarationOperator OperatorDeclaration |+ ClassMemberDeclarationConstructor ConstructorDeclaration |+ ClassMemberDeclarationFinalizer FinalizerDeclaration |+ ClassMemberDeclarationStaticConstructor StaticConstructorDeclaration |+ ClassMemberDeclarationType TypeDeclaration+ deriving (Eq, Ord, Read, Show)++_ClassMemberDeclaration = Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"++_ClassMemberDeclaration_constant = Core.Name "constant"++_ClassMemberDeclaration_field = Core.Name "field"++_ClassMemberDeclaration_method = Core.Name "method"++_ClassMemberDeclaration_property = Core.Name "property"++_ClassMemberDeclaration_event = Core.Name "event"++_ClassMemberDeclaration_indexer = Core.Name "indexer"++_ClassMemberDeclaration_operator = Core.Name "operator"++_ClassMemberDeclaration_constructor = Core.Name "constructor"++_ClassMemberDeclaration_finalizer = Core.Name "finalizer"++_ClassMemberDeclaration_staticConstructor = Core.Name "staticConstructor"++_ClassMemberDeclaration_type = Core.Name "type"++-- | A modifier keyword on a class declaration, such as public, abstract, sealed, or static.+data ClassModifier =+ ClassModifierNew |+ ClassModifierPublic |+ ClassModifierProtected |+ ClassModifierInternal |+ ClassModifierPrivate |+ ClassModifierAbstract |+ ClassModifierSealed |+ ClassModifierStatic |+ ClassModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_ClassModifier = Core.Name "hydra.csharp.syntax.ClassModifier"++_ClassModifier_new = Core.Name "new"++_ClassModifier_public = Core.Name "public"++_ClassModifier_protected = Core.Name "protected"++_ClassModifier_internal = Core.Name "internal"++_ClassModifier_private = Core.Name "private"++_ClassModifier_abstract = Core.Name "abstract"++_ClassModifier_sealed = Core.Name "sealed"++_ClassModifier_static = Core.Name "static"++_ClassModifier_unsafe = Core.Name "unsafe"++-- | A reference to a class type: a named type, or the predefined 'object' or 'string' types.+data ClassType =+ ClassTypeTypeName TypeName |+ ClassTypeObject |+ ClassTypeString+ deriving (Eq, Ord, Read, Show)++_ClassType = Core.Name "hydra.csharp.syntax.ClassType"++_ClassType_typeName = Core.Name "typeName"++_ClassType_object = Core.Name "object"++_ClassType_string = Core.Name "string"++-- | The root of a C# source file: extern aliases, using directives, attributes, and type members.+data CompilationUnit =+ CompilationUnit {+ compilationUnitExterns :: [ExternAliasDirective],+ compilationUnitUsings :: [UsingDirective],+ compilationUnitAttributes :: [GlobalAttributeSection],+ compilationUnitMembers :: [NamespaceMemberDeclaration]}+ deriving (Eq, Ord, Read, Show)++_CompilationUnit = Core.Name "hydra.csharp.syntax.CompilationUnit"++_CompilationUnit_externs = Core.Name "externs"++_CompilationUnit_usings = Core.Name "usings"++_CompilationUnit_attributes = Core.Name "attributes"++_CompilationUnit_members = Core.Name "members"++-- | A simple inclusive-OR expression or a binary conditional-AND (&&) expression.+data ConditionalAndExpression =+ ConditionalAndExpressionSimple InclusiveOrExpression |+ ConditionalAndExpressionBinary BinaryConditionalAndExpression+ deriving (Eq, Ord, Read, Show)++_ConditionalAndExpression = Core.Name "hydra.csharp.syntax.ConditionalAndExpression"++_ConditionalAndExpression_simple = Core.Name "simple"++_ConditionalAndExpression_binary = Core.Name "binary"++-- | The ternary conditional expression, in its simple, ref-conditional, or fallthrough forms.+data ConditionalExpression =+ ConditionalExpressionSimple NullCoalescingExpression |+ ConditionalExpressionSimpleConditional SimpleConditionalExpression |+ ConditionalExpressionRefConditional RefConditionalExpression+ deriving (Eq, Ord, Read, Show)++_ConditionalExpression = Core.Name "hydra.csharp.syntax.ConditionalExpression"++_ConditionalExpression_simple = Core.Name "simple"++_ConditionalExpression_simpleConditional = Core.Name "simpleConditional"++_ConditionalExpression_refConditional = Core.Name "refConditional"++-- | A simple conditional-AND expression or a binary conditional-OR (||) expression.+data ConditionalOrExpression =+ ConditionalOrExpressionSimple ConditionalAndExpression |+ ConditionalOrExpressionBinary BinaryConditionalOrExpression+ deriving (Eq, Ord, Read, Show)++_ConditionalOrExpression = Core.Name "hydra.csharp.syntax.ConditionalOrExpression"++_ConditionalOrExpression_simple = Core.Name "simple"++_ConditionalOrExpression_binary = Core.Name "binary"++-- | A 'const' field declaration with its modifiers, type, and one or more declarators.+data ConstantDeclaration =+ ConstantDeclaration {+ constantDeclarationAttributes :: (Maybe Attributes),+ constantDeclarationModifiers :: [ConstantModifier],+ constantDeclarationType :: Type,+ constantDeclarationDeclarators :: [ConstantDeclarator]}+ deriving (Eq, Ord, Read, Show)++_ConstantDeclaration = Core.Name "hydra.csharp.syntax.ConstantDeclaration"++_ConstantDeclaration_attributes = Core.Name "attributes"++_ConstantDeclaration_modifiers = Core.Name "modifiers"++_ConstantDeclaration_type = Core.Name "type"++_ConstantDeclaration_declarators = Core.Name "declarators"++-- | A single 'identifier = expression' pair within a constant declaration.+data ConstantDeclarator =+ ConstantDeclarator {+ constantDeclaratorIdentifier :: Identifier,+ constantDeclaratorExpression :: ConstantExpression}+ deriving (Eq, Ord, Read, Show)++_ConstantDeclarator = Core.Name "hydra.csharp.syntax.ConstantDeclarator"++_ConstantDeclarator_identifier = Core.Name "identifier"++_ConstantDeclarator_expression = Core.Name "expression"++-- | An expression that is required to be evaluable at compile time.+newtype ConstantExpression =+ ConstantExpression {+ unConstantExpression :: Expression}+ deriving (Eq, Ord, Read, Show)++_ConstantExpression = Core.Name "hydra.csharp.syntax.ConstantExpression"++-- | An access modifier (new, public, protected, internal, or private) on a constant declaration.+data ConstantModifier =+ ConstantModifierNew |+ ConstantModifierPublic |+ ConstantModifierProtected |+ ConstantModifierInternal |+ ConstantModifierPrivate+ deriving (Eq, Ord, Read, Show)++_ConstantModifier = Core.Name "hydra.csharp.syntax.ConstantModifier"++_ConstantModifier_new = Core.Name "new"++_ConstantModifier_public = Core.Name "public"++_ConstantModifier_protected = Core.Name "protected"++_ConstantModifier_internal = Core.Name "internal"++_ConstantModifier_private = Core.Name "private"++-- | The body of an instance constructor: a block, expression body, or empty (extern) body.+data ConstructorBody =+ ConstructorBodyBlock Block |+ ConstructorBodyExpression Expression |+ ConstructorBodyEmpty+ deriving (Eq, Ord, Read, Show)++_ConstructorBody = Core.Name "hydra.csharp.syntax.ConstructorBody"++_ConstructorBody_block = Core.Name "block"++_ConstructorBody_expression = Core.Name "expression"++_ConstructorBody_empty = Core.Name "empty"++-- | An instance constructor declaration, including its declarator and body.+data ConstructorDeclaration =+ ConstructorDeclaration {+ constructorDeclarationAttributes :: (Maybe Attributes),+ constructorDeclarationModifiers :: [ConstructorModifier],+ constructorDeclarationDeclarator :: ConstructorDeclarator,+ constructorDeclarationBody :: ConstructorBody}+ deriving (Eq, Ord, Read, Show)++_ConstructorDeclaration = Core.Name "hydra.csharp.syntax.ConstructorDeclaration"++_ConstructorDeclaration_attributes = Core.Name "attributes"++_ConstructorDeclaration_modifiers = Core.Name "modifiers"++_ConstructorDeclaration_declarator = Core.Name "declarator"++_ConstructorDeclaration_body = Core.Name "body"++-- | A constructor's name, parameter list, and optional base/this initializer.+data ConstructorDeclarator =+ ConstructorDeclarator {+ constructorDeclaratorName :: Identifier,+ constructorDeclaratorParameters :: (Maybe FormalParameterList),+ constructorDeclaratorInitializer :: (Maybe ConstructorInitializer)}+ deriving (Eq, Ord, Read, Show)++_ConstructorDeclarator = Core.Name "hydra.csharp.syntax.ConstructorDeclarator"++_ConstructorDeclarator_name = Core.Name "name"++_ConstructorDeclarator_parameters = Core.Name "parameters"++_ConstructorDeclarator_initializer = Core.Name "initializer"++-- | A ': base(...)' or ': this(...)' initializer invoked before a constructor body runs.+data ConstructorInitializer =+ ConstructorInitializerBase (Maybe ArgumentList) |+ ConstructorInitializerThis (Maybe ArgumentList)+ deriving (Eq, Ord, Read, Show)++_ConstructorInitializer = Core.Name "hydra.csharp.syntax.ConstructorInitializer"++_ConstructorInitializer_base = Core.Name "base"++_ConstructorInitializer_this = Core.Name "this"++-- | An access or extern/unsafe modifier on an instance constructor declaration.+data ConstructorModifier =+ ConstructorModifierPublic |+ ConstructorModifierProtected |+ ConstructorModifierInternal |+ ConstructorModifierPrivate |+ ConstructorModifierExtern |+ ConstructorModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_ConstructorModifier = Core.Name "hydra.csharp.syntax.ConstructorModifier"++_ConstructorModifier_public = Core.Name "public"++_ConstructorModifier_protected = Core.Name "protected"++_ConstructorModifier_internal = Core.Name "internal"++_ConstructorModifier_private = Core.Name "private"++_ConstructorModifier_extern = Core.Name "extern"++_ConstructorModifier_unsafe = Core.Name "unsafe"++-- | Whether a user-defined conversion operator is implicit or explicit.+data ConversionKind =+ ConversionKindImplicit |+ ConversionKindExplicit+ deriving (Eq, Ord, Read, Show)++_ConversionKind = Core.Name "hydra.csharp.syntax.ConversionKind"++_ConversionKind_implicit = Core.Name "implicit"++_ConversionKind_explicit = Core.Name "explicit"++-- | The declarator for a user-defined implicit or explicit conversion operator.+data ConversionOperatorDeclarator =+ ConversionOperatorDeclarator {+ conversionOperatorDeclaratorKind :: ConversionKind,+ conversionOperatorDeclaratorType :: Type,+ conversionOperatorDeclaratorParameter :: FixedParameter}+ deriving (Eq, Ord, Read, Show)++_ConversionOperatorDeclarator = Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"++_ConversionOperatorDeclarator_kind = Core.Name "kind"++_ConversionOperatorDeclarator_type = Core.Name "type"++_ConversionOperatorDeclarator_parameter = Core.Name "parameter"++-- | An inline variable declaration used as an expression, such as an out-variable declaration.+data DeclarationExpression =+ DeclarationExpression {+ declarationExpressionType :: LocalVariableType,+ declarationExpressionIdentifier :: Identifier}+ deriving (Eq, Ord, Read, Show)++_DeclarationExpression = Core.Name "hydra.csharp.syntax.DeclarationExpression"++_DeclarationExpression_type = Core.Name "type"++_DeclarationExpression_identifier = Core.Name "identifier"++-- | A pattern that tests an expression's type and, on success, binds it to a designation.+data DeclarationPattern =+ DeclarationPattern {+ declarationPatternType :: Type,+ declarationPatternDesignation :: Designation}+ deriving (Eq, Ord, Read, Show)++_DeclarationPattern = Core.Name "hydra.csharp.syntax.DeclarationPattern"++_DeclarationPattern_type = Core.Name "type"++_DeclarationPattern_designation = Core.Name "designation"++-- | A local variable, local constant, or local function declaration statement.+data DeclarationStatement =+ DeclarationStatementVariable LocalVariableDeclaration |+ DeclarationStatementConstant LocalConstantDeclaration |+ DeclarationStatementFunction LocalFunctionDeclaration+ deriving (Eq, Ord, Read, Show)++_DeclarationStatement = Core.Name "hydra.csharp.syntax.DeclarationStatement"++_DeclarationStatement_variable = Core.Name "variable"++_DeclarationStatement_constant = Core.Name "constant"++_DeclarationStatement_function = Core.Name "function"++-- | One element of a deconstruction pattern: a nested tuple or a bound identifier.+data DeconstructionElement =+ DeconstructionElementTuple DeconstructionTuple |+ DeconstructionElementIdentifier Identifier+ deriving (Eq, Ord, Read, Show)++_DeconstructionElement = Core.Name "hydra.csharp.syntax.DeconstructionElement"++_DeconstructionElement_tuple = Core.Name "tuple"++_DeconstructionElement_identifier = Core.Name "identifier"++-- | A tuple deconstruction pattern used on the left-hand side of a deconstructing assignment.+newtype DeconstructionTuple =+ DeconstructionTuple {+ unDeconstructionTuple :: [DeconstructionElement]}+ deriving (Eq, Ord, Read, Show)++_DeconstructionTuple = Core.Name "hydra.csharp.syntax.DeconstructionTuple"++-- | A 'default(T)' expression, or the type-inferred 'default' literal.+data DefaultValueExpression =+ DefaultValueExpressionExplicitlyTyped Type |+ DefaultValueExpressionDefaultLiteral+ deriving (Eq, Ord, Read, Show)++_DefaultValueExpression = Core.Name "hydra.csharp.syntax.DefaultValueExpression"++_DefaultValueExpression_explicitlyTyped = Core.Name "explicitlyTyped"++_DefaultValueExpression_defaultLiteral = Core.Name "defaultLiteral"++-- | An expression that creates a delegate instance from a method group or lambda.+data DelegateCreationExpression =+ DelegateCreationExpression {+ delegateCreationExpressionType :: DelegateType,+ delegateCreationExpressionExpression :: Expression}+ deriving (Eq, Ord, Read, Show)++_DelegateCreationExpression = Core.Name "hydra.csharp.syntax.DelegateCreationExpression"++_DelegateCreationExpression_type = Core.Name "type"++_DelegateCreationExpression_expression = Core.Name "expression"++-- | A delegate type declaration, naming its return type, ref kind, and parameter list.+data DelegateDeclaration =+ DelegateDeclaration {+ delegateDeclarationAttributes :: (Maybe Attributes),+ delegateDeclarationModifiers :: [DelegateModifier],+ delegateDeclarationReturnType :: ReturnType,+ delegateDeclarationRefKind :: (Maybe RefKind),+ delegateDeclarationRefReturnType :: (Maybe Type),+ delegateDeclarationHeader :: DelegateHeader}+ deriving (Eq, Ord, Read, Show)++_DelegateDeclaration = Core.Name "hydra.csharp.syntax.DelegateDeclaration"++_DelegateDeclaration_attributes = Core.Name "attributes"++_DelegateDeclaration_modifiers = Core.Name "modifiers"++_DelegateDeclaration_returnType = Core.Name "returnType"++_DelegateDeclaration_refKind = Core.Name "refKind"++_DelegateDeclaration_refReturnType = Core.Name "refReturnType"++_DelegateDeclaration_header = Core.Name "header"++-- | The name, type parameters, formal parameters, and constraints of a delegate declaration.+data DelegateHeader =+ DelegateHeader {+ delegateHeaderName :: Identifier,+ delegateHeaderTypeParameters :: (Maybe VariantTypeParameters),+ delegateHeaderParameters :: (Maybe FormalParameterList),+ delegateHeaderConstraints :: [TypeParameterConstraintsClause]}+ deriving (Eq, Ord, Read, Show)++_DelegateHeader = Core.Name "hydra.csharp.syntax.DelegateHeader"++_DelegateHeader_name = Core.Name "name"++_DelegateHeader_typeParameters = Core.Name "typeParameters"++_DelegateHeader_parameters = Core.Name "parameters"++_DelegateHeader_constraints = Core.Name "constraints"++-- | An access or unsafe modifier on a delegate type declaration.+data DelegateModifier =+ DelegateModifierNew |+ DelegateModifierPublic |+ DelegateModifierProtected |+ DelegateModifierInternal |+ DelegateModifierPrivate |+ DelegateModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_DelegateModifier = Core.Name "hydra.csharp.syntax.DelegateModifier"++_DelegateModifier_new = Core.Name "new"++_DelegateModifier_public = Core.Name "public"++_DelegateModifier_protected = Core.Name "protected"++_DelegateModifier_internal = Core.Name "internal"++_DelegateModifier_private = Core.Name "private"++_DelegateModifier_unsafe = Core.Name "unsafe"++-- | A reference to a delegate type by its type name.+newtype DelegateType =+ DelegateType {+ unDelegateType :: TypeName}+ deriving (Eq, Ord, Read, Show)++_DelegateType = Core.Name "hydra.csharp.syntax.DelegateType"++-- | A member access, element access, or invocation chained after a null-conditional operator.+data DependentAccess =+ DependentAccessMemberAccess DependentAccessForMember |+ DependentAccessElementAccess ArgumentList |+ DependentAccessInvocation (Maybe ArgumentList)+ deriving (Eq, Ord, Read, Show)++_DependentAccess = Core.Name "hydra.csharp.syntax.DependentAccess"++_DependentAccess_memberAccess = Core.Name "memberAccess"++_DependentAccess_elementAccess = Core.Name "elementAccess"++_DependentAccess_invocation = Core.Name "invocation"++-- | A member identifier and optional type arguments chained after a null-conditional access.+data DependentAccessForMember =+ DependentAccessForMember {+ dependentAccessForMemberIdentifier :: Identifier,+ dependentAccessForMemberTypeArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_DependentAccessForMember = Core.Name "hydra.csharp.syntax.DependentAccessForMember"++_DependentAccessForMember_identifier = Core.Name "identifier"++_DependentAccessForMember_typeArguments = Core.Name "typeArguments"++-- | A simple identifier binding introduced by a pattern, such as in a declaration pattern.+newtype Designation =+ Designation {+ unDesignation :: Identifier}+ deriving (Eq, Ord, Read, Show)++_Designation = Core.Name "hydra.csharp.syntax.Designation"++-- | A do-while iteration statement that executes its body at least once.+data DoStatement =+ DoStatement {+ doStatementBody :: EmbeddedStatement,+ doStatementWhile :: BooleanExpression}+ deriving (Eq, Ord, Read, Show)++_DoStatement = Core.Name "hydra.csharp.syntax.DoStatement"++_DoStatement_body = Core.Name "body"++_DoStatement_while = Core.Name "while"++-- | An indexer access expression applying an argument list to a primary expression.+data ElementAccess =+ ElementAccess {+ elementAccessExpression :: PrimaryNoArrayCreationExpression,+ elementAccessArguments :: ArgumentList}+ deriving (Eq, Ord, Read, Show)++_ElementAccess = Core.Name "hydra.csharp.syntax.ElementAccess"++_ElementAccess_expression = Core.Name "expression"++_ElementAccess_arguments = Core.Name "arguments"++-- | A single element of a collection initializer: one expression, or a nested element list.+data ElementInitializer =+ ElementInitializerSingle NonAssignmentExpression |+ ElementInitializerList ExpressionList+ deriving (Eq, Ord, Read, Show)++_ElementInitializer = Core.Name "hydra.csharp.syntax.ElementInitializer"++_ElementInitializer_single = Core.Name "single"++_ElementInitializer_list = Core.Name "list"++-- | A statement nested inside another statement, excluding labeled and declaration statements.+data EmbeddedStatement =+ EmbeddedStatementBlock Block |+ EmbeddedStatementEmpty |+ EmbeddedStatementExpression StatementExpression |+ EmbeddedStatementSelection SelectionStatement |+ EmbeddedStatementIteration IterationStatement |+ EmbeddedStatementJump JumpStatement |+ EmbeddedStatementTry TryStatement |+ EmbeddedStatementChecked Block |+ EmbeddedStatementUnchecked Block |+ EmbeddedStatementLock LockStatement |+ EmbeddedStatementUsing UsingStatement |+ EmbeddedStatementYield YieldStatement |+ EmbeddedStatementUnsafe Block |+ EmbeddedStatementFixed FixedStatement+ deriving (Eq, Ord, Read, Show)++_EmbeddedStatement = Core.Name "hydra.csharp.syntax.EmbeddedStatement"++_EmbeddedStatement_block = Core.Name "block"++_EmbeddedStatement_empty = Core.Name "empty"++_EmbeddedStatement_expression = Core.Name "expression"++_EmbeddedStatement_selection = Core.Name "selection"++_EmbeddedStatement_iteration = Core.Name "iteration"++_EmbeddedStatement_jump = Core.Name "jump"++_EmbeddedStatement_try = Core.Name "try"++_EmbeddedStatement_checked = Core.Name "checked"++_EmbeddedStatement_unchecked = Core.Name "unchecked"++_EmbeddedStatement_lock = Core.Name "lock"++_EmbeddedStatement_using = Core.Name "using"++_EmbeddedStatement_yield = Core.Name "yield"++_EmbeddedStatement_unsafe = Core.Name "unsafe"++_EmbeddedStatement_fixed = Core.Name "fixed"++-- | The optional explicit underlying integral type declared for an enum.+data EnumBase =+ EnumBaseType IntegralType |+ EnumBaseName TypeName+ deriving (Eq, Ord, Read, Show)++_EnumBase = Core.Name "hydra.csharp.syntax.EnumBase"++_EnumBase_type = Core.Name "type"++_EnumBase_name = Core.Name "name"++-- | The brace-delimited list of member declarations that make up an enum.+newtype EnumBody =+ EnumBody {+ unEnumBody :: [EnumMemberDeclaration]}+ deriving (Eq, Ord, Read, Show)++_EnumBody = Core.Name "hydra.csharp.syntax.EnumBody"++-- | An enum type declaration, with its modifiers, name, underlying type, and members.+data EnumDeclaration =+ EnumDeclaration {+ enumDeclarationAttributes :: (Maybe Attributes),+ enumDeclarationModifiers :: [EnumModifier],+ enumDeclarationName :: Identifier,+ enumDeclarationBase :: (Maybe EnumBase),+ enumDeclarationBody :: (Maybe EnumBody)}+ deriving (Eq, Ord, Read, Show)++_EnumDeclaration = Core.Name "hydra.csharp.syntax.EnumDeclaration"++_EnumDeclaration_attributes = Core.Name "attributes"++_EnumDeclaration_modifiers = Core.Name "modifiers"++_EnumDeclaration_name = Core.Name "name"++_EnumDeclaration_base = Core.Name "base"++_EnumDeclaration_body = Core.Name "body"++-- | A single named enum member, with optional attributes and an explicit constant value.+data EnumMemberDeclaration =+ EnumMemberDeclaration {+ enumMemberDeclarationAttributes :: (Maybe Attributes),+ enumMemberDeclarationName :: Identifier,+ enumMemberDeclarationValue :: (Maybe ConstantExpression)}+ deriving (Eq, Ord, Read, Show)++_EnumMemberDeclaration = Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"++_EnumMemberDeclaration_attributes = Core.Name "attributes"++_EnumMemberDeclaration_name = Core.Name "name"++_EnumMemberDeclaration_value = Core.Name "value"++-- | An access modifier (new, public, protected, internal, or private) on an enum declaration.+data EnumModifier =+ EnumModifierNew |+ EnumModifierPublic |+ EnumModifierProtected |+ EnumModifierInternal |+ EnumModifierPrivate+ deriving (Eq, Ord, Read, Show)++_EnumModifier = Core.Name "hydra.csharp.syntax.EnumModifier"++_EnumModifier_new = Core.Name "new"++_EnumModifier_public = Core.Name "public"++_EnumModifier_protected = Core.Name "protected"++_EnumModifier_internal = Core.Name "internal"++_EnumModifier_private = Core.Name "private"++-- | A reference to an enum type by its type name.+newtype EnumType =+ EnumType {+ unEnumType :: TypeName}+ deriving (Eq, Ord, Read, Show)++_EnumType = Core.Name "hydra.csharp.syntax.EnumType"++-- | A simple relational expression or a binary equality/inequality expression.+data EqualityExpression =+ EqualityExpressionSimple RelationalExpression |+ EqualityExpressionBinary BinaryEqualityExpression+ deriving (Eq, Ord, Read, Show)++_EqualityExpression = Core.Name "hydra.csharp.syntax.EqualityExpression"++_EqualityExpression_simple = Core.Name "simple"++_EqualityExpression_binary = Core.Name "binary"++-- | The equality (==) or inequality (!=) operator.+data EqualityOperator =+ EqualityOperatorEqual |+ EqualityOperatorNotEqual+ deriving (Eq, Ord, Read, Show)++_EqualityOperator = Core.Name "hydra.csharp.syntax.EqualityOperator"++_EqualityOperator_equal = Core.Name "equal"++_EqualityOperator_notEqual = Core.Name "notEqual"++-- | The add and remove accessor declarations of an event with an explicit accessor body.+data EventAccessorDeclarations =+ EventAccessorDeclarationsAdd AddRemoveAccessorDeclaration |+ EventAccessorDeclarationsRemove AddRemoveAccessorDeclaration+ deriving (Eq, Ord, Read, Show)++_EventAccessorDeclarations = Core.Name "hydra.csharp.syntax.EventAccessorDeclarations"++_EventAccessorDeclarations_add = Core.Name "add"++_EventAccessorDeclarations_remove = Core.Name "remove"++-- | An event member declaration, in either its field-like or explicit-accessor form.+data EventDeclaration =+ EventDeclarationStandard StandardEventDeclaration |+ EventDeclarationAccessors AccessorsEventDeclaration+ deriving (Eq, Ord, Read, Show)++_EventDeclaration = Core.Name "hydra.csharp.syntax.EventDeclaration"++_EventDeclaration_standard = Core.Name "standard"++_EventDeclaration_accessors = Core.Name "accessors"++-- | A modifier keyword on an event declaration, such as static, virtual, or override.+data EventModifier =+ EventModifierNew |+ EventModifierPublic |+ EventModifierProtected |+ EventModifierInternal |+ EventModifierPrivate |+ EventModifierStatic |+ EventModifierVirtual |+ EventModifierSealed |+ EventModifierOverride |+ EventModifierAbstract |+ EventModifierExtern |+ EventModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_EventModifier = Core.Name "hydra.csharp.syntax.EventModifier"++_EventModifier_new = Core.Name "new"++_EventModifier_public = Core.Name "public"++_EventModifier_protected = Core.Name "protected"++_EventModifier_internal = Core.Name "internal"++_EventModifier_private = Core.Name "private"++_EventModifier_static = Core.Name "static"++_EventModifier_virtual = Core.Name "virtual"++_EventModifier_sealed = Core.Name "sealed"++_EventModifier_override = Core.Name "override"++_EventModifier_abstract = Core.Name "abstract"++_EventModifier_extern = Core.Name "extern"++_EventModifier_unsafe = Core.Name "unsafe"++-- | The exception type and optional identifier caught by a specific catch clause.+data ExceptionSpecifier =+ ExceptionSpecifier {+ exceptionSpecifierType :: Type,+ exceptionSpecifierIdentifier :: (Maybe Identifier)}+ deriving (Eq, Ord, Read, Show)++_ExceptionSpecifier = Core.Name "hydra.csharp.syntax.ExceptionSpecifier"++_ExceptionSpecifier_type = Core.Name "type"++_ExceptionSpecifier_identifier = Core.Name "identifier"++-- | A simple AND expression or a binary bitwise exclusive-OR (^) expression.+data ExclusiveOrExpression =+ ExclusiveOrExpressionSimple AndExpression |+ ExclusiveOrExpressionBinary BinaryExclusiveOrExpression+ deriving (Eq, Ord, Read, Show)++_ExclusiveOrExpression = Core.Name "hydra.csharp.syntax.ExclusiveOrExpression"++_ExclusiveOrExpression_simple = Core.Name "simple"++_ExclusiveOrExpression_binary = Core.Name "binary"++-- | An explicitly typed parameter of an anonymous function, with an optional modifier.+data ExplicitAnonymousFunctionParameter =+ ExplicitAnonymousFunctionParameter {+ explicitAnonymousFunctionParameterModifier :: (Maybe AnonymousFunctionParameterModifier),+ explicitAnonymousFunctionParameterType :: Type,+ explicitAnonymousFunctionParameterIdentifier :: Identifier}+ deriving (Eq, Ord, Read, Show)++_ExplicitAnonymousFunctionParameter = Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"++_ExplicitAnonymousFunctionParameter_modifier = Core.Name "modifier"++_ExplicitAnonymousFunctionParameter_type = Core.Name "type"++_ExplicitAnonymousFunctionParameter_identifier = Core.Name "identifier"++-- | A local variable declaration whose type is written out explicitly.+data ExplicitlyTypedLocalVariableDeclaration =+ ExplicitlyTypedLocalVariableDeclaration {+ explicitlyTypedLocalVariableDeclarationType :: Type,+ explicitlyTypedLocalVariableDeclarationDeclarators :: [ExplicitlyTypedLocalVariableDeclarator]}+ deriving (Eq, Ord, Read, Show)++_ExplicitlyTypedLocalVariableDeclaration = Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"++_ExplicitlyTypedLocalVariableDeclaration_type = Core.Name "type"++_ExplicitlyTypedLocalVariableDeclaration_declarators = Core.Name "declarators"++-- | An identifier and optional initializer within an explicitly typed local declaration.+data ExplicitlyTypedLocalVariableDeclarator =+ ExplicitlyTypedLocalVariableDeclarator {+ explicitlyTypedLocalVariableDeclaratorIdentifier :: Identifier,+ explicitlyTypedLocalVariableDeclaratorInitializer :: (Maybe LocalVariableInitializer)}+ deriving (Eq, Ord, Read, Show)++_ExplicitlyTypedLocalVariableDeclarator = Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"++_ExplicitlyTypedLocalVariableDeclarator_identifier = Core.Name "identifier"++_ExplicitlyTypedLocalVariableDeclarator_initializer = Core.Name "initializer"++-- | A non-assignment expression or an assignment expression.+data Expression =+ ExpressionNonAssignment NonAssignmentExpression |+ ExpressionAssignment Assignment+ deriving (Eq, Ord, Read, Show)++_Expression = Core.Name "hydra.csharp.syntax.Expression"++_Expression_nonAssignment = Core.Name "nonAssignment"++_Expression_assignment = Core.Name "assignment"++-- | A non-empty, comma-separated list of expressions, as used in an array creation expression.+newtype ExpressionList =+ ExpressionList {+ unExpressionList :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_ExpressionList = Core.Name "hydra.csharp.syntax.ExpressionList"++-- | An 'extern alias' directive introducing an alias for an external assembly reference.+newtype ExternAliasDirective =+ ExternAliasDirective {+ unExternAliasDirective :: Identifier}+ deriving (Eq, Ord, Read, Show)++_ExternAliasDirective = Core.Name "hydra.csharp.syntax.ExternAliasDirective"++-- | A field member declaration, with its modifiers, type, and one or more variable declarators.+data FieldDeclaration =+ FieldDeclaration {+ fieldDeclarationAttributes :: (Maybe Attributes),+ fieldDeclarationModifiers :: [FieldModifier],+ fieldDeclarationType :: Type,+ fieldDeclarationDeclarators :: [VariableDeclarator]}+ deriving (Eq, Ord, Read, Show)++_FieldDeclaration = Core.Name "hydra.csharp.syntax.FieldDeclaration"++_FieldDeclaration_attributes = Core.Name "attributes"++_FieldDeclaration_modifiers = Core.Name "modifiers"++_FieldDeclaration_type = Core.Name "type"++_FieldDeclaration_declarators = Core.Name "declarators"++-- | A modifier keyword on a field declaration, such as static, readonly, or volatile.+data FieldModifier =+ FieldModifierNew |+ FieldModifierPublic |+ FieldModifierProtected |+ FieldModifierInternal |+ FieldModifierPrivate |+ FieldModifierStatic |+ FieldModifierReadonly |+ FieldModifierVolatile |+ FieldModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_FieldModifier = Core.Name "hydra.csharp.syntax.FieldModifier"++_FieldModifier_new = Core.Name "new"++_FieldModifier_public = Core.Name "public"++_FieldModifier_protected = Core.Name "protected"++_FieldModifier_internal = Core.Name "internal"++_FieldModifier_private = Core.Name "private"++_FieldModifier_static = Core.Name "static"++_FieldModifier_readonly = Core.Name "readonly"++_FieldModifier_volatile = Core.Name "volatile"++_FieldModifier_unsafe = Core.Name "unsafe"++-- | The body of a finalizer: a block, expression body, or empty (extern) body.+data FinalizerBody =+ FinalizerBodyBlock Block |+ FinalizerBodyExpression Expression |+ FinalizerBodyEmpty+ deriving (Eq, Ord, Read, Show)++_FinalizerBody = Core.Name "hydra.csharp.syntax.FinalizerBody"++_FinalizerBody_block = Core.Name "block"++_FinalizerBody_expression = Core.Name "expression"++_FinalizerBody_empty = Core.Name "empty"++-- | A finalizer (destructor) declaration, with its extern/unsafe flags, name, and body.+data FinalizerDeclaration =+ FinalizerDeclaration {+ finalizerDeclarationAttributes :: (Maybe Attributes),+ finalizerDeclarationExtern :: Bool,+ finalizerDeclarationUnsafe :: Bool,+ finalizerDeclarationName :: Identifier,+ finalizerDeclarationBody :: FinalizerBody}+ deriving (Eq, Ord, Read, Show)++_FinalizerDeclaration = Core.Name "hydra.csharp.syntax.FinalizerDeclaration"++_FinalizerDeclaration_attributes = Core.Name "attributes"++_FinalizerDeclaration_extern = Core.Name "extern"++_FinalizerDeclaration_unsafe = Core.Name "unsafe"++_FinalizerDeclaration_name = Core.Name "name"++_FinalizerDeclaration_body = Core.Name "body"++-- | A single by-value or by-reference formal parameter, with optional attributes and a default value.+data FixedParameter =+ FixedParameter {+ fixedParameterAttributes :: (Maybe Attributes),+ fixedParameterModifier :: (Maybe ParameterModifier),+ fixedParameterType :: Type,+ fixedParameterIdentifier :: Identifier,+ fixedParameterDefaultArgument :: (Maybe Expression)}+ deriving (Eq, Ord, Read, Show)++_FixedParameter = Core.Name "hydra.csharp.syntax.FixedParameter"++_FixedParameter_attributes = Core.Name "attributes"++_FixedParameter_modifier = Core.Name "modifier"++_FixedParameter_type = Core.Name "type"++_FixedParameter_identifier = Core.Name "identifier"++_FixedParameter_defaultArgument = Core.Name "defaultArgument"++-- | A single declarator in a fixed statement, binding a pointer to a variable or expression.+data FixedPointerDeclarator =+ FixedPointerDeclaratorReference VariableReference |+ FixedPointerDeclaratorExpression Expression+ deriving (Eq, Ord, Read, Show)++_FixedPointerDeclarator = Core.Name "hydra.csharp.syntax.FixedPointerDeclarator"++_FixedPointerDeclarator_reference = Core.Name "reference"++_FixedPointerDeclarator_expression = Core.Name "expression"++-- | An unsafe fixed-size buffer field declaration inside a struct.+data FixedSizeBufferDeclaration =+ FixedSizeBufferDeclaration {+ fixedSizeBufferDeclarationAttributes :: (Maybe Attributes),+ fixedSizeBufferDeclarationModifiers :: [FixedSizeBufferModifier],+ fixedSizeBufferDeclarationElementType :: Type,+ fixedSizeBufferDeclarationDeclarators :: [FixedSizeBufferDeclarator]}+ deriving (Eq, Ord, Read, Show)++_FixedSizeBufferDeclaration = Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"++_FixedSizeBufferDeclaration_attributes = Core.Name "attributes"++_FixedSizeBufferDeclaration_modifiers = Core.Name "modifiers"++_FixedSizeBufferDeclaration_elementType = Core.Name "elementType"++_FixedSizeBufferDeclaration_declarators = Core.Name "declarators"++-- | The name and constant size of a single fixed-size buffer member.+data FixedSizeBufferDeclarator =+ FixedSizeBufferDeclarator {+ fixedSizeBufferDeclaratorName :: Identifier,+ fixedSizeBufferDeclaratorSize :: ConstantExpression}+ deriving (Eq, Ord, Read, Show)++_FixedSizeBufferDeclarator = Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"++_FixedSizeBufferDeclarator_name = Core.Name "name"++_FixedSizeBufferDeclarator_size = Core.Name "size"++-- | An access or unsafe modifier on a fixed-size buffer declaration.+data FixedSizeBufferModifier =+ FixedSizeBufferModifierNew |+ FixedSizeBufferModifierPublic |+ FixedSizeBufferModifierInternal |+ FixedSizeBufferModifierPrivate |+ FixedSizeBufferModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_FixedSizeBufferModifier = Core.Name "hydra.csharp.syntax.FixedSizeBufferModifier"++_FixedSizeBufferModifier_new = Core.Name "new"++_FixedSizeBufferModifier_public = Core.Name "public"++_FixedSizeBufferModifier_internal = Core.Name "internal"++_FixedSizeBufferModifier_private = Core.Name "private"++_FixedSizeBufferModifier_unsafe = Core.Name "unsafe"++-- | An unsafe 'fixed' statement that pins one or more variables for pointer access.+data FixedStatement =+ FixedStatement {+ fixedStatementPointerType :: PointerType,+ fixedStatementDeclarators :: [FixedPointerDeclarator],+ fixedStatementStatement :: EmbeddedStatement}+ deriving (Eq, Ord, Read, Show)++_FixedStatement = Core.Name "hydra.csharp.syntax.FixedStatement"++_FixedStatement_pointerType = Core.Name "pointerType"++_FixedStatement_declarators = Core.Name "declarators"++_FixedStatement_statement = Core.Name "statement"++-- | The float or double floating-point numeric type.+data FloatingPointType =+ FloatingPointTypeFloat |+ FloatingPointTypeDouble+ deriving (Eq, Ord, Read, Show)++_FloatingPointType = Core.Name "hydra.csharp.syntax.FloatingPointType"++_FloatingPointType_float = Core.Name "float"++_FloatingPointType_double = Core.Name "double"++-- | The initializer clause of a for statement: a local variable declaration or expression list.+data ForInitializer =+ ForInitializerVariable LocalVariableDeclaration |+ ForInitializerStatements StatementExpressionList+ deriving (Eq, Ord, Read, Show)++_ForInitializer = Core.Name "hydra.csharp.syntax.ForInitializer"++_ForInitializer_variable = Core.Name "variable"++_ForInitializer_statements = Core.Name "statements"++-- | A C-style for loop, with optional initializer, condition, iterator, and a body statement.+data ForStatement =+ ForStatement {+ forStatementInitializer :: (Maybe ForInitializer),+ forStatementCondition :: (Maybe BooleanExpression),+ forStatementIterator :: (Maybe StatementExpressionList),+ forStatementBody :: EmbeddedStatement}+ deriving (Eq, Ord, Read, Show)++_ForStatement = Core.Name "hydra.csharp.syntax.ForStatement"++_ForStatement_initializer = Core.Name "initializer"++_ForStatement_condition = Core.Name "condition"++_ForStatement_iterator = Core.Name "iterator"++_ForStatement_body = Core.Name "body"++-- | A foreach iteration statement over an enumerable expression, binding each element to a variable.+data ForeachStatement =+ ForeachStatement {+ foreachStatementKind :: (Maybe RefKind),+ foreachStatementType :: LocalVariableType,+ foreachStatementIdentifier :: Identifier,+ foreachStatementExpression :: Expression,+ foreachStatementBody :: EmbeddedStatement}+ deriving (Eq, Ord, Read, Show)++_ForeachStatement = Core.Name "hydra.csharp.syntax.ForeachStatement"++_ForeachStatement_kind = Core.Name "kind"++_ForeachStatement_type = Core.Name "type"++_ForeachStatement_identifier = Core.Name "identifier"++_ForeachStatement_expression = Core.Name "expression"++_ForeachStatement_body = Core.Name "body"++-- | The fixed parameters of a member, plus an optional trailing params array parameter.+data FormalParameterList =+ FormalParameterList {+ formalParameterListFixed :: [FixedParameter],+ formalParameterListArray :: (Maybe ParameterArray)}+ deriving (Eq, Ord, Read, Show)++_FormalParameterList = Core.Name "hydra.csharp.syntax.FormalParameterList"++_FormalParameterList_fixed = Core.Name "fixed"++_FormalParameterList_array = Core.Name "array"++-- | The initial or additional 'from' clause of a query expression, introducing a range variable.+data FromClause =+ FromClause {+ fromClauseType :: (Maybe Type),+ fromClauseIdentifier :: Identifier,+ fromClauseIn :: Expression}+ deriving (Eq, Ord, Read, Show)++_FromClause = Core.Name "hydra.csharp.syntax.FromClause"++_FromClause_type = Core.Name "type"++_FromClause_identifier = Core.Name "identifier"++_FromClause_in = Core.Name "in"++-- | An assembly- or module-level attribute section appearing at the top of a compilation unit.+data GlobalAttributeSection =+ GlobalAttributeSection {+ globalAttributeSectionTarget :: Identifier,+ globalAttributeSectionAttributes :: AttributeList}+ deriving (Eq, Ord, Read, Show)++_GlobalAttributeSection = Core.Name "hydra.csharp.syntax.GlobalAttributeSection"++_GlobalAttributeSection_target = Core.Name "target"++_GlobalAttributeSection_attributes = Core.Name "attributes"++-- | A goto statement targeting a label, a switch case, or the switch default section.+data GotoStatement =+ GotoStatementIdentifier Identifier |+ GotoStatementCase ConstantExpression |+ GotoStatementDefault+ deriving (Eq, Ord, Read, Show)++_GotoStatement = Core.Name "hydra.csharp.syntax.GotoStatement"++_GotoStatement_identifier = Core.Name "identifier"++_GotoStatement_case = Core.Name "case"++_GotoStatement_default = Core.Name "default"++-- | The 'group ... by ...' clause that ends a query expression, producing grouped results.+data GroupClause =+ GroupClause {+ groupClauseGrouped :: Expression,+ groupClauseBy :: Expression}+ deriving (Eq, Ord, Read, Show)++_GroupClause = Core.Name "hydra.csharp.syntax.GroupClause"++_GroupClause_grouped = Core.Name "grouped"++_GroupClause_by = Core.Name "by"++-- | A C# identifier: a name for a variable, type, member, or other program element.+newtype Identifier =+ Identifier {+ unIdentifier :: String}+ deriving (Eq, Ord, Read, Show)++_Identifier = Core.Name "hydra.csharp.syntax.Identifier"++-- | A simple namespace-or-type name consisting of an identifier and optional type arguments.+data IdentifierNamespaceOrTypeName =+ IdentifierNamespaceOrTypeName {+ identifierNamespaceOrTypeNameIdentifier :: Identifier,+ identifierNamespaceOrTypeNameArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_IdentifierNamespaceOrTypeName = Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"++_IdentifierNamespaceOrTypeName_identifier = Core.Name "identifier"++_IdentifierNamespaceOrTypeName_arguments = Core.Name "arguments"++-- | An if statement with a boolean condition, a then-branch, and an else-branch.+data IfStatement =+ IfStatement {+ ifStatementCondition :: BooleanExpression,+ ifStatementIfBranch :: EmbeddedStatement,+ ifStatementElseBranch :: EmbeddedStatement}+ deriving (Eq, Ord, Read, Show)++_IfStatement = Core.Name "hydra.csharp.syntax.IfStatement"++_IfStatement_condition = Core.Name "condition"++_IfStatement_ifBranch = Core.Name "ifBranch"++_IfStatement_elseBranch = Core.Name "elseBranch"++-- | A local variable declaration using 'var' with inferred type, plain or ref.+data ImplicitlyTypedLocalVariableDeclaration =+ ImplicitlyTypedLocalVariableDeclarationVar ImplicitlyTypedLocalVariableDeclarator |+ ImplicitlyTypedLocalVariableDeclarationRefVar RefVarImplicitlyTypedLocalVariableDeclaration+ deriving (Eq, Ord, Read, Show)++_ImplicitlyTypedLocalVariableDeclaration = Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclaration"++_ImplicitlyTypedLocalVariableDeclaration_var = Core.Name "var"++_ImplicitlyTypedLocalVariableDeclaration_refVar = Core.Name "refVar"++-- | The identifier and initializer expression of a 'var'-typed local variable.+data ImplicitlyTypedLocalVariableDeclarator =+ ImplicitlyTypedLocalVariableDeclarator {+ implicitlyTypedLocalVariableDeclaratorIdentifier :: Identifier,+ implicitlyTypedLocalVariableDeclaratorExpression :: Expression}+ deriving (Eq, Ord, Read, Show)++_ImplicitlyTypedLocalVariableDeclarator = Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"++_ImplicitlyTypedLocalVariableDeclarator_identifier = Core.Name "identifier"++_ImplicitlyTypedLocalVariableDeclarator_expression = Core.Name "expression"++-- | A simple exclusive-OR expression or a binary bitwise inclusive-OR (|) expression.+data InclusiveOrExpression =+ InclusiveOrExpressionSimple ExclusiveOrExpression |+ InclusiveOrExpressionBinary BinaryInclusiveOrExpression+ deriving (Eq, Ord, Read, Show)++_InclusiveOrExpression = Core.Name "hydra.csharp.syntax.InclusiveOrExpression"++_InclusiveOrExpression_simple = Core.Name "simple"++_InclusiveOrExpression_binary = Core.Name "binary"++-- | The body of a standard indexer: block accessors or a single expression body.+data IndexerBody =+ IndexerBodyBlock AccessorDeclarations |+ IndexerBodyExpression Expression+ deriving (Eq, Ord, Read, Show)++_IndexerBody = Core.Name "hydra.csharp.syntax.IndexerBody"++_IndexerBody_block = Core.Name "block"++_IndexerBody_expression = Core.Name "expression"++-- | An indexer member declaration, in its standard or ref-returning form.+data IndexerDeclaration =+ IndexerDeclarationStandard StandardIndexerDeclaration |+ IndexerDeclarationRef RefIndexerDeclaration+ deriving (Eq, Ord, Read, Show)++_IndexerDeclaration = Core.Name "hydra.csharp.syntax.IndexerDeclaration"++_IndexerDeclaration_standard = Core.Name "standard"++_IndexerDeclaration_ref = Core.Name "ref"++-- | An indexer's declared type, optional explicit interface, and formal parameter list.+data IndexerDeclarator =+ IndexerDeclarator {+ indexerDeclaratorType :: Type,+ indexerDeclaratorInterface :: (Maybe InterfaceType),+ indexerDeclaratorParameters :: FormalParameterList}+ deriving (Eq, Ord, Read, Show)++_IndexerDeclarator = Core.Name "hydra.csharp.syntax.IndexerDeclarator"++_IndexerDeclarator_type = Core.Name "type"++_IndexerDeclarator_interface = Core.Name "interface"++_IndexerDeclarator_parameters = Core.Name "parameters"++-- | A modifier keyword on an indexer declaration, such as virtual, override, or abstract.+data IndexerModifier =+ IndexerModifierNew |+ IndexerModifierPublic |+ IndexerModifierProtected |+ IndexerModifierInternal |+ IndexerModifierPrivate |+ IndexerModifierVirtual |+ IndexerModifierSealed |+ IndexerModifierOverride |+ IndexerModifierAbstract |+ IndexerModifierExtern |+ IndexerModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_IndexerModifier = Core.Name "hydra.csharp.syntax.IndexerModifier"++_IndexerModifier_new = Core.Name "new"++_IndexerModifier_public = Core.Name "public"++_IndexerModifier_protected = Core.Name "protected"++_IndexerModifier_internal = Core.Name "internal"++_IndexerModifier_private = Core.Name "private"++_IndexerModifier_virtual = Core.Name "virtual"++_IndexerModifier_sealed = Core.Name "sealed"++_IndexerModifier_override = Core.Name "override"++_IndexerModifier_abstract = Core.Name "abstract"++_IndexerModifier_extern = Core.Name "extern"++_IndexerModifier_unsafe = Core.Name "unsafe"++-- | The left-hand side of a member initializer: an identifier or an indexer argument list.+data InitializerTarget =+ InitializerTargetIdentifier Identifier |+ InitializerTargetArguments ArgumentList+ deriving (Eq, Ord, Read, Show)++_InitializerTarget = Core.Name "hydra.csharp.syntax.InitializerTarget"++_InitializerTarget_identifier = Core.Name "identifier"++_InitializerTarget_arguments = Core.Name "arguments"++-- | The right-hand side of a member initializer: an expression or a nested collection initializer.+data InitializerValue =+ InitializerValueExpression Expression |+ InitializerValueObjectOrCollection ObjectOrCollectionInitializer+ deriving (Eq, Ord, Read, Show)++_InitializerValue = Core.Name "hydra.csharp.syntax.InitializerValue"++_InitializerValue_expression = Core.Name "expression"++_InitializerValue_objectOrCollection = Core.Name "objectOrCollection"++-- | An integer literal, expressed in decimal, hexadecimal, or binary notation.+data IntegerLiteral =+ IntegerLiteralDecimal String |+ IntegerLiteralHexadecimal String |+ IntegerLiteralBinary Integer+ deriving (Eq, Ord, Read, Show)++_IntegerLiteral = Core.Name "hydra.csharp.syntax.IntegerLiteral"++_IntegerLiteral_decimal = Core.Name "decimal"++_IntegerLiteral_hexadecimal = Core.Name "hexadecimal"++_IntegerLiteral_binary = Core.Name "binary"++-- | One of the built-in integral numeric types (sbyte through char).+data IntegralType =+ IntegralTypeSbyte |+ IntegralTypeByte |+ IntegralTypeShort |+ IntegralTypeUshort |+ IntegralTypeInt |+ IntegralTypeUint |+ IntegralTypeLong |+ IntegralTypeUlong |+ IntegralTypeChar+ deriving (Eq, Ord, Read, Show)++_IntegralType = Core.Name "hydra.csharp.syntax.IntegralType"++_IntegralType_sbyte = Core.Name "sbyte"++_IntegralType_byte = Core.Name "byte"++_IntegralType_short = Core.Name "short"++_IntegralType_ushort = Core.Name "ushort"++_IntegralType_int = Core.Name "int"++_IntegralType_uint = Core.Name "uint"++_IntegralType_long = Core.Name "long"++_IntegralType_ulong = Core.Name "ulong"++_IntegralType_char = Core.Name "char"++-- | The get and/or set accessor attribute lists declared by an interface property or indexer.+data InterfaceAccessors =+ InterfaceAccessors {+ interfaceAccessorsAttributes :: (Maybe Attributes),+ interfaceAccessorsGet :: (Maybe Attributes),+ interfaceAccessorsSet :: (Maybe Attributes)}+ deriving (Eq, Ord, Read, Show)++_InterfaceAccessors = Core.Name "hydra.csharp.syntax.InterfaceAccessors"++_InterfaceAccessors_attributes = Core.Name "attributes"++_InterfaceAccessors_get = Core.Name "get"++_InterfaceAccessors_set = Core.Name "set"++-- | An interface type declaration, with its modifiers, type parameters, base interfaces, and members.+data InterfaceDeclaration =+ InterfaceDeclaration {+ interfaceDeclarationAttributes :: (Maybe Attributes),+ interfaceDeclarationModifiers :: [InterfaceModifier],+ interfaceDeclarationPartial :: Bool,+ interfaceDeclarationName :: Identifier,+ interfaceDeclarationParameters :: (Maybe VariantTypeParameters),+ interfaceDeclarationBase :: [InterfaceType],+ interfaceDeclarationConstraints :: [TypeParameterConstraintsClause],+ interfaceDeclarationBody :: [InterfaceMemberDeclaration]}+ deriving (Eq, Ord, Read, Show)++_InterfaceDeclaration = Core.Name "hydra.csharp.syntax.InterfaceDeclaration"++_InterfaceDeclaration_attributes = Core.Name "attributes"++_InterfaceDeclaration_modifiers = Core.Name "modifiers"++_InterfaceDeclaration_partial = Core.Name "partial"++_InterfaceDeclaration_name = Core.Name "name"++_InterfaceDeclaration_parameters = Core.Name "parameters"++_InterfaceDeclaration_base = Core.Name "base"++_InterfaceDeclaration_constraints = Core.Name "constraints"++_InterfaceDeclaration_body = Core.Name "body"++-- | An event member declared within an interface body.+data InterfaceEventDeclaration =+ InterfaceEventDeclaration {+ interfaceEventDeclarationAttributes :: (Maybe Attributes),+ interfaceEventDeclarationNew :: Bool,+ interfaceEventDeclarationType :: Type,+ interfaceEventDeclarationName :: Identifier}+ deriving (Eq, Ord, Read, Show)++_InterfaceEventDeclaration = Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"++_InterfaceEventDeclaration_attributes = Core.Name "attributes"++_InterfaceEventDeclaration_new = Core.Name "new"++_InterfaceEventDeclaration_type = Core.Name "type"++_InterfaceEventDeclaration_name = Core.Name "name"++-- | An indexer member declared within an interface body.+data InterfaceIndexerDeclaration =+ InterfaceIndexerDeclaration {+ interfaceIndexerDeclarationAttributes :: (Maybe Attributes),+ interfaceIndexerDeclarationNew :: Bool,+ interfaceIndexerDeclarationRefKind :: (Maybe RefKind),+ interfaceIndexerDeclarationType :: Type,+ interfaceIndexerDeclarationParameters :: FormalParameterList,+ interfaceIndexerDeclarationAccessors :: InterfaceAccessors}+ deriving (Eq, Ord, Read, Show)++_InterfaceIndexerDeclaration = Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"++_InterfaceIndexerDeclaration_attributes = Core.Name "attributes"++_InterfaceIndexerDeclaration_new = Core.Name "new"++_InterfaceIndexerDeclaration_refKind = Core.Name "refKind"++_InterfaceIndexerDeclaration_type = Core.Name "type"++_InterfaceIndexerDeclaration_parameters = Core.Name "parameters"++_InterfaceIndexerDeclaration_accessors = Core.Name "accessors"++-- | Any member that can appear in an interface body: method, property, event, or indexer.+data InterfaceMemberDeclaration =+ InterfaceMemberDeclarationMethod InterfaceMethodDeclaration |+ InterfaceMemberDeclarationProperty InterfacePropertyDeclaration |+ InterfaceMemberDeclarationEvent InterfaceEventDeclaration |+ InterfaceMemberDeclarationIndexer InterfaceIndexerDeclaration+ deriving (Eq, Ord, Read, Show)++_InterfaceMemberDeclaration = Core.Name "hydra.csharp.syntax.InterfaceMemberDeclaration"++_InterfaceMemberDeclaration_method = Core.Name "method"++_InterfaceMemberDeclaration_property = Core.Name "property"++_InterfaceMemberDeclaration_event = Core.Name "event"++_InterfaceMemberDeclaration_indexer = Core.Name "indexer"++-- | A method member declared within an interface body.+data InterfaceMethodDeclaration =+ InterfaceMethodDeclaration {+ interfaceMethodDeclarationAttributes :: (Maybe Attributes),+ interfaceMethodDeclarationNew :: Bool,+ interfaceMethodDeclarationReturnType :: ReturnType,+ interfaceMethodDeclarationRefKind :: (Maybe RefKind),+ interfaceMethodDeclarationHeader :: InterfaceMethodHeader}+ deriving (Eq, Ord, Read, Show)++_InterfaceMethodDeclaration = Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"++_InterfaceMethodDeclaration_attributes = Core.Name "attributes"++_InterfaceMethodDeclaration_new = Core.Name "new"++_InterfaceMethodDeclaration_returnType = Core.Name "returnType"++_InterfaceMethodDeclaration_refKind = Core.Name "refKind"++_InterfaceMethodDeclaration_header = Core.Name "header"++-- | The name, parameters, type parameters, and constraints of an interface method declaration.+data InterfaceMethodHeader =+ InterfaceMethodHeader {+ interfaceMethodHeaderName :: Identifier,+ interfaceMethodHeaderParameters :: (Maybe FormalParameterList),+ interfaceMethodHeaderTypeParameters :: (Maybe TypeParameterList),+ interfaceMethodHeaderConstraints :: [TypeParameterConstraintsClause]}+ deriving (Eq, Ord, Read, Show)++_InterfaceMethodHeader = Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"++_InterfaceMethodHeader_name = Core.Name "name"++_InterfaceMethodHeader_parameters = Core.Name "parameters"++_InterfaceMethodHeader_typeParameters = Core.Name "typeParameters"++_InterfaceMethodHeader_constraints = Core.Name "constraints"++-- | An access or unsafe modifier on an interface declaration.+data InterfaceModifier =+ InterfaceModifierNew |+ InterfaceModifierPublic |+ InterfaceModifierProtected |+ InterfaceModifierInternal |+ InterfaceModifierPrivate |+ InterfaceModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_InterfaceModifier = Core.Name "hydra.csharp.syntax.InterfaceModifier"++_InterfaceModifier_new = Core.Name "new"++_InterfaceModifier_public = Core.Name "public"++_InterfaceModifier_protected = Core.Name "protected"++_InterfaceModifier_internal = Core.Name "internal"++_InterfaceModifier_private = Core.Name "private"++_InterfaceModifier_unsafe = Core.Name "unsafe"++-- | A property member declared within an interface body.+data InterfacePropertyDeclaration =+ InterfacePropertyDeclaration {+ interfacePropertyDeclarationAttributes :: (Maybe Attributes),+ interfacePropertyDeclarationNew :: Bool,+ interfacePropertyDeclarationRefKind :: (Maybe RefKind),+ interfacePropertyDeclarationType :: Type,+ interfacePropertyDeclarationName :: Identifier,+ interfacePropertyDeclarationAccessors :: InterfaceAccessors}+ deriving (Eq, Ord, Read, Show)++_InterfacePropertyDeclaration = Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"++_InterfacePropertyDeclaration_attributes = Core.Name "attributes"++_InterfacePropertyDeclaration_new = Core.Name "new"++_InterfacePropertyDeclaration_refKind = Core.Name "refKind"++_InterfacePropertyDeclaration_type = Core.Name "type"++_InterfacePropertyDeclaration_name = Core.Name "name"++_InterfacePropertyDeclaration_accessors = Core.Name "accessors"++-- | A reference to an interface type by its type name.+newtype InterfaceType =+ InterfaceType {+ unInterfaceType :: TypeName}+ deriving (Eq, Ord, Read, Show)++_InterfaceType = Core.Name "hydra.csharp.syntax.InterfaceType"++-- | An interpolated string literal delimited by ordinary double quotes.+newtype InterpolatedRegularStringExpression =+ InterpolatedRegularStringExpression {+ unInterpolatedRegularStringExpression :: String}+ deriving (Eq, Ord, Read, Show)++_InterpolatedRegularStringExpression = Core.Name "hydra.csharp.syntax.InterpolatedRegularStringExpression"++-- | An interpolated string expression, in its regular or verbatim quoting form.+data InterpolatedStringExpression =+ InterpolatedStringExpressionRegular InterpolatedRegularStringExpression |+ InterpolatedStringExpressionVerbatim InterpolatedVerbatimStringExpression+ deriving (Eq, Ord, Read, Show)++_InterpolatedStringExpression = Core.Name "hydra.csharp.syntax.InterpolatedStringExpression"++_InterpolatedStringExpression_regular = Core.Name "regular"++_InterpolatedStringExpression_verbatim = Core.Name "verbatim"++-- | An interpolated string literal using verbatim, at-sign-prefixed quoting.+newtype InterpolatedVerbatimStringExpression =+ InterpolatedVerbatimStringExpression {+ unInterpolatedVerbatimStringExpression :: String}+ deriving (Eq, Ord, Read, Show)++_InterpolatedVerbatimStringExpression = Core.Name "hydra.csharp.syntax.InterpolatedVerbatimStringExpression"++-- | A method or delegate invocation: a primary expression applied to an argument list.+data InvocationExpression =+ InvocationExpression {+ invocationExpressionExpression :: PrimaryExpression,+ invocationExpressionArguments :: (Maybe ArgumentList)}+ deriving (Eq, Ord, Read, Show)++_InvocationExpression = Core.Name "hydra.csharp.syntax.InvocationExpression"++_InvocationExpression_expression = Core.Name "expression"++_InvocationExpression_arguments = Core.Name "arguments"++-- | An 'is' pattern-matching expression testing a relational expression against a pattern.+data IsPatternExpression =+ IsPatternExpression {+ isPatternExpressionExpression :: RelationalExpression,+ isPatternExpressionPattern :: Pattern}+ deriving (Eq, Ord, Read, Show)++_IsPatternExpression = Core.Name "hydra.csharp.syntax.IsPatternExpression"++_IsPatternExpression_expression = Core.Name "expression"++_IsPatternExpression_pattern = Core.Name "pattern"++-- | An 'is' type-testing expression checking whether an expression is of a given type.+data IsTypeExpression =+ IsTypeExpression {+ isTypeExpressionExpression :: RelationalExpression,+ isTypeExpressionType :: Type}+ deriving (Eq, Ord, Read, Show)++_IsTypeExpression = Core.Name "hydra.csharp.syntax.IsTypeExpression"++_IsTypeExpression_expression = Core.Name "expression"++_IsTypeExpression_type = Core.Name "type"++-- | A while, do, for, or foreach loop statement.+data IterationStatement =+ IterationStatementWhile WhileStatement |+ IterationStatementDo DoStatement |+ IterationStatementFor ForStatement |+ IterationStatementForeach ForeachStatement+ deriving (Eq, Ord, Read, Show)++_IterationStatement = Core.Name "hydra.csharp.syntax.IterationStatement"++_IterationStatement_while = Core.Name "while"++_IterationStatement_do = Core.Name "do"++_IterationStatement_for = Core.Name "for"++_IterationStatement_foreach = Core.Name "foreach"++-- | A 'join' clause in a query expression, correlating two sequences on matching keys.+data JoinClause =+ JoinClause {+ joinClauseType :: (Maybe Type),+ joinClauseIdentifier :: Identifier,+ joinClauseIn :: Expression,+ joinClauseOn :: Expression,+ joinClauseEquals :: Expression,+ joinClauseInto :: (Maybe Identifier)}+ deriving (Eq, Ord, Read, Show)++_JoinClause = Core.Name "hydra.csharp.syntax.JoinClause"++_JoinClause_type = Core.Name "type"++_JoinClause_identifier = Core.Name "identifier"++_JoinClause_in = Core.Name "in"++_JoinClause_on = Core.Name "on"++_JoinClause_equals = Core.Name "equals"++_JoinClause_into = Core.Name "into"++-- | A break, continue, goto, return, or throw statement that transfers control.+data JumpStatement =+ JumpStatementBreak |+ JumpStatementContinue |+ JumpStatementGoto GotoStatement |+ JumpStatementReturn ReturnStatement |+ JumpStatementThrow (Maybe Expression)+ deriving (Eq, Ord, Read, Show)++_JumpStatement = Core.Name "hydra.csharp.syntax.JumpStatement"++_JumpStatement_break = Core.Name "break"++_JumpStatement_continue = Core.Name "continue"++_JumpStatement_goto = Core.Name "goto"++_JumpStatement_return = Core.Name "return"++_JumpStatement_throw = Core.Name "throw"++-- | A reserved C# keyword.+newtype Keyword =+ Keyword {+ unKeyword :: String}+ deriving (Eq, Ord, Read, Show)++_Keyword = Core.Name "hydra.csharp.syntax.Keyword"++-- | A statement prefixed with a label, usable as the target of a goto statement.+data LabeledStatement =+ LabeledStatement {+ labeledStatementLabel :: Identifier,+ labeledStatementStatement :: Statement}+ deriving (Eq, Ord, Read, Show)++_LabeledStatement = Core.Name "hydra.csharp.syntax.LabeledStatement"++_LabeledStatement_label = Core.Name "label"++_LabeledStatement_statement = Core.Name "statement"++-- | A lambda expression, with its async flag, parameter signature, and body.+data LambdaExpression =+ LambdaExpression {+ lambdaExpressionAsync :: Bool,+ lambdaExpressionSignature :: AnonymousFunctionSignature,+ lambdaExpressionBody :: AnonymousFunctionBody}+ deriving (Eq, Ord, Read, Show)++_LambdaExpression = Core.Name "hydra.csharp.syntax.LambdaExpression"++_LambdaExpression_async = Core.Name "async"++_LambdaExpression_signature = Core.Name "signature"++_LambdaExpression_body = Core.Name "body"++-- | A 'let' clause in a query expression that introduces a computed range variable.+data LetClause =+ LetClause {+ letClauseLeft :: Identifier,+ letClauseRight :: Expression}+ deriving (Eq, Ord, Read, Show)++_LetClause = Core.Name "hydra.csharp.syntax.LetClause"++_LetClause_left = Core.Name "left"++_LetClause_right = Core.Name "right"++-- | A literal value: boolean, integer, real, character, string, or null.+data Literal =+ LiteralBoolean Bool |+ LiteralInteger IntegerLiteral |+ LiteralReal Double |+ LiteralCharacter String |+ LiteralString String |+ LiteralNull+ deriving (Eq, Ord, Read, Show)++_Literal = Core.Name "hydra.csharp.syntax.Literal"++_Literal_boolean = Core.Name "boolean"++_Literal_integer = Core.Name "integer"++_Literal_real = Core.Name "real"++_Literal_character = Core.Name "character"++_Literal_string = Core.Name "string"++_Literal_null = Core.Name "null"++-- | A 'const' local declaration with its type and one or more constant declarators.+data LocalConstantDeclaration =+ LocalConstantDeclaration {+ localConstantDeclarationType :: Type,+ localConstantDeclarationDeclarators :: [ConstantDeclarator]}+ deriving (Eq, Ord, Read, Show)++_LocalConstantDeclaration = Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"++_LocalConstantDeclaration_type = Core.Name "type"++_LocalConstantDeclaration_declarators = Core.Name "declarators"++-- | The body of a local function: a block, null-conditional invocation, or expression.+data LocalFunctionBody =+ LocalFunctionBodyBlock Block |+ LocalFunctionBodyNullConditionalInvocation NullConditionalInvocationExpression |+ LocalFunctionBodyExpression Expression+ deriving (Eq, Ord, Read, Show)++_LocalFunctionBody = Core.Name "hydra.csharp.syntax.LocalFunctionBody"++_LocalFunctionBody_block = Core.Name "block"++_LocalFunctionBody_nullConditionalInvocation = Core.Name "nullConditionalInvocation"++_LocalFunctionBody_expression = Core.Name "expression"++-- | A local function declaration, in its standard or ref-returning form.+data LocalFunctionDeclaration =+ LocalFunctionDeclarationStandard StandardLocalFunctionDeclaration |+ LocalFunctionDeclarationRef RefLocalFunctionDeclaration+ deriving (Eq, Ord, Read, Show)++_LocalFunctionDeclaration = Core.Name "hydra.csharp.syntax.LocalFunctionDeclaration"++_LocalFunctionDeclaration_standard = Core.Name "standard"++_LocalFunctionDeclaration_ref = Core.Name "ref"++-- | The name, type parameters, formal parameters, and constraints of a local function.+data LocalFunctionHeader =+ LocalFunctionHeader {+ localFunctionHeaderIdentifier :: Identifier,+ localFunctionHeaderTypeParameters :: (Maybe TypeParameterList),+ localFunctionHeaderParameters :: FormalParameterList,+ localFunctionHeaderConstraints :: [TypeParameterConstraintsClause]}+ deriving (Eq, Ord, Read, Show)++_LocalFunctionHeader = Core.Name "hydra.csharp.syntax.LocalFunctionHeader"++_LocalFunctionHeader_identifier = Core.Name "identifier"++_LocalFunctionHeader_typeParameters = Core.Name "typeParameters"++_LocalFunctionHeader_parameters = Core.Name "parameters"++_LocalFunctionHeader_constraints = Core.Name "constraints"++-- | A modifier on a local function declaration: a ref modifier, or 'async'.+data LocalFunctionModifier =+ LocalFunctionModifierRef RefLocalFunctionModifier |+ LocalFunctionModifierAsync+ deriving (Eq, Ord, Read, Show)++_LocalFunctionModifier = Core.Name "hydra.csharp.syntax.LocalFunctionModifier"++_LocalFunctionModifier_ref = Core.Name "ref"++_LocalFunctionModifier_async = Core.Name "async"++-- | A local variable declaration, in its implicitly typed, explicitly typed, or ref form.+data LocalVariableDeclaration =+ LocalVariableDeclarationImplicitlyTyped ImplicitlyTypedLocalVariableDeclaration |+ LocalVariableDeclarationExplicitlyTyped ExplicitlyTypedLocalVariableDeclaration |+ LocalVariableDeclarationRef RefLocalVariableDeclaration+ deriving (Eq, Ord, Read, Show)++_LocalVariableDeclaration = Core.Name "hydra.csharp.syntax.LocalVariableDeclaration"++_LocalVariableDeclaration_implicitlyTyped = Core.Name "implicitlyTyped"++_LocalVariableDeclaration_explicitlyTyped = Core.Name "explicitlyTyped"++_LocalVariableDeclaration_ref = Core.Name "ref"++-- | The initializer of a local variable: an expression or an array initializer.+data LocalVariableInitializer =+ LocalVariableInitializerExpression Expression |+ LocalVariableInitializerInitializer ArrayInitializer+ deriving (Eq, Ord, Read, Show)++_LocalVariableInitializer = Core.Name "hydra.csharp.syntax.LocalVariableInitializer"++_LocalVariableInitializer_expression = Core.Name "expression"++_LocalVariableInitializer_initializer = Core.Name "initializer"++-- | The declared type of a local variable, or 'var' for implicit typing.+data LocalVariableType =+ LocalVariableTypeType Type |+ LocalVariableTypeVar+ deriving (Eq, Ord, Read, Show)++_LocalVariableType = Core.Name "hydra.csharp.syntax.LocalVariableType"++_LocalVariableType_type = Core.Name "type"++_LocalVariableType_var = Core.Name "var"++-- | A 'lock' statement that acquires a mutual-exclusion lock for the duration of its body.+data LockStatement =+ LockStatement {+ lockStatementExpression :: Expression,+ lockStatementBody :: EmbeddedStatement}+ deriving (Eq, Ord, Read, Show)++_LockStatement = Core.Name "hydra.csharp.syntax.LockStatement"++_LockStatement_expression = Core.Name "expression"++_LockStatement_body = Core.Name "body"++-- | A 'primary.identifier' member access, with optional explicit type arguments.+data MemberAccess =+ MemberAccess {+ memberAccessHead :: MemberAccessHead,+ memberAccessIdentifier :: Identifier,+ memberAccessTypeArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_MemberAccess = Core.Name "hydra.csharp.syntax.MemberAccess"++_MemberAccess_head = Core.Name "head"++_MemberAccess_identifier = Core.Name "identifier"++_MemberAccess_typeArguments = Core.Name "typeArguments"++-- | The left-hand target of a member access: a primary expression, predefined type, or alias.+data MemberAccessHead =+ MemberAccessHeadPrimary PrimaryExpression |+ MemberAccessHeadPredefined PredefinedType |+ MemberAccessHeadQualifiedAlias QualifiedAliasMember+ deriving (Eq, Ord, Read, Show)++_MemberAccessHead = Core.Name "hydra.csharp.syntax.MemberAccessHead"++_MemberAccessHead_primary = Core.Name "primary"++_MemberAccessHead_predefined = Core.Name "predefined"++_MemberAccessHead_qualifiedAlias = Core.Name "qualifiedAlias"++-- | A single member of an anonymous object initializer, naming or computing a member value.+data MemberDeclarator =+ MemberDeclaratorName SimpleName |+ MemberDeclaratorMemberAccess MemberAccess |+ MemberDeclaratorNullConditionalProjectionInitializer NullConditionalProjectionInitializer |+ MemberDeclaratorBaseAccess BaseAccess |+ MemberDeclaratorAssignment AssignmentMemberDeclarator+ deriving (Eq, Ord, Read, Show)++_MemberDeclarator = Core.Name "hydra.csharp.syntax.MemberDeclarator"++_MemberDeclarator_name = Core.Name "name"++_MemberDeclarator_memberAccess = Core.Name "memberAccess"++_MemberDeclarator_nullConditionalProjectionInitializer = Core.Name "nullConditionalProjectionInitializer"++_MemberDeclarator_baseAccess = Core.Name "baseAccess"++_MemberDeclarator_assignment = Core.Name "assignment"++-- | A non-empty, comma-separated list of member declarators in an anonymous object creation.+newtype MemberDeclaratorList =+ MemberDeclaratorList {+ unMemberDeclaratorList :: [MemberDeclarator]}+ deriving (Eq, Ord, Read, Show)++_MemberDeclaratorList = Core.Name "hydra.csharp.syntax.MemberDeclaratorList"++-- | A 'target = value' pair within an object initializer.+data MemberInitializer =+ MemberInitializer {+ memberInitializerTarget :: InitializerTarget,+ memberInitializerValue :: InitializerValue}+ deriving (Eq, Ord, Read, Show)++_MemberInitializer = Core.Name "hydra.csharp.syntax.MemberInitializer"++_MemberInitializer_target = Core.Name "target"++_MemberInitializer_value = Core.Name "value"++-- | A member's declared name, with an optional explicit interface type qualifier.+data MemberName =+ MemberName {+ memberNameInterfaceType :: (Maybe TypeName),+ memberNameIdentifier :: Identifier}+ deriving (Eq, Ord, Read, Show)++_MemberName = Core.Name "hydra.csharp.syntax.MemberName"++_MemberName_interfaceType = Core.Name "interfaceType"++_MemberName_identifier = Core.Name "identifier"++-- | The body of a standard method: a block, null-conditional invocation, expression, or empty.+data MethodBody =+ MethodBodyBlock Block |+ MethodBodyNullConditionalInvocation NullConditionalInvocationExpression |+ MethodBodyExpression Expression |+ MethodBodyEmpty+ deriving (Eq, Ord, Read, Show)++_MethodBody = Core.Name "hydra.csharp.syntax.MethodBody"++_MethodBody_block = Core.Name "block"++_MethodBody_nullConditionalInvocation = Core.Name "nullConditionalInvocation"++_MethodBody_expression = Core.Name "expression"++_MethodBody_empty = Core.Name "empty"++-- | A method member declaration, in its standard or ref-returning form.+data MethodDeclaration =+ MethodDeclarationStandard StandardMethodDeclaration |+ MethodDeclarationRefReturn RefReturnMethodDeclaration+ deriving (Eq, Ord, Read, Show)++_MethodDeclaration = Core.Name "hydra.csharp.syntax.MethodDeclaration"++_MethodDeclaration_standard = Core.Name "standard"++_MethodDeclaration_refReturn = Core.Name "refReturn"++-- | The name, type parameters, formal parameters, and constraints of a method declaration.+data MethodHeader =+ MethodHeader {+ methodHeaderName :: MemberName,+ methodHeaderTypeParameters :: (Maybe TypeParameterList),+ methodHeaderParameters :: (Maybe FormalParameterList),+ methodHeaderConstraints :: [TypeParameterConstraintsClause]}+ deriving (Eq, Ord, Read, Show)++_MethodHeader = Core.Name "hydra.csharp.syntax.MethodHeader"++_MethodHeader_name = Core.Name "name"++_MethodHeader_typeParameters = Core.Name "typeParameters"++_MethodHeader_parameters = Core.Name "parameters"++_MethodHeader_constraints = Core.Name "constraints"++-- | A modifier on a method declaration: a ref modifier, or 'async'.+data MethodModifier =+ MethodModifierRef RefMethodModifier |+ MethodModifierAsync+ deriving (Eq, Ord, Read, Show)++_MethodModifier = Core.Name "hydra.csharp.syntax.MethodModifier"++_MethodModifier_ref = Core.Name "ref"++_MethodModifier_async = Core.Name "async"++-- | The full modifier list of a method declaration, including whether it is 'partial'.+data MethodModifiers =+ MethodModifiers {+ methodModifiersModifiers :: [MethodModifier],+ methodModifiersPartial :: Bool}+ deriving (Eq, Ord, Read, Show)++_MethodModifiers = Core.Name "hydra.csharp.syntax.MethodModifiers"++_MethodModifiers_modifiers = Core.Name "modifiers"++_MethodModifiers_partial = Core.Name "partial"++-- | A simple unary expression or a binary multiplication/division/remainder expression.+data MultiplicativeExpression =+ MultiplicativeExpressionSimple UnaryExpression |+ MultiplicativeExpressionBinary BinaryMultiplicativeExpression+ deriving (Eq, Ord, Read, Show)++_MultiplicativeExpression = Core.Name "hydra.csharp.syntax.MultiplicativeExpression"++_MultiplicativeExpression_simple = Core.Name "simple"++_MultiplicativeExpression_binary = Core.Name "binary"++-- | The multiplication, division, or modulo operator.+data MultiplicativeOperator =+ MultiplicativeOperatorTimes |+ MultiplicativeOperatorDivide |+ MultiplicativeOperatorModulo+ deriving (Eq, Ord, Read, Show)++_MultiplicativeOperator = Core.Name "hydra.csharp.syntax.MultiplicativeOperator"++_MultiplicativeOperator_times = Core.Name "times"++_MultiplicativeOperator_divide = Core.Name "divide"++_MultiplicativeOperator_modulo = Core.Name "modulo"++-- | An argument of the form 'name: value' passed to an attribute constructor.+data NamedArgument =+ NamedArgument {+ namedArgumentName :: Identifier,+ namedArgumentValue :: AttributeArgumentExpression}+ deriving (Eq, Ord, Read, Show)++_NamedArgument = Core.Name "hydra.csharp.syntax.NamedArgument"++_NamedArgument_name = Core.Name "name"++_NamedArgument_value = Core.Name "value"++-- | A non-empty, comma-separated list of named arguments passed to an attribute.+newtype NamedArgumentList =+ NamedArgumentList {+ unNamedArgumentList :: [NamedArgument]}+ deriving (Eq, Ord, Read, Show)++_NamedArgumentList = Core.Name "hydra.csharp.syntax.NamedArgumentList"++-- | The target expression of a 'nameof' operator, with its chain of accessed parts.+data NamedEntity =+ NamedEntity {+ namedEntityTarget :: NamedEntityTarget,+ namedEntityParts :: [NamedEntityPart]}+ deriving (Eq, Ord, Read, Show)++_NamedEntity = Core.Name "hydra.csharp.syntax.NamedEntity"++_NamedEntity_target = Core.Name "target"++_NamedEntity_parts = Core.Name "parts"++-- | A single '.identifier<TypeArgs>' segment chained within a named entity.+data NamedEntityPart =+ NamedEntityPart {+ namedEntityPartIdentifier :: Identifier,+ namedEntityPartTypeArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_NamedEntityPart = Core.Name "hydra.csharp.syntax.NamedEntityPart"++_NamedEntityPart_identifier = Core.Name "identifier"++_NamedEntityPart_typeArguments = Core.Name "typeArguments"++-- | The initial target of a named entity: a simple name, this, base, or a predefined/aliased type.+data NamedEntityTarget =+ NamedEntityTargetName SimpleName |+ NamedEntityTargetThis |+ NamedEntityTargetBase |+ NamedEntityTargetPredefinedType PredefinedType |+ NamedEntityTargetQualifiedAliasMember QualifiedAliasMember+ deriving (Eq, Ord, Read, Show)++_NamedEntityTarget = Core.Name "hydra.csharp.syntax.NamedEntityTarget"++_NamedEntityTarget_name = Core.Name "name"++_NamedEntityTarget_this = Core.Name "this"++_NamedEntityTarget_base = Core.Name "base"++_NamedEntityTarget_predefinedType = Core.Name "predefinedType"++_NamedEntityTarget_qualifiedAliasMember = Core.Name "qualifiedAliasMember"++-- | The extern aliases, using directives, and member declarations within a namespace.+data NamespaceBody =+ NamespaceBody {+ namespaceBodyExterns :: [ExternAliasDirective],+ namespaceBodyUsings :: [UsingDirective],+ namespaceBodyMembers :: [NamespaceMemberDeclaration]}+ deriving (Eq, Ord, Read, Show)++_NamespaceBody = Core.Name "hydra.csharp.syntax.NamespaceBody"++_NamespaceBody_externs = Core.Name "externs"++_NamespaceBody_usings = Core.Name "usings"++_NamespaceBody_members = Core.Name "members"++-- | A namespace declaration, naming the namespace and giving its body.+data NamespaceDeclaration =+ NamespaceDeclaration {+ namespaceDeclarationName :: QualifiedIdentifier,+ namespaceDeclarationBody :: NamespaceBody}+ deriving (Eq, Ord, Read, Show)++_NamespaceDeclaration = Core.Name "hydra.csharp.syntax.NamespaceDeclaration"++_NamespaceDeclaration_name = Core.Name "name"++_NamespaceDeclaration_body = Core.Name "body"++-- | A member of a namespace: a nested namespace declaration or a type declaration.+data NamespaceMemberDeclaration =+ NamespaceMemberDeclarationNamespace NamespaceDeclaration |+ NamespaceMemberDeclarationType TypeDeclaration+ deriving (Eq, Ord, Read, Show)++_NamespaceMemberDeclaration = Core.Name "hydra.csharp.syntax.NamespaceMemberDeclaration"++_NamespaceMemberDeclaration_namespace = Core.Name "namespace"++_NamespaceMemberDeclaration_type = Core.Name "type"++-- | A reference to a namespace, expressed as a namespace-or-type name.+newtype NamespaceName =+ NamespaceName {+ unNamespaceName :: NamespaceOrTypeName}+ deriving (Eq, Ord, Read, Show)++_NamespaceName = Core.Name "hydra.csharp.syntax.NamespaceName"++-- | A name that may refer to either a namespace or a type: identifier, qualified, or alias-qualified.+data NamespaceOrTypeName =+ NamespaceOrTypeNameIdentifier IdentifierNamespaceOrTypeName |+ NamespaceOrTypeNameQualified QualifiedNamespaceOrTypeName |+ NamespaceOrTypeNameAlias QualifiedAliasMember+ deriving (Eq, Ord, Read, Show)++_NamespaceOrTypeName = Core.Name "hydra.csharp.syntax.NamespaceOrTypeName"++_NamespaceOrTypeName_identifier = Core.Name "identifier"++_NamespaceOrTypeName_qualified = Core.Name "qualified"++_NamespaceOrTypeName_alias = Core.Name "alias"++-- | A type that is not itself an array type: value, class, interface, delegate, dynamic, or pointer.+data NonArrayType =+ NonArrayTypeValue ValueType |+ NonArrayTypeClass ClassType |+ NonArrayTypeInterface InterfaceType |+ NonArrayTypeDelegate DelegateType |+ NonArrayTypeDynamic |+ NonArrayTypeParameter TypeParameter |+ NonArrayTypePointer PointerType+ deriving (Eq, Ord, Read, Show)++_NonArrayType = Core.Name "hydra.csharp.syntax.NonArrayType"++_NonArrayType_value = Core.Name "value"++_NonArrayType_class = Core.Name "class"++_NonArrayType_interface = Core.Name "interface"++_NonArrayType_delegate = Core.Name "delegate"++_NonArrayType_dynamic = Core.Name "dynamic"++_NonArrayType_parameter = Core.Name "parameter"++_NonArrayType_pointer = Core.Name "pointer"++-- | Array creation giving the element type, dimension expressions, and rank specifiers directly.+data NonArrayTypeArrayCreationExpression =+ NonArrayTypeArrayCreationExpression {+ nonArrayTypeArrayCreationExpressionType :: NonArrayType,+ nonArrayTypeArrayCreationExpressionExpressions :: ExpressionList,+ nonArrayTypeArrayCreationExpressionRankSpecifiers :: [RankSpecifier],+ nonArrayTypeArrayCreationExpressionInitializer :: (Maybe ArrayInitializer)}+ deriving (Eq, Ord, Read, Show)++_NonArrayTypeArrayCreationExpression = Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"++_NonArrayTypeArrayCreationExpression_type = Core.Name "type"++_NonArrayTypeArrayCreationExpression_expressions = Core.Name "expressions"++_NonArrayTypeArrayCreationExpression_rankSpecifiers = Core.Name "rankSpecifiers"++_NonArrayTypeArrayCreationExpression_initializer = Core.Name "initializer"++-- | An expression other than an assignment: declaration, conditional, lambda, or query expression.+data NonAssignmentExpression =+ NonAssignmentExpressionDeclaration DeclarationExpression |+ NonAssignmentExpressionConditional ConditionalExpression |+ NonAssignmentExpressionLambda LambdaExpression |+ NonAssignmentExpressionQuery QueryExpression+ deriving (Eq, Ord, Read, Show)++_NonAssignmentExpression = Core.Name "hydra.csharp.syntax.NonAssignmentExpression"++_NonAssignmentExpression_declaration = Core.Name "declaration"++_NonAssignmentExpression_conditional = Core.Name "conditional"++_NonAssignmentExpression_lambda = Core.Name "lambda"++_NonAssignmentExpression_query = Core.Name "query"++-- | A simple, binary (??), or throw-expression form of the null-coalescing operator.+data NullCoalescingExpression =+ NullCoalescingExpressionSimple ConditionalOrExpression |+ NullCoalescingExpressionBinary BinaryNullCoalescingExpression |+ NullCoalescingExpressionThrow NullCoalescingExpression+ deriving (Eq, Ord, Read, Show)++_NullCoalescingExpression = Core.Name "hydra.csharp.syntax.NullCoalescingExpression"++_NullCoalescingExpression_simple = Core.Name "simple"++_NullCoalescingExpression_binary = Core.Name "binary"++_NullCoalescingExpression_throw = Core.Name "throw"++-- | A null-conditional element access (?[...]) with its chain of dependent accesses.+data NullConditionalElementAccess =+ NullConditionalElementAccess {+ nullConditionalElementAccessExpression :: PrimaryNoArrayCreationExpression,+ nullConditionalElementAccessArguments :: ArgumentList,+ nullConditionalElementAccessDependentAccess :: [DependentAccess]}+ deriving (Eq, Ord, Read, Show)++_NullConditionalElementAccess = Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"++_NullConditionalElementAccess_expression = Core.Name "expression"++_NullConditionalElementAccess_arguments = Core.Name "arguments"++_NullConditionalElementAccess_dependentAccess = Core.Name "dependentAccess"++-- | A null-conditional invocation (?.method(...) or ?[...]) with optional arguments.+data NullConditionalInvocationExpression =+ NullConditionalInvocationExpression {+ nullConditionalInvocationExpressionHead :: NullConditionalInvocationExpressionHead,+ nullConditionalInvocationExpressionArguments :: (Maybe ArgumentList)}+ deriving (Eq, Ord, Read, Show)++_NullConditionalInvocationExpression = Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"++_NullConditionalInvocationExpression_head = Core.Name "head"++_NullConditionalInvocationExpression_arguments = Core.Name "arguments"++-- | The member- or element-access head of a null-conditional invocation expression.+data NullConditionalInvocationExpressionHead =+ NullConditionalInvocationExpressionHeadMember NullConditionalMemberAccess |+ NullConditionalInvocationExpressionHeadElement NullConditionalElementAccess+ deriving (Eq, Ord, Read, Show)++_NullConditionalInvocationExpressionHead = Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpressionHead"++_NullConditionalInvocationExpressionHead_member = Core.Name "member"++_NullConditionalInvocationExpressionHead_element = Core.Name "element"++-- | A null-conditional member access (?.member) with its chain of dependent accesses.+data NullConditionalMemberAccess =+ NullConditionalMemberAccess {+ nullConditionalMemberAccessExpression :: PrimaryExpression,+ nullConditionalMemberAccessIdentifier :: Identifier,+ nullConditionalMemberAccessTypeArguments :: (Maybe TypeArgumentList),+ nullConditionalMemberAccessDependentAccess :: [DependentAccess]}+ deriving (Eq, Ord, Read, Show)++_NullConditionalMemberAccess = Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"++_NullConditionalMemberAccess_expression = Core.Name "expression"++_NullConditionalMemberAccess_identifier = Core.Name "identifier"++_NullConditionalMemberAccess_typeArguments = Core.Name "typeArguments"++_NullConditionalMemberAccess_dependentAccess = Core.Name "dependentAccess"++-- | A null-conditional member projection used inside an anonymous object initializer.+data NullConditionalProjectionInitializer =+ NullConditionalProjectionInitializer {+ nullConditionalProjectionInitializerExpression :: PrimaryExpression,+ nullConditionalProjectionInitializerIdentifier :: Identifier,+ nullConditionalProjectionInitializerTypeArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_NullConditionalProjectionInitializer = Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"++_NullConditionalProjectionInitializer_expression = Core.Name "expression"++_NullConditionalProjectionInitializer_identifier = Core.Name "identifier"++_NullConditionalProjectionInitializer_typeArguments = Core.Name "typeArguments"++-- | A numeric type: integral, floating-point, or decimal.+data NumericType =+ NumericTypeIntegral IntegralType |+ NumericTypeFloatingPoint FloatingPointType |+ NumericTypeDecimal+ deriving (Eq, Ord, Read, Show)++_NumericType = Core.Name "hydra.csharp.syntax.NumericType"++_NumericType_integral = Core.Name "integral"++_NumericType_floatingPoint = Core.Name "floatingPoint"++_NumericType_decimal = Core.Name "decimal"++-- | A 'new' expression that constructs an object, with optional arguments and initializer.+data ObjectCreationExpression =+ ObjectCreationExpression {+ objectCreationExpressionType :: Type,+ objectCreationExpressionArguments :: (Maybe ArgumentList),+ objectCreationExpressionInitializer :: (Maybe ObjectOrCollectionInitializer)}+ deriving (Eq, Ord, Read, Show)++_ObjectCreationExpression = Core.Name "hydra.csharp.syntax.ObjectCreationExpression"++_ObjectCreationExpression_type = Core.Name "type"++_ObjectCreationExpression_arguments = Core.Name "arguments"++_ObjectCreationExpression_initializer = Core.Name "initializer"++-- | An object initializer's member list, or a collection initializer's element list.+data ObjectOrCollectionInitializer =+ ObjectOrCollectionInitializerObject [MemberInitializer] |+ ObjectOrCollectionInitializerCollection [ElementInitializer]+ deriving (Eq, Ord, Read, Show)++_ObjectOrCollectionInitializer = Core.Name "hydra.csharp.syntax.ObjectOrCollectionInitializer"++_ObjectOrCollectionInitializer_object = Core.Name "object"++_ObjectOrCollectionInitializer_collection = Core.Name "collection"++-- | The body of an operator overload declaration: a block, expression body, or empty (extern) body.+data OperatorBody =+ OperatorBodyBlock Block |+ OperatorBodyExpression Expression |+ OperatorBodyEmpty+ deriving (Eq, Ord, Read, Show)++_OperatorBody = Core.Name "hydra.csharp.syntax.OperatorBody"++_OperatorBody_block = Core.Name "block"++_OperatorBody_expression = Core.Name "expression"++_OperatorBody_empty = Core.Name "empty"++-- | A user-defined operator overload declaration, with its modifiers, declarator, and body.+data OperatorDeclaration =+ OperatorDeclaration {+ operatorDeclarationAttributes :: (Maybe Attributes),+ operatorDeclarationModifiers :: [OperatorModifier],+ operatorDeclarationDeclarator :: OperatorDeclarator,+ operatorDeclarationBody :: OperatorBody}+ deriving (Eq, Ord, Read, Show)++_OperatorDeclaration = Core.Name "hydra.csharp.syntax.OperatorDeclaration"++_OperatorDeclaration_attributes = Core.Name "attributes"++_OperatorDeclaration_modifiers = Core.Name "modifiers"++_OperatorDeclaration_declarator = Core.Name "declarator"++_OperatorDeclaration_body = Core.Name "body"++-- | The declarator of an operator overload: unary, binary, or conversion form.+data OperatorDeclarator =+ OperatorDeclaratorUnary UnaryOperatorDeclarator |+ OperatorDeclaratorBinary BinaryOperatorDeclarator |+ OperatorDeclaratorConversion ConversionOperatorDeclarator+ deriving (Eq, Ord, Read, Show)++_OperatorDeclarator = Core.Name "hydra.csharp.syntax.OperatorDeclarator"++_OperatorDeclarator_unary = Core.Name "unary"++_OperatorDeclarator_binary = Core.Name "binary"++_OperatorDeclarator_conversion = Core.Name "conversion"++-- | A modifier keyword on an operator declaration: public, static, extern, or unsafe.+data OperatorModifier =+ OperatorModifierPublic |+ OperatorModifierStatic |+ OperatorModifierExtern |+ OperatorModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_OperatorModifier = Core.Name "hydra.csharp.syntax.OperatorModifier"++_OperatorModifier_public = Core.Name "public"++_OperatorModifier_static = Core.Name "static"++_OperatorModifier_extern = Core.Name "extern"++_OperatorModifier_unsafe = Core.Name "unsafe"++-- | A single ordering key expression, with an optional ascending/descending direction, in an orderby clause.+data Ordering =+ Ordering {+ orderingExpression :: Expression,+ orderingDirection :: (Maybe OrderingDirection)}+ deriving (Eq, Ord, Read, Show)++_Ordering = Core.Name "hydra.csharp.syntax.Ordering"++_Ordering_expression = Core.Name "expression"++_Ordering_direction = Core.Name "direction"++-- | The ascending or descending direction of an ordering key in an orderby clause.+data OrderingDirection =+ OrderingDirectionAscending |+ OrderingDirectionDescending+ deriving (Eq, Ord, Read, Show)++_OrderingDirection = Core.Name "hydra.csharp.syntax.OrderingDirection"++_OrderingDirection_ascending = Core.Name "ascending"++_OrderingDirection_descending = Core.Name "descending"++-- | A binary operator symbol that may be overloaded via a user-defined operator declaration.+data OverloadableBinaryOperator =+ OverloadableBinaryOperatorAdd |+ OverloadableBinaryOperatorSubtract |+ OverloadableBinaryOperatorMultiply |+ OverloadableBinaryOperatorDivide |+ OverloadableBinaryOperatorModulus |+ OverloadableBinaryOperatorAnd |+ OverloadableBinaryOperatorOr |+ OverloadableBinaryOperatorXor |+ OverloadableBinaryOperatorLeftShift |+ OverloadableBinaryOperatorRightShift |+ OverloadableBinaryOperatorEqual |+ OverloadableBinaryOperatorNotEqual |+ OverloadableBinaryOperatorGreaterThan |+ OverloadableBinaryOperatorLessThan |+ OverloadableBinaryOperatorGreaterThanOrEqual |+ OverloadableBinaryOperatorLessThanOrEqual+ deriving (Eq, Ord, Read, Show)++_OverloadableBinaryOperator = Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"++_OverloadableBinaryOperator_add = Core.Name "add"++_OverloadableBinaryOperator_subtract = Core.Name "subtract"++_OverloadableBinaryOperator_multiply = Core.Name "multiply"++_OverloadableBinaryOperator_divide = Core.Name "divide"++_OverloadableBinaryOperator_modulus = Core.Name "modulus"++_OverloadableBinaryOperator_and = Core.Name "and"++_OverloadableBinaryOperator_or = Core.Name "or"++_OverloadableBinaryOperator_xor = Core.Name "xor"++_OverloadableBinaryOperator_leftShift = Core.Name "leftShift"++_OverloadableBinaryOperator_rightShift = Core.Name "rightShift"++_OverloadableBinaryOperator_equal = Core.Name "equal"++_OverloadableBinaryOperator_notEqual = Core.Name "notEqual"++_OverloadableBinaryOperator_greaterThan = Core.Name "greaterThan"++_OverloadableBinaryOperator_lessThan = Core.Name "lessThan"++_OverloadableBinaryOperator_greaterThanOrEqual = Core.Name "greaterThanOrEqual"++_OverloadableBinaryOperator_lessThanOrEqual = Core.Name "lessThanOrEqual"++-- | A unary operator symbol that may be overloaded via a user-defined operator declaration.+data OverloadableUnaryOperator =+ OverloadableUnaryOperatorPlus |+ OverloadableUnaryOperatorMinus |+ OverloadableUnaryOperatorNot |+ OverloadableUnaryOperatorComplement |+ OverloadableUnaryOperatorIncrement |+ OverloadableUnaryOperatorDecrement |+ OverloadableUnaryOperatorTrue |+ OverloadableUnaryOperatorFalse+ deriving (Eq, Ord, Read, Show)++_OverloadableUnaryOperator = Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"++_OverloadableUnaryOperator_plus = Core.Name "plus"++_OverloadableUnaryOperator_minus = Core.Name "minus"++_OverloadableUnaryOperator_not = Core.Name "not"++_OverloadableUnaryOperator_complement = Core.Name "complement"++_OverloadableUnaryOperator_increment = Core.Name "increment"++_OverloadableUnaryOperator_decrement = Core.Name "decrement"++_OverloadableUnaryOperator_true = Core.Name "true"++_OverloadableUnaryOperator_false = Core.Name "false"++-- | A trailing 'params' array parameter of a formal parameter list.+data ParameterArray =+ ParameterArray {+ parameterArrayAttributes :: (Maybe Attributes),+ parameterArrayType :: ArrayType,+ parameterArrayIdentifier :: Identifier}+ deriving (Eq, Ord, Read, Show)++_ParameterArray = Core.Name "hydra.csharp.syntax.ParameterArray"++_ParameterArray_attributes = Core.Name "attributes"++_ParameterArray_type = Core.Name "type"++_ParameterArray_identifier = Core.Name "identifier"++-- | The ref, out, or in passing-mode modifier on a fixed parameter.+data ParameterModeModifier =+ ParameterModeModifierRef |+ ParameterModeModifierOut |+ ParameterModeModifierIn+ deriving (Eq, Ord, Read, Show)++_ParameterModeModifier = Core.Name "hydra.csharp.syntax.ParameterModeModifier"++_ParameterModeModifier_ref = Core.Name "ref"++_ParameterModeModifier_out = Core.Name "out"++_ParameterModeModifier_in = Core.Name "in"++-- | A modifier on a fixed parameter: a passing-mode modifier, or 'this' for extension methods.+data ParameterModifier =+ ParameterModifierMode ParameterModeModifier |+ ParameterModifierThis+ deriving (Eq, Ord, Read, Show)++_ParameterModifier = Core.Name "hydra.csharp.syntax.ParameterModifier"++_ParameterModifier_mode = Core.Name "mode"++_ParameterModifier_this = Core.Name "this"++-- | A pattern used in pattern matching: a declaration, constant, or var pattern.+data Pattern =+ PatternDeclaration DeclarationPattern |+ PatternConstant Expression |+ PatternVar Designation+ deriving (Eq, Ord, Read, Show)++_Pattern = Core.Name "hydra.csharp.syntax.Pattern"++_Pattern_declaration = Core.Name "declaration"++_Pattern_constant = Core.Name "constant"++_Pattern_var = Core.Name "var"++-- | An unsafe pointer indexing expression (pointer[index]).+data PointerElementAccess =+ PointerElementAccess {+ pointerElementAccessPointer :: PrimaryNoArrayCreationExpression,+ pointerElementAccessIndex :: Expression}+ deriving (Eq, Ord, Read, Show)++_PointerElementAccess = Core.Name "hydra.csharp.syntax.PointerElementAccess"++_PointerElementAccess_pointer = Core.Name "pointer"++_PointerElementAccess_index = Core.Name "index"++-- | An unsafe pointer member access expression (pointer->member).+data PointerMemberAccess =+ PointerMemberAccess {+ pointerMemberAccessPointer :: PrimaryExpression,+ pointerMemberAccessMember :: Identifier,+ pointerMemberAccessTypeArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_PointerMemberAccess = Core.Name "hydra.csharp.syntax.PointerMemberAccess"++_PointerMemberAccess_pointer = Core.Name "pointer"++_PointerMemberAccess_member = Core.Name "member"++_PointerMemberAccess_typeArguments = Core.Name "typeArguments"++-- | An unsafe pointer type, formed from a pointee value type and a pointer depth.+data PointerType =+ PointerTypeValueType (Maybe ValueType) |+ PointerTypePointerDepth Int+ deriving (Eq, Ord, Read, Show)++_PointerType = Core.Name "hydra.csharp.syntax.PointerType"++_PointerType_valueType = Core.Name "valueType"++_PointerType_pointerDepth = Core.Name "pointerDepth"++-- | A single positional (or optionally named) argument in an attribute's argument list.+data PositionalArgument =+ PositionalArgument {+ positionalArgumentName :: (Maybe Identifier),+ positionalArgumentValue :: AttributeArgumentExpression}+ deriving (Eq, Ord, Read, Show)++_PositionalArgument = Core.Name "hydra.csharp.syntax.PositionalArgument"++_PositionalArgument_name = Core.Name "name"++_PositionalArgument_value = Core.Name "value"++-- | A non-empty, comma-separated list of positional arguments passed to an attribute.+newtype PositionalArgumentList =+ PositionalArgumentList {+ unPositionalArgumentList :: [PositionalArgument]}+ deriving (Eq, Ord, Read, Show)++_PositionalArgumentList = Core.Name "hydra.csharp.syntax.PositionalArgumentList"++-- | One of the built-in predefined type keywords, such as int, string, or bool.+data PredefinedType =+ PredefinedTypeBool |+ PredefinedTypeByte |+ PredefinedTypeChar |+ PredefinedTypeDecimal |+ PredefinedTypeDouble |+ PredefinedTypeFloat |+ PredefinedTypeInt |+ PredefinedTypeLong |+ PredefinedTypeObject |+ PredefinedTypeSbyte |+ PredefinedTypeShort |+ PredefinedTypeString |+ PredefinedTypeUint |+ PredefinedTypeUlong |+ PredefinedTypeUshort+ deriving (Eq, Ord, Read, Show)++_PredefinedType = Core.Name "hydra.csharp.syntax.PredefinedType"++_PredefinedType_bool = Core.Name "bool"++_PredefinedType_byte = Core.Name "byte"++_PredefinedType_char = Core.Name "char"++_PredefinedType_decimal = Core.Name "decimal"++_PredefinedType_double = Core.Name "double"++_PredefinedType_float = Core.Name "float"++_PredefinedType_int = Core.Name "int"++_PredefinedType_long = Core.Name "long"++_PredefinedType_object = Core.Name "object"++_PredefinedType_sbyte = Core.Name "sbyte"++_PredefinedType_short = Core.Name "short"++_PredefinedType_string = Core.Name "string"++_PredefinedType_uint = Core.Name "uint"++_PredefinedType_ulong = Core.Name "ulong"++_PredefinedType_ushort = Core.Name "ushort"++-- | The primary type-parameter constraint: a class type, or the class/struct/unmanaged constraint.+data PrimaryConstraint =+ PrimaryConstraintClassType ClassType |+ PrimaryConstraintClass |+ PrimaryConstraintStruct |+ PrimaryConstraintUnmanaged+ deriving (Eq, Ord, Read, Show)++_PrimaryConstraint = Core.Name "hydra.csharp.syntax.PrimaryConstraint"++_PrimaryConstraint_classType = Core.Name "classType"++_PrimaryConstraint_class = Core.Name "class"++_PrimaryConstraint_struct = Core.Name "struct"++_PrimaryConstraint_unmanaged = Core.Name "unmanaged"++-- | An expression without an array creation, or an array creation expression.+data PrimaryExpression =+ PrimaryExpressionNoArray PrimaryNoArrayCreationExpression |+ PrimaryExpressionArray ArrayCreationExpression+ deriving (Eq, Ord, Read, Show)++_PrimaryExpression = Core.Name "hydra.csharp.syntax.PrimaryExpression"++_PrimaryExpression_noArray = Core.Name "noArray"++_PrimaryExpression_array = Core.Name "array"++-- | A primary expression other than array creation: literal, invocation, access, and so on.+data PrimaryNoArrayCreationExpression =+ PrimaryNoArrayCreationExpressionLiteral Literal |+ PrimaryNoArrayCreationExpressionInterpolatedString InterpolatedStringExpression |+ PrimaryNoArrayCreationExpressionSimpleName SimpleName |+ PrimaryNoArrayCreationExpressionParenthesized Expression |+ PrimaryNoArrayCreationExpressionTuple TupleExpression |+ PrimaryNoArrayCreationExpressionMemberAccess MemberAccess |+ PrimaryNoArrayCreationExpressionNullConditionalMemberAccess NullConditionalMemberAccess |+ PrimaryNoArrayCreationExpressionInvocation InvocationExpression |+ PrimaryNoArrayCreationExpressionElementAccess ElementAccess |+ PrimaryNoArrayCreationExpressionNullConditionalElementAccess NullConditionalElementAccess |+ PrimaryNoArrayCreationExpressionThisAccess |+ PrimaryNoArrayCreationExpressionBaseAccess BaseAccess |+ PrimaryNoArrayCreationExpressionPostIncrement PrimaryExpression |+ PrimaryNoArrayCreationExpressionPostDecrement PrimaryExpression |+ PrimaryNoArrayCreationExpressionObjectCreation ObjectCreationExpression |+ PrimaryNoArrayCreationExpressionDelegateCreation DelegateCreationExpression |+ PrimaryNoArrayCreationExpressionAnonymousObjectCreation (Maybe MemberDeclaratorList) |+ PrimaryNoArrayCreationExpressionTypeof TypeofExpression |+ PrimaryNoArrayCreationExpressionSizeof UnmanagedType |+ PrimaryNoArrayCreationExpressionChecked Expression |+ PrimaryNoArrayCreationExpressionUnchecked Expression |+ PrimaryNoArrayCreationExpressionDefaultValue DefaultValueExpression |+ PrimaryNoArrayCreationExpressionNameof NamedEntity |+ PrimaryNoArrayCreationExpressionAnonymousMethod AnonymousMethodExpression |+ PrimaryNoArrayCreationExpressionPointerMemberAccess PointerMemberAccess |+ PrimaryNoArrayCreationExpressionPointerElementAccess PointerElementAccess |+ PrimaryNoArrayCreationExpressionStackalloc StackallocExpression+ deriving (Eq, Ord, Read, Show)++_PrimaryNoArrayCreationExpression = Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"++_PrimaryNoArrayCreationExpression_literal = Core.Name "literal"++_PrimaryNoArrayCreationExpression_interpolatedString = Core.Name "interpolatedString"++_PrimaryNoArrayCreationExpression_simpleName = Core.Name "simpleName"++_PrimaryNoArrayCreationExpression_parenthesized = Core.Name "parenthesized"++_PrimaryNoArrayCreationExpression_tuple = Core.Name "tuple"++_PrimaryNoArrayCreationExpression_memberAccess = Core.Name "memberAccess"++_PrimaryNoArrayCreationExpression_nullConditionalMemberAccess = Core.Name "nullConditionalMemberAccess"++_PrimaryNoArrayCreationExpression_invocation = Core.Name "invocation"++_PrimaryNoArrayCreationExpression_elementAccess = Core.Name "elementAccess"++_PrimaryNoArrayCreationExpression_nullConditionalElementAccess = Core.Name "nullConditionalElementAccess"++_PrimaryNoArrayCreationExpression_thisAccess = Core.Name "thisAccess"++_PrimaryNoArrayCreationExpression_baseAccess = Core.Name "baseAccess"++_PrimaryNoArrayCreationExpression_postIncrement = Core.Name "postIncrement"++_PrimaryNoArrayCreationExpression_postDecrement = Core.Name "postDecrement"++_PrimaryNoArrayCreationExpression_objectCreation = Core.Name "objectCreation"++_PrimaryNoArrayCreationExpression_delegateCreation = Core.Name "delegateCreation"++_PrimaryNoArrayCreationExpression_anonymousObjectCreation = Core.Name "anonymousObjectCreation"++_PrimaryNoArrayCreationExpression_typeof = Core.Name "typeof"++_PrimaryNoArrayCreationExpression_sizeof = Core.Name "sizeof"++_PrimaryNoArrayCreationExpression_checked = Core.Name "checked"++_PrimaryNoArrayCreationExpression_unchecked = Core.Name "unchecked"++_PrimaryNoArrayCreationExpression_defaultValue = Core.Name "defaultValue"++_PrimaryNoArrayCreationExpression_nameof = Core.Name "nameof"++_PrimaryNoArrayCreationExpression_anonymousMethod = Core.Name "anonymousMethod"++_PrimaryNoArrayCreationExpression_pointerMemberAccess = Core.Name "pointerMemberAccess"++_PrimaryNoArrayCreationExpression_pointerElementAccess = Core.Name "pointerElementAccess"++_PrimaryNoArrayCreationExpression_stackalloc = Core.Name "stackalloc"++-- | The body of a standard property: block accessors or a single expression body.+data PropertyBody =+ PropertyBodyBlock BlockPropertyBody |+ PropertyBodyExpression Expression+ deriving (Eq, Ord, Read, Show)++_PropertyBody = Core.Name "hydra.csharp.syntax.PropertyBody"++_PropertyBody_block = Core.Name "block"++_PropertyBody_expression = Core.Name "expression"++-- | A property member declaration, in its standard or ref-returning form.+data PropertyDeclaration =+ PropertyDeclarationStandard StandardPropertyDeclaration |+ PropertyDeclarationRefReturn RefReturnPropertyDeclaration+ deriving (Eq, Ord, Read, Show)++_PropertyDeclaration = Core.Name "hydra.csharp.syntax.PropertyDeclaration"++_PropertyDeclaration_standard = Core.Name "standard"++_PropertyDeclaration_refReturn = Core.Name "refReturn"++-- | A modifier keyword on a property declaration, such as virtual, override, or abstract.+data PropertyModifier =+ PropertyModifierNew |+ PropertyModifierPublic |+ PropertyModifierProtected |+ PropertyModifierInternal |+ PropertyModifierPrivate |+ PropertyModifierStatic |+ PropertyModifierVirtual |+ PropertyModifierSealed |+ PropertyModifierOverride |+ PropertyModifierAbstract |+ PropertyModifierExtern |+ PropertyModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_PropertyModifier = Core.Name "hydra.csharp.syntax.PropertyModifier"++_PropertyModifier_new = Core.Name "new"++_PropertyModifier_public = Core.Name "public"++_PropertyModifier_protected = Core.Name "protected"++_PropertyModifier_internal = Core.Name "internal"++_PropertyModifier_private = Core.Name "private"++_PropertyModifier_static = Core.Name "static"++_PropertyModifier_virtual = Core.Name "virtual"++_PropertyModifier_sealed = Core.Name "sealed"++_PropertyModifier_override = Core.Name "override"++_PropertyModifier_abstract = Core.Name "abstract"++_PropertyModifier_extern = Core.Name "extern"++_PropertyModifier_unsafe = Core.Name "unsafe"++-- | An 'alias::member' reference, with optional type arguments, using an extern or global alias.+data QualifiedAliasMember =+ QualifiedAliasMember {+ qualifiedAliasMemberAlias :: Identifier,+ qualifiedAliasMemberMember :: Identifier,+ qualifiedAliasMemberArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_QualifiedAliasMember = Core.Name "hydra.csharp.syntax.QualifiedAliasMember"++_QualifiedAliasMember_alias = Core.Name "alias"++_QualifiedAliasMember_member = Core.Name "member"++_QualifiedAliasMember_arguments = Core.Name "arguments"++-- | A non-empty, dot-separated sequence of identifiers, as used in a namespace declaration.+newtype QualifiedIdentifier =+ QualifiedIdentifier {+ unQualifiedIdentifier :: [Identifier]}+ deriving (Eq, Ord, Read, Show)++_QualifiedIdentifier = Core.Name "hydra.csharp.syntax.QualifiedIdentifier"++-- | A namespace-or-type name qualified with a preceding namespace-or-type and identifier.+data QualifiedNamespaceOrTypeName =+ QualifiedNamespaceOrTypeName {+ qualifiedNamespaceOrTypeNameNamespaceOrType :: NamespaceOrTypeName,+ qualifiedNamespaceOrTypeNameIdentifier :: Identifier,+ qualifiedNamespaceOrTypeNameArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_QualifiedNamespaceOrTypeName = Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"++_QualifiedNamespaceOrTypeName_namespaceOrType = Core.Name "namespaceOrType"++_QualifiedNamespaceOrTypeName_identifier = Core.Name "identifier"++_QualifiedNamespaceOrTypeName_arguments = Core.Name "arguments"++-- | The clauses, select/group clause, and optional continuation of a query expression.+data QueryBody =+ QueryBody {+ queryBodyClauses :: [QueryBodyClause],+ queryBodySelectOrGroup :: SelectOrGroupClause,+ queryBodyContinuation :: (Maybe QueryContinuation)}+ deriving (Eq, Ord, Read, Show)++_QueryBody = Core.Name "hydra.csharp.syntax.QueryBody"++_QueryBody_clauses = Core.Name "clauses"++_QueryBody_selectOrGroup = Core.Name "selectOrGroup"++_QueryBody_continuation = Core.Name "continuation"++-- | A clause in a query expression body: from, let, where, join, or orderby.+data QueryBodyClause =+ QueryBodyClauseFrom FromClause |+ QueryBodyClauseLet LetClause |+ QueryBodyClauseWhere BooleanExpression |+ QueryBodyClauseJoin JoinClause |+ QueryBodyClauseOrderby [Ordering]+ deriving (Eq, Ord, Read, Show)++_QueryBodyClause = Core.Name "hydra.csharp.syntax.QueryBodyClause"++_QueryBodyClause_from = Core.Name "from"++_QueryBodyClause_let = Core.Name "let"++_QueryBodyClause_where = Core.Name "where"++_QueryBodyClause_join = Core.Name "join"++_QueryBodyClause_orderby = Core.Name "orderby"++-- | An 'into' continuation that feeds a query's results into a further query body.+data QueryContinuation =+ QueryContinuation {+ queryContinuationInto :: Identifier,+ queryContinuationBody :: QueryBody}+ deriving (Eq, Ord, Read, Show)++_QueryContinuation = Core.Name "hydra.csharp.syntax.QueryContinuation"++_QueryContinuation_into = Core.Name "into"++_QueryContinuation_body = Core.Name "body"++-- | A LINQ query expression, starting with a from clause and continuing with a query body.+data QueryExpression =+ QueryExpression {+ queryExpressionFrom :: FromClause,+ queryExpressionBody :: QueryBody}+ deriving (Eq, Ord, Read, Show)++_QueryExpression = Core.Name "hydra.csharp.syntax.QueryExpression"++_QueryExpression_from = Core.Name "from"++_QueryExpression_body = Core.Name "body"++-- | The rank (number of dimensions) of an array type or array creation expression.+newtype RankSpecifier =+ RankSpecifier {+ unRankSpecifier :: Int}+ deriving (Eq, Ord, Read, Show)++_RankSpecifier = Core.Name "hydra.csharp.syntax.RankSpecifier"++-- | Array creation using a rank specifier together with an array initializer, with inferred element type.+data RankSpecifierArrayCreationExpression =+ RankSpecifierArrayCreationExpression {+ rankSpecifierArrayCreationExpressionRankSpecifier :: RankSpecifier,+ rankSpecifierArrayCreationExpressionInitializer :: ArrayInitializer}+ deriving (Eq, Ord, Read, Show)++_RankSpecifierArrayCreationExpression = Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"++_RankSpecifierArrayCreationExpression_rankSpecifier = Core.Name "rankSpecifier"++_RankSpecifierArrayCreationExpression_initializer = Core.Name "initializer"++-- | The body of a ref-returning get accessor: a block, ref expression, or empty (abstract) body.+data RefAccessorBody =+ RefAccessorBodyBlock Block |+ RefAccessorBodyRef VariableReference |+ RefAccessorBodyEmpty+ deriving (Eq, Ord, Read, Show)++_RefAccessorBody = Core.Name "hydra.csharp.syntax.RefAccessorBody"++_RefAccessorBody_block = Core.Name "block"++_RefAccessorBody_ref = Core.Name "ref"++_RefAccessorBody_empty = Core.Name "empty"++-- | A ref-returning conditional expression, selecting between two variable references.+data RefConditionalExpression =+ RefConditionalExpression {+ refConditionalExpressionCondition :: NullCoalescingExpression,+ refConditionalExpressionTrue :: VariableReference,+ refConditionalExpressionFalse :: VariableReference}+ deriving (Eq, Ord, Read, Show)++_RefConditionalExpression = Core.Name "hydra.csharp.syntax.RefConditionalExpression"++_RefConditionalExpression_condition = Core.Name "condition"++_RefConditionalExpression_true = Core.Name "true"++_RefConditionalExpression_false = Core.Name "false"++-- | A ref-returning property or indexer get accessor declaration.+data RefGetAccessorDeclaration =+ RefGetAccessorDeclaration {+ refGetAccessorDeclarationAttributes :: (Maybe Attributes),+ refGetAccessorDeclarationModifier :: (Maybe AccessorModifier),+ refGetAccessorDeclarationBody :: RefAccessorBody}+ deriving (Eq, Ord, Read, Show)++_RefGetAccessorDeclaration = Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"++_RefGetAccessorDeclaration_attributes = Core.Name "attributes"++_RefGetAccessorDeclaration_modifier = Core.Name "modifier"++_RefGetAccessorDeclaration_body = Core.Name "body"++-- | The body of a ref-returning indexer: a ref get accessor, or a single ref expression.+data RefIndexerBody =+ RefIndexerBodyBlock RefGetAccessorDeclaration |+ RefIndexerBodyRef VariableReference+ deriving (Eq, Ord, Read, Show)++_RefIndexerBody = Core.Name "hydra.csharp.syntax.RefIndexerBody"++_RefIndexerBody_block = Core.Name "block"++_RefIndexerBody_ref = Core.Name "ref"++-- | A ref-returning indexer member declaration.+data RefIndexerDeclaration =+ RefIndexerDeclaration {+ refIndexerDeclarationAttributes :: (Maybe Attributes),+ refIndexerDeclarationModifiers :: [IndexerModifier],+ refIndexerDeclarationRefKind :: RefKind,+ refIndexerDeclarationDeclarator :: IndexerDeclarator,+ refIndexerDeclarationBody :: RefIndexerBody}+ deriving (Eq, Ord, Read, Show)++_RefIndexerDeclaration = Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"++_RefIndexerDeclaration_attributes = Core.Name "attributes"++_RefIndexerDeclaration_modifiers = Core.Name "modifiers"++_RefIndexerDeclaration_refKind = Core.Name "refKind"++_RefIndexerDeclaration_declarator = Core.Name "declarator"++_RefIndexerDeclaration_body = Core.Name "body"++-- | Whether a ref-returning member returns by plain ref or by ref readonly.+data RefKind =+ RefKindRef |+ RefKindRefReadonly+ deriving (Eq, Ord, Read, Show)++_RefKind = Core.Name "hydra.csharp.syntax.RefKind"++_RefKind_ref = Core.Name "ref"++_RefKind_refReadonly = Core.Name "refReadonly"++-- | The body of a ref-returning local function: a block, or a single ref expression.+data RefLocalFunctionBody =+ RefLocalFunctionBodyBlock Block |+ RefLocalFunctionBodyRef VariableReference+ deriving (Eq, Ord, Read, Show)++_RefLocalFunctionBody = Core.Name "hydra.csharp.syntax.RefLocalFunctionBody"++_RefLocalFunctionBody_block = Core.Name "block"++_RefLocalFunctionBody_ref = Core.Name "ref"++-- | A ref-returning local function declaration.+data RefLocalFunctionDeclaration =+ RefLocalFunctionDeclaration {+ refLocalFunctionDeclarationModifiers :: [RefLocalFunctionModifier],+ refLocalFunctionDeclarationRefKind :: RefKind,+ refLocalFunctionDeclarationReturnType :: Type,+ refLocalFunctionDeclarationHeader :: LocalFunctionHeader,+ refLocalFunctionDeclarationBody :: RefLocalFunctionBody}+ deriving (Eq, Ord, Read, Show)++_RefLocalFunctionDeclaration = Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"++_RefLocalFunctionDeclaration_modifiers = Core.Name "modifiers"++_RefLocalFunctionDeclaration_refKind = Core.Name "refKind"++_RefLocalFunctionDeclaration_returnType = Core.Name "returnType"++_RefLocalFunctionDeclaration_header = Core.Name "header"++_RefLocalFunctionDeclaration_body = Core.Name "body"++-- | A modifier on a ref-returning local function declaration: static or unsafe.+data RefLocalFunctionModifier =+ RefLocalFunctionModifierStatic |+ RefLocalFunctionModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_RefLocalFunctionModifier = Core.Name "hydra.csharp.syntax.RefLocalFunctionModifier"++_RefLocalFunctionModifier_static = Core.Name "static"++_RefLocalFunctionModifier_unsafe = Core.Name "unsafe"++-- | A local variable declaration that binds a variable by reference.+data RefLocalVariableDeclaration =+ RefLocalVariableDeclaration {+ refLocalVariableDeclarationRefKind :: RefKind,+ refLocalVariableDeclarationType :: Type,+ refLocalVariableDeclarationDeclarators :: [RefLocalVariableDeclarator]}+ deriving (Eq, Ord, Read, Show)++_RefLocalVariableDeclaration = Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"++_RefLocalVariableDeclaration_refKind = Core.Name "refKind"++_RefLocalVariableDeclaration_type = Core.Name "type"++_RefLocalVariableDeclaration_declarators = Core.Name "declarators"++-- | The identifier and referenced variable in a single ref local variable declarator.+data RefLocalVariableDeclarator =+ RefLocalVariableDeclarator {+ refLocalVariableDeclaratorLeft :: Identifier,+ refLocalVariableDeclaratorRight :: VariableReference}+ deriving (Eq, Ord, Read, Show)++_RefLocalVariableDeclarator = Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"++_RefLocalVariableDeclarator_left = Core.Name "left"++_RefLocalVariableDeclarator_right = Core.Name "right"++-- | The body of a ref-returning method: a block, ref expression, or empty (extern) body.+data RefMethodBody =+ RefMethodBodyBlock Block |+ RefMethodBodyRef VariableReference |+ RefMethodBodyEmpty+ deriving (Eq, Ord, Read, Show)++_RefMethodBody = Core.Name "hydra.csharp.syntax.RefMethodBody"++_RefMethodBody_block = Core.Name "block"++_RefMethodBody_ref = Core.Name "ref"++_RefMethodBody_empty = Core.Name "empty"++-- | A modifier keyword on a ref-returning method declaration.+data RefMethodModifier =+ RefMethodModifierNew |+ RefMethodModifierPublic |+ RefMethodModifierProtected |+ RefMethodModifierInternal |+ RefMethodModifierPrivate |+ RefMethodModifierStatic |+ RefMethodModifierVirtual |+ RefMethodModifierSealed |+ RefMethodModifierOverride |+ RefMethodModifierAbstract |+ RefMethodModifierExtern |+ RefMethodModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_RefMethodModifier = Core.Name "hydra.csharp.syntax.RefMethodModifier"++_RefMethodModifier_new = Core.Name "new"++_RefMethodModifier_public = Core.Name "public"++_RefMethodModifier_protected = Core.Name "protected"++_RefMethodModifier_internal = Core.Name "internal"++_RefMethodModifier_private = Core.Name "private"++_RefMethodModifier_static = Core.Name "static"++_RefMethodModifier_virtual = Core.Name "virtual"++_RefMethodModifier_sealed = Core.Name "sealed"++_RefMethodModifier_override = Core.Name "override"++_RefMethodModifier_abstract = Core.Name "abstract"++_RefMethodModifier_extern = Core.Name "extern"++_RefMethodModifier_unsafe = Core.Name "unsafe"++-- | The body of a ref-returning property: a ref get accessor, or a single ref expression.+data RefPropertyBody =+ RefPropertyBodyBlock RefGetAccessorDeclaration |+ RefPropertyBodyRef VariableReference+ deriving (Eq, Ord, Read, Show)++_RefPropertyBody = Core.Name "hydra.csharp.syntax.RefPropertyBody"++_RefPropertyBody_block = Core.Name "block"++_RefPropertyBody_ref = Core.Name "ref"++-- | A ref-returning method declaration, including its ref kind, header, and body.+data RefReturnMethodDeclaration =+ RefReturnMethodDeclaration {+ refReturnMethodDeclarationAttributes :: (Maybe Attributes),+ refReturnMethodDeclarationModifiers :: [RefMethodModifier],+ refReturnMethodDeclarationKind :: RefKind,+ refReturnMethodDeclarationReturnType :: ReturnType,+ refReturnMethodDeclarationHeader :: MethodHeader,+ refReturnMethodDeclarationBody :: RefMethodBody}+ deriving (Eq, Ord, Read, Show)++_RefReturnMethodDeclaration = Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"++_RefReturnMethodDeclaration_attributes = Core.Name "attributes"++_RefReturnMethodDeclaration_modifiers = Core.Name "modifiers"++_RefReturnMethodDeclaration_kind = Core.Name "kind"++_RefReturnMethodDeclaration_returnType = Core.Name "returnType"++_RefReturnMethodDeclaration_header = Core.Name "header"++_RefReturnMethodDeclaration_body = Core.Name "body"++-- | A ref-returning property declaration, including its ref kind and body.+data RefReturnPropertyDeclaration =+ RefReturnPropertyDeclaration {+ refReturnPropertyDeclarationAttributes :: (Maybe Attributes),+ refReturnPropertyDeclarationModifiers :: [PropertyModifier],+ refReturnPropertyDeclarationRefKind :: RefKind,+ refReturnPropertyDeclarationType :: Type,+ refReturnPropertyDeclarationName :: MemberName,+ refReturnPropertyDeclarationBody :: RefPropertyBody}+ deriving (Eq, Ord, Read, Show)++_RefReturnPropertyDeclaration = Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"++_RefReturnPropertyDeclaration_attributes = Core.Name "attributes"++_RefReturnPropertyDeclaration_modifiers = Core.Name "modifiers"++_RefReturnPropertyDeclaration_refKind = Core.Name "refKind"++_RefReturnPropertyDeclaration_type = Core.Name "type"++_RefReturnPropertyDeclaration_name = Core.Name "name"++_RefReturnPropertyDeclaration_body = Core.Name "body"++-- | An implicitly typed local variable declared by reference using 'ref var'.+data RefVarImplicitlyTypedLocalVariableDeclaration =+ RefVarImplicitlyTypedLocalVariableDeclaration {+ refVarImplicitlyTypedLocalVariableDeclarationRefKind :: RefKind,+ refVarImplicitlyTypedLocalVariableDeclarationDeclarator :: RefLocalVariableDeclarator}+ deriving (Eq, Ord, Read, Show)++_RefVarImplicitlyTypedLocalVariableDeclaration =+ Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"++_RefVarImplicitlyTypedLocalVariableDeclaration_refKind = Core.Name "refKind"++_RefVarImplicitlyTypedLocalVariableDeclaration_declarator = Core.Name "declarator"++-- | A reference type: class, interface, array, delegate, or the dynamic type.+data ReferenceType =+ ReferenceTypeClass ClassType |+ ReferenceTypeInterface InterfaceType |+ ReferenceTypeArray ArrayType |+ ReferenceTypeDelegate DelegateType |+ ReferenceTypeDynamic+ deriving (Eq, Ord, Read, Show)++_ReferenceType = Core.Name "hydra.csharp.syntax.ReferenceType"++_ReferenceType_class = Core.Name "class"++_ReferenceType_interface = Core.Name "interface"++_ReferenceType_array = Core.Name "array"++_ReferenceType_delegate = Core.Name "delegate"++_ReferenceType_dynamic = Core.Name "dynamic"++-- | A single '{expression[,width][:format]}' hole within a regular interpolated string.+data RegularInterpolation =+ RegularInterpolation {+ regularInterpolationExpression :: Expression,+ regularInterpolationWidth :: (Maybe Expression),+ regularInterpolationFormat :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_RegularInterpolation = Core.Name "hydra.csharp.syntax.RegularInterpolation"++_RegularInterpolation_expression = Core.Name "expression"++_RegularInterpolation_width = Core.Name "width"++_RegularInterpolation_format = Core.Name "format"++-- | A simple, binary, is-type, is-pattern, or as-type relational expression.+data RelationalExpression =+ RelationalExpressionSimple ShiftExpression |+ RelationalExpressionBinary BinaryRelationalExpression |+ RelationalExpressionIsType IsTypeExpression |+ RelationalExpressionIsPattern IsPatternExpression |+ RelationalExpressionAsType AsTypeExpression+ deriving (Eq, Ord, Read, Show)++_RelationalExpression = Core.Name "hydra.csharp.syntax.RelationalExpression"++_RelationalExpression_simple = Core.Name "simple"++_RelationalExpression_binary = Core.Name "binary"++_RelationalExpression_isType = Core.Name "isType"++_RelationalExpression_isPattern = Core.Name "isPattern"++_RelationalExpression_asType = Core.Name "asType"++-- | A relational comparison operator: less than, greater than, or their or-equal variants.+data RelationalOperator =+ RelationalOperatorLessThan |+ RelationalOperatorGreaterThan |+ RelationalOperatorLessThanOrEqual |+ RelationalOperatorGreaterThanOrEqual+ deriving (Eq, Ord, Read, Show)++_RelationalOperator = Core.Name "hydra.csharp.syntax.RelationalOperator"++_RelationalOperator_lessThan = Core.Name "lessThan"++_RelationalOperator_greaterThan = Core.Name "greaterThan"++_RelationalOperator_lessThanOrEqual = Core.Name "lessThanOrEqual"++_RelationalOperator_greaterThanOrEqual = Core.Name "greaterThanOrEqual"++-- | The resource acquired by a using statement: a local variable declaration or an expression.+data ResourceAcquisition =+ ResourceAcquisitionLocal LocalVariableDeclaration |+ ResourceAcquisitionExpression Expression+ deriving (Eq, Ord, Read, Show)++_ResourceAcquisition = Core.Name "hydra.csharp.syntax.ResourceAcquisition"++_ResourceAcquisition_local = Core.Name "local"++_ResourceAcquisition_expression = Core.Name "expression"++-- | A return statement, in its value-less, value-returning, or ref-returning form.+data ReturnStatement =+ ReturnStatementSimple |+ ReturnStatementValue Expression |+ ReturnStatementRef VariableReference+ deriving (Eq, Ord, Read, Show)++_ReturnStatement = Core.Name "hydra.csharp.syntax.ReturnStatement"++_ReturnStatement_simple = Core.Name "simple"++_ReturnStatement_value = Core.Name "value"++_ReturnStatement_ref = Core.Name "ref"++-- | The declared return type of a member: a ref-qualified type, or void.+data ReturnType =+ ReturnTypeRef Type |+ ReturnTypeVoid+ deriving (Eq, Ord, Read, Show)++_ReturnType = Core.Name "hydra.csharp.syntax.ReturnType"++_ReturnType_ref = Core.Name "ref"++_ReturnType_void = Core.Name "void"++-- | A secondary type-parameter constraint: an interface type or another type parameter.+data SecondaryConstraint =+ SecondaryConstraintInterface InterfaceType |+ SecondaryConstraintParameter TypeParameter+ deriving (Eq, Ord, Read, Show)++_SecondaryConstraint = Core.Name "hydra.csharp.syntax.SecondaryConstraint"++_SecondaryConstraint_interface = Core.Name "interface"++_SecondaryConstraint_parameter = Core.Name "parameter"++-- | A non-empty list of secondary constraints on a type parameter.+newtype SecondaryConstraints =+ SecondaryConstraints {+ unSecondaryConstraints :: [SecondaryConstraint]}+ deriving (Eq, Ord, Read, Show)++_SecondaryConstraints = Core.Name "hydra.csharp.syntax.SecondaryConstraints"++-- | The final clause of a query body: a 'select' projection or a 'group by' clause.+data SelectOrGroupClause =+ SelectOrGroupClauseSelect Expression |+ SelectOrGroupClauseGroup GroupClause+ deriving (Eq, Ord, Read, Show)++_SelectOrGroupClause = Core.Name "hydra.csharp.syntax.SelectOrGroupClause"++_SelectOrGroupClause_select = Core.Name "select"++_SelectOrGroupClause_group = Core.Name "group"++-- | An if or switch statement.+data SelectionStatement =+ SelectionStatementIf IfStatement |+ SelectionStatementSwitch SwitchStatement+ deriving (Eq, Ord, Read, Show)++_SelectionStatement = Core.Name "hydra.csharp.syntax.SelectionStatement"++_SelectionStatement_if = Core.Name "if"++_SelectionStatement_switch = Core.Name "switch"++-- | A simple additive expression or a binary left/right-shift expression.+data ShiftExpression =+ ShiftExpressionSimple AdditiveExpression |+ ShiftExpressionBinary BinaryShiftExpression+ deriving (Eq, Ord, Read, Show)++_ShiftExpression = Core.Name "hydra.csharp.syntax.ShiftExpression"++_ShiftExpression_simple = Core.Name "simple"++_ShiftExpression_binary = Core.Name "binary"++-- | The left-shift (<<) or right-shift (>>) operator.+data ShiftOperator =+ ShiftOperatorLeft |+ ShiftOperatorRight+ deriving (Eq, Ord, Read, Show)++_ShiftOperator = Core.Name "hydra.csharp.syntax.ShiftOperator"++_ShiftOperator_left = Core.Name "left"++_ShiftOperator_right = Core.Name "right"++-- | The ordinary ternary conditional expression: 'condition ? true : false'.+data SimpleConditionalExpression =+ SimpleConditionalExpression {+ simpleConditionalExpressionCondition :: NullCoalescingExpression,+ simpleConditionalExpressionTrue :: Expression,+ simpleConditionalExpressionFalse :: Expression}+ deriving (Eq, Ord, Read, Show)++_SimpleConditionalExpression = Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"++_SimpleConditionalExpression_condition = Core.Name "condition"++_SimpleConditionalExpression_true = Core.Name "true"++_SimpleConditionalExpression_false = Core.Name "false"++-- | A simple identifier reference, with an optional list of explicit type arguments.+data SimpleName =+ SimpleName {+ simpleNameIdentifier :: Identifier,+ simpleNameTypeArguments :: (Maybe TypeArgumentList)}+ deriving (Eq, Ord, Read, Show)++_SimpleName = Core.Name "hydra.csharp.syntax.SimpleName"++_SimpleName_identifier = Core.Name "identifier"++_SimpleName_typeArguments = Core.Name "typeArguments"++-- | A numeric type or the bool type.+data SimpleType =+ SimpleTypeNumeric NumericType |+ SimpleTypeBool+ deriving (Eq, Ord, Read, Show)++_SimpleType = Core.Name "hydra.csharp.syntax.SimpleType"++_SimpleType_numeric = Core.Name "numeric"++_SimpleType_bool = Core.Name "bool"++-- | A catch clause naming an exception type and/or filter, with a handler block.+data SpecificCatchClause =+ SpecificCatchClause {+ specificCatchClauseSpecifier :: (Maybe ExceptionSpecifier),+ specificCatchClauseFilter :: (Maybe BooleanExpression),+ specificCatchClauseBody :: Block}+ deriving (Eq, Ord, Read, Show)++_SpecificCatchClause = Core.Name "hydra.csharp.syntax.SpecificCatchClause"++_SpecificCatchClause_specifier = Core.Name "specifier"++_SpecificCatchClause_filter = Core.Name "filter"++_SpecificCatchClause_body = Core.Name "body"++-- | A 'stackalloc' expression that allocates a block of memory on the stack.+data StackallocExpression =+ StackallocExpression {+ stackallocExpressionType :: (Maybe UnmanagedType),+ stackallocExpressionExpression :: (Maybe ConstantExpression),+ stackallocExpressionInitializer :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_StackallocExpression = Core.Name "hydra.csharp.syntax.StackallocExpression"++_StackallocExpression_type = Core.Name "type"++_StackallocExpression_expression = Core.Name "expression"++_StackallocExpression_initializer = Core.Name "initializer"++-- | A field-like event declaration, with its type and one or more declarators.+data StandardEventDeclaration =+ StandardEventDeclaration {+ standardEventDeclarationAttributes :: (Maybe Attributes),+ standardEventDeclarationModifiers :: [EventModifier],+ standardEventDeclarationType :: Type,+ standardEventDeclarationDeclarators :: VariableDeclarators}+ deriving (Eq, Ord, Read, Show)++_StandardEventDeclaration = Core.Name "hydra.csharp.syntax.StandardEventDeclaration"++_StandardEventDeclaration_attributes = Core.Name "attributes"++_StandardEventDeclaration_modifiers = Core.Name "modifiers"++_StandardEventDeclaration_type = Core.Name "type"++_StandardEventDeclaration_declarators = Core.Name "declarators"++-- | A standard (non-ref-returning) indexer declaration.+data StandardIndexerDeclaration =+ StandardIndexerDeclaration {+ standardIndexerDeclarationAttributes :: (Maybe Attributes),+ standardIndexerDeclarationModifiers :: [IndexerModifier],+ standardIndexerDeclarationDeclarator :: IndexerDeclarator,+ standardIndexerDeclarationBody :: IndexerBody}+ deriving (Eq, Ord, Read, Show)++_StandardIndexerDeclaration = Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"++_StandardIndexerDeclaration_attributes = Core.Name "attributes"++_StandardIndexerDeclaration_modifiers = Core.Name "modifiers"++_StandardIndexerDeclaration_declarator = Core.Name "declarator"++_StandardIndexerDeclaration_body = Core.Name "body"++-- | A standard (non-ref-returning) local function declaration.+data StandardLocalFunctionDeclaration =+ StandardLocalFunctionDeclaration {+ standardLocalFunctionDeclarationModifiers :: [LocalFunctionModifier],+ standardLocalFunctionDeclarationReturnType :: ReturnType,+ standardLocalFunctionDeclarationHeader :: LocalFunctionHeader,+ standardLocalFunctionDeclarationBody :: LocalFunctionBody}+ deriving (Eq, Ord, Read, Show)++_StandardLocalFunctionDeclaration = Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"++_StandardLocalFunctionDeclaration_modifiers = Core.Name "modifiers"++_StandardLocalFunctionDeclaration_returnType = Core.Name "returnType"++_StandardLocalFunctionDeclaration_header = Core.Name "header"++_StandardLocalFunctionDeclaration_body = Core.Name "body"++-- | A standard (non-ref-returning) method declaration.+data StandardMethodDeclaration =+ StandardMethodDeclaration {+ standardMethodDeclarationAttributes :: (Maybe Attributes),+ standardMethodDeclarationModifiers :: [MethodModifier],+ standardMethodDeclarationReturnType :: ReturnType,+ standardMethodDeclarationHeader :: MethodHeader,+ standardMethodDeclarationBody :: MethodBody}+ deriving (Eq, Ord, Read, Show)++_StandardMethodDeclaration = Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"++_StandardMethodDeclaration_attributes = Core.Name "attributes"++_StandardMethodDeclaration_modifiers = Core.Name "modifiers"++_StandardMethodDeclaration_returnType = Core.Name "returnType"++_StandardMethodDeclaration_header = Core.Name "header"++_StandardMethodDeclaration_body = Core.Name "body"++-- | A standard (non-ref-returning) property declaration.+data StandardPropertyDeclaration =+ StandardPropertyDeclaration {+ standardPropertyDeclarationAttributes :: (Maybe Attributes),+ standardPropertyDeclarationModifiers :: [PropertyModifier],+ standardPropertyDeclarationType :: Type,+ standardPropertyDeclarationName :: MemberName,+ standardPropertyDeclarationBody :: PropertyBody}+ deriving (Eq, Ord, Read, Show)++_StandardPropertyDeclaration = Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"++_StandardPropertyDeclaration_attributes = Core.Name "attributes"++_StandardPropertyDeclaration_modifiers = Core.Name "modifiers"++_StandardPropertyDeclaration_type = Core.Name "type"++_StandardPropertyDeclaration_name = Core.Name "name"++_StandardPropertyDeclaration_body = Core.Name "body"++-- | A labeled statement, a declaration statement, or an embedded statement.+data Statement =+ StatementLabeled LabeledStatement |+ StatementDeclaration DeclarationStatement |+ StatementEmbedded EmbeddedStatement+ deriving (Eq, Ord, Read, Show)++_Statement = Core.Name "hydra.csharp.syntax.Statement"++_Statement_labeled = Core.Name "labeled"++_Statement_declaration = Core.Name "declaration"++_Statement_embedded = Core.Name "embedded"++-- | An expression usable as a statement on its own, such as an invocation or assignment.+data StatementExpression =+ StatementExpressionNullConditionalInvocation NullConditionalInvocationExpression |+ StatementExpressionInvocation InvocationExpression |+ StatementExpressionObjectCreation ObjectCreationExpression |+ StatementExpressionAssignment Assignment |+ StatementExpressionPostIncrement PrimaryExpression |+ StatementExpressionPostDecrement PrimaryExpression |+ StatementExpressionPreIncrement UnaryExpression |+ StatementExpressionPreDecrement UnaryExpression |+ StatementExpressionAwait UnaryExpression+ deriving (Eq, Ord, Read, Show)++_StatementExpression = Core.Name "hydra.csharp.syntax.StatementExpression"++_StatementExpression_nullConditionalInvocation = Core.Name "nullConditionalInvocation"++_StatementExpression_invocation = Core.Name "invocation"++_StatementExpression_objectCreation = Core.Name "objectCreation"++_StatementExpression_assignment = Core.Name "assignment"++_StatementExpression_postIncrement = Core.Name "postIncrement"++_StatementExpression_postDecrement = Core.Name "postDecrement"++_StatementExpression_preIncrement = Core.Name "preIncrement"++_StatementExpression_preDecrement = Core.Name "preDecrement"++_StatementExpression_await = Core.Name "await"++-- | A non-empty, comma-separated list of statement expressions, as used in a for statement.+newtype StatementExpressionList =+ StatementExpressionList {+ unStatementExpressionList :: [StatementExpression]}+ deriving (Eq, Ord, Read, Show)++_StatementExpressionList = Core.Name "hydra.csharp.syntax.StatementExpressionList"++-- | The body of a static constructor: a block, expression body, or empty (extern) body.+data StaticConstructorBody =+ StaticConstructorBodyBlock Block |+ StaticConstructorBodyExpression Expression |+ StaticConstructorBodyEmpty+ deriving (Eq, Ord, Read, Show)++_StaticConstructorBody = Core.Name "hydra.csharp.syntax.StaticConstructorBody"++_StaticConstructorBody_block = Core.Name "block"++_StaticConstructorBody_expression = Core.Name "expression"++_StaticConstructorBody_empty = Core.Name "empty"++-- | A static constructor declaration for a type.+data StaticConstructorDeclaration =+ StaticConstructorDeclaration {+ staticConstructorDeclarationAttributes :: (Maybe Attributes),+ staticConstructorDeclarationModifiers :: StaticConstructorModifiers,+ staticConstructorDeclarationName :: Identifier,+ staticConstructorDeclarationBody :: StaticConstructorBody}+ deriving (Eq, Ord, Read, Show)++_StaticConstructorDeclaration = Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"++_StaticConstructorDeclaration_attributes = Core.Name "attributes"++_StaticConstructorDeclaration_modifiers = Core.Name "modifiers"++_StaticConstructorDeclaration_name = Core.Name "name"++_StaticConstructorDeclaration_body = Core.Name "body"++-- | The extern and unsafe flags of a static constructor declaration.+data StaticConstructorModifiers =+ StaticConstructorModifiers {+ staticConstructorModifiersExtern :: Bool,+ staticConstructorModifiersUnsafe :: Bool}+ deriving (Eq, Ord, Read, Show)++_StaticConstructorModifiers = Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"++_StaticConstructorModifiers_extern = Core.Name "extern"++_StaticConstructorModifiers_unsafe = Core.Name "unsafe"++-- | A struct type declaration, with its modifiers, type parameters, interfaces, and body.+data StructDeclaration =+ StructDeclaration {+ structDeclarationAttributes :: (Maybe Attributes),+ structDeclarationModifiers :: [StructModifier],+ structDeclarationRef :: Bool,+ structDeclarationPartial :: Bool,+ structDeclarationName :: Identifier,+ structDeclarationParameters :: (Maybe TypeParameterList),+ structDeclarationInterfaces :: [InterfaceType],+ structDeclarationConstraints :: [TypeParameterConstraintsClause],+ structDeclarationBody :: [StructMemberDeclaration]}+ deriving (Eq, Ord, Read, Show)++_StructDeclaration = Core.Name "hydra.csharp.syntax.StructDeclaration"++_StructDeclaration_attributes = Core.Name "attributes"++_StructDeclaration_modifiers = Core.Name "modifiers"++_StructDeclaration_ref = Core.Name "ref"++_StructDeclaration_partial = Core.Name "partial"++_StructDeclaration_name = Core.Name "name"++_StructDeclaration_parameters = Core.Name "parameters"++_StructDeclaration_interfaces = Core.Name "interfaces"++_StructDeclaration_constraints = Core.Name "constraints"++_StructDeclaration_body = Core.Name "body"++-- | Any member that can appear in a struct body, including fixed-size buffer declarations.+data StructMemberDeclaration =+ StructMemberDeclarationConstant ConstantDeclaration |+ StructMemberDeclarationField FieldDeclaration |+ StructMemberDeclarationMethod MethodDeclaration |+ StructMemberDeclarationProperty PropertyDeclaration |+ StructMemberDeclarationEvent EventDeclaration |+ StructMemberDeclarationIndexer IndexerDeclaration |+ StructMemberDeclarationOperator OperatorDeclaration |+ StructMemberDeclarationConstructor ConstructorDeclaration |+ StructMemberDeclarationStaticConstructor StaticConstructorDeclaration |+ StructMemberDeclarationType TypeDeclaration |+ StructMemberDeclarationFixedSizeBuffer FixedSizeBufferDeclaration+ deriving (Eq, Ord, Read, Show)++_StructMemberDeclaration = Core.Name "hydra.csharp.syntax.StructMemberDeclaration"++_StructMemberDeclaration_constant = Core.Name "constant"++_StructMemberDeclaration_field = Core.Name "field"++_StructMemberDeclaration_method = Core.Name "method"++_StructMemberDeclaration_property = Core.Name "property"++_StructMemberDeclaration_event = Core.Name "event"++_StructMemberDeclaration_indexer = Core.Name "indexer"++_StructMemberDeclaration_operator = Core.Name "operator"++_StructMemberDeclaration_constructor = Core.Name "constructor"++_StructMemberDeclaration_staticConstructor = Core.Name "staticConstructor"++_StructMemberDeclaration_type = Core.Name "type"++_StructMemberDeclaration_fixedSizeBuffer = Core.Name "fixedSizeBuffer"++-- | A modifier keyword on a struct declaration, such as readonly or unsafe.+data StructModifier =+ StructModifierNew |+ StructModifierPublic |+ StructModifierProtected |+ StructModifierInternal |+ StructModifierPrivate |+ StructModifierReadonly |+ StructModifierUnsafe+ deriving (Eq, Ord, Read, Show)++_StructModifier = Core.Name "hydra.csharp.syntax.StructModifier"++_StructModifier_new = Core.Name "new"++_StructModifier_public = Core.Name "public"++_StructModifier_protected = Core.Name "protected"++_StructModifier_internal = Core.Name "internal"++_StructModifier_private = Core.Name "private"++_StructModifier_readonly = Core.Name "readonly"++_StructModifier_unsafe = Core.Name "unsafe"++-- | A struct type or an enum type, as used in the definition of value types.+data StructOrEnumType =+ StructOrEnumTypeStruct StructType |+ StructOrEnumTypeEnum EnumType+ deriving (Eq, Ord, Read, Show)++_StructOrEnumType = Core.Name "hydra.csharp.syntax.StructOrEnumType"++_StructOrEnumType_struct = Core.Name "struct"++_StructOrEnumType_enum = Core.Name "enum"++-- | A reference to a struct type: a named type, a simple type, or a tuple type.+data StructType =+ StructTypeTypeName TypeName |+ StructTypeSimple SimpleType |+ StructTypeTuple TupleType+ deriving (Eq, Ord, Read, Show)++_StructType = Core.Name "hydra.csharp.syntax.StructType"++_StructType_typeName = Core.Name "typeName"++_StructType_simple = Core.Name "simple"++_StructType_tuple = Core.Name "tuple"++-- | A pattern and optional guard expression used in a pattern-matching switch section.+data SwitchBranch =+ SwitchBranch {+ switchBranchPattern :: Pattern,+ switchBranchGuard :: (Maybe Expression)}+ deriving (Eq, Ord, Read, Show)++_SwitchBranch = Core.Name "hydra.csharp.syntax.SwitchBranch"++_SwitchBranch_pattern = Core.Name "pattern"++_SwitchBranch_guard = Core.Name "guard"++-- | A single label of a switch section: a pattern branch, or the default label.+data SwitchLabel =+ SwitchLabelBranch SwitchBranch |+ SwitchLabelDefault+ deriving (Eq, Ord, Read, Show)++_SwitchLabel = Core.Name "hydra.csharp.syntax.SwitchLabel"++_SwitchLabel_branch = Core.Name "branch"++_SwitchLabel_default = Core.Name "default"++-- | A group of switch labels sharing a common statement list within a switch statement.+data SwitchSection =+ SwitchSection {+ switchSectionLabels :: [SwitchLabel],+ switchSectionStatements :: [Statement]}+ deriving (Eq, Ord, Read, Show)++_SwitchSection = Core.Name "hydra.csharp.syntax.SwitchSection"++_SwitchSection_labels = Core.Name "labels"++_SwitchSection_statements = Core.Name "statements"++-- | A switch statement, dispatching on an expression across its switch sections.+data SwitchStatement =+ SwitchStatement {+ switchStatementExpression :: Expression,+ switchStatementBranches :: [SwitchSection]}+ deriving (Eq, Ord, Read, Show)++_SwitchStatement = Core.Name "hydra.csharp.syntax.SwitchStatement"++_SwitchStatement_expression = Core.Name "expression"++_SwitchStatement_branches = Core.Name "branches"++-- | A try statement with its protected block, catch clauses, and optional finally block.+data TryStatement =+ TryStatement {+ tryStatementBody :: Block,+ tryStatementCatches :: CatchClauses,+ tryStatementFinally :: (Maybe Block)}+ deriving (Eq, Ord, Read, Show)++_TryStatement = Core.Name "hydra.csharp.syntax.TryStatement"++_TryStatement_body = Core.Name "body"++_TryStatement_catches = Core.Name "catches"++_TryStatement_finally = Core.Name "finally"++-- | A single element of a tuple expression, with an optional name.+data TupleElement =+ TupleElement {+ tupleElementName :: (Maybe Identifier),+ tupleElementExpression :: Expression}+ deriving (Eq, Ord, Read, Show)++_TupleElement = Core.Name "hydra.csharp.syntax.TupleElement"++_TupleElement_name = Core.Name "name"++_TupleElement_expression = Core.Name "expression"++-- | A tuple literal expression, either a list of named elements or a deconstruction tuple.+data TupleExpression =+ TupleExpressionElements [TupleElement] |+ TupleExpressionDeconstruction DeconstructionTuple+ deriving (Eq, Ord, Read, Show)++_TupleExpression = Core.Name "hydra.csharp.syntax.TupleExpression"++_TupleExpression_elements = Core.Name "elements"++_TupleExpression_deconstruction = Core.Name "deconstruction"++-- | A tuple type formed from a non-empty list of named or unnamed element types.+newtype TupleType =+ TupleType {+ unTupleType :: [TupleTypeElement]}+ deriving (Eq, Ord, Read, Show)++_TupleType = Core.Name "hydra.csharp.syntax.TupleType"++-- | A single element type of a tuple type, with an optional element name.+data TupleTypeElement =+ TupleTypeElement {+ tupleTypeElementType :: Type,+ tupleTypeElementIdentifier :: (Maybe Identifier)}+ deriving (Eq, Ord, Read, Show)++_TupleTypeElement = Core.Name "hydra.csharp.syntax.TupleTypeElement"++_TupleTypeElement_type = Core.Name "type"++_TupleTypeElement_identifier = Core.Name "identifier"++-- | A C# type: a reference type, value type, type parameter, or pointer type.+data Type =+ TypeReference ReferenceType |+ TypeValue ValueType |+ TypeParam TypeParameter |+ TypePointer PointerType+ deriving (Eq, Ord, Read, Show)++_Type = Core.Name "hydra.csharp.syntax.Type"++_Type_reference = Core.Name "reference"++_Type_value = Core.Name "value"++_Type_param = Core.Name "param"++_Type_pointer = Core.Name "pointer"++-- | A list of type arguments supplied to a generic type or method.+newtype TypeArgumentList =+ TypeArgumentList {+ unTypeArgumentList :: [Type]}+ deriving (Eq, Ord, Read, Show)++_TypeArgumentList = Core.Name "hydra.csharp.syntax.TypeArgumentList"++-- | A top-level or nested type declaration: class, struct, interface, enum, or delegate.+data TypeDeclaration =+ TypeDeclarationClass ClassDeclaration |+ TypeDeclarationStruct StructDeclaration |+ TypeDeclarationInterface InterfaceDeclaration |+ TypeDeclarationEnum EnumDeclaration |+ TypeDeclarationDelegate DelegateDeclaration+ deriving (Eq, Ord, Read, Show)++_TypeDeclaration = Core.Name "hydra.csharp.syntax.TypeDeclaration"++_TypeDeclaration_class = Core.Name "class"++_TypeDeclaration_struct = Core.Name "struct"++_TypeDeclaration_interface = Core.Name "interface"++_TypeDeclaration_enum = Core.Name "enum"++_TypeDeclaration_delegate = Core.Name "delegate"++-- | A name that is known to refer to a type, expressed as a namespace-or-type name.+newtype TypeName =+ TypeName {+ unTypeName :: NamespaceOrTypeName}+ deriving (Eq, Ord, Read, Show)++_TypeName = Core.Name "hydra.csharp.syntax.TypeName"++-- | A single generic type parameter, identified by its name.+newtype TypeParameter =+ TypeParameter {+ unTypeParameter :: Identifier}+ deriving (Eq, Ord, Read, Show)++_TypeParameter = Core.Name "hydra.csharp.syntax.TypeParameter"++-- | The primary, secondary, and constructor constraints on a single type parameter.+data TypeParameterConstraints =+ TypeParameterConstraints {+ typeParameterConstraintsPrimary :: (Maybe PrimaryConstraint),+ typeParameterConstraintsSecondary :: (Maybe SecondaryConstraints),+ typeParameterConstraintsConstructor :: Bool}+ deriving (Eq, Ord, Read, Show)++_TypeParameterConstraints = Core.Name "hydra.csharp.syntax.TypeParameterConstraints"++_TypeParameterConstraints_primary = Core.Name "primary"++_TypeParameterConstraints_secondary = Core.Name "secondary"++_TypeParameterConstraints_constructor = Core.Name "constructor"++-- | A 'where T : ...' clause constraining one type parameter of a generic declaration.+data TypeParameterConstraintsClause =+ TypeParameterConstraintsClause {+ typeParameterConstraintsClauseParameter :: TypeParameter,+ typeParameterConstraintsClauseConstraints :: [TypeParameterConstraints]}+ deriving (Eq, Ord, Read, Show)++_TypeParameterConstraintsClause = Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"++_TypeParameterConstraintsClause_parameter = Core.Name "parameter"++_TypeParameterConstraintsClause_constraints = Core.Name "constraints"++-- | A non-empty, comma-separated list of type parameters in a generic declaration.+newtype TypeParameterList =+ TypeParameterList {+ unTypeParameterList :: [TypeParameterPart]}+ deriving (Eq, Ord, Read, Show)++_TypeParameterList = Core.Name "hydra.csharp.syntax.TypeParameterList"++-- | A single type parameter within a type parameter list, with its optional attributes.+data TypeParameterPart =+ TypeParameterPart {+ typeParameterPartAttributes :: (Maybe Attributes),+ typeParameterPartName :: TypeParameter}+ deriving (Eq, Ord, Read, Show)++_TypeParameterPart = Core.Name "hydra.csharp.syntax.TypeParameterPart"++_TypeParameterPart_attributes = Core.Name "attributes"++_TypeParameterPart_name = Core.Name "name"++-- | A 'typeof' expression yielding the System.Type of a type, unbound generic type, or void.+data TypeofExpression =+ TypeofExpressionType Type |+ TypeofExpressionUnboundTypeName UnboundTypeName |+ TypeofExpressionVoid+ deriving (Eq, Ord, Read, Show)++_TypeofExpression = Core.Name "hydra.csharp.syntax.TypeofExpression"++_TypeofExpression_type = Core.Name "type"++_TypeofExpression_unboundTypeName = Core.Name "unboundTypeName"++_TypeofExpression_void = Core.Name "void"++-- | A unary expression: a primary expression, or a prefixed unary/cast/await operation.+data UnaryExpression =+ UnaryExpressionPrimary PrimaryExpression |+ UnaryExpressionPlus UnaryExpression |+ UnaryExpressionMinus UnaryExpression |+ UnaryExpressionNot UnaryExpression |+ UnaryExpressionBitwiseComplement UnaryExpression |+ UnaryExpressionPreIncrement UnaryExpression |+ UnaryExpressionPreDecrement UnaryExpression |+ UnaryExpressionCast CastExpression |+ UnaryExpressionAwait UnaryExpression |+ UnaryExpressionPointerIndirection UnaryExpression |+ UnaryExpressionAddressOf UnaryExpression+ deriving (Eq, Ord, Read, Show)++_UnaryExpression = Core.Name "hydra.csharp.syntax.UnaryExpression"++_UnaryExpression_primary = Core.Name "primary"++_UnaryExpression_plus = Core.Name "plus"++_UnaryExpression_minus = Core.Name "minus"++_UnaryExpression_not = Core.Name "not"++_UnaryExpression_bitwiseComplement = Core.Name "bitwiseComplement"++_UnaryExpression_preIncrement = Core.Name "preIncrement"++_UnaryExpression_preDecrement = Core.Name "preDecrement"++_UnaryExpression_cast = Core.Name "cast"++_UnaryExpression_await = Core.Name "await"++_UnaryExpression_pointerIndirection = Core.Name "pointerIndirection"++_UnaryExpression_addressOf = Core.Name "addressOf"++-- | The declarator for a user-defined unary operator overload, naming its single parameter.+data UnaryOperatorDeclarator =+ UnaryOperatorDeclarator {+ unaryOperatorDeclaratorType :: Type,+ unaryOperatorDeclaratorOperator :: OverloadableUnaryOperator,+ unaryOperatorDeclaratorParameter :: FixedParameter}+ deriving (Eq, Ord, Read, Show)++_UnaryOperatorDeclarator = Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"++_UnaryOperatorDeclarator_type = Core.Name "type"++_UnaryOperatorDeclarator_operator = Core.Name "operator"++_UnaryOperatorDeclarator_parameter = Core.Name "parameter"++-- | An unbound generic type name, as used in a typeof expression (e.g. Dictionary<,>).+newtype UnboundTypeName =+ UnboundTypeName {+ unUnboundTypeName :: [UnboundTypeNamePart]}+ deriving (Eq, Ord, Read, Show)++_UnboundTypeName = Core.Name "hydra.csharp.syntax.UnboundTypeName"++-- | A single segment of an unbound type name, with its aliasing flag and generic dimension.+data UnboundTypeNamePart =+ UnboundTypeNamePart {+ unboundTypeNamePartIdentifier :: Identifier,+ unboundTypeNamePartAliased :: Bool,+ unboundTypeNamePartDimension :: (Maybe Int)}+ deriving (Eq, Ord, Read, Show)++_UnboundTypeNamePart = Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"++_UnboundTypeNamePart_identifier = Core.Name "identifier"++_UnboundTypeNamePart_aliased = Core.Name "aliased"++_UnboundTypeNamePart_dimension = Core.Name "dimension"++-- | A type usable with the unsafe 'sizeof' operator: a value type or pointer type.+data UnmanagedType =+ UnmanagedTypeValue ValueType |+ UnmanagedTypePointer PointerType+ deriving (Eq, Ord, Read, Show)++_UnmanagedType = Core.Name "hydra.csharp.syntax.UnmanagedType"++_UnmanagedType_value = Core.Name "value"++_UnmanagedType_pointer = Core.Name "pointer"++-- | A 'using alias = namespace-or-type;' directive introducing a using alias.+data UsingAliasDirective =+ UsingAliasDirective {+ usingAliasDirectiveAlias :: Identifier,+ usingAliasDirectiveName :: NamespaceOrTypeName}+ deriving (Eq, Ord, Read, Show)++_UsingAliasDirective = Core.Name "hydra.csharp.syntax.UsingAliasDirective"++_UsingAliasDirective_alias = Core.Name "alias"++_UsingAliasDirective_name = Core.Name "name"++-- | A using directive: an alias directive, a namespace import, or a using-static directive.+data UsingDirective =+ UsingDirectiveAlias UsingAliasDirective |+ UsingDirectiveNamespace NamespaceName |+ UsingDirectiveStatic TypeName+ deriving (Eq, Ord, Read, Show)++_UsingDirective = Core.Name "hydra.csharp.syntax.UsingDirective"++_UsingDirective_alias = Core.Name "alias"++_UsingDirective_namespace = Core.Name "namespace"++_UsingDirective_static = Core.Name "static"++-- | A 'using' statement that deterministically disposes an acquired resource after its body.+data UsingStatement =+ UsingStatement {+ usingStatementAcquisition :: ResourceAcquisition,+ usingStatementBody :: EmbeddedStatement}+ deriving (Eq, Ord, Read, Show)++_UsingStatement = Core.Name "hydra.csharp.syntax.UsingStatement"++_UsingStatement_acquisition = Core.Name "acquisition"++_UsingStatement_body = Core.Name "body"++-- | A struct or enum type, in its non-nullable or nullable ('?') form.+data ValueType =+ ValueTypeNonNullable StructOrEnumType |+ ValueTypeNullable StructOrEnumType+ deriving (Eq, Ord, Read, Show)++_ValueType = Core.Name "hydra.csharp.syntax.ValueType"++_ValueType_nonNullable = Core.Name "nonNullable"++_ValueType_nullable = Core.Name "nullable"++-- | An identifier and optional initializer within a field or local variable declaration.+data VariableDeclarator =+ VariableDeclarator {+ variableDeclaratorIdentifier :: Identifier,+ variableDeclaratorInitializer :: (Maybe VariableInitializer)}+ deriving (Eq, Ord, Read, Show)++_VariableDeclarator = Core.Name "hydra.csharp.syntax.VariableDeclarator"++_VariableDeclarator_identifier = Core.Name "identifier"++_VariableDeclarator_initializer = Core.Name "initializer"++-- | A non-empty, comma-separated list of variable declarators, as used in an event declaration.+newtype VariableDeclarators =+ VariableDeclarators {+ unVariableDeclarators :: [VariableDeclarator]}+ deriving (Eq, Ord, Read, Show)++_VariableDeclarators = Core.Name "hydra.csharp.syntax.VariableDeclarators"++-- | The initializer of a variable: an expression or a nested array initializer.+data VariableInitializer =+ VariableInitializerExpression Expression |+ VariableInitializerArray ArrayInitializer+ deriving (Eq, Ord, Read, Show)++_VariableInitializer = Core.Name "hydra.csharp.syntax.VariableInitializer"++_VariableInitializer_expression = Core.Name "expression"++_VariableInitializer_array = Core.Name "array"++-- | A reference to a variable, expressed as an expression.+newtype VariableReference =+ VariableReference {+ unVariableReference :: Expression}+ deriving (Eq, Ord, Read, Show)++_VariableReference = Core.Name "hydra.csharp.syntax.VariableReference"++-- | The in (contravariant) or out (covariant) variance annotation on a generic type parameter.+data VarianceAnnotation =+ VarianceAnnotationIn |+ VarianceAnnotationOut+ deriving (Eq, Ord, Read, Show)++_VarianceAnnotation = Core.Name "hydra.csharp.syntax.VarianceAnnotation"++_VarianceAnnotation_in = Core.Name "in"++_VarianceAnnotation_out = Core.Name "out"++-- | A single type parameter of an interface or delegate, with optional variance annotation.+data VariantTypeParameter =+ VariantTypeParameter {+ variantTypeParameterAttributes :: (Maybe Attributes),+ variantTypeParameterVariance :: (Maybe VarianceAnnotation),+ variantTypeParameterParameter :: TypeParameter}+ deriving (Eq, Ord, Read, Show)++_VariantTypeParameter = Core.Name "hydra.csharp.syntax.VariantTypeParameter"++_VariantTypeParameter_attributes = Core.Name "attributes"++_VariantTypeParameter_variance = Core.Name "variance"++_VariantTypeParameter_parameter = Core.Name "parameter"++-- | The list of variant type parameters declared by a generic interface or delegate.+newtype VariantTypeParameters =+ VariantTypeParameters {+ unVariantTypeParameters :: [VariantTypeParameter]}+ deriving (Eq, Ord, Read, Show)++_VariantTypeParameters = Core.Name "hydra.csharp.syntax.VariantTypeParameters"++-- | A single '{expression[,width][:format]}' hole within a verbatim interpolated string.+data VerbatimInterpolation =+ VerbatimInterpolation {+ verbatimInterpolationExpression :: Expression,+ verbatimInterpolationWidth :: (Maybe ConstantExpression),+ verbatimInterpolationFormat :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_VerbatimInterpolation = Core.Name "hydra.csharp.syntax.VerbatimInterpolation"++_VerbatimInterpolation_expression = Core.Name "expression"++_VerbatimInterpolation_width = Core.Name "width"++_VerbatimInterpolation_format = Core.Name "format"++-- | A while iteration statement that tests its condition before each execution of the body.+data WhileStatement =+ WhileStatement {+ whileStatementCondition :: BooleanExpression,+ whileStatementBody :: EmbeddedStatement}+ deriving (Eq, Ord, Read, Show)++_WhileStatement = Core.Name "hydra.csharp.syntax.WhileStatement"++_WhileStatement_condition = Core.Name "condition"++_WhileStatement_body = Core.Name "body"++-- | A 'yield return' or 'yield break' statement used within an iterator.+data YieldStatement =+ YieldStatementReturn Expression |+ YieldStatementBreak+ deriving (Eq, Ord, Read, Show)++_YieldStatement = Core.Name "hydra.csharp.syntax.YieldStatement"++_YieldStatement_return = Core.Name "return"++_YieldStatement_break = Core.Name "break"
src/main/haskell/Hydra/Datalog/Syntax.hs view
@@ -1,110 +1,179 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | A basic Datalog model module Hydra.Datalog.Syntax where+ import qualified Hydra.Core as Core import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci++-- | A relation applied to a list of terms+data Atom =+ Atom {+ atomRelation :: Relation,+ atomTermList :: TermList}+ deriving (Eq, Ord, Read, Show)++_Atom = Core.Name "hydra.datalog.syntax.Atom"++_Atom_Relation = Core.Name "Relation"++_Atom_TermList = Core.Name "TermList"++-- | A nonempty, comma-separated list of atoms+data AtomList =+ AtomListSingle Atom |+ AtomListMany AtomListMultiple+ deriving (Eq, Ord, Read, Show)++_AtomList = Core.Name "hydra.datalog.syntax.AtomList"++_AtomList_single = Core.Name "single"++_AtomList_many = Core.Name "many"++-- | An atom followed by the remainder of a comma-separated atom list+data AtomListMultiple =+ AtomListMultiple {+ atomListMultipleAtom :: Atom,+ atomListMultipleAtomList :: AtomList}+ deriving (Eq, Ord, Read, Show)++_AtomListMultiple = Core.Name "hydra.datalog.syntax.AtomListMultiple"++_AtomListMultiple_Atom = Core.Name "Atom"++_AtomListMultiple_AtomList = Core.Name "AtomList"++-- | A constant term, e.g. an atomic value such as a symbol or number newtype Constant = Constant { unConstant :: String} deriving (Eq, Ord, Read, Show)+ _Constant = Core.Name "hydra.datalog.syntax.Constant"-newtype Relation =- Relation {- unRelation :: String}- deriving (Eq, Ord, Read, Show)-_Relation = Core.Name "hydra.datalog.syntax.Relation"-newtype Variable =- Variable {- unVariable :: String}- deriving (Eq, Ord, Read, Show)-_Variable = Core.Name "hydra.datalog.syntax.Variable"-newtype Program =- Program {- unProgram :: [Program_Elmt]}++-- | A nonempty, comma-separated list of constants+data ConstantList =+ ConstantListSingle Constant |+ ConstantListMany ConstantListMultiple deriving (Eq, Ord, Read, Show)-_Program = Core.Name "hydra.datalog.syntax.Program"-data Program_Elmt =- Program_ElmtFact Fact |- Program_ElmtRule Rule++_ConstantList = Core.Name "hydra.datalog.syntax.ConstantList"++_ConstantList_single = Core.Name "single"++_ConstantList_many = Core.Name "many"++-- | A constant followed by the remainder of a comma-separated constant list+data ConstantListMultiple =+ ConstantListMultiple {+ constantListMultipleConstant :: Constant,+ constantListMultipleConstantList :: ConstantList} deriving (Eq, Ord, Read, Show)-_Program_Elmt = Core.Name "hydra.datalog.syntax.Program_Elmt"-_Program_Elmt_Fact = Core.Name "Fact"-_Program_Elmt_Rule = Core.Name "Rule"++_ConstantListMultiple = Core.Name "hydra.datalog.syntax.ConstantListMultiple"++_ConstantListMultiple_Constant = Core.Name "Constant"++_ConstantListMultiple_ConstantList = Core.Name "ConstantList"++-- | An unconditional assertion of a relation applied to a list of constants data Fact = Fact { factRelation :: Relation, factConstantList :: ConstantList} deriving (Eq, Ord, Read, Show)+ _Fact = Core.Name "hydra.datalog.syntax.Fact"+ _Fact_Relation = Core.Name "Relation"+ _Fact_ConstantList = Core.Name "ConstantList"++-- | A Datalog program: a list of facts and rules+newtype Program =+ Program {+ unProgram :: [ProgramElmt]}+ deriving (Eq, Ord, Read, Show)++_Program = Core.Name "hydra.datalog.syntax.Program"++-- | A single element of a Datalog program: either a fact or a rule+data ProgramElmt =+ ProgramElmtFact Fact |+ ProgramElmtRule Rule+ deriving (Eq, Ord, Read, Show)++_ProgramElmt = Core.Name "hydra.datalog.syntax.ProgramElmt"++_ProgramElmt_Fact = Core.Name "Fact"++_ProgramElmt_Rule = Core.Name "Rule"++-- | The name of a predicate (relation) used in facts, rules, and queries+newtype Relation =+ Relation {+ unRelation :: String}+ deriving (Eq, Ord, Read, Show)++_Relation = Core.Name "hydra.datalog.syntax.Relation"++-- | A conditional assertion: a head atom implied by a conjunction of body atoms data Rule = Rule { ruleAtom :: Atom, ruleAtomList :: AtomList} deriving (Eq, Ord, Read, Show)+ _Rule = Core.Name "hydra.datalog.syntax.Rule"+ _Rule_Atom = Core.Name "Atom"+ _Rule_AtomList = Core.Name "AtomList"-data Atom =- Atom {- atomRelation :: Relation,- atomTermList :: TermList}- deriving (Eq, Ord, Read, Show)-_Atom = Core.Name "hydra.datalog.syntax.Atom"-_Atom_Relation = Core.Name "Relation"-_Atom_TermList = Core.Name "TermList"-data AtomList =- AtomListSingle Atom |- AtomListMultiple AtomList_Multiple- deriving (Eq, Ord, Read, Show)-_AtomList = Core.Name "hydra.datalog.syntax.AtomList"-_AtomList_single = Core.Name "single"-_AtomList_multiple = Core.Name "multiple"-data AtomList_Multiple =- AtomList_Multiple {- atomList_MultipleAtom :: Atom,- atomList_MultipleAtomList :: AtomList}- deriving (Eq, Ord, Read, Show)-_AtomList_Multiple = Core.Name "hydra.datalog.syntax.AtomList_Multiple"-_AtomList_Multiple_Atom = Core.Name "Atom"-_AtomList_Multiple_AtomList = Core.Name "AtomList"++-- | An argument to an atom: either a constant or a variable data Term = TermConstant Constant | TermVariable Variable deriving (Eq, Ord, Read, Show)+ _Term = Core.Name "hydra.datalog.syntax.Term"+ _Term_Constant = Core.Name "Constant"+ _Term_Variable = Core.Name "Variable"++-- | A nonempty, comma-separated list of terms data TermList = TermListSingle Term |- TermListMultiple TermList_Multiple+ TermListMany TermListMultiple deriving (Eq, Ord, Read, Show)+ _TermList = Core.Name "hydra.datalog.syntax.TermList"+ _TermList_single = Core.Name "single"-_TermList_multiple = Core.Name "multiple"-data TermList_Multiple =- TermList_Multiple {- termList_MultipleTerm :: Term,- termList_MultipleTermList :: TermList}- deriving (Eq, Ord, Read, Show)-_TermList_Multiple = Core.Name "hydra.datalog.syntax.TermList_Multiple"-_TermList_Multiple_Term = Core.Name "Term"-_TermList_Multiple_TermList = Core.Name "TermList"-data ConstantList =- ConstantListSingle Constant |- ConstantListMultiple ConstantList_Multiple++_TermList_many = Core.Name "many"++-- | A term followed by the remainder of a comma-separated term list+data TermListMultiple =+ TermListMultiple {+ termListMultipleTerm :: Term,+ termListMultipleTermList :: TermList} deriving (Eq, Ord, Read, Show)-_ConstantList = Core.Name "hydra.datalog.syntax.ConstantList"-_ConstantList_single = Core.Name "single"-_ConstantList_multiple = Core.Name "multiple"-data ConstantList_Multiple =- ConstantList_Multiple {- constantList_MultipleConstant :: Constant,- constantList_MultipleConstantList :: ConstantList}++_TermListMultiple = Core.Name "hydra.datalog.syntax.TermListMultiple"++_TermListMultiple_Term = Core.Name "Term"++_TermListMultiple_TermList = Core.Name "TermList"++-- | A logic variable, which may be bound to different constants across a query+newtype Variable =+ Variable {+ unVariable :: String} deriving (Eq, Ord, Read, Show)-_ConstantList_Multiple = Core.Name "hydra.datalog.syntax.ConstantList_Multiple"-_ConstantList_Multiple_Constant = Core.Name "Constant"-_ConstantList_Multiple_ConstantList = Core.Name "ConstantList"++_Variable = Core.Name "hydra.datalog.syntax.Variable"
src/main/haskell/Hydra/Delta/Parquet.hs view
@@ -1,19 +1,26 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | A partial Delta Parquet model, based on DataType and its subclasses as specified in the 3.0.0 Java API: https://docs.delta.io/3.0.0/api/java/kernel/io/delta/kernel/types/DataType.html module Hydra.Delta.Parquet where+ import qualified Hydra.Core as Core import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Represent array data type. data ArrayType = ArrayType { arrayTypeElementType :: DataType, arrayTypeContainsNull :: Bool} deriving (Eq, Ord, Read, Show)+ _ArrayType = Core.Name "hydra.delta.parquet.ArrayType"+ _ArrayType_elementType = Core.Name "elementType"+ _ArrayType_containsNull = Core.Name "containsNull"+ -- | Base class for all primitive types DataType. data BasePrimitiveType = -- | The data type representing byte[] values.@@ -39,18 +46,32 @@ -- | A timestamp type, supporting [0001-01-01T00:00:00.000000Z, 9999-12-31T23:59:59.999999Z] where the left/right-bound is a date and time of the proleptic Gregorian calendar in UTC+00:00. Internally, this is represented as the number of microseconds since the Unix epoch, 1970-01-01 00:00:00 UTC. BasePrimitiveTypeTimestamp deriving (Eq, Ord, Read, Show)+ _BasePrimitiveType = Core.Name "hydra.delta.parquet.BasePrimitiveType"+ _BasePrimitiveType_binary = Core.Name "binary"+ _BasePrimitiveType_boolean = Core.Name "boolean"+ _BasePrimitiveType_byte = Core.Name "byte"+ _BasePrimitiveType_date = Core.Name "date"+ _BasePrimitiveType_double = Core.Name "double"+ _BasePrimitiveType_float = Core.Name "float"+ _BasePrimitiveType_integer = Core.Name "integer"+ _BasePrimitiveType_long = Core.Name "long"+ _BasePrimitiveType_short = Core.Name "short"+ _BasePrimitiveType_string = Core.Name "string"+ _BasePrimitiveType_timestamp = Core.Name "timestamp"++-- | A Delta Parquet data type, either array, primitive, decimal, map, or struct. data DataType = -- | Represent array data type. DataTypeArray ArrayType |@@ -63,21 +84,32 @@ -- | Struct type which contains one or more columns. DataTypeStruct StructType deriving (Eq, Ord, Read, Show)+ _DataType = Core.Name "hydra.delta.parquet.DataType"+ _DataType_array = Core.Name "array"+ _DataType_base = Core.Name "base"+ _DataType_decimal = Core.Name "decimal"+ _DataType_map = Core.Name "map"+ _DataType_struct = Core.Name "struct"+ -- | A decimal data type with fixed precision (the maximum number of digits) and scale (the number of digits on right side of dot). The precision can be up to 38, scale can also be up to 38 (less or equal to precision). data DecimalType = DecimalType { decimalTypePrecision :: Int, decimalTypeScale :: Int} deriving (Eq, Ord, Read, Show)+ _DecimalType = Core.Name "hydra.delta.parquet.DecimalType"+ _DecimalType_precision = Core.Name "precision"+ _DecimalType_scale = Core.Name "scale"+ -- | Data type representing a map type. data MapType = MapType {@@ -85,10 +117,15 @@ mapTypeValueType :: DataType, mapTypeValueContainsNull :: Bool} deriving (Eq, Ord, Read, Show)+ _MapType = Core.Name "hydra.delta.parquet.MapType"+ _MapType_keyType = Core.Name "keyType"+ _MapType_valueType = Core.Name "valueType"+ _MapType_valueContainsNull = Core.Name "valueContainsNull"+ -- | Represents a subfield of StructType with additional properties and metadata. data StructField = StructField {@@ -96,14 +133,21 @@ structFieldDataType :: DataType, structFieldNullable :: Bool} deriving (Eq, Ord, Read, Show)+ _StructField = Core.Name "hydra.delta.parquet.StructField"+ _StructField_name = Core.Name "name"+ _StructField_dataType = Core.Name "dataType"+ _StructField_nullable = Core.Name "nullable"+ -- | Struct type which contains one or more columns. data StructType = StructType { structTypeFields :: [StructField]} deriving (Eq, Ord, Read, Show)+ _StructType = Core.Name "hydra.delta.parquet.StructType"+ _StructType_fields = Core.Name "fields"
src/main/haskell/Hydra/Geojson/Model.hs view
@@ -1,26 +1,36 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | A GeoJSON model based on the specification at https://www.rfc-editor.org/rfc/rfc7946. This model provides some additional structure beyond the JSON encoding described in the specification; For example, it provides MultiPoint not as an object with an array of coordinates which encode points, but as an array of Points. A BoundingBox is not simply an list of numbers, but a list of CoordinateRanges. module Hydra.Geojson.Model where+ import qualified Hydra.Core as Core import qualified Hydra.Json.Model as Model import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M+ -- | A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. newtype BoundingBox = BoundingBox { unBoundingBox :: [CoordinateRange]} deriving (Eq, Ord, Read, Show)+ _BoundingBox = Core.Name "hydra.geojson.model.BoundingBox"++-- | The minimum and maximum values along one axis of a bounding box data CoordinateRange = CoordinateRange { coordinateRangeMin :: Double, coordinateRangeMax :: Double} deriving (Eq, Ord, Read, Show)+ _CoordinateRange = Core.Name "hydra.geojson.model.CoordinateRange"+ _CoordinateRange_min = Core.Name "min"+ _CoordinateRange_max = Core.Name "max"+ -- | A Feature object represents a spatially bounded thing. Every Feature object is a GeoJSON object no matter where it occurs in a GeoJSON text. data Feature = Feature {@@ -32,29 +42,30 @@ featureId :: (Maybe Id), featureBbox :: (Maybe BoundingBox)} deriving (Eq, Ord, Read, Show)+ _Feature = Core.Name "hydra.geojson.model.Feature"+ _Feature_geometry = Core.Name "geometry"+ _Feature_properties = Core.Name "properties"+ _Feature_id = Core.Name "id"+ _Feature_bbox = Core.Name "bbox"+ -- | A GeoJSON object with the type "FeatureCollection" is a FeatureCollection object. A FeatureCollection object has a member with the name "features". The value of "features" is a JSON array. Each element of the array is a Feature object as defined above. It is possible for this array to be empty. data FeatureCollection = FeatureCollection { featureCollectionFeatures :: [Feature], featureCollectionBbox :: (Maybe BoundingBox)} deriving (Eq, Ord, Read, Show)+ _FeatureCollection = Core.Name "hydra.geojson.model.FeatureCollection"+ _FeatureCollection_features = Core.Name "features"+ _FeatureCollection_bbox = Core.Name "bbox"--- | A GeoJSON object with type "GeometryCollection" is a Geometry object. A GeometryCollection has a member with the name "geometries". The value of "geometries" is an array. Each element of this array is a GeoJSON Geometry object. It is possible for this array to be empty.-data GeometryCollection =- GeometryCollection {- geometryCollectionGeometries :: [Geometry],- geometryCollectionBbox :: (Maybe BoundingBox)}- deriving (Eq, Ord, Read, Show)-_GeometryCollection = Core.Name "hydra.geojson.model.GeometryCollection"-_GeometryCollection_geometries = Core.Name "geometries"-_GeometryCollection_bbox = Core.Name "bbox"+ -- | A Geometry object represents points, curves, and surfaces in coordinate space. Every Geometry object is a GeoJSON object no matter where it occurs in a GeoJSON text. data Geometry = GeometryPoint Point |@@ -65,76 +76,128 @@ GeometryMultiPolygon MultiPolygon | GeometryGeometryCollection GeometryCollection deriving (Eq, Ord, Read, Show)+ _Geometry = Core.Name "hydra.geojson.model.Geometry"+ _Geometry_point = Core.Name "point"+ _Geometry_multiPoint = Core.Name "multiPoint"+ _Geometry_lineString = Core.Name "lineString"+ _Geometry_multiLineString = Core.Name "multiLineString"+ _Geometry_polygon = Core.Name "polygon"+ _Geometry_multiPolygon = Core.Name "multiPolygon"+ _Geometry_geometryCollection = Core.Name "geometryCollection"++-- | A GeoJSON object with type "GeometryCollection" is a Geometry object. A GeometryCollection has a member with the name "geometries". The value of "geometries" is an array. Each element of this array is a GeoJSON Geometry object. It is possible for this array to be empty.+data GeometryCollection =+ GeometryCollection {+ geometryCollectionGeometries :: [Geometry],+ geometryCollectionBbox :: (Maybe BoundingBox)}+ deriving (Eq, Ord, Read, Show)++_GeometryCollection = Core.Name "hydra.geojson.model.GeometryCollection"++_GeometryCollection_geometries = Core.Name "geometries"++_GeometryCollection_bbox = Core.Name "bbox"++-- | A Feature's commonly used identifier, either a JSON string or a number data Id = IdNumber Double | IdString String deriving (Eq, Ord, Read, Show)+ _Id = Core.Name "hydra.geojson.model.Id"+ _Id_number = Core.Name "number"+ _Id_string = Core.Name "string"+ -- | For type "LineString", the "coordinates" member is an array of two or more positions. data LineString = LineString { lineStringCoordinates :: [Position], lineStringBbox :: (Maybe BoundingBox)} deriving (Eq, Ord, Read, Show)+ _LineString = Core.Name "hydra.geojson.model.LineString"+ _LineString_coordinates = Core.Name "coordinates"+ _LineString_bbox = Core.Name "bbox"+ -- | For type "MultiLineString", the "coordinates" member is an array of LineString coordinate arrays. data MultiLineString = MultiLineString { multiLineStringCoordinates :: [LineString], multiLineStringBbox :: (Maybe BoundingBox)} deriving (Eq, Ord, Read, Show)+ _MultiLineString = Core.Name "hydra.geojson.model.MultiLineString"+ _MultiLineString_coordinates = Core.Name "coordinates"+ _MultiLineString_bbox = Core.Name "bbox"+ -- | For type "MultiPoint", the "coordinates" member is an array of positions. data MultiPoint = MultiPoint { multiPointCoordinates :: [Point], multiPointBbox :: (Maybe BoundingBox)} deriving (Eq, Ord, Read, Show)+ _MultiPoint = Core.Name "hydra.geojson.model.MultiPoint"+ _MultiPoint_coordinates = Core.Name "coordinates"+ _MultiPoint_bbox = Core.Name "bbox"+ -- | For type "MultiPolygon", the "coordinates" member is an array of Polygon coordinate arrays. data MultiPolygon = MultiPolygon { multiPolygonCoordinates :: [Polygon], multiPolygonBbox :: (Maybe BoundingBox)} deriving (Eq, Ord, Read, Show)+ _MultiPolygon = Core.Name "hydra.geojson.model.MultiPolygon"+ _MultiPolygon_coordinates = Core.Name "coordinates"+ _MultiPolygon_bbox = Core.Name "bbox"+ -- | A GeoJSON object represents a Geometry, Feature, or collection of Features. data Object = ObjectGeometry Geometry | ObjectFeature Feature | ObjectFeatureCollection FeatureCollection deriving (Eq, Ord, Read, Show)+ _Object = Core.Name "hydra.geojson.model.Object"+ _Object_geometry = Core.Name "geometry"+ _Object_feature = Core.Name "feature"+ _Object_featureCollection = Core.Name "featureCollection"+ -- | For type "Point", the "coordinates" member is a single position. data Point = Point { pointCoordinates :: Position, pointBbox :: (Maybe BoundingBox)} deriving (Eq, Ord, Read, Show)+ _Point = Core.Name "hydra.geojson.model.Point"+ _Point_coordinates = Core.Name "coordinates"+ _Point_bbox = Core.Name "bbox"+ -- | For type "Polygon", the "coordinates" member MUST be an array of linear ring coordinate arrays. -- | For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings. The exterior ring bounds the surface, and the interior rings (if present) bound holes within the surface. data Polygon =@@ -142,9 +205,13 @@ polygonCoordinates :: [Position], polygonBbox :: (Maybe BoundingBox)} deriving (Eq, Ord, Read, Show)+ _Polygon = Core.Name "hydra.geojson.model.Polygon"+ _Polygon_coordinates = Core.Name "coordinates"+ _Polygon_bbox = Core.Name "bbox"+ -- | A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. data Position = Position {@@ -152,7 +219,11 @@ positionLongitude :: Double, positionAltitude :: (Maybe Double)} deriving (Eq, Ord, Read, Show)+ _Position = Core.Name "hydra.geojson.model.Position"+ _Position_latitude = Core.Name "latitude"+ _Position_longitude = Core.Name "longitude"+ _Position_altitude = Core.Name "altitude"
src/main/haskell/Hydra/Graphql/Coder.hs view
@@ -1,17 +1,22 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | GraphQL code generator: converts Hydra modules to GraphQL schema definitions module Hydra.Graphql.Coder where+ import qualified Hydra.Annotations as Annotations import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core-import qualified Hydra.File as File+import qualified Hydra.Docs as Docs import qualified Hydra.Environment as Environment import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph import qualified Hydra.Graphql.Language as Language@@ -32,13 +37,16 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Predicates as Predicates+import qualified Hydra.Print.Core as PrintCore import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Serialization as Serialization-import qualified Hydra.Show.Core as ShowCore import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -48,19 +56,29 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M++-- | Get the description from a type as a GraphQL Description descriptionFromType :: t0 -> Graph.Graph -> Core.Type -> Either Errors.Error (Maybe Syntax.Description) descriptionFromType cx g typ = Eithers.map (\mval -> Optionals.map (\s -> Syntax.Description (Syntax.StringValue s)) mval) (Annotations.getTypeDescription cx g typ)++-- | Encode a field name to a GraphQL EnumValue encodeEnumFieldName :: Core.Name -> Syntax.EnumValue encodeEnumFieldName name = Syntax.EnumValue (Syntax.Name (sanitize (Core.unName name)))++-- | Encode an enum field type to a GraphQL EnumValueDefinition encodeEnumFieldType :: t0 -> Graph.Graph -> Core.FieldType -> Either Errors.Error Syntax.EnumValueDefinition encodeEnumFieldType cx g ft = Eithers.bind (descriptionFromType cx g (Core.fieldTypeType ft)) (\desc -> Right (Syntax.EnumValueDefinition { Syntax.enumValueDefinitionDescription = desc, Syntax.enumValueDefinitionEnumValue = (encodeEnumFieldName (Core.fieldTypeName ft)), Syntax.enumValueDefinitionDirectives = Nothing}))++-- | Encode a field name to a GraphQL Name encodeFieldName :: Core.Name -> Syntax.Name encodeFieldName name = Syntax.Name (sanitize (Core.unName name))++-- | Encode a field type to a GraphQL FieldDefinition encodeFieldType :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Core.FieldType -> Either Errors.Error Syntax.FieldDefinition encodeFieldType cx g prefixes ft = Eithers.bind (encodeType cx g prefixes (Core.fieldTypeType ft)) (\gtype -> Eithers.bind (descriptionFromType cx g (Core.fieldTypeType ft)) (\desc -> Right (Syntax.FieldDefinition {@@ -69,18 +87,22 @@ Syntax.fieldDefinitionArgumentsDefinition = Nothing, Syntax.fieldDefinitionType = gtype, Syntax.fieldDefinitionDirectives = Nothing})))++-- | Encode a literal type to a GraphQL NamedType encodeLiteralType :: t0 -> Core.LiteralType -> Either Errors.Error Syntax.NamedType encodeLiteralType cx lt = case lt of Core.LiteralTypeBoolean -> Right (Syntax.NamedType (Syntax.Name "Boolean")) Core.LiteralTypeFloat v0 -> case v0 of Core.FloatTypeFloat64 -> Right (Syntax.NamedType (Syntax.Name "Float"))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected 64-bit float type, found: " (ShowCore.floatType v0))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected 64-bit float type, found: " (PrintCore.floatType v0)))) Core.LiteralTypeInteger v0 -> case v0 of Core.IntegerTypeInt32 -> Right (Syntax.NamedType (Syntax.Name "Int"))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected 32-bit signed integer type, found: " (ShowCore.integerType v0))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected 32-bit signed integer type, found: " (PrintCore.integerType v0)))) Core.LiteralTypeString -> Right (Syntax.NamedType (Syntax.Name "String"))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected GraphQL-compatible literal type, found: " (ShowCore.literalType lt))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected GraphQL-compatible literal type, found: " (PrintCore.literalType lt))))++-- | Encode a named type to a GraphQL type definition. encodeNamedType :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Core.Name -> Core.Type -> Either Errors.Error Syntax.TypeDefinition encodeNamedType cx g prefixes name typ = case (Strip.deannotateType typ) of@@ -154,7 +176,9 @@ Core.FieldType { Core.fieldTypeName = (Core.Name "codomain"), Core.fieldTypeType = (Core.functionTypeCodomain v0)}])- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected record or union type, found: " (ShowCore.type_ typ))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected record or union type, found: " (PrintCore.type_ typ))))++-- | Encode a Hydra type as a GraphQL type reference encodeType :: t0 -> t1 -> M.Map Packaging.ModuleName String -> Core.Type -> Either Errors.Error Syntax.Type encodeType cx g prefixes typ = case (Strip.deannotateType typ) of@@ -173,7 +197,7 @@ Core.TypeApplication v1 -> encodeType cx g prefixes (Core.TypeOptional (Core.applicationTypeFunction v1)) Core.TypeFunction _ -> Right (Syntax.TypeNamed (Syntax.NamedType (Syntax.Name "String"))) Core.TypeUnit -> Right (Syntax.TypeNamed (Syntax.NamedType (Syntax.Name "Boolean")))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected GraphQL-compatible type, found: " (ShowCore.type_ v0))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected GraphQL-compatible type, found: " (PrintCore.type_ v0)))) Core.TypeList v0 -> Eithers.map (\gt -> Syntax.TypeNonNull (Syntax.NonNullTypeList (Syntax.ListType gt))) (encodeType cx g prefixes v0) Core.TypeSet v0 -> Eithers.map (\gt -> Syntax.TypeNonNull (Syntax.NonNullTypeList (Syntax.ListType gt))) (encodeType cx g prefixes v0) Core.TypeMap v0 -> Eithers.map (\gt -> Syntax.TypeNonNull (Syntax.NonNullTypeList (Syntax.ListType gt))) (encodeType cx g prefixes (Core.mapTypeValues v0))@@ -188,10 +212,14 @@ Core.TypeApplication v0 -> encodeType cx g prefixes (Core.applicationTypeFunction v0) Core.TypeFunction _ -> Right (Syntax.TypeNonNull (Syntax.NonNullTypeNamed (Syntax.NamedType (Syntax.Name "String")))) Core.TypeUnit -> Right (Syntax.TypeNonNull (Syntax.NonNullTypeNamed (Syntax.NamedType (Syntax.Name "Boolean"))))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected GraphQL-compatible type, found: " (ShowCore.type_ typ))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected GraphQL-compatible type, found: " (PrintCore.type_ typ))))++-- | Encode a TypeDefinition to a GraphQL TypeDefinition encodeTypeDefinition :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Packaging.TypeDefinition -> Either Errors.Error Syntax.TypeDefinition encodeTypeDefinition cx g prefixes tdef = encodeNamedType cx g prefixes (Packaging.typeDefinitionName tdef) (Core.typeSchemeBody (Packaging.typeDefinitionBody tdef))++-- | Encode a Hydra Name as a GraphQL Name with namespace prefix encodeTypeName :: M.Map Packaging.ModuleName String -> Core.Name -> Syntax.Name encodeTypeName prefixes name = @@ -199,19 +227,24 @@ local = Util.qualifiedNameLocal qualName mns = Util.qualifiedNameModuleName qualName prefix = Optionals.cases mns "" (\ns_ -> Optionals.cases (Maps.lookup ns_ prefixes) "" (\p -> p))- in (Syntax.Name (Strings.cat2 prefix (sanitize local)))+ in (Syntax.Name (Strings.concat2 prefix (sanitize local)))++-- | Encode a union variant field type to a nullable GraphQL FieldDefinition. Unit-typed variants become Boolean fields; data-carrying variants use their actual type, made nullable. encodeUnionFieldType :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Core.FieldType -> Either Errors.Error Syntax.FieldDefinition encodeUnionFieldType cx g prefixes ft = let innerType = Core.fieldTypeType ft isUnit = Predicates.isUnitType (Strip.deannotateType innerType)- effectiveType = Logic.ifElse isUnit (Core.TypeOptional (Core.TypeLiteral Core.LiteralTypeBoolean)) (Core.TypeOptional innerType)+ effectiveType =+ Logic.ifElse isUnit (Core.TypeOptional (Core.TypeLiteral Core.LiteralTypeBoolean)) (Core.TypeOptional innerType) in (Eithers.bind (encodeType cx g prefixes effectiveType) (\gtype -> Eithers.bind (descriptionFromType cx g innerType) (\desc -> Right (Syntax.FieldDefinition { Syntax.fieldDefinitionDescription = desc, Syntax.fieldDefinitionName = (encodeFieldName (Core.fieldTypeName ft)), Syntax.fieldDefinitionArgumentsDefinition = Nothing, Syntax.fieldDefinitionType = gtype, Syntax.fieldDefinitionDirectives = Nothing}))))++-- | Top-level entry point: convert a module to GraphQL schema files. moduleToGraphql :: Packaging.Module -> [Packaging.Definition] -> t0 -> Graph.Graph -> Either Errors.Error (M.Map String String) moduleToGraphql mod defs cx g = @@ -219,13 +252,15 @@ typeDefs = Pairs.first partitioned prefixes = (\modNs -> \tdefs ->- let namespaces = Lists.nub (Optionals.cat (Lists.map (\td -> Names.moduleNameOf (Packaging.typeDefinitionName td)) tdefs))+ let namespaces = Lists.distinct (Optionals.givens (Lists.map (\td -> Names.moduleNameOf (Packaging.typeDefinitionName td)) tdefs)) in (Maps.fromList (Lists.map (\ns_ -> ( ns_,- (Logic.ifElse (Equality.equal ns_ modNs) "" (Strings.cat2 (Formatting.sanitizeWithUnderscores Sets.empty (Packaging.unModuleName ns_)) "_")))) namespaces))) (Packaging.moduleName mod) typeDefs+ (Logic.ifElse (Equality.equal ns_ modNs) "" (Strings.concat2 (Formatting.sanitizeWithUnderscores Sets.empty (Packaging.unModuleName ns_)) "_")))) namespaces))) (Packaging.moduleName mod) typeDefs filePath = Names.moduleNameToFilePath Util.CaseConventionCamel (File.FileExtension "graphql") (Packaging.moduleName mod) in (Eithers.bind (Eithers.mapList (\td -> encodeTypeDefinition cx g prefixes td) typeDefs) (\gtdefs -> Right (Maps.fromList (Lists.pure ( filePath, (Serialization.printExpr (Serialization.parenthesize (Serde.documentToExpr (Syntax.Document (Lists.map (\gtdef -> Syntax.DefinitionTypeSystem (Syntax.TypeSystemDefinitionOrExtensionDefinition (Syntax.TypeSystemDefinitionType gtdef))) gtdefs))))))))))++-- | Sanitize a string for use as a GraphQL identifier sanitize :: String -> String sanitize s = Formatting.sanitizeWithUnderscores Language.graphqlReservedWords s
src/main/haskell/Hydra/Graphql/Language.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Language constraints and reserved words for GraphQL module Hydra.Graphql.Language where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Lexical as Lexical@@ -17,10 +23,13 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -30,6 +39,7 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Set as S+ -- | Language constraints for GraphQL graphqlLanguage :: Coders.Language graphqlLanguage =@@ -41,7 +51,23 @@ Coders.languageConstraintsIntegerTypes = integerTypes, Coders.languageConstraintsTermVariants = termVariants, Coders.languageConstraintsTypeVariants = typeVariants,- Coders.languageConstraintsTypes = typePredicate}}+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeaturePartialApplication,+ Coders.LanguageFeatureNestedCaseStatements,+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "graphql")} where literalVariants = Sets.fromList [@@ -83,6 +109,7 @@ Core.TypeOptional _ -> False _ -> True _ -> True+ -- | A set of reserved words in GraphQL graphqlReservedWords :: S.Set String graphqlReservedWords =
src/main/haskell/Hydra/Graphql/Serde.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Serialization functions for converting GraphQL AST to abstract expressions module Hydra.Graphql.Serde where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Graphql.Syntax as Syntax import qualified Hydra.Json.Model as Model@@ -18,10 +24,13 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Serialization as Serialization+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -30,12 +39,14 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Convert a GraphQL definition to an expression definitionToExpr :: Syntax.Definition -> Ast.Expr definitionToExpr def = case def of Syntax.DefinitionExecutable _ -> Serialization.cst "Unsupported: executable definition" Syntax.DefinitionTypeSystem v0 -> typeSystemDefinitionOrExtensionToExpr v0+ -- | Convert a GraphQL description to a triple-quoted comment descriptionToExpr :: Syntax.Description -> Ast.Expr descriptionToExpr desc =@@ -46,9 +57,11 @@ delim, (Serialization.cst text), delim])+ -- | Convert a GraphQL document to an expression documentToExpr :: Syntax.Document -> Ast.Expr documentToExpr d = Serialization.doubleNewlineSep (Lists.map definitionToExpr (Syntax.unDocument d))+ -- | Convert a GraphQL enum type definition to an expression enumTypeDefinitionToExpr :: Syntax.EnumTypeDefinition -> Ast.Expr enumTypeDefinitionToExpr def =@@ -61,6 +74,7 @@ Serialization.cst "enum", (nameToExpr name), (Serialization.curlyBracesList Nothing Serialization.fullBlockStyle valuesExpr)]))+ -- | Convert a GraphQL enum value definition to an expression enumValueDefinitionToExpr :: Syntax.EnumValueDefinition -> Ast.Expr enumValueDefinitionToExpr def =@@ -68,9 +82,11 @@ let desc = Syntax.enumValueDefinitionDescription def ev = Syntax.enumValueDefinitionEnumValue def in (withDescription desc (enumValueToExpr ev))+ -- | Convert a GraphQL enum value to an expression enumValueToExpr :: Syntax.EnumValue -> Ast.Expr enumValueToExpr ev = nameToExpr (Syntax.unEnumValue ev)+ -- | Convert a GraphQL field definition to an expression fieldDefinitionToExpr :: Syntax.FieldDefinition -> Ast.Expr fieldDefinitionToExpr def =@@ -86,6 +102,7 @@ in (withDescription desc (Serialization.spaceSep [ namePart, typePart]))+ -- | Convert a GraphQL list type to an expression listTypeToExpr :: Syntax.ListType -> Ast.Expr listTypeToExpr lt =@@ -93,12 +110,15 @@ Serialization.cst "[", (typeToExpr (Syntax.unListType lt)), (Serialization.cst "]")]+ -- | Convert a GraphQL name to an expression nameToExpr :: Syntax.Name -> Ast.Expr nameToExpr n = Serialization.cst (Syntax.unName n)+ -- | Convert a GraphQL named type to an expression namedTypeToExpr :: Syntax.NamedType -> Ast.Expr namedTypeToExpr nt = nameToExpr (Syntax.unNamedType nt)+ -- | Convert a GraphQL non-null type to an expression nonNullTypeToExpr :: Syntax.NonNullType -> Ast.Expr nonNullTypeToExpr nnt =@@ -110,6 +130,7 @@ in (Serialization.noSep [ typeExpr, (Serialization.cst "!")])+ -- | Convert a GraphQL object type definition to an expression objectTypeDefinitionToExpr :: Syntax.ObjectTypeDefinition -> Ast.Expr objectTypeDefinitionToExpr def =@@ -122,6 +143,7 @@ Serialization.cst "type", (nameToExpr name), (Serialization.curlyBracesList Nothing Serialization.fullBlockStyle fieldsExpr)]))+ -- | Convert a GraphQL type definition to an expression typeDefinitionToExpr :: Syntax.TypeDefinition -> Ast.Expr typeDefinitionToExpr def =@@ -132,12 +154,14 @@ Syntax.TypeDefinitionUnion _ -> Serialization.cst "Unsupported: union type definition" Syntax.TypeDefinitionEnum v0 -> enumTypeDefinitionToExpr v0 Syntax.TypeDefinitionInputObject _ -> Serialization.cst "Unsupported: input object type definition"+ -- | Convert a GraphQL type system definition or extension to an expression typeSystemDefinitionOrExtensionToExpr :: Syntax.TypeSystemDefinitionOrExtension -> Ast.Expr typeSystemDefinitionOrExtensionToExpr de = case de of Syntax.TypeSystemDefinitionOrExtensionDefinition v0 -> typeSystemDefinitionToExpr v0 Syntax.TypeSystemDefinitionOrExtensionExtension _ -> Serialization.cst "Unsupported: type system extension"+ -- | Convert a GraphQL type system definition to an expression typeSystemDefinitionToExpr :: Syntax.TypeSystemDefinition -> Ast.Expr typeSystemDefinitionToExpr def =@@ -145,6 +169,7 @@ Syntax.TypeSystemDefinitionSchema _ -> Serialization.cst "Unsupported: schema definition" Syntax.TypeSystemDefinitionType v0 -> typeDefinitionToExpr v0 Syntax.TypeSystemDefinitionDirective _ -> Serialization.cst "Unsupported: directive definition"+ -- | Convert a GraphQL type to an expression typeToExpr :: Syntax.Type -> Ast.Expr typeToExpr typ =@@ -152,9 +177,10 @@ Syntax.TypeNamed v0 -> namedTypeToExpr v0 Syntax.TypeList v0 -> listTypeToExpr v0 Syntax.TypeNonNull v0 -> nonNullTypeToExpr v0+ -- | Prepend an optional description to an expression withDescription :: Maybe Syntax.Description -> Ast.Expr -> Ast.Expr withDescription mdesc expr =- Serialization.newlineSep (Optionals.cat [+ Serialization.newlineSep (Optionals.givens [ Optionals.map descriptionToExpr mdesc, (Optionals.pure expr)])
src/main/haskell/Hydra/Graphql/Syntax.hs view
@@ -1,865 +1,1396 @@ -- Note: this is an automatically generated file. Do not edit.--- | A GraphQL model. Based on the (extended) BNF at:--- | https://spec.graphql.org/draft/#sec-Appendix-Grammar-Summary--module Hydra.Graphql.Syntax where-import qualified Hydra.Core as Core-import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.Scientific as Sci-newtype Name =- Name {- unName :: String}- deriving (Eq, Ord, Read, Show)-_Name = Core.Name "hydra.graphql.syntax.Name"-newtype IntValue =- IntValue {- unIntValue :: String}- deriving (Eq, Ord, Read, Show)-_IntValue = Core.Name "hydra.graphql.syntax.IntValue"-newtype FloatValue =- FloatValue {- unFloatValue :: String}- deriving (Eq, Ord, Read, Show)-_FloatValue = Core.Name "hydra.graphql.syntax.FloatValue"-newtype StringValue =- StringValue {- unStringValue :: String}- deriving (Eq, Ord, Read, Show)-_StringValue = Core.Name "hydra.graphql.syntax.StringValue"-newtype Document =- Document {- unDocument :: [Definition]}- deriving (Eq, Ord, Read, Show)-_Document = Core.Name "hydra.graphql.syntax.Document"-data Definition =- DefinitionExecutable ExecutableDefinition |- DefinitionTypeSystem TypeSystemDefinitionOrExtension- deriving (Eq, Ord, Read, Show)-_Definition = Core.Name "hydra.graphql.syntax.Definition"-_Definition_executable = Core.Name "executable"-_Definition_typeSystem = Core.Name "typeSystem"-newtype ExecutableDocument =- ExecutableDocument {- unExecutableDocument :: [ExecutableDefinition]}- deriving (Eq, Ord, Read, Show)-_ExecutableDocument = Core.Name "hydra.graphql.syntax.ExecutableDocument"-data ExecutableDefinition =- ExecutableDefinitionOperation OperationDefinition |- ExecutableDefinitionFragment FragmentDefinition- deriving (Eq, Ord, Read, Show)-_ExecutableDefinition = Core.Name "hydra.graphql.syntax.ExecutableDefinition"-_ExecutableDefinition_operation = Core.Name "operation"-_ExecutableDefinition_fragment = Core.Name "fragment"-data OperationDefinition =- OperationDefinitionSequence OperationDefinition_Sequence |- OperationDefinitionSelectionSet SelectionSet- deriving (Eq, Ord, Read, Show)-_OperationDefinition = Core.Name "hydra.graphql.syntax.OperationDefinition"-_OperationDefinition_sequence = Core.Name "sequence"-_OperationDefinition_SelectionSet = Core.Name "SelectionSet"-data OperationDefinition_Sequence =- OperationDefinition_Sequence {- operationDefinition_SequenceOperationType :: OperationType,- operationDefinition_SequenceName :: (Maybe Name),- operationDefinition_SequenceVariablesDefinition :: (Maybe VariablesDefinition),- operationDefinition_SequenceDirectives :: (Maybe Directives),- operationDefinition_SequenceSelectionSet :: SelectionSet}- deriving (Eq, Ord, Read, Show)-_OperationDefinition_Sequence = Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"-_OperationDefinition_Sequence_OperationType = Core.Name "OperationType"-_OperationDefinition_Sequence_Name = Core.Name "Name"-_OperationDefinition_Sequence_VariablesDefinition = Core.Name "VariablesDefinition"-_OperationDefinition_Sequence_Directives = Core.Name "Directives"-_OperationDefinition_Sequence_SelectionSet = Core.Name "SelectionSet"-data OperationType =- OperationTypeQuery |- OperationTypeMutation |- OperationTypeSubscription- deriving (Eq, Ord, Read, Show)-_OperationType = Core.Name "hydra.graphql.syntax.OperationType"-_OperationType_Query = Core.Name "Query"-_OperationType_Mutation = Core.Name "Mutation"-_OperationType_Subscription = Core.Name "Subscription"-newtype SelectionSet =- SelectionSet {- unSelectionSet :: [Selection]}- deriving (Eq, Ord, Read, Show)-_SelectionSet = Core.Name "hydra.graphql.syntax.SelectionSet"-data Selection =- SelectionField Field |- SelectionFragmentSpread FragmentSpread |- SelectionInlineFragment InlineFragment- deriving (Eq, Ord, Read, Show)-_Selection = Core.Name "hydra.graphql.syntax.Selection"-_Selection_Field = Core.Name "Field"-_Selection_FragmentSpread = Core.Name "FragmentSpread"-_Selection_InlineFragment = Core.Name "InlineFragment"-data Field =- Field {- fieldAlias :: (Maybe Alias),- fieldName :: Name,- fieldArguments :: (Maybe Arguments),- fieldDirectives :: (Maybe Directives),- fieldSelectionSet :: (Maybe SelectionSet)}- deriving (Eq, Ord, Read, Show)-_Field = Core.Name "hydra.graphql.syntax.Field"-_Field_Alias = Core.Name "Alias"-_Field_Name = Core.Name "Name"-_Field_Arguments = Core.Name "Arguments"-_Field_Directives = Core.Name "Directives"-_Field_SelectionSet = Core.Name "SelectionSet"-data Alias =- AliasName Name |- AliasColon- deriving (Eq, Ord, Read, Show)-_Alias = Core.Name "hydra.graphql.syntax.Alias"-_Alias_Name = Core.Name "Name"-_Alias_Colon = Core.Name "Colon"-newtype Arguments =- Arguments {- unArguments :: [Argument]}- deriving (Eq, Ord, Read, Show)-_Arguments = Core.Name "hydra.graphql.syntax.Arguments"-data Argument =- Argument {- argumentName :: Name,- argumentValue :: Value}- deriving (Eq, Ord, Read, Show)-_Argument = Core.Name "hydra.graphql.syntax.Argument"-_Argument_Name = Core.Name "Name"-_Argument_Value = Core.Name "Value"-data FragmentSpread =- FragmentSpread {- fragmentSpreadFragmentName :: FragmentName,- fragmentSpreadDirectives :: (Maybe Directives)}- deriving (Eq, Ord, Read, Show)-_FragmentSpread = Core.Name "hydra.graphql.syntax.FragmentSpread"-_FragmentSpread_FragmentName = Core.Name "FragmentName"-_FragmentSpread_Directives = Core.Name "Directives"-data InlineFragment =- InlineFragment {- inlineFragmentTypeCondition :: (Maybe TypeCondition),- inlineFragmentDirectives :: (Maybe Directives),- inlineFragmentSelectionSet :: SelectionSet}- deriving (Eq, Ord, Read, Show)-_InlineFragment = Core.Name "hydra.graphql.syntax.InlineFragment"-_InlineFragment_TypeCondition = Core.Name "TypeCondition"-_InlineFragment_Directives = Core.Name "Directives"-_InlineFragment_SelectionSet = Core.Name "SelectionSet"-data FragmentDefinition =- FragmentDefinition {- fragmentDefinitionFragmentName :: FragmentName,- fragmentDefinitionTypeCondition :: TypeCondition,- fragmentDefinitionDirectives :: (Maybe Directives),- fragmentDefinitionSelectionSet :: SelectionSet}- deriving (Eq, Ord, Read, Show)-_FragmentDefinition = Core.Name "hydra.graphql.syntax.FragmentDefinition"-_FragmentDefinition_FragmentName = Core.Name "FragmentName"-_FragmentDefinition_TypeCondition = Core.Name "TypeCondition"-_FragmentDefinition_Directives = Core.Name "Directives"-_FragmentDefinition_SelectionSet = Core.Name "SelectionSet"-newtype FragmentName =- FragmentName {- unFragmentName :: Name}- deriving (Eq, Ord, Read, Show)-_FragmentName = Core.Name "hydra.graphql.syntax.FragmentName"-data TypeCondition =- TypeConditionOn |- TypeConditionNamedType NamedType- deriving (Eq, Ord, Read, Show)-_TypeCondition = Core.Name "hydra.graphql.syntax.TypeCondition"-_TypeCondition_On = Core.Name "On"-_TypeCondition_NamedType = Core.Name "NamedType"-data Value =- ValueVariable Variable |- ValueInt IntValue |- ValueFloat FloatValue |- ValueString StringValue |- ValueBoolean BooleanValue |- ValueNull NullValue |- ValueEnum EnumValue |- ValueList ListValue |- ValueObject ObjectValue- deriving (Eq, Ord, Read, Show)-_Value = Core.Name "hydra.graphql.syntax.Value"-_Value_Variable = Core.Name "Variable"-_Value_int = Core.Name "int"-_Value_float = Core.Name "float"-_Value_string = Core.Name "string"-_Value_boolean = Core.Name "boolean"-_Value_null = Core.Name "null"-_Value_enum = Core.Name "enum"-_Value_list = Core.Name "list"-_Value_object = Core.Name "object"-data BooleanValue =- BooleanValueTrue |- BooleanValueFalse- deriving (Eq, Ord, Read, Show)-_BooleanValue = Core.Name "hydra.graphql.syntax.BooleanValue"-_BooleanValue_True = Core.Name "True"-_BooleanValue_False = Core.Name "False"-newtype NullValue =- NullValue {- unNullValue :: ()}- deriving (Eq, Ord, Read, Show)-_NullValue = Core.Name "hydra.graphql.syntax.NullValue"-newtype EnumValue =- EnumValue {- unEnumValue :: Name}- deriving (Eq, Ord, Read, Show)-_EnumValue = Core.Name "hydra.graphql.syntax.EnumValue"-data ListValue =- ListValueSequence ListValue_Sequence |- ListValueSequence2 [Value]- deriving (Eq, Ord, Read, Show)-_ListValue = Core.Name "hydra.graphql.syntax.ListValue"-_ListValue_sequence = Core.Name "sequence"-_ListValue_sequence2 = Core.Name "sequence2"-data ListValue_Sequence =- ListValue_Sequence {}- deriving (Eq, Ord, Read, Show)-_ListValue_Sequence = Core.Name "hydra.graphql.syntax.ListValue_Sequence"-data ObjectValue =- ObjectValueSequence ObjectValue_Sequence |- ObjectValueSequence2 [ObjectField]- deriving (Eq, Ord, Read, Show)-_ObjectValue = Core.Name "hydra.graphql.syntax.ObjectValue"-_ObjectValue_sequence = Core.Name "sequence"-_ObjectValue_sequence2 = Core.Name "sequence2"-data ObjectValue_Sequence =- ObjectValue_Sequence {}- deriving (Eq, Ord, Read, Show)-_ObjectValue_Sequence = Core.Name "hydra.graphql.syntax.ObjectValue_Sequence"-data ObjectField =- ObjectField {- objectFieldName :: Name,- objectFieldValue :: Value}- deriving (Eq, Ord, Read, Show)-_ObjectField = Core.Name "hydra.graphql.syntax.ObjectField"-_ObjectField_Name = Core.Name "Name"-_ObjectField_Value = Core.Name "Value"-data VariablesDefinition =- VariablesDefinition {- variablesDefinitionVariable :: Variable,- variablesDefinitionType :: Type,- variablesDefinitionDefaultValue :: (Maybe DefaultValue),- variablesDefinitionDirectives :: (Maybe Directives)}- deriving (Eq, Ord, Read, Show)-_VariablesDefinition = Core.Name "hydra.graphql.syntax.VariablesDefinition"-_VariablesDefinition_Variable = Core.Name "Variable"-_VariablesDefinition_Type = Core.Name "Type"-_VariablesDefinition_DefaultValue = Core.Name "DefaultValue"-_VariablesDefinition_Directives = Core.Name "Directives"-newtype Variable =- Variable {- unVariable :: Name}- deriving (Eq, Ord, Read, Show)-_Variable = Core.Name "hydra.graphql.syntax.Variable"-newtype DefaultValue =- DefaultValue {- unDefaultValue :: Value}- deriving (Eq, Ord, Read, Show)-_DefaultValue = Core.Name "hydra.graphql.syntax.DefaultValue"-data Type =- TypeNamed NamedType |- TypeList ListType |- TypeNonNull NonNullType- deriving (Eq, Ord, Read, Show)-_Type = Core.Name "hydra.graphql.syntax.Type"-_Type_named = Core.Name "named"-_Type_list = Core.Name "list"-_Type_nonNull = Core.Name "nonNull"-newtype NamedType =- NamedType {- unNamedType :: Name}- deriving (Eq, Ord, Read, Show)-_NamedType = Core.Name "hydra.graphql.syntax.NamedType"-newtype ListType =- ListType {- unListType :: Type}- deriving (Eq, Ord, Read, Show)-_ListType = Core.Name "hydra.graphql.syntax.ListType"-data NonNullType =- NonNullTypeNamed NamedType |- NonNullTypeList ListType- deriving (Eq, Ord, Read, Show)-_NonNullType = Core.Name "hydra.graphql.syntax.NonNullType"-_NonNullType_named = Core.Name "named"-_NonNullType_list = Core.Name "list"-newtype Directives =- Directives {- unDirectives :: [Directive]}- deriving (Eq, Ord, Read, Show)-_Directives = Core.Name "hydra.graphql.syntax.Directives"-data Directive =- Directive {- directiveName :: Name,- directiveArguments :: (Maybe Arguments)}- deriving (Eq, Ord, Read, Show)-_Directive = Core.Name "hydra.graphql.syntax.Directive"-_Directive_Name = Core.Name "Name"-_Directive_Arguments = Core.Name "Arguments"-newtype TypeSystemDocment =- TypeSystemDocment {- unTypeSystemDocment :: [TypeSystemDefinition]}- deriving (Eq, Ord, Read, Show)-_TypeSystemDocment = Core.Name "hydra.graphql.syntax.TypeSystemDocment"-data TypeSystemDefinition =- TypeSystemDefinitionSchema SchemaDefinition |- TypeSystemDefinitionType TypeDefinition |- TypeSystemDefinitionDirective DirectiveDefinition- deriving (Eq, Ord, Read, Show)-_TypeSystemDefinition = Core.Name "hydra.graphql.syntax.TypeSystemDefinition"-_TypeSystemDefinition_schema = Core.Name "schema"-_TypeSystemDefinition_type = Core.Name "type"-_TypeSystemDefinition_directive = Core.Name "directive"-newtype TypeSystemExtensionDocument =- TypeSystemExtensionDocument {- unTypeSystemExtensionDocument :: [TypeSystemDefinitionOrExtension]}- deriving (Eq, Ord, Read, Show)-_TypeSystemExtensionDocument = Core.Name "hydra.graphql.syntax.TypeSystemExtensionDocument"-data TypeSystemDefinitionOrExtension =- TypeSystemDefinitionOrExtensionDefinition TypeSystemDefinition |- TypeSystemDefinitionOrExtensionExtension TypeSystemExtension- deriving (Eq, Ord, Read, Show)-_TypeSystemDefinitionOrExtension = Core.Name "hydra.graphql.syntax.TypeSystemDefinitionOrExtension"-_TypeSystemDefinitionOrExtension_definition = Core.Name "definition"-_TypeSystemDefinitionOrExtension_extension = Core.Name "extension"-data TypeSystemExtension =- TypeSystemExtensionSchema SchemaExtension |- TypeSystemExtensionType TypeExtension- deriving (Eq, Ord, Read, Show)-_TypeSystemExtension = Core.Name "hydra.graphql.syntax.TypeSystemExtension"-_TypeSystemExtension_schema = Core.Name "schema"-_TypeSystemExtension_type = Core.Name "type"-data SchemaDefinition =- SchemaDefinition {- schemaDefinitionDescription :: (Maybe Description),- schemaDefinitionDirectives :: (Maybe Directives),- schemaDefinitionRootOperationTypeDefinition :: RootOperationTypeDefinition}- deriving (Eq, Ord, Read, Show)-_SchemaDefinition = Core.Name "hydra.graphql.syntax.SchemaDefinition"-_SchemaDefinition_Description = Core.Name "Description"-_SchemaDefinition_Directives = Core.Name "Directives"-_SchemaDefinition_RootOperationTypeDefinition = Core.Name "RootOperationTypeDefinition"-data SchemaExtension =- SchemaExtensionSequence SchemaExtension_Sequence |- SchemaExtensionSequence2 Directives- deriving (Eq, Ord, Read, Show)-_SchemaExtension = Core.Name "hydra.graphql.syntax.SchemaExtension"-_SchemaExtension_sequence = Core.Name "sequence"-_SchemaExtension_sequence2 = Core.Name "sequence2"-data SchemaExtension_Sequence =- SchemaExtension_Sequence {- schemaExtension_SequenceDirectives :: (Maybe Directives),- schemaExtension_SequenceRootOperationTypeDefinition :: RootOperationTypeDefinition}- deriving (Eq, Ord, Read, Show)-_SchemaExtension_Sequence = Core.Name "hydra.graphql.syntax.SchemaExtension_Sequence"-_SchemaExtension_Sequence_Directives = Core.Name "Directives"-_SchemaExtension_Sequence_RootOperationTypeDefinition = Core.Name "RootOperationTypeDefinition"-data RootOperationTypeDefinition =- RootOperationTypeDefinition {- rootOperationTypeDefinitionOperationType :: OperationType,- rootOperationTypeDefinitionNamedType :: NamedType}- deriving (Eq, Ord, Read, Show)-_RootOperationTypeDefinition = Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"-_RootOperationTypeDefinition_OperationType = Core.Name "OperationType"-_RootOperationTypeDefinition_NamedType = Core.Name "NamedType"-newtype Description =- Description {- unDescription :: StringValue}- deriving (Eq, Ord, Read, Show)-_Description = Core.Name "hydra.graphql.syntax.Description"-data TypeDefinition =- TypeDefinitionScalar ScalarTypeDefinition |- TypeDefinitionObject ObjectTypeDefinition |- TypeDefinitionInterface InterfaceTypeDefinition |- TypeDefinitionUnion UnionTypeDefinition |- TypeDefinitionEnum EnumTypeDefinition |- TypeDefinitionInputObject InputObjectTypeDefinition- deriving (Eq, Ord, Read, Show)-_TypeDefinition = Core.Name "hydra.graphql.syntax.TypeDefinition"-_TypeDefinition_scalar = Core.Name "scalar"-_TypeDefinition_object = Core.Name "object"-_TypeDefinition_interface = Core.Name "interface"-_TypeDefinition_union = Core.Name "union"-_TypeDefinition_enum = Core.Name "enum"-_TypeDefinition_inputObject = Core.Name "inputObject"-data TypeExtension =- TypeExtensionScalar ScalarTypeExtension |- TypeExtensionObject ObjectTypeExtension |- TypeExtensionInterface InterfaceTypeExtension |- TypeExtensionUnion UnionTypeExtension |- TypeExtensionEnum EnumTypeExtension |- TypeExtensionInputObject InputObjectTypeExtension- deriving (Eq, Ord, Read, Show)-_TypeExtension = Core.Name "hydra.graphql.syntax.TypeExtension"-_TypeExtension_scalar = Core.Name "scalar"-_TypeExtension_object = Core.Name "object"-_TypeExtension_interface = Core.Name "interface"-_TypeExtension_union = Core.Name "union"-_TypeExtension_enum = Core.Name "enum"-_TypeExtension_inputObject = Core.Name "inputObject"-data ScalarTypeDefinition =- ScalarTypeDefinition {- scalarTypeDefinitionDescription :: (Maybe Description),- scalarTypeDefinitionName :: Name,- scalarTypeDefinitionDirectives :: (Maybe Directives)}- deriving (Eq, Ord, Read, Show)-_ScalarTypeDefinition = Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"-_ScalarTypeDefinition_Description = Core.Name "Description"-_ScalarTypeDefinition_Name = Core.Name "Name"-_ScalarTypeDefinition_Directives = Core.Name "Directives"-data ScalarTypeExtension =- ScalarTypeExtension {- scalarTypeExtensionName :: Name,- scalarTypeExtensionDirectives :: Directives}- deriving (Eq, Ord, Read, Show)-_ScalarTypeExtension = Core.Name "hydra.graphql.syntax.ScalarTypeExtension"-_ScalarTypeExtension_Name = Core.Name "Name"-_ScalarTypeExtension_Directives = Core.Name "Directives"-data ObjectTypeDefinition =- ObjectTypeDefinition {- objectTypeDefinitionDescription :: (Maybe Description),- objectTypeDefinitionName :: Name,- objectTypeDefinitionImplementsInterfaces :: (Maybe ImplementsInterfaces),- objectTypeDefinitionDirectives :: (Maybe Directives),- objectTypeDefinitionFieldsDefinition :: (Maybe FieldsDefinition)}- deriving (Eq, Ord, Read, Show)-_ObjectTypeDefinition = Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"-_ObjectTypeDefinition_Description = Core.Name "Description"-_ObjectTypeDefinition_Name = Core.Name "Name"-_ObjectTypeDefinition_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-_ObjectTypeDefinition_Directives = Core.Name "Directives"-_ObjectTypeDefinition_FieldsDefinition = Core.Name "FieldsDefinition"-data ObjectTypeExtension =- ObjectTypeExtensionSequence ObjectTypeExtension_Sequence |- ObjectTypeExtensionSequence2 ObjectTypeExtension_Sequence2 |- ObjectTypeExtensionSequence3 ObjectTypeExtension_Sequence3- deriving (Eq, Ord, Read, Show)-_ObjectTypeExtension = Core.Name "hydra.graphql.syntax.ObjectTypeExtension"-_ObjectTypeExtension_sequence = Core.Name "sequence"-_ObjectTypeExtension_sequence2 = Core.Name "sequence2"-_ObjectTypeExtension_sequence3 = Core.Name "sequence3"-data ObjectTypeExtension_Sequence =- ObjectTypeExtension_Sequence {- objectTypeExtension_SequenceName :: Name,- objectTypeExtension_SequenceImplementsInterfaces :: (Maybe ImplementsInterfaces),- objectTypeExtension_SequenceDirectives :: (Maybe Directives),- objectTypeExtension_SequenceFieldsDefinition :: FieldsDefinition}- deriving (Eq, Ord, Read, Show)-_ObjectTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"-_ObjectTypeExtension_Sequence_Name = Core.Name "Name"-_ObjectTypeExtension_Sequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-_ObjectTypeExtension_Sequence_Directives = Core.Name "Directives"-_ObjectTypeExtension_Sequence_FieldsDefinition = Core.Name "FieldsDefinition"-data ObjectTypeExtension_Sequence2 =- ObjectTypeExtension_Sequence2 {- objectTypeExtension_Sequence2Name :: Name,- objectTypeExtension_Sequence2ImplementsInterfaces :: (Maybe ImplementsInterfaces),- objectTypeExtension_Sequence2Directives :: (Maybe Directives)}- deriving (Eq, Ord, Read, Show)-_ObjectTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"-_ObjectTypeExtension_Sequence2_Name = Core.Name "Name"-_ObjectTypeExtension_Sequence2_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-_ObjectTypeExtension_Sequence2_Directives = Core.Name "Directives"-data ObjectTypeExtension_Sequence3 =- ObjectTypeExtension_Sequence3 {- objectTypeExtension_Sequence3Name :: Name,- objectTypeExtension_Sequence3ImplementsInterfaces :: ImplementsInterfaces}- deriving (Eq, Ord, Read, Show)-_ObjectTypeExtension_Sequence3 = Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence3"-_ObjectTypeExtension_Sequence3_Name = Core.Name "Name"-_ObjectTypeExtension_Sequence3_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-data ImplementsInterfaces =- ImplementsInterfacesSequence ImplementsInterfaces_Sequence |- ImplementsInterfacesSequence2 ImplementsInterfaces_Sequence2- deriving (Eq, Ord, Read, Show)-_ImplementsInterfaces = Core.Name "hydra.graphql.syntax.ImplementsInterfaces"-_ImplementsInterfaces_sequence = Core.Name "sequence"-_ImplementsInterfaces_sequence2 = Core.Name "sequence2"-data ImplementsInterfaces_Sequence =- ImplementsInterfaces_Sequence {- implementsInterfaces_SequenceImplementsInterfaces :: ImplementsInterfaces,- implementsInterfaces_SequenceNamedType :: NamedType}- deriving (Eq, Ord, Read, Show)-_ImplementsInterfaces_Sequence = Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence"-_ImplementsInterfaces_Sequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-_ImplementsInterfaces_Sequence_NamedType = Core.Name "NamedType"-data ImplementsInterfaces_Sequence2 =- ImplementsInterfaces_Sequence2 {- implementsInterfaces_Sequence2Amp :: (Maybe ()),- implementsInterfaces_Sequence2NamedType :: NamedType}- deriving (Eq, Ord, Read, Show)-_ImplementsInterfaces_Sequence2 = Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence2"-_ImplementsInterfaces_Sequence2_Amp = Core.Name "Amp"-_ImplementsInterfaces_Sequence2_NamedType = Core.Name "NamedType"-newtype FieldsDefinition =- FieldsDefinition {- unFieldsDefinition :: [FieldDefinition]}- deriving (Eq, Ord, Read, Show)-_FieldsDefinition = Core.Name "hydra.graphql.syntax.FieldsDefinition"-data FieldDefinition =- FieldDefinition {- fieldDefinitionDescription :: (Maybe Description),- fieldDefinitionName :: Name,- fieldDefinitionArgumentsDefinition :: (Maybe ArgumentsDefinition),- fieldDefinitionType :: Type,- fieldDefinitionDirectives :: (Maybe Directives)}- deriving (Eq, Ord, Read, Show)-_FieldDefinition = Core.Name "hydra.graphql.syntax.FieldDefinition"-_FieldDefinition_Description = Core.Name "Description"-_FieldDefinition_Name = Core.Name "Name"-_FieldDefinition_ArgumentsDefinition = Core.Name "ArgumentsDefinition"-_FieldDefinition_Type = Core.Name "Type"-_FieldDefinition_Directives = Core.Name "Directives"-newtype ArgumentsDefinition =- ArgumentsDefinition {- unArgumentsDefinition :: [InputValueDefinition]}- deriving (Eq, Ord, Read, Show)-_ArgumentsDefinition = Core.Name "hydra.graphql.syntax.ArgumentsDefinition"-data InputValueDefinition =- InputValueDefinition {- inputValueDefinitionDescription :: (Maybe Description),- inputValueDefinitionName :: Name,- inputValueDefinitionType :: Type,- inputValueDefinitionDefaultValue :: (Maybe DefaultValue),- inputValueDefinitionDirectives :: (Maybe Directives)}- deriving (Eq, Ord, Read, Show)-_InputValueDefinition = Core.Name "hydra.graphql.syntax.InputValueDefinition"-_InputValueDefinition_Description = Core.Name "Description"-_InputValueDefinition_Name = Core.Name "Name"-_InputValueDefinition_Type = Core.Name "Type"-_InputValueDefinition_DefaultValue = Core.Name "DefaultValue"-_InputValueDefinition_Directives = Core.Name "Directives"-data InterfaceTypeDefinition =- InterfaceTypeDefinitionSequence InterfaceTypeDefinition_Sequence |- InterfaceTypeDefinitionSequence2 InterfaceTypeDefinition_Sequence2- deriving (Eq, Ord, Read, Show)-_InterfaceTypeDefinition = Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition"-_InterfaceTypeDefinition_sequence = Core.Name "sequence"-_InterfaceTypeDefinition_sequence2 = Core.Name "sequence2"-data InterfaceTypeDefinition_Sequence =- InterfaceTypeDefinition_Sequence {- interfaceTypeDefinition_SequenceDescription :: (Maybe Description),- interfaceTypeDefinition_SequenceName :: Name,- interfaceTypeDefinition_SequenceImplementsInterfaces :: (Maybe ImplementsInterfaces),- interfaceTypeDefinition_SequenceDirectives :: (Maybe Directives),- interfaceTypeDefinition_SequenceFieldsDefinition :: FieldsDefinition}- deriving (Eq, Ord, Read, Show)-_InterfaceTypeDefinition_Sequence = Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"-_InterfaceTypeDefinition_Sequence_Description = Core.Name "Description"-_InterfaceTypeDefinition_Sequence_Name = Core.Name "Name"-_InterfaceTypeDefinition_Sequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-_InterfaceTypeDefinition_Sequence_Directives = Core.Name "Directives"-_InterfaceTypeDefinition_Sequence_FieldsDefinition = Core.Name "FieldsDefinition"-data InterfaceTypeDefinition_Sequence2 =- InterfaceTypeDefinition_Sequence2 {- interfaceTypeDefinition_Sequence2Description :: (Maybe Description),- interfaceTypeDefinition_Sequence2Name :: Name,- interfaceTypeDefinition_Sequence2ImplementsInterfaces :: ImplementsInterfaces,- interfaceTypeDefinition_Sequence2Directives :: (Maybe Directives)}- deriving (Eq, Ord, Read, Show)-_InterfaceTypeDefinition_Sequence2 = Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"-_InterfaceTypeDefinition_Sequence2_Description = Core.Name "Description"-_InterfaceTypeDefinition_Sequence2_Name = Core.Name "Name"-_InterfaceTypeDefinition_Sequence2_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-_InterfaceTypeDefinition_Sequence2_Directives = Core.Name "Directives"-data InterfaceTypeExtension =- InterfaceTypeExtensionSequence InterfaceTypeExtension_Sequence |- InterfaceTypeExtensionSequence2 InterfaceTypeExtension_Sequence2 |- InterfaceTypeExtensionSequence3 InterfaceTypeExtension_Sequence3- deriving (Eq, Ord, Read, Show)-_InterfaceTypeExtension = Core.Name "hydra.graphql.syntax.InterfaceTypeExtension"-_InterfaceTypeExtension_sequence = Core.Name "sequence"-_InterfaceTypeExtension_sequence2 = Core.Name "sequence2"-_InterfaceTypeExtension_sequence3 = Core.Name "sequence3"-data InterfaceTypeExtension_Sequence =- InterfaceTypeExtension_Sequence {- interfaceTypeExtension_SequenceName :: Name,- interfaceTypeExtension_SequenceImplementsInterfaces :: (Maybe ImplementsInterfaces),- interfaceTypeExtension_SequenceDirectives :: (Maybe Directives),- interfaceTypeExtension_SequenceFieldsDefinition :: FieldsDefinition}- deriving (Eq, Ord, Read, Show)-_InterfaceTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"-_InterfaceTypeExtension_Sequence_Name = Core.Name "Name"-_InterfaceTypeExtension_Sequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-_InterfaceTypeExtension_Sequence_Directives = Core.Name "Directives"-_InterfaceTypeExtension_Sequence_FieldsDefinition = Core.Name "FieldsDefinition"-data InterfaceTypeExtension_Sequence2 =- InterfaceTypeExtension_Sequence2 {- interfaceTypeExtension_Sequence2Name :: Name,- interfaceTypeExtension_Sequence2ImplementsInterfaces :: (Maybe ImplementsInterfaces),- interfaceTypeExtension_Sequence2Directives :: Directives}- deriving (Eq, Ord, Read, Show)-_InterfaceTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"-_InterfaceTypeExtension_Sequence2_Name = Core.Name "Name"-_InterfaceTypeExtension_Sequence2_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-_InterfaceTypeExtension_Sequence2_Directives = Core.Name "Directives"-data InterfaceTypeExtension_Sequence3 =- InterfaceTypeExtension_Sequence3 {- interfaceTypeExtension_Sequence3Name :: Name,- interfaceTypeExtension_Sequence3ImplementsInterfaces :: ImplementsInterfaces}- deriving (Eq, Ord, Read, Show)-_InterfaceTypeExtension_Sequence3 = Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence3"-_InterfaceTypeExtension_Sequence3_Name = Core.Name "Name"-_InterfaceTypeExtension_Sequence3_ImplementsInterfaces = Core.Name "ImplementsInterfaces"-data UnionTypeDefinition =- UnionTypeDefinition {- unionTypeDefinitionDescription :: (Maybe Description),- unionTypeDefinitionName :: Name,- unionTypeDefinitionDirectives :: (Maybe Directives),- unionTypeDefinitionUnionMemberTypes :: (Maybe UnionMemberTypes)}- deriving (Eq, Ord, Read, Show)-_UnionTypeDefinition = Core.Name "hydra.graphql.syntax.UnionTypeDefinition"-_UnionTypeDefinition_Description = Core.Name "Description"-_UnionTypeDefinition_Name = Core.Name "Name"-_UnionTypeDefinition_Directives = Core.Name "Directives"-_UnionTypeDefinition_UnionMemberTypes = Core.Name "UnionMemberTypes"-data UnionMemberTypes =- UnionMemberTypesSequence UnionMemberTypes_Sequence |- UnionMemberTypesSequence2 UnionMemberTypes_Sequence2- deriving (Eq, Ord, Read, Show)-_UnionMemberTypes = Core.Name "hydra.graphql.syntax.UnionMemberTypes"-_UnionMemberTypes_sequence = Core.Name "sequence"-_UnionMemberTypes_sequence2 = Core.Name "sequence2"-data UnionMemberTypes_Sequence =- UnionMemberTypes_Sequence {- unionMemberTypes_SequenceUnionMemberTypes :: UnionMemberTypes,- unionMemberTypes_SequenceNamedType :: NamedType}- deriving (Eq, Ord, Read, Show)-_UnionMemberTypes_Sequence = Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence"-_UnionMemberTypes_Sequence_UnionMemberTypes = Core.Name "UnionMemberTypes"-_UnionMemberTypes_Sequence_NamedType = Core.Name "NamedType"-data UnionMemberTypes_Sequence2 =- UnionMemberTypes_Sequence2 {- unionMemberTypes_Sequence2Or :: (Maybe ()),- unionMemberTypes_Sequence2NamedType :: NamedType}- deriving (Eq, Ord, Read, Show)-_UnionMemberTypes_Sequence2 = Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence2"-_UnionMemberTypes_Sequence2_Or = Core.Name "Or"-_UnionMemberTypes_Sequence2_NamedType = Core.Name "NamedType"-data UnionTypeExtension =- UnionTypeExtensionSequence UnionTypeExtension_Sequence |- UnionTypeExtensionSequence2 UnionTypeExtension_Sequence2- deriving (Eq, Ord, Read, Show)-_UnionTypeExtension = Core.Name "hydra.graphql.syntax.UnionTypeExtension"-_UnionTypeExtension_sequence = Core.Name "sequence"-_UnionTypeExtension_sequence2 = Core.Name "sequence2"-data UnionTypeExtension_Sequence =- UnionTypeExtension_Sequence {- unionTypeExtension_SequenceName :: Name,- unionTypeExtension_SequenceDirectives :: (Maybe Directives),- unionTypeExtension_SequenceUnionMemberTypes :: UnionMemberTypes}- deriving (Eq, Ord, Read, Show)-_UnionTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"-_UnionTypeExtension_Sequence_Name = Core.Name "Name"-_UnionTypeExtension_Sequence_Directives = Core.Name "Directives"-_UnionTypeExtension_Sequence_UnionMemberTypes = Core.Name "UnionMemberTypes"-data UnionTypeExtension_Sequence2 =- UnionTypeExtension_Sequence2 {- unionTypeExtension_Sequence2Name :: Name,- unionTypeExtension_Sequence2Directives :: Directives}- deriving (Eq, Ord, Read, Show)-_UnionTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence2"-_UnionTypeExtension_Sequence2_Name = Core.Name "Name"-_UnionTypeExtension_Sequence2_Directives = Core.Name "Directives"-data EnumTypeDefinition =- EnumTypeDefinition {- enumTypeDefinitionDescription :: (Maybe Description),- enumTypeDefinitionName :: Name,- enumTypeDefinitionDirectives :: (Maybe Directives),- enumTypeDefinitionEnumValuesDefinition :: (Maybe EnumValuesDefinition)}- deriving (Eq, Ord, Read, Show)-_EnumTypeDefinition = Core.Name "hydra.graphql.syntax.EnumTypeDefinition"-_EnumTypeDefinition_Description = Core.Name "Description"-_EnumTypeDefinition_Name = Core.Name "Name"-_EnumTypeDefinition_Directives = Core.Name "Directives"-_EnumTypeDefinition_EnumValuesDefinition = Core.Name "EnumValuesDefinition"-newtype EnumValuesDefinition =- EnumValuesDefinition {- unEnumValuesDefinition :: [EnumValueDefinition]}- deriving (Eq, Ord, Read, Show)-_EnumValuesDefinition = Core.Name "hydra.graphql.syntax.EnumValuesDefinition"-data EnumValueDefinition =- EnumValueDefinition {- enumValueDefinitionDescription :: (Maybe Description),- enumValueDefinitionEnumValue :: EnumValue,- enumValueDefinitionDirectives :: (Maybe Directives)}- deriving (Eq, Ord, Read, Show)-_EnumValueDefinition = Core.Name "hydra.graphql.syntax.EnumValueDefinition"-_EnumValueDefinition_Description = Core.Name "Description"-_EnumValueDefinition_EnumValue = Core.Name "EnumValue"-_EnumValueDefinition_Directives = Core.Name "Directives"-data EnumTypeExtension =- EnumTypeExtensionSequence EnumTypeExtension_Sequence |- EnumTypeExtensionSequence2 EnumTypeExtension_Sequence2- deriving (Eq, Ord, Read, Show)-_EnumTypeExtension = Core.Name "hydra.graphql.syntax.EnumTypeExtension"-_EnumTypeExtension_sequence = Core.Name "sequence"-_EnumTypeExtension_sequence2 = Core.Name "sequence2"-data EnumTypeExtension_Sequence =- EnumTypeExtension_Sequence {- enumTypeExtension_SequenceName :: Name,- enumTypeExtension_SequenceDirectives :: (Maybe Directives),- enumTypeExtension_SequenceEnumValuesDefinition :: EnumValuesDefinition}- deriving (Eq, Ord, Read, Show)-_EnumTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"-_EnumTypeExtension_Sequence_Name = Core.Name "Name"-_EnumTypeExtension_Sequence_Directives = Core.Name "Directives"-_EnumTypeExtension_Sequence_EnumValuesDefinition = Core.Name "EnumValuesDefinition"-data EnumTypeExtension_Sequence2 =- EnumTypeExtension_Sequence2 {- enumTypeExtension_Sequence2Name :: Name,- enumTypeExtension_Sequence2Directives :: Directives}- deriving (Eq, Ord, Read, Show)-_EnumTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence2"-_EnumTypeExtension_Sequence2_Name = Core.Name "Name"-_EnumTypeExtension_Sequence2_Directives = Core.Name "Directives"-data InputObjectTypeDefinition =- InputObjectTypeDefinitionSequence InputObjectTypeDefinition_Sequence |- InputObjectTypeDefinitionSequence2 InputObjectTypeDefinition_Sequence2- deriving (Eq, Ord, Read, Show)-_InputObjectTypeDefinition = Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition"-_InputObjectTypeDefinition_sequence = Core.Name "sequence"-_InputObjectTypeDefinition_sequence2 = Core.Name "sequence2"-data InputObjectTypeDefinition_Sequence =- InputObjectTypeDefinition_Sequence {- inputObjectTypeDefinition_SequenceDescription :: (Maybe Description),- inputObjectTypeDefinition_SequenceName :: Name,- inputObjectTypeDefinition_SequenceDirectives :: (Maybe Directives),- inputObjectTypeDefinition_SequenceInputFieldsDefinition :: InputFieldsDefinition}- deriving (Eq, Ord, Read, Show)-_InputObjectTypeDefinition_Sequence = Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"-_InputObjectTypeDefinition_Sequence_Description = Core.Name "Description"-_InputObjectTypeDefinition_Sequence_Name = Core.Name "Name"-_InputObjectTypeDefinition_Sequence_Directives = Core.Name "Directives"-_InputObjectTypeDefinition_Sequence_InputFieldsDefinition = Core.Name "InputFieldsDefinition"-data InputObjectTypeDefinition_Sequence2 =- InputObjectTypeDefinition_Sequence2 {- inputObjectTypeDefinition_Sequence2Description :: (Maybe Description),- inputObjectTypeDefinition_Sequence2Name :: Name,- inputObjectTypeDefinition_Sequence2Directives :: (Maybe Directives)}- deriving (Eq, Ord, Read, Show)-_InputObjectTypeDefinition_Sequence2 = Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"-_InputObjectTypeDefinition_Sequence2_Description = Core.Name "Description"-_InputObjectTypeDefinition_Sequence2_Name = Core.Name "Name"-_InputObjectTypeDefinition_Sequence2_Directives = Core.Name "Directives"-newtype InputFieldsDefinition =- InputFieldsDefinition {- unInputFieldsDefinition :: [InputValueDefinition]}- deriving (Eq, Ord, Read, Show)-_InputFieldsDefinition = Core.Name "hydra.graphql.syntax.InputFieldsDefinition"-data InputObjectTypeExtension =- InputObjectTypeExtensionSequence InputObjectTypeExtension_Sequence |- InputObjectTypeExtensionSequence2 InputObjectTypeExtension_Sequence2- deriving (Eq, Ord, Read, Show)-_InputObjectTypeExtension = Core.Name "hydra.graphql.syntax.InputObjectTypeExtension"-_InputObjectTypeExtension_sequence = Core.Name "sequence"-_InputObjectTypeExtension_sequence2 = Core.Name "sequence2"-data InputObjectTypeExtension_Sequence =- InputObjectTypeExtension_Sequence {- inputObjectTypeExtension_SequenceName :: Name,- inputObjectTypeExtension_SequenceDirectives :: (Maybe Directives),- inputObjectTypeExtension_SequenceInputFieldsDefinition :: InputFieldsDefinition}- deriving (Eq, Ord, Read, Show)-_InputObjectTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"-_InputObjectTypeExtension_Sequence_Name = Core.Name "Name"-_InputObjectTypeExtension_Sequence_Directives = Core.Name "Directives"-_InputObjectTypeExtension_Sequence_InputFieldsDefinition = Core.Name "InputFieldsDefinition"-data InputObjectTypeExtension_Sequence2 =- InputObjectTypeExtension_Sequence2 {- inputObjectTypeExtension_Sequence2Name :: Name,- inputObjectTypeExtension_Sequence2Directives :: Directives}- deriving (Eq, Ord, Read, Show)-_InputObjectTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence2"-_InputObjectTypeExtension_Sequence2_Name = Core.Name "Name"-_InputObjectTypeExtension_Sequence2_Directives = Core.Name "Directives"-data DirectiveDefinition =- DirectiveDefinition {- directiveDefinitionDescription :: (Maybe Description),- directiveDefinitionName :: Name,- directiveDefinitionArgumentsDefinition :: (Maybe ArgumentsDefinition),- directiveDefinitionRepeatable :: (Maybe ()),- directiveDefinitionDirectiveLocations :: DirectiveLocations}- deriving (Eq, Ord, Read, Show)-_DirectiveDefinition = Core.Name "hydra.graphql.syntax.DirectiveDefinition"-_DirectiveDefinition_Description = Core.Name "Description"-_DirectiveDefinition_Name = Core.Name "Name"-_DirectiveDefinition_ArgumentsDefinition = Core.Name "ArgumentsDefinition"-_DirectiveDefinition_Repeatable = Core.Name "Repeatable"-_DirectiveDefinition_DirectiveLocations = Core.Name "DirectiveLocations"-data DirectiveLocations =- DirectiveLocationsSequence DirectiveLocations_Sequence |- DirectiveLocationsSequence2 DirectiveLocations_Sequence2- deriving (Eq, Ord, Read, Show)-_DirectiveLocations = Core.Name "hydra.graphql.syntax.DirectiveLocations"-_DirectiveLocations_sequence = Core.Name "sequence"-_DirectiveLocations_sequence2 = Core.Name "sequence2"-data DirectiveLocations_Sequence =- DirectiveLocations_Sequence {- directiveLocations_SequenceDirectiveLocations :: DirectiveLocations,- directiveLocations_SequenceDirectiveLocation :: DirectiveLocation}- deriving (Eq, Ord, Read, Show)-_DirectiveLocations_Sequence = Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence"-_DirectiveLocations_Sequence_DirectiveLocations = Core.Name "DirectiveLocations"-_DirectiveLocations_Sequence_DirectiveLocation = Core.Name "DirectiveLocation"-data DirectiveLocations_Sequence2 =- DirectiveLocations_Sequence2 {- directiveLocations_Sequence2Or :: (Maybe ()),- directiveLocations_Sequence2DirectiveLocation :: DirectiveLocation}- deriving (Eq, Ord, Read, Show)-_DirectiveLocations_Sequence2 = Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence2"-_DirectiveLocations_Sequence2_Or = Core.Name "Or"-_DirectiveLocations_Sequence2_DirectiveLocation = Core.Name "DirectiveLocation"-data DirectiveLocation =- DirectiveLocationExecutable ExecutableDirectiveLocation |- DirectiveLocationTypeSystem TypeSystemDirectiveLocation- deriving (Eq, Ord, Read, Show)-_DirectiveLocation = Core.Name "hydra.graphql.syntax.DirectiveLocation"-_DirectiveLocation_executable = Core.Name "executable"-_DirectiveLocation_typeSystem = Core.Name "typeSystem"-data ExecutableDirectiveLocation =- ExecutableDirectiveLocationQUERY |- ExecutableDirectiveLocationMUTATION |- ExecutableDirectiveLocationSUBSCRIPTION |- ExecutableDirectiveLocationFIELD |- ExecutableDirectiveLocationFRAGMENT_DEFINITION |- ExecutableDirectiveLocationFRAGMENT_SPREAD |- ExecutableDirectiveLocationINLINE_FRAGMENT |- ExecutableDirectiveLocationVARIABLE_DEFINITION- deriving (Eq, Ord, Read, Show)-_ExecutableDirectiveLocation = Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"-_ExecutableDirectiveLocation_QUERY = Core.Name "QUERY"-_ExecutableDirectiveLocation_MUTATION = Core.Name "MUTATION"-_ExecutableDirectiveLocation_SUBSCRIPTION = Core.Name "SUBSCRIPTION"-_ExecutableDirectiveLocation_FIELD = Core.Name "FIELD"-_ExecutableDirectiveLocation_FRAGMENT_DEFINITION = Core.Name "FRAGMENT_DEFINITION"-_ExecutableDirectiveLocation_FRAGMENT_SPREAD = Core.Name "FRAGMENT_SPREAD"-_ExecutableDirectiveLocation_INLINE_FRAGMENT = Core.Name "INLINE_FRAGMENT"-_ExecutableDirectiveLocation_VARIABLE_DEFINITION = Core.Name "VARIABLE_DEFINITION"-data TypeSystemDirectiveLocation =- TypeSystemDirectiveLocationSCHEMA |- TypeSystemDirectiveLocationSCALAR |- TypeSystemDirectiveLocationOBJECT |- TypeSystemDirectiveLocationFIELD_DEFINITION |- TypeSystemDirectiveLocationARGUMENT_DEFINITION |- TypeSystemDirectiveLocationINTERFACE |- TypeSystemDirectiveLocationUNION |- TypeSystemDirectiveLocationENUM |- TypeSystemDirectiveLocationENUM_VALUE |- TypeSystemDirectiveLocationINPUT_OBJECT |- TypeSystemDirectiveLocationINPUT_FIELD_DEFINITION- deriving (Eq, Ord, Read, Show)-_TypeSystemDirectiveLocation = Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"-_TypeSystemDirectiveLocation_SCHEMA = Core.Name "SCHEMA"-_TypeSystemDirectiveLocation_SCALAR = Core.Name "SCALAR"-_TypeSystemDirectiveLocation_OBJECT = Core.Name "OBJECT"-_TypeSystemDirectiveLocation_FIELD_DEFINITION = Core.Name "FIELD_DEFINITION"-_TypeSystemDirectiveLocation_ARGUMENT_DEFINITION = Core.Name "ARGUMENT_DEFINITION"-_TypeSystemDirectiveLocation_INTERFACE = Core.Name "INTERFACE"-_TypeSystemDirectiveLocation_UNION = Core.Name "UNION"-_TypeSystemDirectiveLocation_ENUM = Core.Name "ENUM"-_TypeSystemDirectiveLocation_ENUM_VALUE = Core.Name "ENUM_VALUE"-_TypeSystemDirectiveLocation_INPUT_OBJECT = Core.Name "INPUT_OBJECT"-_TypeSystemDirectiveLocation_INPUT_FIELD_DEFINITION = Core.Name "INPUT_FIELD_DEFINITION"++-- | A GraphQL model. Based on the (extended) BNF at:+-- | https://spec.graphql.org/draft/#sec-Appendix-Grammar-Summary++module Hydra.Graphql.Syntax where++import qualified Hydra.Core as Core+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci++-- | A GraphQL field alias, immediately followed by a colon.+data Alias =+ AliasName Name |+ AliasColon+ deriving (Eq, Ord, Read, Show)++_Alias = Core.Name "hydra.graphql.syntax.Alias"++_Alias_Name = Core.Name "Name"++_Alias_Colon = Core.Name "Colon"++-- | A single GraphQL argument, consisting of a name and a value.+data Argument =+ Argument {+ argumentName :: Name,+ argumentValue :: Value}+ deriving (Eq, Ord, Read, Show)++_Argument = Core.Name "hydra.graphql.syntax.Argument"++_Argument_Name = Core.Name "Name"++_Argument_Value = Core.Name "Value"++-- | A parenthesized list of GraphQL arguments.+newtype Arguments =+ Arguments {+ unArguments :: [Argument]}+ deriving (Eq, Ord, Read, Show)++_Arguments = Core.Name "hydra.graphql.syntax.Arguments"++-- | A parenthesized list of GraphQL input value definitions for a field's arguments.+newtype ArgumentsDefinition =+ ArgumentsDefinition {+ unArgumentsDefinition :: [InputValueDefinition]}+ deriving (Eq, Ord, Read, Show)++_ArgumentsDefinition = Core.Name "hydra.graphql.syntax.ArgumentsDefinition"++-- | A GraphQL boolean literal, either true or false.+data BooleanValue =+ BooleanValueTrue |+ BooleanValueFalse+ deriving (Eq, Ord, Read, Show)++_BooleanValue = Core.Name "hydra.graphql.syntax.BooleanValue"++_BooleanValue_True = Core.Name "True"++_BooleanValue_False = Core.Name "False"++-- | A default value for a GraphQL variable or input field, introduced by an equals sign.+newtype DefaultValue =+ DefaultValue {+ unDefaultValue :: Value}+ deriving (Eq, Ord, Read, Show)++_DefaultValue = Core.Name "hydra.graphql.syntax.DefaultValue"++-- | A top-level GraphQL definition, either executable or part of the type system.+data Definition =+ DefinitionExecutable ExecutableDefinition |+ DefinitionTypeSystem TypeSystemDefinitionOrExtension+ deriving (Eq, Ord, Read, Show)++_Definition = Core.Name "hydra.graphql.syntax.Definition"++_Definition_executable = Core.Name "executable"++_Definition_typeSystem = Core.Name "typeSystem"++-- | An optional string description preceding a GraphQL type system definition.+newtype Description =+ Description {+ unDescription :: StringValue}+ deriving (Eq, Ord, Read, Show)++_Description = Core.Name "hydra.graphql.syntax.Description"++-- | A single GraphQL directive, consisting of a name and optional arguments.+data Directive =+ Directive {+ directiveName :: Name,+ directiveArguments :: (Maybe Arguments)}+ deriving (Eq, Ord, Read, Show)++_Directive = Core.Name "hydra.graphql.syntax.Directive"++_Directive_Name = Core.Name "Name"++_Directive_Arguments = Core.Name "Arguments"++-- | A GraphQL directive definition, giving its name, arguments, repeatability, and locations.+data DirectiveDefinition =+ DirectiveDefinition {+ directiveDefinitionDescription :: (Maybe Description),+ directiveDefinitionName :: Name,+ directiveDefinitionArgumentsDefinition :: (Maybe ArgumentsDefinition),+ directiveDefinitionRepeatable :: (Maybe ()),+ directiveDefinitionDirectiveLocations :: DirectiveLocations}+ deriving (Eq, Ord, Read, Show)++_DirectiveDefinition = Core.Name "hydra.graphql.syntax.DirectiveDefinition"++_DirectiveDefinition_Description = Core.Name "Description"++_DirectiveDefinition_Name = Core.Name "Name"++_DirectiveDefinition_ArgumentsDefinition = Core.Name "ArgumentsDefinition"++_DirectiveDefinition_Repeatable = Core.Name "Repeatable"++_DirectiveDefinition_DirectiveLocations = Core.Name "DirectiveLocations"++-- | A location at which a GraphQL directive may be applied, either executable or type-system.+data DirectiveLocation =+ DirectiveLocationExecutable ExecutableDirectiveLocation |+ DirectiveLocationTypeSystem TypeSystemDirectiveLocation+ deriving (Eq, Ord, Read, Show)++_DirectiveLocation = Core.Name "hydra.graphql.syntax.DirectiveLocation"++_DirectiveLocation_executable = Core.Name "executable"++_DirectiveLocation_typeSystem = Core.Name "typeSystem"++-- | A pipe-separated list of GraphQL directive locations.+data DirectiveLocations =+ DirectiveLocationsSeq DirectiveLocationsSequence |+ DirectiveLocationsSeq2 DirectiveLocationsSequence2+ deriving (Eq, Ord, Read, Show)++_DirectiveLocations = Core.Name "hydra.graphql.syntax.DirectiveLocations"++_DirectiveLocations_seq = Core.Name "seq"++_DirectiveLocations_seq2 = Core.Name "seq2"++-- | A non-empty DirectiveLocations sequence with a leading list of locations.+data DirectiveLocationsSequence =+ DirectiveLocationsSequence {+ directiveLocationsSequenceDirectiveLocations :: DirectiveLocations,+ directiveLocationsSequenceDirectiveLocation :: DirectiveLocation}+ deriving (Eq, Ord, Read, Show)++_DirectiveLocationsSequence = Core.Name "hydra.graphql.syntax.DirectiveLocationsSequence"++_DirectiveLocationsSequence_DirectiveLocations = Core.Name "DirectiveLocations"++_DirectiveLocationsSequence_DirectiveLocation = Core.Name "DirectiveLocation"++-- | The base case of a DirectiveLocations sequence: a single, optionally pipe-prefixed location.+data DirectiveLocationsSequence2 =+ DirectiveLocationsSequence2 {+ directiveLocationsSequence2Or :: (Maybe ()),+ directiveLocationsSequence2DirectiveLocation :: DirectiveLocation}+ deriving (Eq, Ord, Read, Show)++_DirectiveLocationsSequence2 = Core.Name "hydra.graphql.syntax.DirectiveLocationsSequence2"++_DirectiveLocationsSequence2_Or = Core.Name "Or"++_DirectiveLocationsSequence2_DirectiveLocation = Core.Name "DirectiveLocation"++-- | A list of GraphQL directives applied to a definition or selection.+newtype Directives =+ Directives {+ unDirectives :: [Directive]}+ deriving (Eq, Ord, Read, Show)++_Directives = Core.Name "hydra.graphql.syntax.Directives"++-- | A GraphQL document, consisting of a list of definitions.+newtype Document =+ Document {+ unDocument :: [Definition]}+ deriving (Eq, Ord, Read, Show)++_Document = Core.Name "hydra.graphql.syntax.Document"++-- | A GraphQL enum type definition, giving its name, directives, and enum values.+data EnumTypeDefinition =+ EnumTypeDefinition {+ enumTypeDefinitionDescription :: (Maybe Description),+ enumTypeDefinitionName :: Name,+ enumTypeDefinitionDirectives :: (Maybe Directives),+ enumTypeDefinitionEnumValuesDefinition :: (Maybe EnumValuesDefinition)}+ deriving (Eq, Ord, Read, Show)++_EnumTypeDefinition = Core.Name "hydra.graphql.syntax.EnumTypeDefinition"++_EnumTypeDefinition_Description = Core.Name "Description"++_EnumTypeDefinition_Name = Core.Name "Name"++_EnumTypeDefinition_Directives = Core.Name "Directives"++_EnumTypeDefinition_EnumValuesDefinition = Core.Name "EnumValuesDefinition"++-- | An extension of a GraphQL enum type, either adding enum values or only directives.+data EnumTypeExtension =+ EnumTypeExtensionSeq EnumTypeExtensionSequence |+ EnumTypeExtensionSeq2 EnumTypeExtensionSequence2+ deriving (Eq, Ord, Read, Show)++_EnumTypeExtension = Core.Name "hydra.graphql.syntax.EnumTypeExtension"++_EnumTypeExtension_seq = Core.Name "seq"++_EnumTypeExtension_seq2 = Core.Name "seq2"++-- | An enum type extension that adds new enum values, with optional directives.+data EnumTypeExtensionSequence =+ EnumTypeExtensionSequence {+ enumTypeExtensionSequenceName :: Name,+ enumTypeExtensionSequenceDirectives :: (Maybe Directives),+ enumTypeExtensionSequenceEnumValuesDefinition :: EnumValuesDefinition}+ deriving (Eq, Ord, Read, Show)++_EnumTypeExtensionSequence = Core.Name "hydra.graphql.syntax.EnumTypeExtensionSequence"++_EnumTypeExtensionSequence_Name = Core.Name "Name"++_EnumTypeExtensionSequence_Directives = Core.Name "Directives"++_EnumTypeExtensionSequence_EnumValuesDefinition = Core.Name "EnumValuesDefinition"++-- | An enum type extension consisting of directives only, with no new enum values.+data EnumTypeExtensionSequence2 =+ EnumTypeExtensionSequence2 {+ enumTypeExtensionSequence2Name :: Name,+ enumTypeExtensionSequence2Directives :: Directives}+ deriving (Eq, Ord, Read, Show)++_EnumTypeExtensionSequence2 = Core.Name "hydra.graphql.syntax.EnumTypeExtensionSequence2"++_EnumTypeExtensionSequence2_Name = Core.Name "Name"++_EnumTypeExtensionSequence2_Directives = Core.Name "Directives"++-- | A GraphQL enum value, represented as a name (excluding true, false, and null).+newtype EnumValue =+ EnumValue {+ unEnumValue :: Name}+ deriving (Eq, Ord, Read, Show)++_EnumValue = Core.Name "hydra.graphql.syntax.EnumValue"++-- | A single value definition within a GraphQL enum type, with optional description and directives.+data EnumValueDefinition =+ EnumValueDefinition {+ enumValueDefinitionDescription :: (Maybe Description),+ enumValueDefinitionEnumValue :: EnumValue,+ enumValueDefinitionDirectives :: (Maybe Directives)}+ deriving (Eq, Ord, Read, Show)++_EnumValueDefinition = Core.Name "hydra.graphql.syntax.EnumValueDefinition"++_EnumValueDefinition_Description = Core.Name "Description"++_EnumValueDefinition_EnumValue = Core.Name "EnumValue"++_EnumValueDefinition_Directives = Core.Name "Directives"++-- | The braced list of enum value definitions in a GraphQL enum type.+newtype EnumValuesDefinition =+ EnumValuesDefinition {+ unEnumValuesDefinition :: [EnumValueDefinition]}+ deriving (Eq, Ord, Read, Show)++_EnumValuesDefinition = Core.Name "hydra.graphql.syntax.EnumValuesDefinition"++-- | A GraphQL executable definition, either an operation or a fragment definition.+data ExecutableDefinition =+ ExecutableDefinitionOperation OperationDefinition |+ ExecutableDefinitionFragment FragmentDefinition+ deriving (Eq, Ord, Read, Show)++_ExecutableDefinition = Core.Name "hydra.graphql.syntax.ExecutableDefinition"++_ExecutableDefinition_operation = Core.Name "operation"++_ExecutableDefinition_fragment = Core.Name "fragment"++-- | A directive location valid on GraphQL executable definitions (queries, fields, fragments, etc.).+data ExecutableDirectiveLocation =+ ExecutableDirectiveLocationQUERY |+ ExecutableDirectiveLocationMUTATION |+ ExecutableDirectiveLocationSUBSCRIPTION |+ ExecutableDirectiveLocationFIELD |+ ExecutableDirectiveLocationFRAGMENT_DEFINITION |+ ExecutableDirectiveLocationFRAGMENT_SPREAD |+ ExecutableDirectiveLocationINLINE_FRAGMENT |+ ExecutableDirectiveLocationVARIABLE_DEFINITION+ deriving (Eq, Ord, Read, Show)++_ExecutableDirectiveLocation = Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"++_ExecutableDirectiveLocation_QUERY = Core.Name "QUERY"++_ExecutableDirectiveLocation_MUTATION = Core.Name "MUTATION"++_ExecutableDirectiveLocation_SUBSCRIPTION = Core.Name "SUBSCRIPTION"++_ExecutableDirectiveLocation_FIELD = Core.Name "FIELD"++_ExecutableDirectiveLocation_FRAGMENT_DEFINITION = Core.Name "FRAGMENT_DEFINITION"++_ExecutableDirectiveLocation_FRAGMENT_SPREAD = Core.Name "FRAGMENT_SPREAD"++_ExecutableDirectiveLocation_INLINE_FRAGMENT = Core.Name "INLINE_FRAGMENT"++_ExecutableDirectiveLocation_VARIABLE_DEFINITION = Core.Name "VARIABLE_DEFINITION"++-- | A GraphQL document consisting only of executable definitions.+newtype ExecutableDocument =+ ExecutableDocument {+ unExecutableDocument :: [ExecutableDefinition]}+ deriving (Eq, Ord, Read, Show)++_ExecutableDocument = Core.Name "hydra.graphql.syntax.ExecutableDocument"++-- | A GraphQL field selection, with optional alias, arguments, directives, and sub-selection set.+data Field =+ Field {+ fieldAlias :: (Maybe Alias),+ fieldName :: Name,+ fieldArguments :: (Maybe Arguments),+ fieldDirectives :: (Maybe Directives),+ fieldSelectionSet :: (Maybe SelectionSet)}+ deriving (Eq, Ord, Read, Show)++_Field = Core.Name "hydra.graphql.syntax.Field"++_Field_Alias = Core.Name "Alias"++_Field_Name = Core.Name "Name"++_Field_Arguments = Core.Name "Arguments"++_Field_Directives = Core.Name "Directives"++_Field_SelectionSet = Core.Name "SelectionSet"++-- | A field definition within a GraphQL object or interface type.+data FieldDefinition =+ FieldDefinition {+ fieldDefinitionDescription :: (Maybe Description),+ fieldDefinitionName :: Name,+ fieldDefinitionArgumentsDefinition :: (Maybe ArgumentsDefinition),+ fieldDefinitionType :: Type,+ fieldDefinitionDirectives :: (Maybe Directives)}+ deriving (Eq, Ord, Read, Show)++_FieldDefinition = Core.Name "hydra.graphql.syntax.FieldDefinition"++_FieldDefinition_Description = Core.Name "Description"++_FieldDefinition_Name = Core.Name "Name"++_FieldDefinition_ArgumentsDefinition = Core.Name "ArgumentsDefinition"++_FieldDefinition_Type = Core.Name "Type"++_FieldDefinition_Directives = Core.Name "Directives"++-- | The braced list of field definitions in a GraphQL object or interface type.+newtype FieldsDefinition =+ FieldsDefinition {+ unFieldsDefinition :: [FieldDefinition]}+ deriving (Eq, Ord, Read, Show)++_FieldsDefinition = Core.Name "hydra.graphql.syntax.FieldsDefinition"++-- | A GraphQL floating-point literal.+newtype FloatValue =+ FloatValue {+ unFloatValue :: String}+ deriving (Eq, Ord, Read, Show)++_FloatValue = Core.Name "hydra.graphql.syntax.FloatValue"++-- | A GraphQL fragment definition, naming a type condition and a selection set.+data FragmentDefinition =+ FragmentDefinition {+ fragmentDefinitionFragmentName :: FragmentName,+ fragmentDefinitionTypeCondition :: TypeCondition,+ fragmentDefinitionDirectives :: (Maybe Directives),+ fragmentDefinitionSelectionSet :: SelectionSet}+ deriving (Eq, Ord, Read, Show)++_FragmentDefinition = Core.Name "hydra.graphql.syntax.FragmentDefinition"++_FragmentDefinition_FragmentName = Core.Name "FragmentName"++_FragmentDefinition_TypeCondition = Core.Name "TypeCondition"++_FragmentDefinition_Directives = Core.Name "Directives"++_FragmentDefinition_SelectionSet = Core.Name "SelectionSet"++-- | The name of a GraphQL fragment (any name other than "on").+newtype FragmentName =+ FragmentName {+ unFragmentName :: Name}+ deriving (Eq, Ord, Read, Show)++_FragmentName = Core.Name "hydra.graphql.syntax.FragmentName"++-- | A GraphQL fragment spread, referencing a named fragment with optional directives.+data FragmentSpread =+ FragmentSpread {+ fragmentSpreadFragmentName :: FragmentName,+ fragmentSpreadDirectives :: (Maybe Directives)}+ deriving (Eq, Ord, Read, Show)++_FragmentSpread = Core.Name "hydra.graphql.syntax.FragmentSpread"++_FragmentSpread_FragmentName = Core.Name "FragmentName"++_FragmentSpread_Directives = Core.Name "Directives"++-- | A clause declaring the interfaces implemented by a GraphQL object or interface type.+data ImplementsInterfaces =+ ImplementsInterfacesSeq ImplementsInterfacesSequence |+ ImplementsInterfacesSeq2 ImplementsInterfacesSequence2+ deriving (Eq, Ord, Read, Show)++_ImplementsInterfaces = Core.Name "hydra.graphql.syntax.ImplementsInterfaces"++_ImplementsInterfaces_seq = Core.Name "seq"++_ImplementsInterfaces_seq2 = Core.Name "seq2"++-- | A non-empty ImplementsInterfaces list with a leading list of interfaces.+data ImplementsInterfacesSequence =+ ImplementsInterfacesSequence {+ implementsInterfacesSequenceImplementsInterfaces :: ImplementsInterfaces,+ implementsInterfacesSequenceNamedType :: NamedType}+ deriving (Eq, Ord, Read, Show)++_ImplementsInterfacesSequence = Core.Name "hydra.graphql.syntax.ImplementsInterfacesSequence"++_ImplementsInterfacesSequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++_ImplementsInterfacesSequence_NamedType = Core.Name "NamedType"++-- | The base case of an ImplementsInterfaces list: a single, optionally ampersand-prefixed interface.+data ImplementsInterfacesSequence2 =+ ImplementsInterfacesSequence2 {+ implementsInterfacesSequence2Amp :: (Maybe ()),+ implementsInterfacesSequence2NamedType :: NamedType}+ deriving (Eq, Ord, Read, Show)++_ImplementsInterfacesSequence2 = Core.Name "hydra.graphql.syntax.ImplementsInterfacesSequence2"++_ImplementsInterfacesSequence2_Amp = Core.Name "Amp"++_ImplementsInterfacesSequence2_NamedType = Core.Name "NamedType"++-- | A GraphQL inline fragment, with optional type condition, directives, and a selection set.+data InlineFragment =+ InlineFragment {+ inlineFragmentTypeCondition :: (Maybe TypeCondition),+ inlineFragmentDirectives :: (Maybe Directives),+ inlineFragmentSelectionSet :: SelectionSet}+ deriving (Eq, Ord, Read, Show)++_InlineFragment = Core.Name "hydra.graphql.syntax.InlineFragment"++_InlineFragment_TypeCondition = Core.Name "TypeCondition"++_InlineFragment_Directives = Core.Name "Directives"++_InlineFragment_SelectionSet = Core.Name "SelectionSet"++-- | The braced list of input field definitions in a GraphQL input object type.+newtype InputFieldsDefinition =+ InputFieldsDefinition {+ unInputFieldsDefinition :: [InputValueDefinition]}+ deriving (Eq, Ord, Read, Show)++_InputFieldsDefinition = Core.Name "hydra.graphql.syntax.InputFieldsDefinition"++-- | A GraphQL input object type definition, either with or without input fields.+data InputObjectTypeDefinition =+ InputObjectTypeDefinitionSeq InputObjectTypeDefinitionSequence |+ InputObjectTypeDefinitionSeq2 InputObjectTypeDefinitionSequence2+ deriving (Eq, Ord, Read, Show)++_InputObjectTypeDefinition = Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition"++_InputObjectTypeDefinition_seq = Core.Name "seq"++_InputObjectTypeDefinition_seq2 = Core.Name "seq2"++-- | An input object type definition that includes an input fields definition.+data InputObjectTypeDefinitionSequence =+ InputObjectTypeDefinitionSequence {+ inputObjectTypeDefinitionSequenceDescription :: (Maybe Description),+ inputObjectTypeDefinitionSequenceName :: Name,+ inputObjectTypeDefinitionSequenceDirectives :: (Maybe Directives),+ inputObjectTypeDefinitionSequenceInputFieldsDefinition :: InputFieldsDefinition}+ deriving (Eq, Ord, Read, Show)++_InputObjectTypeDefinitionSequence = Core.Name "hydra.graphql.syntax.InputObjectTypeDefinitionSequence"++_InputObjectTypeDefinitionSequence_Description = Core.Name "Description"++_InputObjectTypeDefinitionSequence_Name = Core.Name "Name"++_InputObjectTypeDefinitionSequence_Directives = Core.Name "Directives"++_InputObjectTypeDefinitionSequence_InputFieldsDefinition = Core.Name "InputFieldsDefinition"++-- | An input object type definition with no input fields definition.+data InputObjectTypeDefinitionSequence2 =+ InputObjectTypeDefinitionSequence2 {+ inputObjectTypeDefinitionSequence2Description :: (Maybe Description),+ inputObjectTypeDefinitionSequence2Name :: Name,+ inputObjectTypeDefinitionSequence2Directives :: (Maybe Directives)}+ deriving (Eq, Ord, Read, Show)++_InputObjectTypeDefinitionSequence2 = Core.Name "hydra.graphql.syntax.InputObjectTypeDefinitionSequence2"++_InputObjectTypeDefinitionSequence2_Description = Core.Name "Description"++_InputObjectTypeDefinitionSequence2_Name = Core.Name "Name"++_InputObjectTypeDefinitionSequence2_Directives = Core.Name "Directives"++-- | An extension of a GraphQL input object type, either with or without input fields.+data InputObjectTypeExtension =+ InputObjectTypeExtensionSeq InputObjectTypeExtensionSequence |+ InputObjectTypeExtensionSeq2 InputObjectTypeExtensionSequence2+ deriving (Eq, Ord, Read, Show)++_InputObjectTypeExtension = Core.Name "hydra.graphql.syntax.InputObjectTypeExtension"++_InputObjectTypeExtension_seq = Core.Name "seq"++_InputObjectTypeExtension_seq2 = Core.Name "seq2"++-- | An input object type extension that adds an input fields definition.+data InputObjectTypeExtensionSequence =+ InputObjectTypeExtensionSequence {+ inputObjectTypeExtensionSequenceName :: Name,+ inputObjectTypeExtensionSequenceDirectives :: (Maybe Directives),+ inputObjectTypeExtensionSequenceInputFieldsDefinition :: InputFieldsDefinition}+ deriving (Eq, Ord, Read, Show)++_InputObjectTypeExtensionSequence = Core.Name "hydra.graphql.syntax.InputObjectTypeExtensionSequence"++_InputObjectTypeExtensionSequence_Name = Core.Name "Name"++_InputObjectTypeExtensionSequence_Directives = Core.Name "Directives"++_InputObjectTypeExtensionSequence_InputFieldsDefinition = Core.Name "InputFieldsDefinition"++-- | An input object type extension consisting of directives only.+data InputObjectTypeExtensionSequence2 =+ InputObjectTypeExtensionSequence2 {+ inputObjectTypeExtensionSequence2Name :: Name,+ inputObjectTypeExtensionSequence2Directives :: Directives}+ deriving (Eq, Ord, Read, Show)++_InputObjectTypeExtensionSequence2 = Core.Name "hydra.graphql.syntax.InputObjectTypeExtensionSequence2"++_InputObjectTypeExtensionSequence2_Name = Core.Name "Name"++_InputObjectTypeExtensionSequence2_Directives = Core.Name "Directives"++-- | A single input value definition, used for field arguments and input object fields.+data InputValueDefinition =+ InputValueDefinition {+ inputValueDefinitionDescription :: (Maybe Description),+ inputValueDefinitionName :: Name,+ inputValueDefinitionType :: Type,+ inputValueDefinitionDefaultValue :: (Maybe DefaultValue),+ inputValueDefinitionDirectives :: (Maybe Directives)}+ deriving (Eq, Ord, Read, Show)++_InputValueDefinition = Core.Name "hydra.graphql.syntax.InputValueDefinition"++_InputValueDefinition_Description = Core.Name "Description"++_InputValueDefinition_Name = Core.Name "Name"++_InputValueDefinition_Type = Core.Name "Type"++_InputValueDefinition_DefaultValue = Core.Name "DefaultValue"++_InputValueDefinition_Directives = Core.Name "Directives"++-- | A GraphQL integer literal.+newtype IntValue =+ IntValue {+ unIntValue :: String}+ deriving (Eq, Ord, Read, Show)++_IntValue = Core.Name "hydra.graphql.syntax.IntValue"++-- | A GraphQL interface type definition, either with or without a fields definition.+data InterfaceTypeDefinition =+ InterfaceTypeDefinitionSeq InterfaceTypeDefinitionSequence |+ InterfaceTypeDefinitionSeq2 InterfaceTypeDefinitionSequence2+ deriving (Eq, Ord, Read, Show)++_InterfaceTypeDefinition = Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition"++_InterfaceTypeDefinition_seq = Core.Name "seq"++_InterfaceTypeDefinition_seq2 = Core.Name "seq2"++-- | An interface type definition that includes a fields definition.+data InterfaceTypeDefinitionSequence =+ InterfaceTypeDefinitionSequence {+ interfaceTypeDefinitionSequenceDescription :: (Maybe Description),+ interfaceTypeDefinitionSequenceName :: Name,+ interfaceTypeDefinitionSequenceImplementsInterfaces :: (Maybe ImplementsInterfaces),+ interfaceTypeDefinitionSequenceDirectives :: (Maybe Directives),+ interfaceTypeDefinitionSequenceFieldsDefinition :: FieldsDefinition}+ deriving (Eq, Ord, Read, Show)++_InterfaceTypeDefinitionSequence = Core.Name "hydra.graphql.syntax.InterfaceTypeDefinitionSequence"++_InterfaceTypeDefinitionSequence_Description = Core.Name "Description"++_InterfaceTypeDefinitionSequence_Name = Core.Name "Name"++_InterfaceTypeDefinitionSequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++_InterfaceTypeDefinitionSequence_Directives = Core.Name "Directives"++_InterfaceTypeDefinitionSequence_FieldsDefinition = Core.Name "FieldsDefinition"++-- | An interface type definition with no fields definition.+data InterfaceTypeDefinitionSequence2 =+ InterfaceTypeDefinitionSequence2 {+ interfaceTypeDefinitionSequence2Description :: (Maybe Description),+ interfaceTypeDefinitionSequence2Name :: Name,+ interfaceTypeDefinitionSequence2ImplementsInterfaces :: ImplementsInterfaces,+ interfaceTypeDefinitionSequence2Directives :: (Maybe Directives)}+ deriving (Eq, Ord, Read, Show)++_InterfaceTypeDefinitionSequence2 = Core.Name "hydra.graphql.syntax.InterfaceTypeDefinitionSequence2"++_InterfaceTypeDefinitionSequence2_Description = Core.Name "Description"++_InterfaceTypeDefinitionSequence2_Name = Core.Name "Name"++_InterfaceTypeDefinitionSequence2_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++_InterfaceTypeDefinitionSequence2_Directives = Core.Name "Directives"++-- | An extension of a GraphQL interface type, in one of three forms.+data InterfaceTypeExtension =+ InterfaceTypeExtensionSeq InterfaceTypeExtensionSequence |+ InterfaceTypeExtensionSeq2 InterfaceTypeExtensionSequence2 |+ InterfaceTypeExtensionSeq3 InterfaceTypeExtensionSequence3+ deriving (Eq, Ord, Read, Show)++_InterfaceTypeExtension = Core.Name "hydra.graphql.syntax.InterfaceTypeExtension"++_InterfaceTypeExtension_seq = Core.Name "seq"++_InterfaceTypeExtension_seq2 = Core.Name "seq2"++_InterfaceTypeExtension_seq3 = Core.Name "seq3"++-- | An interface type extension that adds a fields definition.+data InterfaceTypeExtensionSequence =+ InterfaceTypeExtensionSequence {+ interfaceTypeExtensionSequenceName :: Name,+ interfaceTypeExtensionSequenceImplementsInterfaces :: (Maybe ImplementsInterfaces),+ interfaceTypeExtensionSequenceDirectives :: (Maybe Directives),+ interfaceTypeExtensionSequenceFieldsDefinition :: FieldsDefinition}+ deriving (Eq, Ord, Read, Show)++_InterfaceTypeExtensionSequence = Core.Name "hydra.graphql.syntax.InterfaceTypeExtensionSequence"++_InterfaceTypeExtensionSequence_Name = Core.Name "Name"++_InterfaceTypeExtensionSequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++_InterfaceTypeExtensionSequence_Directives = Core.Name "Directives"++_InterfaceTypeExtensionSequence_FieldsDefinition = Core.Name "FieldsDefinition"++-- | An interface type extension that adds directives but no fields definition.+data InterfaceTypeExtensionSequence2 =+ InterfaceTypeExtensionSequence2 {+ interfaceTypeExtensionSequence2Name :: Name,+ interfaceTypeExtensionSequence2ImplementsInterfaces :: (Maybe ImplementsInterfaces),+ interfaceTypeExtensionSequence2Directives :: Directives}+ deriving (Eq, Ord, Read, Show)++_InterfaceTypeExtensionSequence2 = Core.Name "hydra.graphql.syntax.InterfaceTypeExtensionSequence2"++_InterfaceTypeExtensionSequence2_Name = Core.Name "Name"++_InterfaceTypeExtensionSequence2_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++_InterfaceTypeExtensionSequence2_Directives = Core.Name "Directives"++-- | An interface type extension that adds only implemented interfaces.+data InterfaceTypeExtensionSequence3 =+ InterfaceTypeExtensionSequence3 {+ interfaceTypeExtensionSequence3Name :: Name,+ interfaceTypeExtensionSequence3ImplementsInterfaces :: ImplementsInterfaces}+ deriving (Eq, Ord, Read, Show)++_InterfaceTypeExtensionSequence3 = Core.Name "hydra.graphql.syntax.InterfaceTypeExtensionSequence3"++_InterfaceTypeExtensionSequence3_Name = Core.Name "Name"++_InterfaceTypeExtensionSequence3_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++-- | A GraphQL list type, wrapping an inner type in square brackets.+newtype ListType =+ ListType {+ unListType :: Type}+ deriving (Eq, Ord, Read, Show)++_ListType = Core.Name "hydra.graphql.syntax.ListType"++-- | A GraphQL list literal, either empty or containing a sequence of values.+data ListValue =+ ListValueSeq ListValueSequence |+ ListValueSequence2 [Value]+ deriving (Eq, Ord, Read, Show)++_ListValue = Core.Name "hydra.graphql.syntax.ListValue"++_ListValue_seq = Core.Name "seq"++_ListValue_sequence2 = Core.Name "sequence2"++-- | The empty-list form of a GraphQL ListValue.+type ListValueSequence = ()++_ListValueSequence = Core.Name "hydra.graphql.syntax.ListValueSequence"++-- | A GraphQL name: an identifier matching [_A-Za-z][_0-9A-Za-z]*.+newtype Name =+ Name {+ unName :: String}+ deriving (Eq, Ord, Read, Show)++_Name = Core.Name "hydra.graphql.syntax.Name"++-- | A GraphQL named type, referencing a type by its name.+newtype NamedType =+ NamedType {+ unNamedType :: Name}+ deriving (Eq, Ord, Read, Show)++_NamedType = Core.Name "hydra.graphql.syntax.NamedType"++-- | A GraphQL non-null type, wrapping a named or list type with a trailing exclamation mark.+data NonNullType =+ NonNullTypeNamed NamedType |+ NonNullTypeList ListType+ deriving (Eq, Ord, Read, Show)++_NonNullType = Core.Name "hydra.graphql.syntax.NonNullType"++_NonNullType_named = Core.Name "named"++_NonNullType_list = Core.Name "list"++-- | The GraphQL null literal.+newtype NullValue =+ NullValue {+ unNullValue :: ()}+ deriving (Eq, Ord, Read, Show)++_NullValue = Core.Name "hydra.graphql.syntax.NullValue"++-- | A single field of a GraphQL object literal, consisting of a name and a value.+data ObjectField =+ ObjectField {+ objectFieldName :: Name,+ objectFieldValue :: Value}+ deriving (Eq, Ord, Read, Show)++_ObjectField = Core.Name "hydra.graphql.syntax.ObjectField"++_ObjectField_Name = Core.Name "Name"++_ObjectField_Value = Core.Name "Value"++-- | A GraphQL object type definition, giving its name, interfaces, directives, and fields.+data ObjectTypeDefinition =+ ObjectTypeDefinition {+ objectTypeDefinitionDescription :: (Maybe Description),+ objectTypeDefinitionName :: Name,+ objectTypeDefinitionImplementsInterfaces :: (Maybe ImplementsInterfaces),+ objectTypeDefinitionDirectives :: (Maybe Directives),+ objectTypeDefinitionFieldsDefinition :: (Maybe FieldsDefinition)}+ deriving (Eq, Ord, Read, Show)++_ObjectTypeDefinition = Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"++_ObjectTypeDefinition_Description = Core.Name "Description"++_ObjectTypeDefinition_Name = Core.Name "Name"++_ObjectTypeDefinition_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++_ObjectTypeDefinition_Directives = Core.Name "Directives"++_ObjectTypeDefinition_FieldsDefinition = Core.Name "FieldsDefinition"++-- | An extension of a GraphQL object type, in one of three forms.+data ObjectTypeExtension =+ ObjectTypeExtensionSeq ObjectTypeExtensionSequence |+ ObjectTypeExtensionSeq2 ObjectTypeExtensionSequence2 |+ ObjectTypeExtensionSeq3 ObjectTypeExtensionSequence3+ deriving (Eq, Ord, Read, Show)++_ObjectTypeExtension = Core.Name "hydra.graphql.syntax.ObjectTypeExtension"++_ObjectTypeExtension_seq = Core.Name "seq"++_ObjectTypeExtension_seq2 = Core.Name "seq2"++_ObjectTypeExtension_seq3 = Core.Name "seq3"++-- | An object type extension that adds a fields definition.+data ObjectTypeExtensionSequence =+ ObjectTypeExtensionSequence {+ objectTypeExtensionSequenceName :: Name,+ objectTypeExtensionSequenceImplementsInterfaces :: (Maybe ImplementsInterfaces),+ objectTypeExtensionSequenceDirectives :: (Maybe Directives),+ objectTypeExtensionSequenceFieldsDefinition :: FieldsDefinition}+ deriving (Eq, Ord, Read, Show)++_ObjectTypeExtensionSequence = Core.Name "hydra.graphql.syntax.ObjectTypeExtensionSequence"++_ObjectTypeExtensionSequence_Name = Core.Name "Name"++_ObjectTypeExtensionSequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++_ObjectTypeExtensionSequence_Directives = Core.Name "Directives"++_ObjectTypeExtensionSequence_FieldsDefinition = Core.Name "FieldsDefinition"++-- | An object type extension that adds directives but no fields definition.+data ObjectTypeExtensionSequence2 =+ ObjectTypeExtensionSequence2 {+ objectTypeExtensionSequence2Name :: Name,+ objectTypeExtensionSequence2ImplementsInterfaces :: (Maybe ImplementsInterfaces),+ objectTypeExtensionSequence2Directives :: (Maybe Directives)}+ deriving (Eq, Ord, Read, Show)++_ObjectTypeExtensionSequence2 = Core.Name "hydra.graphql.syntax.ObjectTypeExtensionSequence2"++_ObjectTypeExtensionSequence2_Name = Core.Name "Name"++_ObjectTypeExtensionSequence2_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++_ObjectTypeExtensionSequence2_Directives = Core.Name "Directives"++-- | An object type extension that adds only implemented interfaces.+data ObjectTypeExtensionSequence3 =+ ObjectTypeExtensionSequence3 {+ objectTypeExtensionSequence3Name :: Name,+ objectTypeExtensionSequence3ImplementsInterfaces :: ImplementsInterfaces}+ deriving (Eq, Ord, Read, Show)++_ObjectTypeExtensionSequence3 = Core.Name "hydra.graphql.syntax.ObjectTypeExtensionSequence3"++_ObjectTypeExtensionSequence3_Name = Core.Name "Name"++_ObjectTypeExtensionSequence3_ImplementsInterfaces = Core.Name "ImplementsInterfaces"++-- | A GraphQL object literal, either empty or containing a sequence of object fields.+data ObjectValue =+ ObjectValueSeq ObjectValueSequence |+ ObjectValueSequence2 [ObjectField]+ deriving (Eq, Ord, Read, Show)++_ObjectValue = Core.Name "hydra.graphql.syntax.ObjectValue"++_ObjectValue_seq = Core.Name "seq"++_ObjectValue_sequence2 = Core.Name "sequence2"++-- | The empty-object form of a GraphQL ObjectValue.+type ObjectValueSequence = ()++_ObjectValueSequence = Core.Name "hydra.graphql.syntax.ObjectValueSequence"++-- | A GraphQL operation definition, either a shorthand query or an explicit operation.+data OperationDefinition =+ OperationDefinitionSeq OperationDefinitionSequence |+ OperationDefinitionSelectionSet SelectionSet+ deriving (Eq, Ord, Read, Show)++_OperationDefinition = Core.Name "hydra.graphql.syntax.OperationDefinition"++_OperationDefinition_seq = Core.Name "seq"++_OperationDefinition_SelectionSet = Core.Name "SelectionSet"++-- | An explicit GraphQL operation definition with a type, optional name, variables, and directives.+data OperationDefinitionSequence =+ OperationDefinitionSequence {+ operationDefinitionSequenceOperationType :: OperationType,+ operationDefinitionSequenceName :: (Maybe Name),+ operationDefinitionSequenceVariablesDefinition :: (Maybe VariablesDefinition),+ operationDefinitionSequenceDirectives :: (Maybe Directives),+ operationDefinitionSequenceSelectionSet :: SelectionSet}+ deriving (Eq, Ord, Read, Show)++_OperationDefinitionSequence = Core.Name "hydra.graphql.syntax.OperationDefinitionSequence"++_OperationDefinitionSequence_OperationType = Core.Name "OperationType"++_OperationDefinitionSequence_Name = Core.Name "Name"++_OperationDefinitionSequence_VariablesDefinition = Core.Name "VariablesDefinition"++_OperationDefinitionSequence_Directives = Core.Name "Directives"++_OperationDefinitionSequence_SelectionSet = Core.Name "SelectionSet"++-- | The type of a GraphQL operation: query, mutation, or subscription.+data OperationType =+ OperationTypeQuery |+ OperationTypeMutation |+ OperationTypeSubscription+ deriving (Eq, Ord, Read, Show)++_OperationType = Core.Name "hydra.graphql.syntax.OperationType"++_OperationType_Query = Core.Name "Query"++_OperationType_Mutation = Core.Name "Mutation"++_OperationType_Subscription = Core.Name "Subscription"++-- | A mapping from a GraphQL operation type to its root object type.+data RootOperationTypeDefinition =+ RootOperationTypeDefinition {+ rootOperationTypeDefinitionOperationType :: OperationType,+ rootOperationTypeDefinitionNamedType :: NamedType}+ deriving (Eq, Ord, Read, Show)++_RootOperationTypeDefinition = Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"++_RootOperationTypeDefinition_OperationType = Core.Name "OperationType"++_RootOperationTypeDefinition_NamedType = Core.Name "NamedType"++-- | A GraphQL scalar type definition, with optional description and directives.+data ScalarTypeDefinition =+ ScalarTypeDefinition {+ scalarTypeDefinitionDescription :: (Maybe Description),+ scalarTypeDefinitionName :: Name,+ scalarTypeDefinitionDirectives :: (Maybe Directives)}+ deriving (Eq, Ord, Read, Show)++_ScalarTypeDefinition = Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"++_ScalarTypeDefinition_Description = Core.Name "Description"++_ScalarTypeDefinition_Name = Core.Name "Name"++_ScalarTypeDefinition_Directives = Core.Name "Directives"++-- | An extension of a GraphQL scalar type, adding directives.+data ScalarTypeExtension =+ ScalarTypeExtension {+ scalarTypeExtensionName :: Name,+ scalarTypeExtensionDirectives :: Directives}+ deriving (Eq, Ord, Read, Show)++_ScalarTypeExtension = Core.Name "hydra.graphql.syntax.ScalarTypeExtension"++_ScalarTypeExtension_Name = Core.Name "Name"++_ScalarTypeExtension_Directives = Core.Name "Directives"++-- | A GraphQL schema definition, declaring its root operation types.+data SchemaDefinition =+ SchemaDefinition {+ schemaDefinitionDescription :: (Maybe Description),+ schemaDefinitionDirectives :: (Maybe Directives),+ schemaDefinitionRootOperationTypeDefinition :: RootOperationTypeDefinition}+ deriving (Eq, Ord, Read, Show)++_SchemaDefinition = Core.Name "hydra.graphql.syntax.SchemaDefinition"++_SchemaDefinition_Description = Core.Name "Description"++_SchemaDefinition_Directives = Core.Name "Directives"++_SchemaDefinition_RootOperationTypeDefinition = Core.Name "RootOperationTypeDefinition"++-- | An extension of a GraphQL schema, adding root operation types or directives.+data SchemaExtension =+ SchemaExtensionSeq SchemaExtensionSequence |+ SchemaExtensionSequence2 Directives+ deriving (Eq, Ord, Read, Show)++_SchemaExtension = Core.Name "hydra.graphql.syntax.SchemaExtension"++_SchemaExtension_seq = Core.Name "seq"++_SchemaExtension_sequence2 = Core.Name "sequence2"++-- | A schema extension that adds a root operation type definition.+data SchemaExtensionSequence =+ SchemaExtensionSequence {+ schemaExtensionSequenceDirectives :: (Maybe Directives),+ schemaExtensionSequenceRootOperationTypeDefinition :: RootOperationTypeDefinition}+ deriving (Eq, Ord, Read, Show)++_SchemaExtensionSequence = Core.Name "hydra.graphql.syntax.SchemaExtensionSequence"++_SchemaExtensionSequence_Directives = Core.Name "Directives"++_SchemaExtensionSequence_RootOperationTypeDefinition = Core.Name "RootOperationTypeDefinition"++-- | A single selection within a GraphQL selection set: a field, fragment spread, or inline fragment.+data Selection =+ SelectionField Field |+ SelectionFragmentSpread FragmentSpread |+ SelectionInlineFragment InlineFragment+ deriving (Eq, Ord, Read, Show)++_Selection = Core.Name "hydra.graphql.syntax.Selection"++_Selection_Field = Core.Name "Field"++_Selection_FragmentSpread = Core.Name "FragmentSpread"++_Selection_InlineFragment = Core.Name "InlineFragment"++-- | A braced list of GraphQL selections.+newtype SelectionSet =+ SelectionSet {+ unSelectionSet :: [Selection]}+ deriving (Eq, Ord, Read, Show)++_SelectionSet = Core.Name "hydra.graphql.syntax.SelectionSet"++-- | A GraphQL string literal.+newtype StringValue =+ StringValue {+ unStringValue :: String}+ deriving (Eq, Ord, Read, Show)++_StringValue = Core.Name "hydra.graphql.syntax.StringValue"++-- | A GraphQL type reference: named, list, or non-null.+data Type =+ TypeNamed NamedType |+ TypeList ListType |+ TypeNonNull NonNullType+ deriving (Eq, Ord, Read, Show)++_Type = Core.Name "hydra.graphql.syntax.Type"++_Type_named = Core.Name "named"++_Type_list = Core.Name "list"++_Type_nonNull = Core.Name "nonNull"++-- | A GraphQL type condition, naming the type a fragment applies to.+data TypeCondition =+ TypeConditionOn |+ TypeConditionNamedType NamedType+ deriving (Eq, Ord, Read, Show)++_TypeCondition = Core.Name "hydra.graphql.syntax.TypeCondition"++_TypeCondition_On = Core.Name "On"++_TypeCondition_NamedType = Core.Name "NamedType"++-- | A GraphQL type system definition for a single named type.+data TypeDefinition =+ TypeDefinitionScalar ScalarTypeDefinition |+ TypeDefinitionObject ObjectTypeDefinition |+ TypeDefinitionInterface InterfaceTypeDefinition |+ TypeDefinitionUnion UnionTypeDefinition |+ TypeDefinitionEnum EnumTypeDefinition |+ TypeDefinitionInputObject InputObjectTypeDefinition+ deriving (Eq, Ord, Read, Show)++_TypeDefinition = Core.Name "hydra.graphql.syntax.TypeDefinition"++_TypeDefinition_scalar = Core.Name "scalar"++_TypeDefinition_object = Core.Name "object"++_TypeDefinition_interface = Core.Name "interface"++_TypeDefinition_union = Core.Name "union"++_TypeDefinition_enum = Core.Name "enum"++_TypeDefinition_inputObject = Core.Name "inputObject"++-- | An extension of a GraphQL named type.+data TypeExtension =+ TypeExtensionScalar ScalarTypeExtension |+ TypeExtensionObject ObjectTypeExtension |+ TypeExtensionInterface InterfaceTypeExtension |+ TypeExtensionUnion UnionTypeExtension |+ TypeExtensionEnum EnumTypeExtension |+ TypeExtensionInputObject InputObjectTypeExtension+ deriving (Eq, Ord, Read, Show)++_TypeExtension = Core.Name "hydra.graphql.syntax.TypeExtension"++_TypeExtension_scalar = Core.Name "scalar"++_TypeExtension_object = Core.Name "object"++_TypeExtension_interface = Core.Name "interface"++_TypeExtension_union = Core.Name "union"++_TypeExtension_enum = Core.Name "enum"++_TypeExtension_inputObject = Core.Name "inputObject"++-- | A GraphQL type system definition: schema, type, or directive.+data TypeSystemDefinition =+ TypeSystemDefinitionSchema SchemaDefinition |+ TypeSystemDefinitionType TypeDefinition |+ TypeSystemDefinitionDirective DirectiveDefinition+ deriving (Eq, Ord, Read, Show)++_TypeSystemDefinition = Core.Name "hydra.graphql.syntax.TypeSystemDefinition"++_TypeSystemDefinition_schema = Core.Name "schema"++_TypeSystemDefinition_type = Core.Name "type"++_TypeSystemDefinition_directive = Core.Name "directive"++-- | Either a GraphQL type system definition or an extension of one.+data TypeSystemDefinitionOrExtension =+ TypeSystemDefinitionOrExtensionDefinition TypeSystemDefinition |+ TypeSystemDefinitionOrExtensionExtension TypeSystemExtension+ deriving (Eq, Ord, Read, Show)++_TypeSystemDefinitionOrExtension = Core.Name "hydra.graphql.syntax.TypeSystemDefinitionOrExtension"++_TypeSystemDefinitionOrExtension_definition = Core.Name "definition"++_TypeSystemDefinitionOrExtension_extension = Core.Name "extension"++-- | A directive location valid on GraphQL type system definitions.+data TypeSystemDirectiveLocation =+ TypeSystemDirectiveLocationSCHEMA |+ TypeSystemDirectiveLocationSCALAR |+ TypeSystemDirectiveLocationOBJECT |+ TypeSystemDirectiveLocationFIELD_DEFINITION |+ TypeSystemDirectiveLocationARGUMENT_DEFINITION |+ TypeSystemDirectiveLocationINTERFACE |+ TypeSystemDirectiveLocationUNION |+ TypeSystemDirectiveLocationENUM |+ TypeSystemDirectiveLocationENUM_VALUE |+ TypeSystemDirectiveLocationINPUT_OBJECT |+ TypeSystemDirectiveLocationINPUT_FIELD_DEFINITION+ deriving (Eq, Ord, Read, Show)++_TypeSystemDirectiveLocation = Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"++_TypeSystemDirectiveLocation_SCHEMA = Core.Name "SCHEMA"++_TypeSystemDirectiveLocation_SCALAR = Core.Name "SCALAR"++_TypeSystemDirectiveLocation_OBJECT = Core.Name "OBJECT"++_TypeSystemDirectiveLocation_FIELD_DEFINITION = Core.Name "FIELD_DEFINITION"++_TypeSystemDirectiveLocation_ARGUMENT_DEFINITION = Core.Name "ARGUMENT_DEFINITION"++_TypeSystemDirectiveLocation_INTERFACE = Core.Name "INTERFACE"++_TypeSystemDirectiveLocation_UNION = Core.Name "UNION"++_TypeSystemDirectiveLocation_ENUM = Core.Name "ENUM"++_TypeSystemDirectiveLocation_ENUM_VALUE = Core.Name "ENUM_VALUE"++_TypeSystemDirectiveLocation_INPUT_OBJECT = Core.Name "INPUT_OBJECT"++_TypeSystemDirectiveLocation_INPUT_FIELD_DEFINITION = Core.Name "INPUT_FIELD_DEFINITION"++-- | A GraphQL document consisting only of type system definitions.+newtype TypeSystemDocment =+ TypeSystemDocment {+ unTypeSystemDocment :: [TypeSystemDefinition]}+ deriving (Eq, Ord, Read, Show)++_TypeSystemDocment = Core.Name "hydra.graphql.syntax.TypeSystemDocment"++-- | An extension of a GraphQL schema or type.+data TypeSystemExtension =+ TypeSystemExtensionSchema SchemaExtension |+ TypeSystemExtensionType TypeExtension+ deriving (Eq, Ord, Read, Show)++_TypeSystemExtension = Core.Name "hydra.graphql.syntax.TypeSystemExtension"++_TypeSystemExtension_schema = Core.Name "schema"++_TypeSystemExtension_type = Core.Name "type"++-- | A GraphQL document consisting of type system definitions and extensions.+newtype TypeSystemExtensionDocument =+ TypeSystemExtensionDocument {+ unTypeSystemExtensionDocument :: [TypeSystemDefinitionOrExtension]}+ deriving (Eq, Ord, Read, Show)++_TypeSystemExtensionDocument = Core.Name "hydra.graphql.syntax.TypeSystemExtensionDocument"++-- | The list of member types of a GraphQL union type, introduced by an equals sign.+data UnionMemberTypes =+ UnionMemberTypesSeq UnionMemberTypesSequence |+ UnionMemberTypesSeq2 UnionMemberTypesSequence2+ deriving (Eq, Ord, Read, Show)++_UnionMemberTypes = Core.Name "hydra.graphql.syntax.UnionMemberTypes"++_UnionMemberTypes_seq = Core.Name "seq"++_UnionMemberTypes_seq2 = Core.Name "seq2"++-- | A non-empty UnionMemberTypes list with a leading list of member types.+data UnionMemberTypesSequence =+ UnionMemberTypesSequence {+ unionMemberTypesSequenceUnionMemberTypes :: UnionMemberTypes,+ unionMemberTypesSequenceNamedType :: NamedType}+ deriving (Eq, Ord, Read, Show)++_UnionMemberTypesSequence = Core.Name "hydra.graphql.syntax.UnionMemberTypesSequence"++_UnionMemberTypesSequence_UnionMemberTypes = Core.Name "UnionMemberTypes"++_UnionMemberTypesSequence_NamedType = Core.Name "NamedType"++-- | The base case of a UnionMemberTypes list: a single, optionally pipe-prefixed member type.+data UnionMemberTypesSequence2 =+ UnionMemberTypesSequence2 {+ unionMemberTypesSequence2Or :: (Maybe ()),+ unionMemberTypesSequence2NamedType :: NamedType}+ deriving (Eq, Ord, Read, Show)++_UnionMemberTypesSequence2 = Core.Name "hydra.graphql.syntax.UnionMemberTypesSequence2"++_UnionMemberTypesSequence2_Or = Core.Name "Or"++_UnionMemberTypesSequence2_NamedType = Core.Name "NamedType"++-- | A GraphQL union type definition, giving its name, directives, and member types.+data UnionTypeDefinition =+ UnionTypeDefinition {+ unionTypeDefinitionDescription :: (Maybe Description),+ unionTypeDefinitionName :: Name,+ unionTypeDefinitionDirectives :: (Maybe Directives),+ unionTypeDefinitionUnionMemberTypes :: (Maybe UnionMemberTypes)}+ deriving (Eq, Ord, Read, Show)++_UnionTypeDefinition = Core.Name "hydra.graphql.syntax.UnionTypeDefinition"++_UnionTypeDefinition_Description = Core.Name "Description"++_UnionTypeDefinition_Name = Core.Name "Name"++_UnionTypeDefinition_Directives = Core.Name "Directives"++_UnionTypeDefinition_UnionMemberTypes = Core.Name "UnionMemberTypes"++-- | An extension of a GraphQL union type, either adding member types or only directives.+data UnionTypeExtension =+ UnionTypeExtensionSeq UnionTypeExtensionSequence |+ UnionTypeExtensionSeq2 UnionTypeExtensionSequence2+ deriving (Eq, Ord, Read, Show)++_UnionTypeExtension = Core.Name "hydra.graphql.syntax.UnionTypeExtension"++_UnionTypeExtension_seq = Core.Name "seq"++_UnionTypeExtension_seq2 = Core.Name "seq2"++-- | A union type extension that adds new member types.+data UnionTypeExtensionSequence =+ UnionTypeExtensionSequence {+ unionTypeExtensionSequenceName :: Name,+ unionTypeExtensionSequenceDirectives :: (Maybe Directives),+ unionTypeExtensionSequenceUnionMemberTypes :: UnionMemberTypes}+ deriving (Eq, Ord, Read, Show)++_UnionTypeExtensionSequence = Core.Name "hydra.graphql.syntax.UnionTypeExtensionSequence"++_UnionTypeExtensionSequence_Name = Core.Name "Name"++_UnionTypeExtensionSequence_Directives = Core.Name "Directives"++_UnionTypeExtensionSequence_UnionMemberTypes = Core.Name "UnionMemberTypes"++-- | A union type extension consisting of directives only.+data UnionTypeExtensionSequence2 =+ UnionTypeExtensionSequence2 {+ unionTypeExtensionSequence2Name :: Name,+ unionTypeExtensionSequence2Directives :: Directives}+ deriving (Eq, Ord, Read, Show)++_UnionTypeExtensionSequence2 = Core.Name "hydra.graphql.syntax.UnionTypeExtensionSequence2"++_UnionTypeExtensionSequence2_Name = Core.Name "Name"++_UnionTypeExtensionSequence2_Directives = Core.Name "Directives"++-- | A GraphQL value: a variable, literal, list, or object.+data Value =+ ValueVariable Variable |+ ValueInt IntValue |+ ValueFloat FloatValue |+ ValueString StringValue |+ ValueBoolean BooleanValue |+ ValueNull NullValue |+ ValueEnum EnumValue |+ ValueList ListValue |+ ValueObject ObjectValue+ deriving (Eq, Ord, Read, Show)++_Value = Core.Name "hydra.graphql.syntax.Value"++_Value_Variable = Core.Name "Variable"++_Value_int = Core.Name "int"++_Value_float = Core.Name "float"++_Value_string = Core.Name "string"++_Value_boolean = Core.Name "boolean"++_Value_null = Core.Name "null"++_Value_enum = Core.Name "enum"++_Value_list = Core.Name "list"++_Value_object = Core.Name "object"++-- | A GraphQL variable reference, introduced by a dollar sign.+newtype Variable =+ Variable {+ unVariable :: Name}+ deriving (Eq, Ord, Read, Show)++_Variable = Core.Name "hydra.graphql.syntax.Variable"++-- | A single variable definition in a GraphQL operation's variable list.+data VariablesDefinition =+ VariablesDefinition {+ variablesDefinitionVariable :: Variable,+ variablesDefinitionType :: Type,+ variablesDefinitionDefaultValue :: (Maybe DefaultValue),+ variablesDefinitionDirectives :: (Maybe Directives)}+ deriving (Eq, Ord, Read, Show)++_VariablesDefinition = Core.Name "hydra.graphql.syntax.VariablesDefinition"++_VariablesDefinition_Variable = Core.Name "Variable"++_VariablesDefinition_Type = Core.Name "Type"++_VariablesDefinition_DefaultValue = Core.Name "DefaultValue"++_VariablesDefinition_Directives = Core.Name "Directives"
src/main/haskell/Hydra/Iana/Linkrelations.hs view
@@ -1,10 +1,13 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | All IANA Link Relation Types, as of 2022-10-11. See https://www.iana.org/assignments/link-relations/link-relations.xhtml module Hydra.Iana.Linkrelations where+ import qualified Hydra.Core as Core import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | An IANA link relation type data LinkRelationType = -- | Refers to a resource that is the subject of the link's context. [RFC6903], section 2@@ -250,125 +253,247 @@ -- | Points to the versioned resource from which this working copy was obtained. [RFC5829] LinkRelationTypeWorking_copy_of deriving (Eq, Ord, Read, Show)+ _LinkRelationType = Core.Name "hydra.iana.linkrelations.LinkRelationType"+ _LinkRelationType_about = Core.Name "about"+ _LinkRelationType_acl = Core.Name "acl"+ _LinkRelationType_alternate = Core.Name "alternate"+ _LinkRelationType_amphtml = Core.Name "amphtml"+ _LinkRelationType_appendix = Core.Name "appendix"+ _LinkRelationType_apple_touch_icon = Core.Name "apple-touch-icon"+ _LinkRelationType_apple_touch_startup_image = Core.Name "apple-touch-startup-image"+ _LinkRelationType_archives = Core.Name "archives"+ _LinkRelationType_author = Core.Name "author"+ _LinkRelationType_blocked_by = Core.Name "blocked-by"+ _LinkRelationType_bookmark = Core.Name "bookmark"+ _LinkRelationType_canonical = Core.Name "canonical"+ _LinkRelationType_chapter = Core.Name "chapter"+ _LinkRelationType_cite_as = Core.Name "cite-as"+ _LinkRelationType_collection = Core.Name "collection"+ _LinkRelationType_contents = Core.Name "contents"+ _LinkRelationType_convertedfrom = Core.Name "convertedfrom"+ _LinkRelationType_copyright = Core.Name "copyright"+ _LinkRelationType_create_form = Core.Name "create-form"+ _LinkRelationType_current = Core.Name "current"+ _LinkRelationType_describedby = Core.Name "describedby"+ _LinkRelationType_describes = Core.Name "describes"+ _LinkRelationType_disclosure = Core.Name "disclosure"+ _LinkRelationType_dns_prefetch = Core.Name "dns-prefetch"+ _LinkRelationType_duplicate = Core.Name "duplicate"+ _LinkRelationType_edit = Core.Name "edit"+ _LinkRelationType_edit_form = Core.Name "edit-form"+ _LinkRelationType_edit_media = Core.Name "edit-media"+ _LinkRelationType_enclosure = Core.Name "enclosure"+ _LinkRelationType_external = Core.Name "external"+ _LinkRelationType_first = Core.Name "first"+ _LinkRelationType_glossary = Core.Name "glossary"+ _LinkRelationType_help = Core.Name "help"+ _LinkRelationType_hosts = Core.Name "hosts"+ _LinkRelationType_hub = Core.Name "hub"+ _LinkRelationType_icon = Core.Name "icon"+ _LinkRelationType_index = Core.Name "index"+ _LinkRelationType_intervalafter = Core.Name "intervalafter"+ _LinkRelationType_intervalbefore = Core.Name "intervalbefore"+ _LinkRelationType_intervalcontains = Core.Name "intervalcontains"+ _LinkRelationType_intervaldisjoint = Core.Name "intervaldisjoint"+ _LinkRelationType_intervalduring = Core.Name "intervalduring"+ _LinkRelationType_intervalequals = Core.Name "intervalequals"+ _LinkRelationType_intervalfinishedby = Core.Name "intervalfinishedby"+ _LinkRelationType_intervalfinishes = Core.Name "intervalfinishes"+ _LinkRelationType_intervalin = Core.Name "intervalin"+ _LinkRelationType_intervalmeets = Core.Name "intervalmeets"+ _LinkRelationType_intervalmetby = Core.Name "intervalmetby"+ _LinkRelationType_intervaloverlappedby = Core.Name "intervaloverlappedby"+ _LinkRelationType_intervaloverlaps = Core.Name "intervaloverlaps"+ _LinkRelationType_intervalstartedby = Core.Name "intervalstartedby"+ _LinkRelationType_intervalstarts = Core.Name "intervalstarts"+ _LinkRelationType_item = Core.Name "item"+ _LinkRelationType_last = Core.Name "last"+ _LinkRelationType_latest_version = Core.Name "latest-version"+ _LinkRelationType_license = Core.Name "license"+ _LinkRelationType_linkset = Core.Name "linkset"+ _LinkRelationType_lrdd = Core.Name "lrdd"+ _LinkRelationType_manifest = Core.Name "manifest"+ _LinkRelationType_mask_icon = Core.Name "mask-icon"+ _LinkRelationType_media_feed = Core.Name "media-feed"+ _LinkRelationType_memento = Core.Name "memento"+ _LinkRelationType_micropub = Core.Name "micropub"+ _LinkRelationType_modulepreload = Core.Name "modulepreload"+ _LinkRelationType_monitor = Core.Name "monitor"+ _LinkRelationType_monitor_group = Core.Name "monitor-group"+ _LinkRelationType_next = Core.Name "next"+ _LinkRelationType_next_archive = Core.Name "next-archive"+ _LinkRelationType_nofollow = Core.Name "nofollow"+ _LinkRelationType_noopener = Core.Name "noopener"+ _LinkRelationType_noreferrer = Core.Name "noreferrer"+ _LinkRelationType_opener = Core.Name "opener"+ _LinkRelationType_openid2_local_id = Core.Name "openid2.local_id"+ _LinkRelationType_openid2_provider = Core.Name "openid2.provider"+ _LinkRelationType_original = Core.Name "original"+ _LinkRelationType_p3pv1 = Core.Name "p3pv1"+ _LinkRelationType_payment = Core.Name "payment"+ _LinkRelationType_pingback = Core.Name "pingback"+ _LinkRelationType_preconnect = Core.Name "preconnect"+ _LinkRelationType_predecessor_version = Core.Name "predecessor-version"+ _LinkRelationType_prefetch = Core.Name "prefetch"+ _LinkRelationType_preload = Core.Name "preload"+ _LinkRelationType_prerender = Core.Name "prerender"+ _LinkRelationType_prev = Core.Name "prev"+ _LinkRelationType_preview = Core.Name "preview"+ _LinkRelationType_previous = Core.Name "previous"+ _LinkRelationType_prev_archive = Core.Name "prev-archive"+ _LinkRelationType_privacy_policy = Core.Name "privacy-policy"+ _LinkRelationType_profile = Core.Name "profile"+ _LinkRelationType_publication = Core.Name "publication"+ _LinkRelationType_related = Core.Name "related"+ _LinkRelationType_restconf = Core.Name "restconf"+ _LinkRelationType_replies = Core.Name "replies"+ _LinkRelationType_ruleinput = Core.Name "ruleinput"+ _LinkRelationType_search = Core.Name "search"+ _LinkRelationType_section = Core.Name "section"+ _LinkRelationType_self = Core.Name "self"+ _LinkRelationType_service = Core.Name "service"+ _LinkRelationType_service_desc = Core.Name "service-desc"+ _LinkRelationType_service_doc = Core.Name "service-doc"+ _LinkRelationType_service_meta = Core.Name "service-meta"+ _LinkRelationType_siptrunkingcapability = Core.Name "siptrunkingcapability"+ _LinkRelationType_sponsored = Core.Name "sponsored"+ _LinkRelationType_start = Core.Name "start"+ _LinkRelationType_status = Core.Name "status"+ _LinkRelationType_stylesheet = Core.Name "stylesheet"+ _LinkRelationType_subsection = Core.Name "subsection"+ _LinkRelationType_successor_version = Core.Name "successor-version"+ _LinkRelationType_sunset = Core.Name "sunset"+ _LinkRelationType_tag = Core.Name "tag"+ _LinkRelationType_terms_of_service = Core.Name "terms-of-service"+ _LinkRelationType_timegate = Core.Name "timegate"+ _LinkRelationType_timemap = Core.Name "timemap"+ _LinkRelationType_type = Core.Name "type"+ _LinkRelationType_ugc = Core.Name "ugc"+ _LinkRelationType_up = Core.Name "up"+ _LinkRelationType_version_history = Core.Name "version-history"+ _LinkRelationType_via = Core.Name "via"+ _LinkRelationType_webmention = Core.Name "webmention"+ _LinkRelationType_working_copy = Core.Name "working-copy"+ _LinkRelationType_working_copy_of = Core.Name "working-copy-of"
− src/main/haskell/Hydra/Json/Schema.hs
@@ -1,174 +0,0 @@--- Note: this is an automatically generated file. Do not edit.--- | A model for JSON Schema. Based on https://cswr.github.io/JsonSchema/spec/grammar--module Hydra.Json.Schema where-import qualified Hydra.Core as Core-import qualified Hydra.Json.Model as Model-import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.Scientific as Sci-import qualified Data.Map as M-data Document =- Document {- documentId :: (Maybe String),- documentDefinitions :: (Maybe (M.Map Keyword Schema)),- documentRoot :: Schema}- deriving (Eq, Ord, Read, Show)-_Document = Core.Name "hydra.json.schema.Document"-_Document_id = Core.Name "id"-_Document_definitions = Core.Name "definitions"-_Document_root = Core.Name "root"-newtype Keyword =- Keyword {- unKeyword :: String}- deriving (Eq, Ord, Read, Show)-_Keyword = Core.Name "hydra.json.schema.Keyword"-newtype Schema =- Schema {- unSchema :: [Restriction]}- deriving (Eq, Ord, Read, Show)-_Schema = Core.Name "hydra.json.schema.Schema"-data Restriction =- RestrictionType Type |- RestrictionString StringRestriction |- RestrictionNumber NumericRestriction |- RestrictionArray ArrayRestriction |- RestrictionObject ObjectRestriction |- RestrictionMultiple MultipleRestriction |- RestrictionReference SchemaReference |- RestrictionTitle String |- RestrictionDescription String- deriving (Eq, Ord, Read, Show)-_Restriction = Core.Name "hydra.json.schema.Restriction"-_Restriction_type = Core.Name "type"-_Restriction_string = Core.Name "string"-_Restriction_number = Core.Name "number"-_Restriction_array = Core.Name "array"-_Restriction_object = Core.Name "object"-_Restriction_multiple = Core.Name "multiple"-_Restriction_reference = Core.Name "reference"-_Restriction_title = Core.Name "title"-_Restriction_description = Core.Name "description"-data Type =- TypeSingle TypeName |- TypeMultiple [TypeName]- deriving (Eq, Ord, Read, Show)-_Type = Core.Name "hydra.json.schema.Type"-_Type_single = Core.Name "single"-_Type_multiple = Core.Name "multiple"-data TypeName =- TypeNameString |- TypeNameInteger |- TypeNameNumber |- TypeNameBoolean |- TypeNameNull |- TypeNameArray |- TypeNameObject- deriving (Eq, Ord, Read, Show)-_TypeName = Core.Name "hydra.json.schema.TypeName"-_TypeName_string = Core.Name "string"-_TypeName_integer = Core.Name "integer"-_TypeName_number = Core.Name "number"-_TypeName_boolean = Core.Name "boolean"-_TypeName_null = Core.Name "null"-_TypeName_array = Core.Name "array"-_TypeName_object = Core.Name "object"-data StringRestriction =- StringRestrictionMinLength Int |- StringRestrictionMaxLength Int |- StringRestrictionPattern RegularExpression- deriving (Eq, Ord, Read, Show)-_StringRestriction = Core.Name "hydra.json.schema.StringRestriction"-_StringRestriction_minLength = Core.Name "minLength"-_StringRestriction_maxLength = Core.Name "maxLength"-_StringRestriction_pattern = Core.Name "pattern"-newtype RegularExpression =- RegularExpression {- unRegularExpression :: String}- deriving (Eq, Ord, Read, Show)-_RegularExpression = Core.Name "hydra.json.schema.RegularExpression"-data NumericRestriction =- NumericRestrictionMinimum Limit |- NumericRestrictionMaximum Limit |- NumericRestrictionMultipleOf Int- deriving (Eq, Ord, Read, Show)-_NumericRestriction = Core.Name "hydra.json.schema.NumericRestriction"-_NumericRestriction_minimum = Core.Name "minimum"-_NumericRestriction_maximum = Core.Name "maximum"-_NumericRestriction_multipleOf = Core.Name "multipleOf"-data Limit =- Limit {- limitValue :: Int,- limitExclusive :: Bool}- deriving (Eq, Ord, Read, Show)-_Limit = Core.Name "hydra.json.schema.Limit"-_Limit_value = Core.Name "value"-_Limit_exclusive = Core.Name "exclusive"-data ArrayRestriction =- ArrayRestrictionItems Items |- ArrayRestrictionAdditionalItems AdditionalItems |- ArrayRestrictionMinItems Int |- ArrayRestrictionMaxItems Int |- ArrayRestrictionUniqueItems Bool- deriving (Eq, Ord, Read, Show)-_ArrayRestriction = Core.Name "hydra.json.schema.ArrayRestriction"-_ArrayRestriction_items = Core.Name "items"-_ArrayRestriction_additionalItems = Core.Name "additionalItems"-_ArrayRestriction_minItems = Core.Name "minItems"-_ArrayRestriction_maxItems = Core.Name "maxItems"-_ArrayRestriction_uniqueItems = Core.Name "uniqueItems"-data Items =- ItemsSameItems Schema |- ItemsVarItems [Schema]- deriving (Eq, Ord, Read, Show)-_Items = Core.Name "hydra.json.schema.Items"-_Items_sameItems = Core.Name "sameItems"-_Items_varItems = Core.Name "varItems"-data AdditionalItems =- AdditionalItemsAny Bool |- AdditionalItemsSchema Schema- deriving (Eq, Ord, Read, Show)-_AdditionalItems = Core.Name "hydra.json.schema.AdditionalItems"-_AdditionalItems_any = Core.Name "any"-_AdditionalItems_schema = Core.Name "schema"-data ObjectRestriction =- ObjectRestrictionProperties (M.Map Keyword Schema) |- ObjectRestrictionAdditionalProperties AdditionalItems |- ObjectRestrictionRequired [Keyword] |- ObjectRestrictionMinProperties Int |- ObjectRestrictionMaxProperties Int |- ObjectRestrictionDependencies (M.Map Keyword SchemaOrArray) |- ObjectRestrictionPatternProperties (M.Map RegularExpression Schema)- deriving (Eq, Ord, Read, Show)-_ObjectRestriction = Core.Name "hydra.json.schema.ObjectRestriction"-_ObjectRestriction_properties = Core.Name "properties"-_ObjectRestriction_additionalProperties = Core.Name "additionalProperties"-_ObjectRestriction_required = Core.Name "required"-_ObjectRestriction_minProperties = Core.Name "minProperties"-_ObjectRestriction_maxProperties = Core.Name "maxProperties"-_ObjectRestriction_dependencies = Core.Name "dependencies"-_ObjectRestriction_patternProperties = Core.Name "patternProperties"-data SchemaOrArray =- SchemaOrArraySchema Schema |- SchemaOrArrayArray [Keyword]- deriving (Eq, Ord, Read, Show)-_SchemaOrArray = Core.Name "hydra.json.schema.SchemaOrArray"-_SchemaOrArray_schema = Core.Name "schema"-_SchemaOrArray_array = Core.Name "array"-data MultipleRestriction =- MultipleRestrictionAllOf [Schema] |- MultipleRestrictionAnyOf [Schema] |- MultipleRestrictionOneOf [Schema] |- MultipleRestrictionNot Schema |- MultipleRestrictionEnum [Model.Value]- deriving (Eq, Ord, Read, Show)-_MultipleRestriction = Core.Name "hydra.json.schema.MultipleRestriction"-_MultipleRestriction_allOf = Core.Name "allOf"-_MultipleRestriction_anyOf = Core.Name "anyOf"-_MultipleRestriction_oneOf = Core.Name "oneOf"-_MultipleRestriction_not = Core.Name "not"-_MultipleRestriction_enum = Core.Name "enum"-newtype SchemaReference =- SchemaReference {- unSchemaReference :: String}- deriving (Eq, Ord, Read, Show)-_SchemaReference = Core.Name "hydra.json.schema.SchemaReference"
src/main/haskell/Hydra/Json/Schema/Coder.hs view
@@ -1,23 +1,28 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | JSON Schema code generator: converts Hydra modules to JSON Schema documents module Hydra.Json.Schema.Coder where+ import qualified Hydra.Annotations as Annotations import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Constants as Constants import qualified Hydra.Core as Core-import qualified Hydra.File as File import qualified Hydra.Dependencies as Dependencies+import qualified Hydra.Docs as Docs import qualified Hydra.Environment as Environment import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model-import qualified Hydra.Json.Schema as Schema+import qualified Hydra.Json.Schema.Model as SchemaModel import qualified Hydra.Json.Schema.Serde as Serde import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality@@ -33,13 +38,16 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Predicates as Predicates+import qualified Hydra.Print.Variants as PrintVariants import qualified Hydra.Query as Query import qualified Hydra.Reflect as Reflect+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational-import qualified Hydra.Show.Variants as ShowVariants import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -51,64 +59,72 @@ import qualified Data.Scientific as Sci import qualified Data.Map as M import qualified Data.Set as S+ -- | Construct JSON Schema documents from type definitions-constructModule :: t0 -> Graph.Graph -> t1 -> [Packaging.TypeDefinition] -> Either Errors.Error (M.Map String Schema.Document)+constructModule :: t0 -> Graph.Graph -> t1 -> [Packaging.TypeDefinition] -> Either Errors.Error (M.Map String SchemaModel.Document) constructModule cx g mod typeDefs = let typeBody = \td -> Core.typeSchemeBody (Packaging.typeDefinitionBody td) typeMap = Maps.fromList (Lists.map (\td -> (Packaging.typeDefinitionName td, (typeBody td))) typeDefs) in (Eithers.map (\ps -> Maps.fromList ps) (Eithers.mapList (\td -> typeDefToDocument cx g typeMap (Packaging.typeDefinitionName td) (typeBody td)) typeDefs))+ -- | Build a single-property record Schema for one branch of an Either oneOf-eitherBranch :: String -> [Schema.Restriction] -> Schema.Schema+eitherBranch :: String -> [SchemaModel.Restriction] -> SchemaModel.Schema eitherBranch label res =- Schema.Schema [- Schema.RestrictionType (Schema.TypeSingle Schema.TypeNameObject),- (Schema.RestrictionObject (Schema.ObjectRestrictionProperties (Maps.singleton (Schema.Keyword label) (Schema.Schema res)))),- (Schema.RestrictionObject (Schema.ObjectRestrictionRequired [- Schema.Keyword label])),- (Schema.RestrictionObject (Schema.ObjectRestrictionAdditionalProperties (Schema.AdditionalItemsAny False)))]+ SchemaModel.Schema [+ SchemaModel.RestrictionType (SchemaModel.TypeSingle SchemaModel.TypeNameObject),+ (SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionProperties (Maps.singleton (SchemaModel.Keyword label) (SchemaModel.Schema res)))),+ (SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionRequired [+ SchemaModel.Keyword label])),+ (SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionAdditionalProperties (SchemaModel.AdditionalItemsAny False)))]+ -- | Encode a field type as a JSON Schema keyword-schema pair-encodeField :: t0 -> Graph.Graph -> Core.FieldType -> Either Errors.Error (Schema.Keyword, Schema.Schema)+encodeField :: t0 -> Graph.Graph -> Core.FieldType -> Either Errors.Error (SchemaModel.Keyword, SchemaModel.Schema) encodeField cx g ft = let name = Core.fieldTypeName ft typ = Core.fieldTypeType ft- in (Eithers.map (\res -> (Schema.Keyword (Core.unName name), (Schema.Schema res))) (typeToExpr cx g False typ))+ in (Eithers.map (\res -> (SchemaModel.Keyword (Core.unName name), (SchemaModel.Schema res))) (typeToExpr cx g False typ))+ -- | Encode a Hydra name as a safe identifier string, replacing non-alphanumeric characters with underscores encodeName :: Core.Name -> String encodeName name = Formatting.nonAlnumToUnderscores (Core.unName name)+ -- | Encode a named type as a list of JSON Schema restrictions with a title-encodeNamedType :: t0 -> Graph.Graph -> Core.Name -> Core.Type -> Either Errors.Error [Schema.Restriction]+encodeNamedType :: t0 -> Graph.Graph -> Core.Name -> Core.Type -> Either Errors.Error [SchemaModel.Restriction] encodeNamedType cx g name typ = Eithers.map (\res -> Lists.concat [ [- Schema.RestrictionTitle (Core.unName name)],+ SchemaModel.RestrictionTitle (Core.unName name)], res]) (typeToExpr cx g False (Strip.deannotateType typ))+ -- | Encode a record or union as a list of JSON Schema object restrictions; isUnion adds min/maxProperties=1-encodeRecordOrUnion :: t0 -> Graph.Graph -> Bool -> Bool -> [Core.FieldType] -> Either Errors.Error [Schema.Restriction]+encodeRecordOrUnion :: t0 -> Graph.Graph -> Bool -> Bool -> [Core.FieldType] -> Either Errors.Error [SchemaModel.Restriction] encodeRecordOrUnion cx g optional isUnion fields = Eithers.bind (Eithers.mapList (\ft -> encodeField cx g ft) fields) (\props -> let objRes = [- Schema.RestrictionObject (Schema.ObjectRestrictionProperties (Maps.fromList props))]+ SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionProperties (Maps.fromList props))] reqs = Lists.foldl (\acc -> \f -> Logic.ifElse (isRequiredField f) (Lists.concat2 acc [- Schema.Keyword (Core.unName (Core.fieldTypeName f))]) acc) [] fields+ SchemaModel.Keyword (Core.unName (Core.fieldTypeName f))]) acc) [] fields reqRes = Logic.ifElse (Lists.null reqs) [] [- Schema.RestrictionObject (Schema.ObjectRestrictionRequired reqs)]- addPropsRes = [- Schema.RestrictionObject (Schema.ObjectRestrictionAdditionalProperties (Schema.AdditionalItemsAny False))]+ SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionRequired reqs)]+ addPropsRes =+ [+ SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionAdditionalProperties (SchemaModel.AdditionalItemsAny False))] cardRes = Logic.ifElse isUnion [- Schema.RestrictionObject (Schema.ObjectRestrictionMinProperties 1),- (Schema.RestrictionObject (Schema.ObjectRestrictionMaxProperties 1))] []+ SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionMinProperties 1),+ (SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionMaxProperties 1))] [] in (Right (Lists.concat [- jsType optional Schema.TypeNameObject,+ jsType optional SchemaModel.TypeNameObject, objRes, reqRes, addPropsRes, cardRes])))+ -- | Encode a union type, splitting unit-typed (simple) variants into a string-enum branch-encodeUnion :: t0 -> Graph.Graph -> Bool -> [Core.FieldType] -> Either Errors.Error [Schema.Restriction]+encodeUnion :: t0 -> Graph.Graph -> Bool -> [Core.FieldType] -> Either Errors.Error [SchemaModel.Restriction] encodeUnion cx g optional fields = let isSimple = \f -> Predicates.isUnitType (Strip.deannotateType (Core.fieldTypeType f))@@ -117,13 +133,14 @@ in (Logic.ifElse (Lists.null simple) (encodeRecordOrUnion cx g optional True fields) (Eithers.bind (encodeRecordOrUnion cx g False True nonsimple) (\recRes -> let names = Lists.map (\f -> Core.unName (Core.fieldTypeName f)) simple simpleSchema =- Schema.Schema [- Schema.RestrictionType (Schema.TypeSingle Schema.TypeNameString),- (Schema.RestrictionMultiple (Schema.MultipleRestrictionEnum (Lists.map (\n -> Model.ValueString n) names)))]+ SchemaModel.Schema [+ SchemaModel.RestrictionType (SchemaModel.TypeSingle SchemaModel.TypeNameString),+ (SchemaModel.RestrictionMultiple (SchemaModel.MultipleRestrictionEnum (Lists.map (\n -> Model.ValueString n) names)))] in (Right [- Schema.RestrictionMultiple (Schema.MultipleRestrictionOneOf [- Schema.Schema recRes,+ SchemaModel.RestrictionMultiple (SchemaModel.MultipleRestrictionOneOf [+ SchemaModel.Schema recRes, simpleSchema])]))))+ -- | Determine whether a field is required (i.e., not optional/Maybe) isRequiredField :: Core.FieldType -> Bool isRequiredField ft =@@ -132,23 +149,26 @@ in case (Strip.deannotateType typ) of Core.TypeOptional _ -> False _ -> True+ -- | Build the JSON Schema type-restriction list for a type name, optionally widening to allow null-jsType :: Bool -> Schema.TypeName -> [Schema.Restriction]+jsType :: Bool -> SchemaModel.TypeName -> [SchemaModel.Restriction] jsType optional tname = [- Schema.RestrictionType (Logic.ifElse optional (Schema.TypeMultiple [+ SchemaModel.RestrictionType (Logic.ifElse optional (SchemaModel.TypeMultiple [ tname,- Schema.TypeNameNull]) (Schema.TypeSingle tname))]+ SchemaModel.TypeNameNull]) (SchemaModel.TypeSingle tname))]+ -- | Map a Hydra literal type to a JSON Schema type name-literalTypeName :: Core.LiteralType -> Schema.TypeName+literalTypeName :: Core.LiteralType -> SchemaModel.TypeName literalTypeName lt = case lt of- Core.LiteralTypeBinary -> Schema.TypeNameString- Core.LiteralTypeBoolean -> Schema.TypeNameBoolean- Core.LiteralTypeFloat _ -> Schema.TypeNameNumber- Core.LiteralTypeInteger _ -> Schema.TypeNameInteger- Core.LiteralTypeString -> Schema.TypeNameString- _ -> Schema.TypeNameString+ Core.LiteralTypeBinary -> SchemaModel.TypeNameString+ Core.LiteralTypeBoolean -> SchemaModel.TypeNameBoolean+ Core.LiteralTypeFloat _ -> SchemaModel.TypeNameNumber+ Core.LiteralTypeInteger _ -> SchemaModel.TypeNameInteger+ Core.LiteralTypeString -> SchemaModel.TypeNameString+ _ -> SchemaModel.TypeNameString+ -- | Convert a Hydra module to a map from file path to JSON Schema document string moduleToJsonSchema :: t0 -> [Packaging.Definition] -> t1 -> Graph.Graph -> Either Errors.Error (M.Map String String) moduleToJsonSchema mod defs cx g =@@ -156,6 +176,7 @@ let partitioned = Environment.partitionDefinitions defs typeDefs = Pairs.first partitioned in (Eithers.map (\docs -> Maps.map (\doc -> Serde.jsonSchemaDocumentToString doc) docs) (constructModule cx g mod typeDefs))+ -- | Compute the JSON Schema output file path for a named type nameToPath :: Core.Name -> String nameToPath name =@@ -163,29 +184,32 @@ let qn = Names.qualifyName name mns = Util.qualifiedNameModuleName qn local = Util.qualifiedNameLocal qn- nsPart = Optionals.cases mns "" (\ns -> Strings.cat2 (Packaging.unModuleName ns) ".")- in (Names.moduleNameToFilePath Util.CaseConventionCamel (File.FileExtension "json") (Packaging.ModuleName (Strings.cat2 nsPart local)))+ nsPart = Optionals.cases mns "" (\ns -> Strings.concat2 (Packaging.unModuleName ns) ".")+ in (Names.moduleNameToFilePath Util.CaseConventionCamel (File.FileExtension "json") (Packaging.ModuleName (Strings.concat2 nsPart local)))+ -- | Build the JSON Schema restriction list for a pair type-pairRestrictions :: Bool -> [Schema.Restriction] -> [Schema.Restriction] -> [Schema.Restriction]+pairRestrictions :: Bool -> [SchemaModel.Restriction] -> [SchemaModel.Restriction] -> [SchemaModel.Restriction] pairRestrictions optional firstRes secondRes = Lists.concat [- jsType optional Schema.TypeNameObject,+ jsType optional SchemaModel.TypeNameObject, [- Schema.RestrictionObject (Schema.ObjectRestrictionProperties (Maps.fromList [- (Schema.Keyword "first", (Schema.Schema firstRes)),- (Schema.Keyword "second", (Schema.Schema secondRes))]))],+ SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionProperties (Maps.fromList [+ (SchemaModel.Keyword "first", (SchemaModel.Schema firstRes)),+ (SchemaModel.Keyword "second", (SchemaModel.Schema secondRes))]))], [- Schema.RestrictionObject (Schema.ObjectRestrictionRequired [- Schema.Keyword "first",- (Schema.Keyword "second")])],+ SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionRequired [+ SchemaModel.Keyword "first",+ (SchemaModel.Keyword "second")])], [- Schema.RestrictionObject (Schema.ObjectRestrictionAdditionalProperties (Schema.AdditionalItemsAny False))]]+ SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionAdditionalProperties (SchemaModel.AdditionalItemsAny False))]]+ -- | Create a JSON Schema reference restriction for a named type-referenceRestriction :: Core.Name -> Schema.Restriction+referenceRestriction :: Core.Name -> SchemaModel.Restriction referenceRestriction name =- Schema.RestrictionReference (Schema.SchemaReference (Strings.cat [+ SchemaModel.RestrictionReference (SchemaModel.SchemaReference (Strings.concat [ "#/$defs/", (encodeName name)]))+ -- | Walk the transitive named-type dependency closure of a root type through typeMap; the visited set guards against cycles in self-/mutually-recursive types transitiveTypeDeps :: M.Map Core.Name Core.Type -> S.Set Core.Name -> Core.Type -> S.Set Core.Name transitiveTypeDeps typeMap visited rootType =@@ -196,62 +220,65 @@ let acc1 = Sets.insert n acc in (Optionals.cases (Maps.lookup n typeMap) acc1 (\t -> transitiveTypeDeps typeMap acc1 t))) in (Lists.foldl step visited (Sets.toList directDeps))+ -- | Build a JSON Schema document for a single named type, with $defs covering its transitive dependencies and short-name substitution applied-typeDefToDocument :: t0 -> Graph.Graph -> M.Map Core.Name Core.Type -> Core.Name -> Core.Type -> Either Errors.Error (String, Schema.Document)+typeDefToDocument :: t0 -> Graph.Graph -> M.Map Core.Name Core.Type -> Core.Name -> Core.Type -> Either Errors.Error (String, SchemaModel.Document) typeDefToDocument cx g typeMap rootName rootType = let depNames = Sets.toList (transitiveTypeDeps typeMap Sets.empty rootType) allNames = Lists.concat2 [ rootName] (Lists.filter (\n -> Logic.not (Equality.equal n rootName)) depNames)- allTypes = Lists.map (\n -> Optionals.fromOptional (Core.TypeVariable n) (Maps.lookup n typeMap)) allNames+ allTypes = Lists.map (\n -> Optionals.withDefault (Core.TypeVariable n) (Maps.lookup n typeMap)) allNames nameSubst = Dependencies.toShortNames allNames types = Lists.map (\t -> Variables.substituteTypeVariables nameSubst t) allTypes- names = Lists.map (\n -> Optionals.fromOptional n (Maps.lookup n nameSubst)) allNames- subRoot = Optionals.fromOptional rootName (Maps.lookup rootName nameSubst)+ names = Lists.map (\n -> Optionals.withDefault n (Maps.lookup n nameSubst)) allNames+ subRoot = Optionals.withDefault rootName (Maps.lookup rootName nameSubst) pairs = Lists.zip names types in (Eithers.bind (Eithers.mapList (\p -> typeToKeywordSchemaPair cx g (Pairs.first p) (Pairs.second p)) pairs) (\schemas -> Right ( nameToPath rootName,- Schema.Document {- Schema.documentId = Nothing,- Schema.documentDefinitions = (Just (Maps.fromList schemas)),- Schema.documentRoot = (Schema.Schema [+ SchemaModel.Document {+ SchemaModel.documentId = Nothing,+ SchemaModel.documentDefinitions = (Just (Maps.fromList schemas)),+ SchemaModel.documentRoot = (SchemaModel.Schema [ referenceRestriction subRoot])})))+ -- | Encode a Hydra type as a list of JSON Schema restrictions-typeToExpr :: t0 -> Graph.Graph -> Bool -> Core.Type -> Either Errors.Error [Schema.Restriction]+typeToExpr :: t0 -> Graph.Graph -> Bool -> Core.Type -> Either Errors.Error [SchemaModel.Restriction] typeToExpr cx g optional typ = case typ of Core.TypeAnnotated _ -> Eithers.bind (typeToExpr cx g optional (Strip.deannotateType typ)) (\res -> Eithers.bind (Annotations.getTypeDescription cx g typ) (\mdesc -> Right (Lists.concat2 (Optionals.cases mdesc [] (\d -> [- Schema.RestrictionDescription d])) res)))+ SchemaModel.RestrictionDescription d])) res))) Core.TypeApplication v0 -> typeToExpr cx g optional (Core.applicationTypeFunction v0) Core.TypeEither v0 -> let lt = Core.eitherTypeLeft v0 rt = Core.eitherTypeRight v0 in (Eithers.bind (typeToExpr cx g False lt) (\leftRes -> Eithers.bind (typeToExpr cx g False rt) (\rightRes -> Right [- Schema.RestrictionMultiple (Schema.MultipleRestrictionOneOf [+ SchemaModel.RestrictionMultiple (SchemaModel.MultipleRestrictionOneOf [ eitherBranch "left" leftRes, (eitherBranch "right" rightRes)])]))) Core.TypeForall v0 -> typeToExpr cx g optional (Core.forallTypeBody v0)- Core.TypeList v0 -> Eithers.bind (typeToExpr cx g False v0) (\els -> Right (Lists.concat2 (jsType optional Schema.TypeNameArray) [- Schema.RestrictionArray (Schema.ArrayRestrictionItems (Schema.ItemsSameItems (Schema.Schema els)))]))+ Core.TypeList v0 -> Eithers.bind (typeToExpr cx g False v0) (\els -> Right (Lists.concat2 (jsType optional SchemaModel.TypeNameArray) [+ SchemaModel.RestrictionArray (SchemaModel.ArrayRestrictionItems (SchemaModel.ItemsSameItems (SchemaModel.Schema els)))])) Core.TypeLiteral v0 -> Right (jsType optional (literalTypeName v0)) Core.TypeMap v0 -> let vt = Core.mapTypeValues v0- in (Eithers.bind (typeToExpr cx g False vt) (\vRes -> Right (Lists.concat2 (jsType optional Schema.TypeNameObject) [- Schema.RestrictionObject (Schema.ObjectRestrictionAdditionalProperties (Schema.AdditionalItemsSchema (Schema.Schema vRes)))])))+ in (Eithers.bind (typeToExpr cx g False vt) (\vRes -> Right (Lists.concat2 (jsType optional SchemaModel.TypeNameObject) [+ SchemaModel.RestrictionObject (SchemaModel.ObjectRestrictionAdditionalProperties (SchemaModel.AdditionalItemsSchema (SchemaModel.Schema vRes)))]))) Core.TypeOptional v0 -> typeToExpr cx g True v0 Core.TypePair v0 -> let ft = Core.pairTypeFirst v0 st = Core.pairTypeSecond v0 in (Eithers.bind (typeToExpr cx g False ft) (\firstRes -> Eithers.bind (typeToExpr cx g False st) (\secondRes -> Right (pairRestrictions optional firstRes secondRes)))) Core.TypeRecord v0 -> encodeRecordOrUnion cx g optional False v0- Core.TypeSet v0 -> Eithers.bind (typeToExpr cx g False v0) (\els -> Right (Lists.concat2 (jsType optional Schema.TypeNameArray) [- Schema.RestrictionArray (Schema.ArrayRestrictionItems (Schema.ItemsSameItems (Schema.Schema els)))]))+ Core.TypeSet v0 -> Eithers.bind (typeToExpr cx g False v0) (\els -> Right (Lists.concat2 (jsType optional SchemaModel.TypeNameArray) [+ SchemaModel.RestrictionArray (SchemaModel.ArrayRestrictionItems (SchemaModel.ItemsSameItems (SchemaModel.Schema els)))])) Core.TypeUnion v0 -> encodeUnion cx g optional v0 Core.TypeVariable v0 -> Right [ referenceRestriction v0] Core.TypeWrap v0 -> typeToExpr cx g optional v0- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "JSON Schema: unsupported type variant: " (ShowVariants.typeVariant (Reflect.typeVariant typ)))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "JSON Schema: unsupported type variant: " (PrintVariants.typeVariant (Reflect.typeVariant typ)))))+ -- | Build a (Keyword, Schema) pair for a named type, used as a $defs entry-typeToKeywordSchemaPair :: t0 -> Graph.Graph -> Core.Name -> Core.Type -> Either Errors.Error (Schema.Keyword, Schema.Schema)+typeToKeywordSchemaPair :: t0 -> Graph.Graph -> Core.Name -> Core.Type -> Either Errors.Error (SchemaModel.Keyword, SchemaModel.Schema) typeToKeywordSchemaPair cx g name typ =- Eithers.map (\res -> (Schema.Keyword (encodeName name), (Schema.Schema res))) (encodeNamedType cx g name typ)+ Eithers.map (\res -> (SchemaModel.Keyword (encodeName name), (SchemaModel.Schema res))) (encodeNamedType cx g name typ)
src/main/haskell/Hydra/Json/Schema/Language.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Language constraints for JSON Schema module Hydra.Json.Schema.Language where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets@@ -17,9 +23,12 @@ import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query import qualified Hydra.Reflect as Reflect+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -28,6 +37,7 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Language constraints for JSON Schema jsonSchemaLanguage :: Coders.Language jsonSchemaLanguage =@@ -39,7 +49,23 @@ Coders.languageConstraintsIntegerTypes = integerTypes, Coders.languageConstraintsTermVariants = termVariants, Coders.languageConstraintsTypeVariants = typeVariants,- Coders.languageConstraintsTypes = typePredicate}}+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeaturePartialApplication,+ Coders.LanguageFeatureNestedCaseStatements,+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "json")} where literalVariants = Sets.fromList [
+ src/main/haskell/Hydra/Json/Schema/Model.hs view
@@ -0,0 +1,279 @@+-- Note: this is an automatically generated file. Do not edit.++-- | A model for JSON Schema. Based on https://cswr.github.io/JsonSchema/spec/grammar++module Hydra.Json.Schema.Model where++import qualified Hydra.Core as Core+import qualified Hydra.Json.Model as Model+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci+import qualified Data.Map as M++-- | Whether additional array items beyond those explicitly typed are permitted, and if so, their schema+data AdditionalItems =+ AdditionalItemsAny Bool |+ AdditionalItemsSchema Schema+ deriving (Eq, Ord, Read, Show)++_AdditionalItems = Core.Name "hydra.json.schema.model.AdditionalItems"++_AdditionalItems_any = Core.Name "any"++_AdditionalItems_schema = Core.Name "schema"++-- | A restriction on array-typed values: items, additionalItems, minItems, maxItems, or uniqueItems+data ArrayRestriction =+ ArrayRestrictionItems Items |+ ArrayRestrictionAdditionalItems AdditionalItems |+ ArrayRestrictionMinItems Int |+ ArrayRestrictionMaxItems Int |+ ArrayRestrictionUniqueItems Bool+ deriving (Eq, Ord, Read, Show)++_ArrayRestriction = Core.Name "hydra.json.schema.model.ArrayRestriction"++_ArrayRestriction_items = Core.Name "items"++_ArrayRestriction_additionalItems = Core.Name "additionalItems"++_ArrayRestriction_minItems = Core.Name "minItems"++_ArrayRestriction_maxItems = Core.Name "maxItems"++_ArrayRestriction_uniqueItems = Core.Name "uniqueItems"++-- | A JSON Schema document: an optional id, optional local definitions, and a root schema+data Document =+ Document {+ documentId :: (Maybe String),+ documentDefinitions :: (Maybe (M.Map Keyword Schema)),+ documentRoot :: Schema}+ deriving (Eq, Ord, Read, Show)++_Document = Core.Name "hydra.json.schema.model.Document"++_Document_id = Core.Name "id"++_Document_definitions = Core.Name "definitions"++_Document_root = Core.Name "root"++-- | The schema(s) for array items: either a single schema shared by all items, or one schema per item+data Items =+ ItemsSameItems Schema |+ ItemsVarItems [Schema]+ deriving (Eq, Ord, Read, Show)++_Items = Core.Name "hydra.json.schema.model.Items"++_Items_sameItems = Core.Name "sameItems"++_Items_varItems = Core.Name "varItems"++-- | A property name used as a key in a JSON Schema keyword-to-schema map+newtype Keyword =+ Keyword {+ unKeyword :: String}+ deriving (Eq, Ord, Read, Show)++_Keyword = Core.Name "hydra.json.schema.model.Keyword"++-- | A numeric bound with a flag indicating whether the bound itself is excluded+data Limit =+ Limit {+ limitValue :: Int,+ limitExclusive :: Bool}+ deriving (Eq, Ord, Read, Show)++_Limit = Core.Name "hydra.json.schema.model.Limit"++_Limit_value = Core.Name "value"++_Limit_exclusive = Core.Name "exclusive"++-- | A restriction combining multiple schemas: allOf, anyOf, oneOf, not, or enum+data MultipleRestriction =+ MultipleRestrictionAllOf [Schema] |+ MultipleRestrictionAnyOf [Schema] |+ MultipleRestrictionOneOf [Schema] |+ MultipleRestrictionNot Schema |+ MultipleRestrictionEnum [Model.Value]+ deriving (Eq, Ord, Read, Show)++_MultipleRestriction = Core.Name "hydra.json.schema.model.MultipleRestriction"++_MultipleRestriction_allOf = Core.Name "allOf"++_MultipleRestriction_anyOf = Core.Name "anyOf"++_MultipleRestriction_oneOf = Core.Name "oneOf"++_MultipleRestriction_not = Core.Name "not"++_MultipleRestriction_enum = Core.Name "enum"++-- | A restriction on numeric-typed values: a minimum, a maximum, or a multipleOf constraint+data NumericRestriction =+ NumericRestrictionMinimum Limit |+ NumericRestrictionMaximum Limit |+ NumericRestrictionMultipleOf Int+ deriving (Eq, Ord, Read, Show)++_NumericRestriction = Core.Name "hydra.json.schema.model.NumericRestriction"++_NumericRestriction_minimum = Core.Name "minimum"++_NumericRestriction_maximum = Core.Name "maximum"++_NumericRestriction_multipleOf = Core.Name "multipleOf"++-- | A restriction on object-typed values: properties, additionalProperties, required, and related keywords+data ObjectRestriction =+ ObjectRestrictionProperties (M.Map Keyword Schema) |+ ObjectRestrictionAdditionalProperties AdditionalItems |+ ObjectRestrictionRequired [Keyword] |+ ObjectRestrictionMinProperties Int |+ ObjectRestrictionMaxProperties Int |+ ObjectRestrictionDependencies (M.Map Keyword SchemaOrArray) |+ ObjectRestrictionPatternProperties (M.Map RegularExpression Schema)+ deriving (Eq, Ord, Read, Show)++_ObjectRestriction = Core.Name "hydra.json.schema.model.ObjectRestriction"++_ObjectRestriction_properties = Core.Name "properties"++_ObjectRestriction_additionalProperties = Core.Name "additionalProperties"++_ObjectRestriction_required = Core.Name "required"++_ObjectRestriction_minProperties = Core.Name "minProperties"++_ObjectRestriction_maxProperties = Core.Name "maxProperties"++_ObjectRestriction_dependencies = Core.Name "dependencies"++_ObjectRestriction_patternProperties = Core.Name "patternProperties"++-- | A regular expression pattern, as used by the pattern and patternProperties keywords+newtype RegularExpression =+ RegularExpression {+ unRegularExpression :: String}+ deriving (Eq, Ord, Read, Show)++_RegularExpression = Core.Name "hydra.json.schema.model.RegularExpression"++-- | A single JSON Schema restriction: a type, value restriction, reference, title, or description+data Restriction =+ RestrictionType Type |+ RestrictionString StringRestriction |+ RestrictionNumber NumericRestriction |+ RestrictionArray ArrayRestriction |+ RestrictionObject ObjectRestriction |+ RestrictionMultiple MultipleRestriction |+ RestrictionReference SchemaReference |+ RestrictionTitle String |+ RestrictionDescription String+ deriving (Eq, Ord, Read, Show)++_Restriction = Core.Name "hydra.json.schema.model.Restriction"++_Restriction_type = Core.Name "type"++_Restriction_string = Core.Name "string"++_Restriction_number = Core.Name "number"++_Restriction_array = Core.Name "array"++_Restriction_object = Core.Name "object"++_Restriction_multiple = Core.Name "multiple"++_Restriction_reference = Core.Name "reference"++_Restriction_title = Core.Name "title"++_Restriction_description = Core.Name "description"++-- | A JSON schema: a non-empty list of restrictions that a conforming value must satisfy+newtype Schema =+ Schema {+ unSchema :: [Restriction]}+ deriving (Eq, Ord, Read, Show)++_Schema = Core.Name "hydra.json.schema.model.Schema"++-- | A dependency value: either a schema, or a list of required keyword names+data SchemaOrArray =+ SchemaOrArraySchema Schema |+ SchemaOrArrayArray [Keyword]+ deriving (Eq, Ord, Read, Show)++_SchemaOrArray = Core.Name "hydra.json.schema.model.SchemaOrArray"++_SchemaOrArray_schema = Core.Name "schema"++_SchemaOrArray_array = Core.Name "array"++-- | A reference to another schema by URI+newtype SchemaReference =+ SchemaReference {+ unSchemaReference :: String}+ deriving (Eq, Ord, Read, Show)++_SchemaReference = Core.Name "hydra.json.schema.model.SchemaReference"++-- | A restriction on string-typed values: minLength, maxLength, or pattern+data StringRestriction =+ StringRestrictionMinLength Int |+ StringRestrictionMaxLength Int |+ StringRestrictionPattern RegularExpression+ deriving (Eq, Ord, Read, Show)++_StringRestriction = Core.Name "hydra.json.schema.model.StringRestriction"++_StringRestriction_minLength = Core.Name "minLength"++_StringRestriction_maxLength = Core.Name "maxLength"++_StringRestriction_pattern = Core.Name "pattern"++-- | A type restriction: a single type name, or a list of alternative type names+data Type =+ TypeSingle TypeName |+ TypeMultiple [TypeName]+ deriving (Eq, Ord, Read, Show)++_Type = Core.Name "hydra.json.schema.model.Type"++_Type_single = Core.Name "single"++_Type_multiple = Core.Name "multiple"++-- | The name of a JSON Schema primitive type+data TypeName =+ TypeNameString |+ TypeNameInteger |+ TypeNameNumber |+ TypeNameBoolean |+ TypeNameNull |+ TypeNameArray |+ TypeNameObject+ deriving (Eq, Ord, Read, Show)++_TypeName = Core.Name "hydra.json.schema.model.TypeName"++_TypeName_string = Core.Name "string"++_TypeName_integer = Core.Name "integer"++_TypeName_number = Core.Name "number"++_TypeName_boolean = Core.Name "boolean"++_TypeName_null = Core.Name "null"++_TypeName_array = Core.Name "array"++_TypeName_object = Core.Name "object"
src/main/haskell/Hydra/Json/Schema/Serde.hs view
@@ -1,17 +1,23 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Serialization functions for converting JSON Schema documents to JSON values module Hydra.Json.Schema.Serde where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model-import qualified Hydra.Json.Schema as Schema+import qualified Hydra.Json.Schema.Model as SchemaModel import qualified Hydra.Json.Writer as Writer import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists import qualified Hydra.Overlay.Haskell.Lib.Literals as Literals@@ -23,9 +29,12 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -35,252 +44,340 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M+ -- | Encode additional items as a JSON value-additionalItemsToExpr :: Schema.AdditionalItems -> Model.Value+additionalItemsToExpr :: SchemaModel.AdditionalItems -> Model.Value additionalItemsToExpr ai = case ai of- Schema.AdditionalItemsAny v0 -> Model.ValueBoolean v0- Schema.AdditionalItemsSchema v0 -> schemaToExpr v0+ SchemaModel.AdditionalItemsAny v0 -> Model.ValueBoolean v0+ SchemaModel.AdditionalItemsSchema v0 -> schemaToExpr v0+ -- | Encode an array restriction as a key-value pair-arrayRestrictionToExpr :: Schema.ArrayRestriction -> (String, Model.Value)+arrayRestrictionToExpr :: SchemaModel.ArrayRestriction -> (String, Model.Value) arrayRestrictionToExpr r = case r of- Schema.ArrayRestrictionItems v0 -> itemsToExpr v0- Schema.ArrayRestrictionAdditionalItems v0 -> (key_additionalItems, (additionalItemsToExpr v0))- Schema.ArrayRestrictionMinItems v0 -> (key_minItems, (integerToExpr v0))- Schema.ArrayRestrictionMaxItems v0 -> (key_maxItems, (integerToExpr v0))- Schema.ArrayRestrictionUniqueItems v0 -> (key_uniqueItems, (Model.ValueBoolean v0))--- | Extract the map from a JSON object value+ SchemaModel.ArrayRestrictionItems v0 -> itemsToExpr v0+ SchemaModel.ArrayRestrictionAdditionalItems v0 -> (keyAdditionalItems, (additionalItemsToExpr v0))+ SchemaModel.ArrayRestrictionMinItems v0 -> (keyMinItems, (integerToExpr v0))+ SchemaModel.ArrayRestrictionMaxItems v0 -> (keyMaxItems, (integerToExpr v0))+ SchemaModel.ArrayRestrictionUniqueItems v0 -> (keyUniqueItems, (Model.ValueBoolean v0))++-- | Extract a name-keyed map from a JSON object value (field order is dropped) fromObject :: Model.Value -> M.Map String Model.Value fromObject v = case v of Model.ValueObject v0 -> Maps.fromList v0+ -- | Encode an integer as a JSON number value integerToExpr :: Int -> Model.Value integerToExpr n = Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint n))+ -- | Encode items as a key-value pair-itemsToExpr :: Schema.Items -> (String, Model.Value)+itemsToExpr :: SchemaModel.Items -> (String, Model.Value) itemsToExpr items = (- key_items,+ keyItems, case items of- Schema.ItemsSameItems v0 -> schemaToExpr v0- Schema.ItemsVarItems v0 -> Model.ValueArray (Lists.map schemaToExpr v0))+ SchemaModel.ItemsSameItems v0 -> schemaToExpr v0+ SchemaModel.ItemsVarItems v0 -> Model.ValueArray (Lists.map schemaToExpr v0))+ -- | Convert a JSON Schema document to a JSON value-jsonSchemaDocumentToJsonValue :: Schema.Document -> Model.Value+jsonSchemaDocumentToJsonValue :: SchemaModel.Document -> Model.Value jsonSchemaDocumentToJsonValue doc = - let mid = Schema.documentId doc- mdefs = Schema.documentDefinitions doc- root = Schema.documentRoot doc+ let mid = SchemaModel.documentId doc+ mdefs = SchemaModel.documentDefinitions doc+ root = SchemaModel.documentRoot doc schemaMap = fromObject (schemaToExpr root) restMap = fromObject (toObject [- (key_id, (Optionals.map (\i -> Model.ValueString i) mid)),- (key_schema, (Optionals.pure (Model.ValueString "http://json-schema.org/2020-12/schema"))),+ (keyId, (Optionals.map (\i -> Model.ValueString i) mid)),+ (keySchema, (Optionals.pure (Model.ValueString "http://json-schema.org/2020-12/schema"))), (- key_definitions,- (Optionals.map (\mp -> Model.ValueObject ((Lists.map (\p ->+ keyDefinitions,+ (Optionals.map (\mp -> Model.ValueObject (Lists.map (\p -> let k = Pairs.first p schema = Pairs.second p- in (Schema.unKeyword k, (schemaToExpr schema))) (Maps.toList mp)))) mdefs))])+ in (SchemaModel.unKeyword k, (schemaToExpr schema))) (Maps.toList mp))) mdefs))]) in (Model.ValueObject (Maps.toList (Maps.union schemaMap restMap)))+ -- | Convert a JSON Schema document to a JSON string-jsonSchemaDocumentToString :: Schema.Document -> String+jsonSchemaDocumentToString :: SchemaModel.Document -> String jsonSchemaDocumentToString doc = Writer.printJson (jsonSchemaDocumentToJsonValue doc)-key_additionalItems :: String-key_additionalItems = "additionalItems"-key_additionalProperties :: String-key_additionalProperties = "additionalProperties"-key_allOf :: String-key_allOf = "allOf"-key_anyOf :: String-key_anyOf = "anyOf"-key_definitions :: String-key_definitions = "$defs"-key_dependencies :: String-key_dependencies = "dependencies"-key_description :: String-key_description = "description"-key_enum :: String-key_enum = "enum"-key_exclusiveMaximum :: String-key_exclusiveMaximum = "exclusiveMaximum"-key_exclusiveMinimum :: String-key_exclusiveMinimum = "exclusiveMinimum"-key_id :: String-key_id = "$id"-key_items :: String-key_items = "items"-key_label :: String-key_label = "label"-key_maxItems :: String-key_maxItems = "maxItems"-key_maxLength :: String-key_maxLength = "maxLength"-key_maxProperties :: String-key_maxProperties = "maxProperties"-key_maximum :: String-key_maximum = "maximum"-key_minItems :: String-key_minItems = "minItems"-key_minLength :: String-key_minLength = "minLength"-key_minProperties :: String-key_minProperties = "minProperties"-key_minimum :: String-key_minimum = "minimum"-key_multipleOf :: String-key_multipleOf = "multipleOf"-key_not :: String-key_not = "not"-key_oneOf :: String-key_oneOf = "oneOf"-key_pattern :: String-key_pattern = "pattern"-key_patternProperties :: String-key_patternProperties = "patternProperties"-key_properties :: String-key_properties = "properties"-key_ref :: String-key_ref = "$ref"-key_required :: String-key_required = "required"-key_schema :: String-key_schema = "$schema"-key_title :: String-key_title = "title"-key_type :: String-key_type = "type"-key_uniqueItems :: String-key_uniqueItems = "uniqueItems"++-- | The JSON Schema "additionalItems" keyword+keyAdditionalItems :: String+keyAdditionalItems = "additionalItems"++-- | The JSON Schema "additionalProperties" keyword+keyAdditionalProperties :: String+keyAdditionalProperties = "additionalProperties"++-- | The JSON Schema "allOf" keyword+keyAllOf :: String+keyAllOf = "allOf"++-- | The JSON Schema "anyOf" keyword+keyAnyOf :: String+keyAnyOf = "anyOf"++-- | The JSON Schema "$defs" keyword, used for reusable schema definitions+keyDefinitions :: String+keyDefinitions = "$defs"++-- | The JSON Schema "dependencies" keyword+keyDependencies :: String+keyDependencies = "dependencies"++-- | The JSON Schema "description" keyword+keyDescription :: String+keyDescription = "description"++-- | The JSON Schema "enum" keyword+keyEnum :: String+keyEnum = "enum"++-- | The JSON Schema "exclusiveMaximum" keyword+keyExclusiveMaximum :: String+keyExclusiveMaximum = "exclusiveMaximum"++-- | The JSON Schema "exclusiveMinimum" keyword+keyExclusiveMinimum :: String+keyExclusiveMinimum = "exclusiveMinimum"++-- | The JSON Schema "$id" keyword, identifying the schema+keyId :: String+keyId = "$id"++-- | The JSON Schema "items" keyword+keyItems :: String+keyItems = "items"++-- | The JSON Schema "label" keyword+keyLabel :: String+keyLabel = "label"++-- | The JSON Schema "maxItems" keyword+keyMaxItems :: String+keyMaxItems = "maxItems"++-- | The JSON Schema "maxLength" keyword+keyMaxLength :: String+keyMaxLength = "maxLength"++-- | The JSON Schema "maxProperties" keyword+keyMaxProperties :: String+keyMaxProperties = "maxProperties"++-- | The JSON Schema "maximum" keyword+keyMaximum :: String+keyMaximum = "maximum"++-- | The JSON Schema "minItems" keyword+keyMinItems :: String+keyMinItems = "minItems"++-- | The JSON Schema "minLength" keyword+keyMinLength :: String+keyMinLength = "minLength"++-- | The JSON Schema "minProperties" keyword+keyMinProperties :: String+keyMinProperties = "minProperties"++-- | The JSON Schema "minimum" keyword+keyMinimum :: String+keyMinimum = "minimum"++-- | The JSON Schema "multipleOf" keyword+keyMultipleOf :: String+keyMultipleOf = "multipleOf"++-- | The JSON Schema "not" keyword+keyNot :: String+keyNot = "not"++-- | The JSON Schema "oneOf" keyword+keyOneOf :: String+keyOneOf = "oneOf"++-- | The JSON Schema "pattern" keyword+keyPattern :: String+keyPattern = "pattern"++-- | The JSON Schema "patternProperties" keyword+keyPatternProperties :: String+keyPatternProperties = "patternProperties"++-- | The JSON Schema "properties" keyword+keyProperties :: String+keyProperties = "properties"++-- | The JSON Schema "$ref" keyword, used for schema references+keyRef :: String+keyRef = "$ref"++-- | The JSON Schema "required" keyword+keyRequired :: String+keyRequired = "required"++-- | The JSON Schema "$schema" keyword, identifying the schema dialect+keySchema :: String+keySchema = "$schema"++-- | The JSON Schema "title" keyword+keyTitle :: String+keyTitle = "title"++-- | The JSON Schema "type" keyword+keyType :: String+keyType = "type"++-- | The JSON Schema "uniqueItems" keyword+keyUniqueItems :: String+keyUniqueItems = "uniqueItems"+ -- | Encode a keyword-schema-or-array pair as a key-value pair-keywordSchemaOrArrayToExpr :: (Schema.Keyword, Schema.SchemaOrArray) -> (String, Model.Value)+keywordSchemaOrArrayToExpr :: (SchemaModel.Keyword, SchemaModel.SchemaOrArray) -> (String, Model.Value) keywordSchemaOrArrayToExpr p = let k = Pairs.first p s = Pairs.second p- in (Schema.unKeyword k, (schemaOrArrayToExpr s))+ in (SchemaModel.unKeyword k, (schemaOrArrayToExpr s))+ -- | Encode a keyword as a JSON string value-keywordToExpr :: Schema.Keyword -> Model.Value-keywordToExpr k = Model.ValueString (Schema.unKeyword k)+keywordToExpr :: SchemaModel.Keyword -> Model.Value+keywordToExpr k = Model.ValueString (SchemaModel.unKeyword k)+ -- | Encode a multiple restriction as a key-value pair-multipleRestrictionToExpr :: Schema.MultipleRestriction -> (String, Model.Value)+multipleRestrictionToExpr :: SchemaModel.MultipleRestriction -> (String, Model.Value) multipleRestrictionToExpr r = case r of- Schema.MultipleRestrictionAllOf v0 -> (key_allOf, (Model.ValueArray (Lists.map schemaToExpr v0)))- Schema.MultipleRestrictionAnyOf v0 -> (key_anyOf, (Model.ValueArray (Lists.map schemaToExpr v0)))- Schema.MultipleRestrictionOneOf v0 -> (key_oneOf, (Model.ValueArray (Lists.map schemaToExpr v0)))- Schema.MultipleRestrictionNot v0 -> (key_not, (schemaToExpr v0))- Schema.MultipleRestrictionEnum v0 -> (key_enum, (Model.ValueArray v0))+ SchemaModel.MultipleRestrictionAllOf v0 -> (keyAllOf, (Model.ValueArray (Lists.map schemaToExpr v0)))+ SchemaModel.MultipleRestrictionAnyOf v0 -> (keyAnyOf, (Model.ValueArray (Lists.map schemaToExpr v0)))+ SchemaModel.MultipleRestrictionOneOf v0 -> (keyOneOf, (Model.ValueArray (Lists.map schemaToExpr v0)))+ SchemaModel.MultipleRestrictionNot v0 -> (keyNot, (schemaToExpr v0))+ SchemaModel.MultipleRestrictionEnum v0 -> (keyEnum, (Model.ValueArray v0))+ -- | Encode a numeric restriction as a list of key-value pairs-numericRestrictionToExpr :: Schema.NumericRestriction -> [(String, Model.Value)]+numericRestrictionToExpr :: SchemaModel.NumericRestriction -> [(String, Model.Value)] numericRestrictionToExpr r = case r of- Schema.NumericRestrictionMinimum v0 ->- let value = Schema.limitValue v0- excl = Schema.limitExclusive v0+ SchemaModel.NumericRestrictionMinimum v0 ->+ let value = SchemaModel.limitValue v0+ excl = SchemaModel.limitExclusive v0 in (Lists.concat [ [- (key_minimum, (integerToExpr value))],+ (keyMinimum, (integerToExpr value))], (Logic.ifElse excl [- (key_exclusiveMinimum, (Model.ValueBoolean True))] [])])- Schema.NumericRestrictionMaximum v0 ->- let value = Schema.limitValue v0- excl = Schema.limitExclusive v0+ (keyExclusiveMinimum, (Model.ValueBoolean True))] [])])+ SchemaModel.NumericRestrictionMaximum v0 ->+ let value = SchemaModel.limitValue v0+ excl = SchemaModel.limitExclusive v0 in (Lists.concat [ [- (key_maximum, (integerToExpr value))],+ (keyMaximum, (integerToExpr value))], (Logic.ifElse excl [- (key_exclusiveMaximum, (Model.ValueBoolean True))] [])])- Schema.NumericRestrictionMultipleOf v0 -> [- (key_multipleOf, (integerToExpr v0))]+ (keyExclusiveMaximum, (Model.ValueBoolean True))] [])])+ SchemaModel.NumericRestrictionMultipleOf v0 -> [+ (keyMultipleOf, (integerToExpr v0))]+ -- | Encode an object restriction as a key-value pair-objectRestrictionToExpr :: Schema.ObjectRestriction -> (String, Model.Value)+objectRestrictionToExpr :: SchemaModel.ObjectRestriction -> (String, Model.Value) objectRestrictionToExpr r = case r of- Schema.ObjectRestrictionProperties v0 -> (key_properties, (Model.ValueObject ((Lists.map propertyToExpr (Maps.toList v0)))))- Schema.ObjectRestrictionAdditionalProperties v0 -> (key_additionalProperties, (additionalItemsToExpr v0))- Schema.ObjectRestrictionRequired v0 -> (key_required, (Model.ValueArray (Lists.map keywordToExpr v0)))- Schema.ObjectRestrictionMinProperties v0 -> (key_minProperties, (integerToExpr v0))- Schema.ObjectRestrictionMaxProperties v0 -> (key_maxProperties, (integerToExpr v0))- Schema.ObjectRestrictionDependencies v0 -> (key_dependencies, (Model.ValueObject ((Lists.map keywordSchemaOrArrayToExpr (Maps.toList v0)))))- Schema.ObjectRestrictionPatternProperties v0 -> (key_patternProperties, (Model.ValueObject ((Lists.map patternPropertyToExpr (Maps.toList v0)))))+ SchemaModel.ObjectRestrictionProperties v0 -> (keyProperties, (Model.ValueObject (Lists.map propertyToExpr (Maps.toList v0))))+ SchemaModel.ObjectRestrictionAdditionalProperties v0 -> (keyAdditionalProperties, (additionalItemsToExpr v0))+ SchemaModel.ObjectRestrictionRequired v0 -> (keyRequired, (Model.ValueArray (Lists.map keywordToExpr v0)))+ SchemaModel.ObjectRestrictionMinProperties v0 -> (keyMinProperties, (integerToExpr v0))+ SchemaModel.ObjectRestrictionMaxProperties v0 -> (keyMaxProperties, (integerToExpr v0))+ SchemaModel.ObjectRestrictionDependencies v0 -> (keyDependencies, (Model.ValueObject (Lists.map keywordSchemaOrArrayToExpr (Maps.toList v0))))+ SchemaModel.ObjectRestrictionPatternProperties v0 -> (keyPatternProperties, (Model.ValueObject (Lists.map patternPropertyToExpr (Maps.toList v0))))+ -- | Encode a pattern property pair as a key-value pair-patternPropertyToExpr :: (Schema.RegularExpression, Schema.Schema) -> (String, Model.Value)+patternPropertyToExpr :: (SchemaModel.RegularExpression, SchemaModel.Schema) -> (String, Model.Value) patternPropertyToExpr p = let pat = Pairs.first p s = Pairs.second p- in (Schema.unRegularExpression pat, (schemaToExpr s))+ in (SchemaModel.unRegularExpression pat, (schemaToExpr s))+ -- | Encode a property pair as a key-value pair-propertyToExpr :: (Schema.Keyword, Schema.Schema) -> (String, Model.Value)+propertyToExpr :: (SchemaModel.Keyword, SchemaModel.Schema) -> (String, Model.Value) propertyToExpr p = let k = Pairs.first p s = Pairs.second p- in (Schema.unKeyword k, (schemaToExpr s))+ in (SchemaModel.unKeyword k, (schemaToExpr s))+ -- | Encode a restriction as a list of key-value pairs-restrictionToExpr :: Schema.Restriction -> [(String, Model.Value)]+restrictionToExpr :: SchemaModel.Restriction -> [(String, Model.Value)] restrictionToExpr r = case r of- Schema.RestrictionType v0 -> [- (key_type, (typeToExpr v0))]- Schema.RestrictionString v0 -> [+ SchemaModel.RestrictionType v0 -> [+ (keyType, (typeToExpr v0))]+ SchemaModel.RestrictionString v0 -> [ stringRestrictionToExpr v0]- Schema.RestrictionNumber v0 -> numericRestrictionToExpr v0- Schema.RestrictionArray v0 -> [+ SchemaModel.RestrictionNumber v0 -> numericRestrictionToExpr v0+ SchemaModel.RestrictionArray v0 -> [ arrayRestrictionToExpr v0]- Schema.RestrictionObject v0 -> [+ SchemaModel.RestrictionObject v0 -> [ objectRestrictionToExpr v0]- Schema.RestrictionMultiple v0 -> [+ SchemaModel.RestrictionMultiple v0 -> [ multipleRestrictionToExpr v0]- Schema.RestrictionReference v0 -> [- (key_ref, (schemaReferenceToExpr v0))]- Schema.RestrictionTitle v0 -> [- (key_title, (Model.ValueString v0))]- Schema.RestrictionDescription v0 -> [- (key_description, (Model.ValueString v0))]+ SchemaModel.RestrictionReference v0 -> [+ (keyRef, (schemaReferenceToExpr v0))]+ SchemaModel.RestrictionTitle v0 -> [+ (keyTitle, (Model.ValueString v0))]+ SchemaModel.RestrictionDescription v0 -> [+ (keyDescription, (Model.ValueString v0))]+ -- | Encode a schema or array as a JSON value-schemaOrArrayToExpr :: Schema.SchemaOrArray -> Model.Value+schemaOrArrayToExpr :: SchemaModel.SchemaOrArray -> Model.Value schemaOrArrayToExpr soa = case soa of- Schema.SchemaOrArraySchema v0 -> schemaToExpr v0- Schema.SchemaOrArrayArray v0 -> Model.ValueArray (Lists.map keywordToExpr v0)+ SchemaModel.SchemaOrArraySchema v0 -> schemaToExpr v0+ SchemaModel.SchemaOrArrayArray v0 -> Model.ValueArray (Lists.map keywordToExpr v0)+ -- | Encode a schema reference as a JSON string value-schemaReferenceToExpr :: Schema.SchemaReference -> Model.Value-schemaReferenceToExpr sr = Model.ValueString (Schema.unSchemaReference sr)+schemaReferenceToExpr :: SchemaModel.SchemaReference -> Model.Value+schemaReferenceToExpr sr = Model.ValueString (SchemaModel.unSchemaReference sr)+ -- | Encode a schema as a JSON object value-schemaToExpr :: Schema.Schema -> Model.Value-schemaToExpr s = Model.ValueObject ((Lists.concat (Lists.map restrictionToExpr (Schema.unSchema s))))+schemaToExpr :: SchemaModel.Schema -> Model.Value+schemaToExpr s = Model.ValueObject (Lists.concat (Lists.map restrictionToExpr (SchemaModel.unSchema s)))+ -- | Encode a string restriction as a key-value pair-stringRestrictionToExpr :: Schema.StringRestriction -> (String, Model.Value)+stringRestrictionToExpr :: SchemaModel.StringRestriction -> (String, Model.Value) stringRestrictionToExpr r = case r of- Schema.StringRestrictionMaxLength v0 -> (key_maxLength, (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint v0))))- Schema.StringRestrictionMinLength v0 -> (key_minLength, (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint v0))))- Schema.StringRestrictionPattern v0 -> (key_pattern, (Model.ValueString (Schema.unRegularExpression v0)))+ SchemaModel.StringRestrictionMaxLength v0 -> (keyMaxLength, (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint v0))))+ SchemaModel.StringRestrictionMinLength v0 -> (keyMinLength, (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint v0))))+ SchemaModel.StringRestrictionPattern v0 -> (keyPattern, (Model.ValueString (SchemaModel.unRegularExpression v0)))+ -- | Construct a JSON object from a list of optional key-value pairs, filtering out Nothing values toObject :: [(String, (Maybe Model.Value))] -> Model.Value toObject pairs =- Model.ValueObject ((Optionals.cat (Lists.map (\p ->+ Model.ValueObject (Optionals.givens (Lists.map (\p -> let k = Pairs.first p mv = Pairs.second p- in (Optionals.map (\v -> (k, v)) mv)) pairs)))+ in (Optionals.map (\v -> (k, v)) mv)) pairs))+ -- | Encode a type name as a JSON string value-typeNameToExpr :: Schema.TypeName -> Model.Value+typeNameToExpr :: SchemaModel.TypeName -> Model.Value typeNameToExpr t = case t of- Schema.TypeNameString -> Model.ValueString "string"- Schema.TypeNameInteger -> Model.ValueString "integer"- Schema.TypeNameNumber -> Model.ValueString "number"- Schema.TypeNameBoolean -> Model.ValueString "boolean"- Schema.TypeNameNull -> Model.ValueString "null"- Schema.TypeNameArray -> Model.ValueString "array"- Schema.TypeNameObject -> Model.ValueString "object"+ SchemaModel.TypeNameString -> Model.ValueString "string"+ SchemaModel.TypeNameInteger -> Model.ValueString "integer"+ SchemaModel.TypeNameNumber -> Model.ValueString "number"+ SchemaModel.TypeNameBoolean -> Model.ValueString "boolean"+ SchemaModel.TypeNameNull -> Model.ValueString "null"+ SchemaModel.TypeNameArray -> Model.ValueString "array"+ SchemaModel.TypeNameObject -> Model.ValueString "object"+ -- | Encode a type as a JSON value-typeToExpr :: Schema.Type -> Model.Value+typeToExpr :: SchemaModel.Type -> Model.Value typeToExpr t = case t of- Schema.TypeSingle v0 -> typeNameToExpr v0- Schema.TypeMultiple v0 -> Model.ValueArray (Lists.map typeNameToExpr v0)+ SchemaModel.TypeSingle v0 -> typeNameToExpr v0+ SchemaModel.TypeMultiple v0 -> Model.ValueArray (Lists.map typeNameToExpr v0)
src/main/haskell/Hydra/Kusto/Kql.hs view
@@ -1,11 +1,15 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | A partial KQL (Kusto Query Language) model, based on examples from the documentation. Not normative. module Hydra.Kusto.Kql where+ import qualified Hydra.Core as Core import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Int as I++-- | A 'between' range test on an expression, optionally negated data BetweenExpression = BetweenExpression { betweenExpressionNot :: Bool,@@ -13,21 +17,34 @@ betweenExpressionLowerBound :: Expression, betweenExpressionUpperBound :: Expression} deriving (Eq, Ord, Read, Show)+ _BetweenExpression = Core.Name "hydra.kusto.kql.BetweenExpression"+ _BetweenExpression_not = Core.Name "not"+ _BetweenExpression_expression = Core.Name "expression"+ _BetweenExpression_lowerBound = Core.Name "lowerBound"+ _BetweenExpression_upperBound = Core.Name "upperBound"++-- | A binary operator expression, combining a left and right operand data BinaryExpression = BinaryExpression { binaryExpressionLeft :: Expression, binaryExpressionOperator :: BinaryOperator, binaryExpressionRight :: Expression} deriving (Eq, Ord, Read, Show)+ _BinaryExpression = Core.Name "hydra.kusto.kql.BinaryExpression"+ _BinaryExpression_left = Core.Name "left"+ _BinaryExpression_operator = Core.Name "operator"+ _BinaryExpression_right = Core.Name "right"++-- | A binary comparison or arithmetic operator used in KQL expressions data BinaryOperator = BinaryOperatorCaseInsensitiveEqual | BinaryOperatorContains |@@ -48,25 +65,46 @@ BinaryOperatorStartsWith | BinaryOperatorTimes deriving (Eq, Ord, Read, Show)+ _BinaryOperator = Core.Name "hydra.kusto.kql.BinaryOperator"+ _BinaryOperator_caseInsensitiveEqual = Core.Name "caseInsensitiveEqual"+ _BinaryOperator_contains = Core.Name "contains"+ _BinaryOperator_divide = Core.Name "divide"+ _BinaryOperator_endsWith = Core.Name "endsWith"+ _BinaryOperator_equal = Core.Name "equal"+ _BinaryOperator_greater = Core.Name "greater"+ _BinaryOperator_greaterOrEqual = Core.Name "greaterOrEqual"+ _BinaryOperator_has = Core.Name "has"+ _BinaryOperator_hasPrefix = Core.Name "hasPrefix"+ _BinaryOperator_hasSuffix = Core.Name "hasSuffix"+ _BinaryOperator_less = Core.Name "less"+ _BinaryOperator_lessOrEqual = Core.Name "lessOrEqual"+ _BinaryOperator_matchesRegex = Core.Name "matchesRegex"+ _BinaryOperator_minus = Core.Name "minus"+ _BinaryOperator_notEqual = Core.Name "notEqual"+ _BinaryOperator_plus = Core.Name "plus"+ _BinaryOperator_startsWith = Core.Name "startsWith"+ _BinaryOperator_times = Core.Name "times"++-- | One of the built-in scalar or aggregation functions supported by KQL data BuiltInFunction = BuiltInFunctionAgo | BuiltInFunctionBin |@@ -82,48 +120,82 @@ BuiltInFunctionStrcat | BuiltInFunctionTodynamic deriving (Eq, Ord, Read, Show)+ _BuiltInFunction = Core.Name "hydra.kusto.kql.BuiltInFunction"+ _BuiltInFunction_ago = Core.Name "ago"+ _BuiltInFunction_bin = Core.Name "bin"+ _BuiltInFunction_count = Core.Name "count"+ _BuiltInFunction_dcount = Core.Name "dcount"+ _BuiltInFunction_endofday = Core.Name "endofday"+ _BuiltInFunction_extract = Core.Name "extract"+ _BuiltInFunction_format_datetime = Core.Name "format_datetime"+ _BuiltInFunction_materialize = Core.Name "materialize"+ _BuiltInFunction_now = Core.Name "now"+ _BuiltInFunction_range = Core.Name "range"+ _BuiltInFunction_startofday = Core.Name "startofday"+ _BuiltInFunction_strcat = Core.Name "strcat"+ _BuiltInFunction_todynamic = Core.Name "todynamic"++-- | An association between a column and an alternate (renamed) column name data ColumnAlias = ColumnAlias { columnAliasColumn :: ColumnName, columnAliasAlias :: ColumnName} deriving (Eq, Ord, Read, Show)+ _ColumnAlias = Core.Name "hydra.kusto.kql.ColumnAlias"+ _ColumnAlias_column = Core.Name "column"+ _ColumnAlias_alias = Core.Name "alias"++-- | An assignment of a computed expression to a column data ColumnAssignment = ColumnAssignment { columnAssignmentColumn :: ColumnName, columnAssignmentExpression :: Expression} deriving (Eq, Ord, Read, Show)+ _ColumnAssignment = Core.Name "hydra.kusto.kql.ColumnAssignment"+ _ColumnAssignment_column = Core.Name "column"+ _ColumnAssignment_expression = Core.Name "expression"++-- | The name of a table column newtype ColumnName = ColumnName { unColumnName :: String} deriving (Eq, Ord, Read, Show)+ _ColumnName = Core.Name "hydra.kusto.kql.ColumnName"++-- | A selection of either all columns, or a single named column data Columns = ColumnsAll | ColumnsSingle ColumnName deriving (Eq, Ord, Read, Show)+ _Columns = Core.Name "hydra.kusto.kql.Columns"+ _Columns_all = Core.Name "all"+ _Columns_single = Core.Name "single"++-- | A tabular operator, applied in sequence within a pipeline expression data Command = CommandCount | -- | See https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/distinct-operator@@ -148,49 +220,86 @@ CommandUnion UnionCommand | CommandWhere Expression deriving (Eq, Ord, Read, Show)+ _Command = Core.Name "hydra.kusto.kql.Command"+ _Command_count = Core.Name "count"+ _Command_distinct = Core.Name "distinct"+ _Command_extend = Core.Name "extend"+ _Command_join = Core.Name "join"+ _Command_limit = Core.Name "limit"+ _Command_mvexpand = Core.Name "mvexpand"+ _Command_orderBy = Core.Name "orderBy"+ _Command_parse = Core.Name "parse"+ _Command_print = Core.Name "print"+ _Command_project = Core.Name "project"+ _Command_projectAway = Core.Name "projectAway"+ _Command_projectRename = Core.Name "projectRename"+ _Command_render = Core.Name "render"+ _Command_search = Core.Name "search"+ _Command_sortBy = Core.Name "sortBy"+ _Command_summarize = Core.Name "summarize"+ _Command_take = Core.Name "take"+ _Command_top = Core.Name "top"+ _Command_union = Core.Name "union"+ _Command_where = Core.Name "where"++-- | A KQL datetime literal newtype Datetime = Datetime { unDatetime :: String} deriving (Eq, Ord, Read, Show)+ _Datetime = Core.Name "hydra.kusto.kql.Datetime"++-- | A duration (timespan) literal, expressed as a value and a unit data Duration = Duration { durationValue :: Int, durationUnit :: DurationUnit} deriving (Eq, Ord, Read, Show)+ _Duration = Core.Name "hydra.kusto.kql.Duration"+ _Duration_value = Core.Name "value"+ _Duration_unit = Core.Name "unit"++-- | The unit of measure of a Duration value data DurationUnit = DurationUnitSecond | DurationUnitMinute | DurationUnitHour deriving (Eq, Ord, Read, Show)+ _DurationUnit = Core.Name "hydra.kusto.kql.DurationUnit"+ _DurationUnit_second = Core.Name "second"+ _DurationUnit_minute = Core.Name "minute"+ _DurationUnit_hour = Core.Name "hour"++-- | A KQL scalar expression data Expression = ExpressionAnd [Expression] | ExpressionAny |@@ -207,59 +316,100 @@ ExpressionProperty PropertyExpression | ExpressionUnary UnaryExpression deriving (Eq, Ord, Read, Show)+ _Expression = Core.Name "hydra.kusto.kql.Expression"+ _Expression_and = Core.Name "and"+ _Expression_any = Core.Name "any"+ _Expression_between = Core.Name "between"+ _Expression_binary = Core.Name "binary"+ _Expression_braces = Core.Name "braces"+ _Expression_column = Core.Name "column"+ _Expression_dataset = Core.Name "dataset"+ _Expression_index = Core.Name "index"+ _Expression_list = Core.Name "list"+ _Expression_literal = Core.Name "literal"+ _Expression_or = Core.Name "or"+ _Expression_parentheses = Core.Name "parentheses"+ _Expression_property = Core.Name "property"+ _Expression_unary = Core.Name "unary"++-- | A reference to either a built-in or a user-defined function data Function = FunctionBuiltIn BuiltInFunction | FunctionCustom FunctionName deriving (Eq, Ord, Read, Show)+ _Function = Core.Name "hydra.kusto.kql.Function"+ _Function_builtIn = Core.Name "builtIn"+ _Function_custom = Core.Name "custom"++-- | An invocation of a function with a list of argument expressions data FunctionExpression = FunctionExpression { functionExpressionFunction :: Function, functionExpressionArguments :: [Expression]} deriving (Eq, Ord, Read, Show)+ _FunctionExpression = Core.Name "hydra.kusto.kql.FunctionExpression"+ _FunctionExpression_function = Core.Name "function"+ _FunctionExpression_arguments = Core.Name "arguments"++-- | The name of a user-defined function newtype FunctionName = FunctionName { unFunctionName :: String} deriving (Eq, Ord, Read, Show)+ _FunctionName = Core.Name "hydra.kusto.kql.FunctionName"++-- | An indexing operation applied to an expression, e.g. array or property access data IndexExpression = IndexExpression { indexExpressionExpression :: Expression, indexExpressionIndex :: String} deriving (Eq, Ord, Read, Show)+ _IndexExpression = Core.Name "hydra.kusto.kql.IndexExpression"+ _IndexExpression_expression = Core.Name "expression"+ _IndexExpression_index = Core.Name "index"++-- | A 'join' operator combining rows from the current and a second tabular expression data JoinCommand = JoinCommand { joinCommandKind :: JoinKind, joinCommandExpression :: TableName, joinCommandOn :: Expression} deriving (Eq, Ord, Read, Show)+ _JoinCommand = Core.Name "hydra.kusto.kql.JoinCommand"+ _JoinCommand_kind = Core.Name "kind"+ _JoinCommand_expression = Core.Name "expression"+ _JoinCommand_on = Core.Name "on"++-- | The kind of join to perform, e.g. inner, left outer, or left semi/anti data JoinKind = JoinKindLeftouter | JoinKindLeftsemi |@@ -271,40 +421,67 @@ JoinKindRightsemi | JoinKindRightanti deriving (Eq, Ord, Read, Show)+ _JoinKind = Core.Name "hydra.kusto.kql.JoinKind"+ _JoinKind_leftouter = Core.Name "leftouter"+ _JoinKind_leftsemi = Core.Name "leftsemi"+ _JoinKind_leftanti = Core.Name "leftanti"+ _JoinKind_fullouter = Core.Name "fullouter"+ _JoinKind_inner = Core.Name "inner"+ _JoinKind_innerunique = Core.Name "innerunique"+ _JoinKind_rightouter = Core.Name "rightouter"+ _JoinKind_rightsemi = Core.Name "rightsemi"+ _JoinKind_rightanti = Core.Name "rightanti"++-- | A key-value pair extracted by a 'parse' command data KeyValuePair = KeyValuePair { keyValuePairKey :: String, keyValuePairValue :: Expression} deriving (Eq, Ord, Read, Show)+ _KeyValuePair = Core.Name "hydra.kusto.kql.KeyValuePair"+ _KeyValuePair_key = Core.Name "key"+ _KeyValuePair_value = Core.Name "value"++-- | A single 'let' binding of a name to an expression data LetBinding = LetBinding { letBindingName :: ColumnName, letBindingExpression :: Expression} deriving (Eq, Ord, Read, Show)+ _LetBinding = Core.Name "hydra.kusto.kql.LetBinding"+ _LetBinding_name = Core.Name "name"+ _LetBinding_expression = Core.Name "expression"++-- | A sequence of 'let' bindings followed by a tabular expression that may reference them data LetExpression = LetExpression { letExpressionBindings :: [LetBinding], letExpressionExpression :: TabularExpression} deriving (Eq, Ord, Read, Show)+ _LetExpression = Core.Name "hydra.kusto.kql.LetExpression"+ _LetExpression_bindings = Core.Name "bindings"+ _LetExpression_expression = Core.Name "expression"++-- | A literal value in a KQL expression data Literal = LiteralDuration Duration | LiteralDatetime Datetime |@@ -314,133 +491,217 @@ LiteralDouble Double | LiteralBoolean Bool deriving (Eq, Ord, Read, Show)+ _Literal = Core.Name "hydra.kusto.kql.Literal"+ _Literal_duration = Core.Name "duration"+ _Literal_datetime = Core.Name "datetime"+ _Literal_string = Core.Name "string"+ _Literal_int = Core.Name "int"+ _Literal_long = Core.Name "long"+ _Literal_double = Core.Name "double"+ _Literal_boolean = Core.Name "boolean"++-- | The sort direction for an 'order by' or 'sort by' clause data Order = OrderAscending | OrderDescending deriving (Eq, Ord, Read, Show)+ _Order = Core.Name "hydra.kusto.kql.Order"+ _Order_ascending = Core.Name "ascending"+ _Order_descending = Core.Name "descending"++-- | A named parameter with a literal value, e.g. for a union operator data Parameter = Parameter { parameterKey :: String, parameterValue :: Literal} deriving (Eq, Ord, Read, Show)+ _Parameter = Core.Name "hydra.kusto.kql.Parameter"+ _Parameter_key = Core.Name "key"+ _Parameter_value = Core.Name "value"++-- | A 'parse' command that extracts key-value pairs from a column into new columns data ParseCommand = ParseCommand { parseCommandColumn :: ColumnName, parseCommandPairs :: [KeyValuePair]} deriving (Eq, Ord, Read, Show)+ _ParseCommand = Core.Name "hydra.kusto.kql.ParseCommand"+ _ParseCommand_column = Core.Name "column"+ _ParseCommand_pairs = Core.Name "pairs"++-- | A pipe ('|')-separated sequence of tabular expressions newtype PipelineExpression = PipelineExpression { unPipelineExpression :: [TabularExpression]} deriving (Eq, Ord, Read, Show)+ _PipelineExpression = Core.Name "hydra.kusto.kql.PipelineExpression"++-- | A 'print' command that outputs the value of an expression, optionally naming a column data PrintCommand = PrintCommand { printCommandColumn :: (Maybe ColumnName), printCommandExpression :: Expression} deriving (Eq, Ord, Read, Show)+ _PrintCommand = Core.Name "hydra.kusto.kql.PrintCommand"+ _PrintCommand_column = Core.Name "column"+ _PrintCommand_expression = Core.Name "expression"++-- | An expression to project as a column, with an optional alias, used by a 'project' command data Projection = Projection { projectionExpression :: Expression, projectionAlias :: (Maybe ColumnName)} deriving (Eq, Ord, Read, Show)+ _Projection = Core.Name "hydra.kusto.kql.Projection"+ _Projection_expression = Core.Name "expression"+ _Projection_alias = Core.Name "alias"++-- | A dotted property access on an expression, e.g. 'x.property' data PropertyExpression = PropertyExpression { propertyExpressionExpression :: Expression, propertyExpressionProperty :: String} deriving (Eq, Ord, Read, Show)+ _PropertyExpression = Core.Name "hydra.kusto.kql.PropertyExpression"+ _PropertyExpression_expression = Core.Name "expression"+ _PropertyExpression_property = Core.Name "property"++-- | A complete KQL query, consisting of a single tabular expression newtype Query = Query { unQuery :: TabularExpression} deriving (Eq, Ord, Read, Show)+ _Query = Core.Name "hydra.kusto.kql.Query"+ -- | Search across all datasets and columns or, if provided, specific datasets and/or columns data SearchCommand = SearchCommand { searchCommandDatasets :: [TableName], searchCommandPattern :: Expression} deriving (Eq, Ord, Read, Show)+ _SearchCommand = Core.Name "hydra.kusto.kql.SearchCommand"+ _SearchCommand_datasets = Core.Name "datasets"+ _SearchCommand_pattern = Core.Name "pattern"++-- | A single sort key with an optional sort order, used by 'order by'/'sort by'+data SortBy =+ SortBy {+ sortByColumn :: ColumnName,+ sortByOrder :: (Maybe Order)}+ deriving (Eq, Ord, Read, Show)++_SortBy = Core.Name "hydra.kusto.kql.SortBy"++_SortBy_column = Core.Name "column"++_SortBy_order = Core.Name "order"++-- | A 'summarize' command that computes aggregate columns, optionally grouped by other columns data SummarizeCommand = SummarizeCommand { summarizeCommandColumns :: [ColumnAssignment], summarizeCommandBy :: [ColumnName]} deriving (Eq, Ord, Read, Show)+ _SummarizeCommand = Core.Name "hydra.kusto.kql.SummarizeCommand"+ _SummarizeCommand_columns = Core.Name "columns"+ _SummarizeCommand_by = Core.Name "by"++-- | The name of a table or dataset newtype TableName = TableName { unTableName :: String} deriving (Eq, Ord, Read, Show)+ _TableName = Core.Name "hydra.kusto.kql.TableName"-data TopCommand =- TopCommand {- topCommandCount :: Int,- topCommandSort :: [SortBy]}- deriving (Eq, Ord, Read, Show)-_TopCommand = Core.Name "hydra.kusto.kql.TopCommand"-_TopCommand_count = Core.Name "count"-_TopCommand_sort = Core.Name "sort"-data SortBy =- SortBy {- sortByColumn :: ColumnName,- sortByOrder :: (Maybe Order)}- deriving (Eq, Ord, Read, Show)-_SortBy = Core.Name "hydra.kusto.kql.SortBy"-_SortBy_column = Core.Name "column"-_SortBy_order = Core.Name "order"++-- | An expression which produces a table: a command, pipeline, let expression, or table reference data TabularExpression = TabularExpressionCommand Command | TabularExpressionPipeline PipelineExpression | TabularExpressionLet LetExpression | TabularExpressionTable TableName deriving (Eq, Ord, Read, Show)+ _TabularExpression = Core.Name "hydra.kusto.kql.TabularExpression"+ _TabularExpression_command = Core.Name "command"+ _TabularExpression_pipeline = Core.Name "pipeline"+ _TabularExpression_let = Core.Name "let"+ _TabularExpression_table = Core.Name "table"++-- | A 'top' command that returns the first N rows sorted by the given columns+data TopCommand =+ TopCommand {+ topCommandCount :: Int,+ topCommandSort :: [SortBy]}+ deriving (Eq, Ord, Read, Show)++_TopCommand = Core.Name "hydra.kusto.kql.TopCommand"++_TopCommand_count = Core.Name "count"++_TopCommand_sort = Core.Name "sort"++-- | A unary operator expression applied to a single operand data UnaryExpression = UnaryExpression { unaryExpressionOperator :: UnaryOperator, unaryExpressionExpression :: Expression} deriving (Eq, Ord, Read, Show)+ _UnaryExpression = Core.Name "hydra.kusto.kql.UnaryExpression"+ _UnaryExpression_operator = Core.Name "operator"+ _UnaryExpression_expression = Core.Name "expression"++-- | A unary operator used in KQL expressions data UnaryOperator = UnaryOperatorNot deriving (Eq, Ord, Read, Show)+ _UnaryOperator = Core.Name "hydra.kusto.kql.UnaryOperator"+ _UnaryOperator_not = Core.Name "not"++-- | A 'union' command that combines rows from multiple tables data UnionCommand = UnionCommand { unionCommandParameters :: [Parameter],@@ -449,16 +710,27 @@ unionCommandIsFuzzy :: (Maybe Bool), unionCommandTables :: [TableName]} deriving (Eq, Ord, Read, Show)+ _UnionCommand = Core.Name "hydra.kusto.kql.UnionCommand"+ _UnionCommand_parameters = Core.Name "parameters"+ _UnionCommand_kind = Core.Name "kind"+ _UnionCommand_withSource = Core.Name "withSource"+ _UnionCommand_isFuzzy = Core.Name "isFuzzy"+ _UnionCommand_tables = Core.Name "tables"++-- | Whether a union preserves only common columns (inner) or all columns (outer) data UnionKind = UnionKindInner | UnionKindOuter deriving (Eq, Ord, Read, Show)+ _UnionKind = Core.Name "hydra.kusto.kql.UnionKind"+ _UnionKind_inner = Core.Name "inner"+ _UnionKind_outer = Core.Name "outer"
src/main/haskell/Hydra/Osv/Schema.hs view
@@ -1,24 +1,35 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | See https://ossf.github.io/osv-schema module Hydra.Osv.Schema where+ import qualified Hydra.Core as Core import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci++-- | A person or entity credited with discovering, fixing, or reporting a vulnerability data Credited = Credited { creditedName :: String, creditedContact :: (Maybe [Url])} deriving (Eq, Ord, Read, Show)+ _Credited = Core.Name "hydra.osv.schema.Credited"+ _Credited_name = Core.Name "name"+ _Credited_contact = Core.Name "contact"+ -- | One of a limited set of defined ecosystems, currently Go, npm, OSS-Fuzz, PyPI, RubyGems, crates.io, Packagist, Maven, NuGet, Linux, Debian, Hex, Android, GitHub Actions, or Pub newtype Ecosystem = Ecosystem { unEcosystem :: String} deriving (Eq, Ord, Read, Show)+ _Ecosystem = Core.Name "hydra.osv.schema.Ecosystem"++-- | A single OSV vulnerability entry data Entry = Entry { -- | The default value is '1.0.0', matching version 1.0 of the OSV Schema@@ -36,144 +47,219 @@ entryReferences :: (Maybe [Reference]), entryCredits :: (Maybe [Credited])} deriving (Eq, Ord, Read, Show)+ _Entry = Core.Name "hydra.osv.schema.Entry"+ _Entry_schemaVersion = Core.Name "schemaVersion"+ _Entry_id = Core.Name "id"+ _Entry_modified = Core.Name "modified"+ _Entry_published = Core.Name "published"+ _Entry_withdrawn = Core.Name "withdrawn"+ _Entry_aliases = Core.Name "aliases"+ _Entry_related = Core.Name "related"+ _Entry_summary = Core.Name "summary"+ _Entry_details = Core.Name "details"+ _Entry_severity = Core.Name "severity"+ _Entry_affected = Core.Name "affected"+ _Entry_references = Core.Name "references"+ _Entry_credits = Core.Name "credits"++-- | A version event marking a point in a range where a vulnerability's status changes data Event = EventIntroduced VersionOrZero | EventFixed Version | EventLastAffected Version | EventLimit VersionOrStar deriving (Eq, Ord, Read, Show)+ _Event = Core.Name "hydra.osv.schema.Event"+ _Event_introduced = Core.Name "introduced"+ _Event_fixed = Core.Name "fixed"+ _Event_lastAffected = Core.Name "lastAffected"+ _Event_limit = Core.Name "limit"+ -- | A string of the format <DB>-<ENTRYID>, where DB names the database and ENTRYID is in the format used by the database. For example: OSV-2020-111, CVE-2021-3114, or GHSA-vp9c-fpxx-744v newtype Id = Id { unId :: String} deriving (Eq, Ord, Read, Show)+ _Id = Core.Name "hydra.osv.schema.Id"+ -- | CommonMark markdown text newtype Markdown = Markdown { unMarkdown :: String} deriving (Eq, Ord, Read, Show)+ _Markdown = Core.Name "hydra.osv.schema.Markdown"+ -- | A string which follows the SemVer 2.0.0 format, with no leading 'v' prefix newtype OsvVersion = OsvVersion { unOsvVersion :: String} deriving (Eq, Ord, Read, Show)+ _OsvVersion = Core.Name "hydra.osv.schema.OsvVersion"++-- | The identity of a software package within a given ecosystem data Package = Package { packageEcosystem :: Ecosystem, packageName :: String, packagePurl :: (Maybe Url)} deriving (Eq, Ord, Read, Show)+ _Package = Core.Name "hydra.osv.schema.Package"+ _Package_ecosystem = Core.Name "ecosystem"+ _Package_name = Core.Name "name"+ _Package_purl = Core.Name "purl"++-- | The package affected by a vulnerability, along with its affected version ranges and versions data PackageVersions = PackageVersions { packageVersionsPackage :: Package, packageVersionsRanges :: (Maybe [VersionRange]), packageVersionsVersions :: (Maybe [Version])} deriving (Eq, Ord, Read, Show)+ _PackageVersions = Core.Name "hydra.osv.schema.PackageVersions"+ _PackageVersions_package = Core.Name "package"+ _PackageVersions_ranges = Core.Name "ranges"+ _PackageVersions_versions = Core.Name "versions"++-- | A link to additional information about a vulnerability, together with its type data Reference = Reference { referenceType :: ReferenceType, referenceUrl :: Url} deriving (Eq, Ord, Read, Show)+ _Reference = Core.Name "hydra.osv.schema.Reference"+ _Reference_type = Core.Name "type"+ _Reference_url = Core.Name "url"+ -- | One of ADVISORY, ARTICLE, REPORT, FIX, GIT, PACKAGE, EVIDENCE, or WEB newtype ReferenceType = ReferenceType { unReferenceType :: String} deriving (Eq, Ord, Read, Show)+ _ReferenceType = Core.Name "hydra.osv.schema.ReferenceType"++-- | A severity score for a vulnerability, together with the scoring type used data Severity = Severity { severityType :: SeverityType, severityScore :: SeverityScore} deriving (Eq, Ord, Read, Show)+ _Severity = Core.Name "hydra.osv.schema.Severity"+ _Severity_type = Core.Name "type"+ _Severity_score = Core.Name "score"++-- | The severity score value, formatted according to its severity type newtype SeverityScore = SeverityScore { unSeverityScore :: String} deriving (Eq, Ord, Read, Show)+ _SeverityScore = Core.Name "hydra.osv.schema.SeverityScore"+ -- | The value CVSS_V3, or future supported types newtype SeverityType = SeverityType { unSeverityType :: String} deriving (Eq, Ord, Read, Show)+ _SeverityType = Core.Name "hydra.osv.schema.SeverityType"+ -- | An RFC3339-formatted timestamp in UTC (ending in 'Z') newtype Timestamp = Timestamp { unTimestamp :: String} deriving (Eq, Ord, Read, Show)+ _Timestamp = Core.Name "hydra.osv.schema.Timestamp"++-- | A URL string newtype Url = Url { unUrl :: String} deriving (Eq, Ord, Read, Show)+ _Url = Core.Name "hydra.osv.schema.Url"+ -- | A version number in an ecosystem-specific format newtype Version = Version { unVersion :: String} deriving (Eq, Ord, Read, Show)+ _Version = Core.Name "hydra.osv.schema.Version"+ -- | An ecosystem-specific version number, or the string '*' representing infinity newtype VersionOrStar = VersionOrStar { unVersionOrStar :: String} deriving (Eq, Ord, Read, Show)+ _VersionOrStar = Core.Name "hydra.osv.schema.VersionOrStar"+ -- | An ecosystem-specific version number, or the string '0' representing a version that sorts before any other version newtype VersionOrZero = VersionOrZero { unVersionOrZero :: String} deriving (Eq, Ord, Read, Show)+ _VersionOrZero = Core.Name "hydra.osv.schema.VersionOrZero"++-- | A range of affected versions, expressed as a type and an ordered list of events data VersionRange = VersionRange { versionRangeType :: VersionType, versionRangeRepo :: (Maybe Url), versionRangeEvents :: [Event]} deriving (Eq, Ord, Read, Show)+ _VersionRange = Core.Name "hydra.osv.schema.VersionRange"+ _VersionRange_type = Core.Name "type"+ _VersionRange_repo = Core.Name "repo"+ _VersionRange_events = Core.Name "events"+ -- | One of the values 'SEMVER', 'ECOSYSTEM', or 'GIT newtype VersionType = VersionType { unVersionType :: String} deriving (Eq, Ord, Read, Show)+ _VersionType = Core.Name "hydra.osv.schema.VersionType"
src/main/haskell/Hydra/Parquet/Format.hs view
@@ -1,726 +1,989 @@ -- Note: this is an automatically generated file. Do not edit.--- | A model for the Parquet format. Based on the Thrift-based specification at:--- | https://github.com/apache/parquet-format/blob/master/src/main/thrift/parquet.thrift--module Hydra.Parquet.Format where-import qualified Hydra.Core as Core-import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.Scientific as Sci-import qualified Data.ByteString as B-import qualified Data.Int as I--- | Types supported by Parquet. These types are intended to be used in combination with the encodings to control the on disk storage format. For example INT16 is not included as a type since a good encoding of INT32 would handle this.-data Type =- TypeBoolean |- TypeInt32 |- TypeInt64 |- TypeFloat |- TypeDouble |- TypeByteArray |- TypeFixedLenByteArray- deriving (Eq, Ord, Read, Show)-_Type = Core.Name "hydra.parquet.format.Type"-_Type_boolean = Core.Name "boolean"-_Type_int32 = Core.Name "int32"-_Type_int64 = Core.Name "int64"-_Type_float = Core.Name "float"-_Type_double = Core.Name "double"-_Type_byteArray = Core.Name "byteArray"-_Type_fixedLenByteArray = Core.Name "fixedLenByteArray"--- | Representation of Schemas-data FieldRepetitionType =- -- | This field is required (can not be null) and each record has exactly 1 value.- FieldRepetitionTypeRequired |- -- | The field is optional (can be null) and each record has 0 or 1 values.- FieldRepetitionTypeOptional |- -- | The field is repeated and can contain 0 or more values- FieldRepetitionTypeRepeated- deriving (Eq, Ord, Read, Show)-_FieldRepetitionType = Core.Name "hydra.parquet.format.FieldRepetitionType"-_FieldRepetitionType_required = Core.Name "required"-_FieldRepetitionType_optional = Core.Name "optional"-_FieldRepetitionType_repeated = Core.Name "repeated"--- | Statistics per row group and per page. All fields are optional.-data Statistics =- Statistics {- statisticsNullCount :: (Maybe Integer),- statisticsDistinctCount :: (Maybe Integer),- -- | Max value for the column, determined by its ColumnOrder. Values are encoded using PLAIN encoding, except that variable-length byte arrays do not include a length prefix.- statisticsMaxValue :: (Maybe B.ByteString),- -- | Max value for the column, determined by its ColumnOrder. Values are encoded using PLAIN encoding, except that variable-length byte arrays do not include a length prefix.- statisticsMinValue :: (Maybe B.ByteString)}- deriving (Eq, Ord, Read, Show)-_Statistics = Core.Name "hydra.parquet.format.Statistics"-_Statistics_nullCount = Core.Name "nullCount"-_Statistics_distinctCount = Core.Name "distinctCount"-_Statistics_maxValue = Core.Name "maxValue"-_Statistics_minValue = Core.Name "minValue"--- | Decimal logical type annotation. To maintain forward-compatibility in v1, implementations using this logical type must also set scale and precision on the annotated SchemaElement. Allowed for physical types: INT32, INT64, FIXED, and BINARY-data DecimalType =- DecimalType {- decimalTypeScale :: Int,- decimalTypePrecision :: Int}- deriving (Eq, Ord, Read, Show)-_DecimalType = Core.Name "hydra.parquet.format.DecimalType"-_DecimalType_scale = Core.Name "scale"-_DecimalType_precision = Core.Name "precision"-data TimeUnit =- TimeUnitMillis |- TimeUnitMicros |- TimeUnitNanos- deriving (Eq, Ord, Read, Show)-_TimeUnit = Core.Name "hydra.parquet.format.TimeUnit"-_TimeUnit_millis = Core.Name "millis"-_TimeUnit_micros = Core.Name "micros"-_TimeUnit_nanos = Core.Name "nanos"--- | Timestamp logical type annotation. Allowed for physical types: INT64-data TimestampType =- TimestampType {- timestampTypeIsAdjustedToUtc :: Bool,- timestampTypeUnit :: TimeUnit}- deriving (Eq, Ord, Read, Show)-_TimestampType = Core.Name "hydra.parquet.format.TimestampType"-_TimestampType_isAdjustedToUtc = Core.Name "isAdjustedToUtc"-_TimestampType_unit = Core.Name "unit"--- | Time logical type annotation. Allowed for physical types: INT32 (millis), INT64 (micros, nanos)-data TimeType =- TimeType {- timeTypeIsAdjustedToUtc :: Bool,- timeTypeUnit :: TimeUnit}- deriving (Eq, Ord, Read, Show)-_TimeType = Core.Name "hydra.parquet.format.TimeType"-_TimeType_isAdjustedToUtc = Core.Name "isAdjustedToUtc"-_TimeType_unit = Core.Name "unit"--- | Integer logical type annotation. bitWidth must be 8, 16, 32, or 64. Allowed for physical types: INT32, INT64-data IntType =- IntType {- intTypeBitWidth :: I.Int16,- intTypeIsSigned :: Bool}- deriving (Eq, Ord, Read, Show)-_IntType = Core.Name "hydra.parquet.format.IntType"-_IntType_bitWidth = Core.Name "bitWidth"-_IntType_isSigned = Core.Name "isSigned"--- | LogicalType annotations to replace ConvertedType. To maintain compatibility, implementations using LogicalType for a SchemaElement aust also set the corresponding ConvertedType (if any) from the following table.-data LogicalType =- -- | use ConvertedType UTF8- LogicalTypeString |- -- | use ConvertedType MAP- LogicalTypeMap |- -- | use ConvertedType LIST- LogicalTypeList |- -- | use ConvertedType ENUM- LogicalTypeEnum |- -- | use ConvertedType DECIMAL + SchemaElement.{scale, precision}- LogicalTypeDecimal DecimalType |- -- | use ConvertedType DATE- LogicalTypeDate |- -- | use ConvertedType TIME_MICROS for TIME(isAdjustedToUTC = *, unit = MICROS). use ConvertedType TIME_MILLIS for TIME(isAdjustedToUTC = *, unit = MILLIS)- LogicalTypeTime TimeType |- -- | use ConvertedType TIMESTAMP_MICROS for TIMESTAMP(isAdjustedToUTC = *, unit = MICROS). use ConvertedType TIMESTAMP_MILLIS for TIMESTAMP(isAdjustedToUTC = *, unit = MILLIS)- LogicalTypeTimestamp TimestampType |- -- | use ConvertedType INT_* or UINT_*- LogicalTypeInteger IntType |- -- | no compatible ConvertedType- LogicalTypeUnknown |- -- | use ConvertedType JSON- LogicalTypeJson |- -- | use ConvertedType BSON- LogicalTypeBson |- -- | no compatible ConvertedType- LogicalTypeUuid- deriving (Eq, Ord, Read, Show)-_LogicalType = Core.Name "hydra.parquet.format.LogicalType"-_LogicalType_string = Core.Name "string"-_LogicalType_map = Core.Name "map"-_LogicalType_list = Core.Name "list"-_LogicalType_enum = Core.Name "enum"-_LogicalType_decimal = Core.Name "decimal"-_LogicalType_date = Core.Name "date"-_LogicalType_time = Core.Name "time"-_LogicalType_timestamp = Core.Name "timestamp"-_LogicalType_integer = Core.Name "integer"-_LogicalType_unknown = Core.Name "unknown"-_LogicalType_json = Core.Name "json"-_LogicalType_bson = Core.Name "bson"-_LogicalType_uuid = Core.Name "uuid"--- | Represents a element inside a schema definition.--- | - if it is a group (inner node) then type is undefined and num_children is defined--- | - if it is a primitive type (leaf) then type is defined and num_children is undefined--- | the nodes are listed in depth first traversal order.-data SchemaElement =- SchemaElement {- -- | Data type for this field. Not set if the current element is a non-leaf node- schemaElementType :: (Maybe Type),- -- | If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the values. Otherwise, if specified, this is the maximum bit length to store any of the values. (e.g. a low cardinality INT col could have this set to 3). Note that this is in the schema, and therefore fixed for the entire file.- schemaElementTypeLength :: (Maybe Int),- -- | repetition of the field. The root of the schema does not have a repetition_type. All other nodes must have one- schemaElementRepetitionType :: (Maybe FieldRepetitionType),- -- | Name of the field in the schema- schemaElementName :: String,- -- | Nested fields. Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal. The children count is used to construct the nested relationship. This field is not set when the element is a primitive type- schemaElementNumChildren :: (Maybe Int),- -- | When the original schema supports field ids, this will save the original field id in the parquet schema- schemaElementFieldId :: (Maybe Int),- -- | The logical type of this SchemaElement. LogicalType replaces ConvertedType, but ConvertedType is still required for some logical types to ensure forward-compatibility in format v1.- schemaElementLogicalType :: (Maybe LogicalType)}- deriving (Eq, Ord, Read, Show)-_SchemaElement = Core.Name "hydra.parquet.format.SchemaElement"-_SchemaElement_type = Core.Name "type"-_SchemaElement_typeLength = Core.Name "typeLength"-_SchemaElement_repetitionType = Core.Name "repetitionType"-_SchemaElement_name = Core.Name "name"-_SchemaElement_numChildren = Core.Name "numChildren"-_SchemaElement_fieldId = Core.Name "fieldId"-_SchemaElement_logicalType = Core.Name "logicalType"--- | Encodings supported by Parquet. Not all encodings are valid for all types. These enums are also used to specify the encoding of definition and repetition levels. See the accompanying doc for the details of the more complicated encodings.-data Encoding =- -- | Default encoding.- -- | BOOLEAN - 1 bit per value. 0 is false; 1 is true.- -- | INT32 - 4 bytes per value. Stored as little-endian.- -- | INT64 - 8 bytes per value. Stored as little-endian.- -- | FLOAT - 4 bytes per value. IEEE. Stored as little-endian.- -- | DOUBLE - 8 bytes per value. IEEE. Stored as little-endian.- -- | BYTE_ARRAY - 4 byte length stored as little endian, followed by bytes.- -- | FIXED_LEN_BYTE_ARRAY - Just the bytes.- EncodingPlain |- -- | Group packed run length encoding. Usable for definition/repetition levels encoding and Booleans (on one bit: 0 is false; 1 is true.)- EncodingRle |- -- | Bit packed encoding. This can only be used if the data has a known max width. Usable for definition/repetition levels encoding.- EncodingBitPacked |- -- | Delta encoding for integers. This can be used for int columns and works best on sorted data- EncodingDeltaBinaryPacked |- -- | Encoding for byte arrays to separate the length values and the data. The lengths are encoded using DELTA_BINARY_PACKED- EncodingDeltaLengthByteArray |- -- | Incremental-encoded byte array. Prefix lengths are encoded using DELTA_BINARY_PACKED. Suffixes are stored as delta length byte arrays.- EncodingDeltaByteArray |- -- | Dictionary encoding: the ids are encoded using the RLE encoding- EncodingRleDictionary |- -- | Encoding for floating-point data. K byte-streams are created where K is the size in bytes of the data type. The individual bytes of an FP value are scattered to the corresponding stream and the streams are concatenated. This itself does not reduce the size of the data but can lead to better compression afterwards.- EncodingByteStreamSplit- deriving (Eq, Ord, Read, Show)-_Encoding = Core.Name "hydra.parquet.format.Encoding"-_Encoding_plain = Core.Name "plain"-_Encoding_rle = Core.Name "rle"-_Encoding_bitPacked = Core.Name "bitPacked"-_Encoding_deltaBinaryPacked = Core.Name "deltaBinaryPacked"-_Encoding_deltaLengthByteArray = Core.Name "deltaLengthByteArray"-_Encoding_deltaByteArray = Core.Name "deltaByteArray"-_Encoding_rleDictionary = Core.Name "rleDictionary"-_Encoding_byteStreamSplit = Core.Name "byteStreamSplit"--- | Supported compression algorithms. Codecs added in format version X.Y can be read by readers based on X.Y and later. Codec support may vary between readers based on the format version and libraries available at runtime. See Compression.md for a detailed specification of these algorithms.-data CompressionCodec =- CompressionCodecUncompressed |- CompressionCodecSnappy |- CompressionCodecGzip |- CompressionCodecLzo |- -- | Added in 2.4- CompressionCodecBrotli |- -- | Added in 2.4- CompressionCodecZstd |- -- | Added in 2.9- CompressionCodecLz4Raw- deriving (Eq, Ord, Read, Show)-_CompressionCodec = Core.Name "hydra.parquet.format.CompressionCodec"-_CompressionCodec_uncompressed = Core.Name "uncompressed"-_CompressionCodec_snappy = Core.Name "snappy"-_CompressionCodec_gzip = Core.Name "gzip"-_CompressionCodec_lzo = Core.Name "lzo"-_CompressionCodec_brotli = Core.Name "brotli"-_CompressionCodec_zstd = Core.Name "zstd"-_CompressionCodec_lz4Raw = Core.Name "lz4Raw"-data PageType =- PageTypeDataPage |- PageTypeIndexPage |- PageTypeDictionaryPage |- PageTypeDataPageV2- deriving (Eq, Ord, Read, Show)-_PageType = Core.Name "hydra.parquet.format.PageType"-_PageType_dataPage = Core.Name "dataPage"-_PageType_indexPage = Core.Name "indexPage"-_PageType_dictionaryPage = Core.Name "dictionaryPage"-_PageType_dataPageV2 = Core.Name "dataPageV2"--- | Enum to annotate whether lists of min/max elements inside ColumnIndex are ordered and if so, in which direction.-data BoundaryOrder =- BoundaryOrderUnordered |- BoundaryOrderAscending |- BoundaryOrderDescending- deriving (Eq, Ord, Read, Show)-_BoundaryOrder = Core.Name "hydra.parquet.format.BoundaryOrder"-_BoundaryOrder_unordered = Core.Name "unordered"-_BoundaryOrder_ascending = Core.Name "ascending"-_BoundaryOrder_descending = Core.Name "descending"--- | Data page header-data DataPageHeader =- DataPageHeader {- -- | Number of values, including NULLs, in this data page.- dataPageHeaderNumValues :: Int,- -- | Encoding used for this data page- dataPageHeaderEncoding :: Encoding,- -- | Encoding used for definition levels- dataPageHeaderDefinitionLevelEncoding :: Encoding,- -- | Encoding used for repetition levels- dataPageHeaderRepetitionLevelEncoding :: Encoding,- -- | Optional statistics for the data in this page- dataPageHeaderStatistics :: (Maybe Statistics)}- deriving (Eq, Ord, Read, Show)-_DataPageHeader = Core.Name "hydra.parquet.format.DataPageHeader"-_DataPageHeader_numValues = Core.Name "numValues"-_DataPageHeader_encoding = Core.Name "encoding"-_DataPageHeader_definitionLevelEncoding = Core.Name "definitionLevelEncoding"-_DataPageHeader_repetitionLevelEncoding = Core.Name "repetitionLevelEncoding"-_DataPageHeader_statistics = Core.Name "statistics"-data IndexPageHeader =- IndexPageHeader {}- deriving (Eq, Ord, Read, Show)-_IndexPageHeader = Core.Name "hydra.parquet.format.IndexPageHeader"--- | The dictionary page must be placed at the first position of the column chunk if it is partly or completely dictionary encoded. At most one dictionary page can be placed in a column chunk.-data DictionaryPageHeader =- DictionaryPageHeader {- -- | Number of values in the dictionary- dictionaryPageHeaderNumValues :: Int,- -- | Encoding using this dictionary page- dictionaryPageHeaderEncoding :: Encoding,- -- | If true, the entries in the dictionary are sorted in ascending order- dictionaryPageHeaderIsSorted :: (Maybe Bool)}- deriving (Eq, Ord, Read, Show)-_DictionaryPageHeader = Core.Name "hydra.parquet.format.DictionaryPageHeader"-_DictionaryPageHeader_numValues = Core.Name "numValues"-_DictionaryPageHeader_encoding = Core.Name "encoding"-_DictionaryPageHeader_isSorted = Core.Name "isSorted"--- | New page format allowing reading levels without decompressing the data Repetition and definition levels are uncompressed The remaining section containing the data is compressed if is_compressed is true-data DataPageHeaderV2 =- DataPageHeaderV2 {- -- | Number of values, including NULLs, in this data page.- dataPageHeaderV2NumValues :: Int,- -- | Number of NULL values, in this data page. Number of non-null = num_values - num_nulls which is also the number of values in the data section- dataPageHeaderV2NumNulls :: Int,- -- | Number of rows in this data page. which means pages change on record boundaries (r = 0)- dataPageHeaderV2NumRows :: Int,- -- | Encoding used for data in this page- dataPageHeaderV2Encoding :: Encoding,- -- | length of the definition levels- dataPageHeaderV2DefinitionLevelsByteLength :: Int,- -- | length of the repetition levels- dataPageHeaderV2RepetitionLevelsByteLength :: Int,- -- | whether the values are compressed. Which means the section of the page between definition_levels_byte_length + repetition_levels_byte_length + 1 and compressed_page_size (included) is compressed with the compression_codec. If missing it is considered compressed- dataPageHeaderV2IsCompressed :: (Maybe Bool),- -- | optional statistics for the data in this page- dataPageHeaderV2Statistics :: (Maybe Statistics)}- deriving (Eq, Ord, Read, Show)-_DataPageHeaderV2 = Core.Name "hydra.parquet.format.DataPageHeaderV2"-_DataPageHeaderV2_numValues = Core.Name "numValues"-_DataPageHeaderV2_numNulls = Core.Name "numNulls"-_DataPageHeaderV2_numRows = Core.Name "numRows"-_DataPageHeaderV2_encoding = Core.Name "encoding"-_DataPageHeaderV2_definitionLevelsByteLength = Core.Name "definitionLevelsByteLength"-_DataPageHeaderV2_repetitionLevelsByteLength = Core.Name "repetitionLevelsByteLength"-_DataPageHeaderV2_isCompressed = Core.Name "isCompressed"-_DataPageHeaderV2_statistics = Core.Name "statistics"--- | The algorithm used in Bloom filter.-data BloomFilterAlgorithm =- -- | Block-based Bloom filter.- BloomFilterAlgorithmBlock- deriving (Eq, Ord, Read, Show)-_BloomFilterAlgorithm = Core.Name "hydra.parquet.format.BloomFilterAlgorithm"-_BloomFilterAlgorithm_block = Core.Name "block"--- | The hash function used in Bloom filter. This function takes the hash of a column value using plain encoding.-data BloomFilterHash =- -- | xxHash Strategy.- BloomFilterHashXxhash- deriving (Eq, Ord, Read, Show)-_BloomFilterHash = Core.Name "hydra.parquet.format.BloomFilterHash"-_BloomFilterHash_xxhash = Core.Name "xxhash"--- | The compression used in the Bloom filter.-data BloomFilterCompression =- BloomFilterCompressionUncompressed- deriving (Eq, Ord, Read, Show)-_BloomFilterCompression = Core.Name "hydra.parquet.format.BloomFilterCompression"-_BloomFilterCompression_uncompressed = Core.Name "uncompressed"--- | Bloom filter header is stored at beginning of Bloom filter data of each column and followed by its bitset.-data BloomFilterHeader =- BloomFilterHeader {- -- | The size of bitset in bytes- bloomFilterHeaderNumBytes :: Int,- -- | The algorithm for setting bits.- bloomFilterHeaderAlgorithm :: BloomFilterAlgorithm,- -- | The hash function used for Bloom filter.- bloomFilterHeaderHash :: BloomFilterHash,- -- | The compression used in the Bloom filter- bloomFilterHeaderCompression :: BloomFilterCompression}- deriving (Eq, Ord, Read, Show)-_BloomFilterHeader = Core.Name "hydra.parquet.format.BloomFilterHeader"-_BloomFilterHeader_numBytes = Core.Name "numBytes"-_BloomFilterHeader_algorithm = Core.Name "algorithm"-_BloomFilterHeader_hash = Core.Name "hash"-_BloomFilterHeader_compression = Core.Name "compression"-data PageHeader =- PageHeader {- -- | the type of the page: indicates which of the *_header fields is set- pageHeaderType :: PageType,- -- | Uncompressed page size in bytes (not including this header)- pageHeaderUncompressedPageSize :: Int,- -- | Compressed (and potentially encrypted) page size in bytes, not including this header- pageHeaderCompressedPageSize :: Int,- -- | The 32bit CRC for the page, to be be calculated as follows:- -- | - Using the standard CRC32 algorithm- -- | - On the data only, i.e. this header should not be included. 'Data'- -- | hereby refers to the concatenation of the repetition levels, the- -- | definition levels and the column value, in this exact order.- -- | - On the encoded versions of the repetition levels, definition levels and- -- | column values- -- | - On the compressed versions of the repetition levels, definition levels- -- | and column values where possible;- -- | - For v1 data pages, the repetition levels, definition levels and column- -- | values are always compressed together. If a compression scheme is- -- | specified, the CRC shall be calculated on the compressed version of- -- | this concatenation. If no compression scheme is specified, the CRC- -- | shall be calculated on the uncompressed version of this concatenation.- -- | - For v2 data pages, the repetition levels and definition levels are- -- | handled separately from the data and are never compressed (only- -- | encoded). If a compression scheme is specified, the CRC shall be- -- | calculated on the concatenation of the uncompressed repetition levels,- -- | uncompressed definition levels and the compressed column values.- -- | If no compression scheme is specified, the CRC shall be calculated on- -- | the uncompressed concatenation.- -- | - In encrypted columns, CRC is calculated after page encryption; the- -- | encryption itself is performed after page compression (if compressed)- -- | If enabled, this allows for disabling checksumming in HDFS if only a few pages need to be read. - pageHeaderCrc :: (Maybe Int),- pageHeaderDataPageHeader :: (Maybe DataPageHeader),- pageHeaderIndexPageHeader :: (Maybe IndexPageHeader),- pageHeaderDictionaryPageHeader :: (Maybe DictionaryPageHeader),- pageHeaderDataPageHeaderV2 :: (Maybe DataPageHeaderV2)}- deriving (Eq, Ord, Read, Show)-_PageHeader = Core.Name "hydra.parquet.format.PageHeader"-_PageHeader_type = Core.Name "type"-_PageHeader_uncompressedPageSize = Core.Name "uncompressedPageSize"-_PageHeader_compressedPageSize = Core.Name "compressedPageSize"-_PageHeader_crc = Core.Name "crc"-_PageHeader_dataPageHeader = Core.Name "dataPageHeader"-_PageHeader_indexPageHeader = Core.Name "indexPageHeader"-_PageHeader_dictionaryPageHeader = Core.Name "dictionaryPageHeader"-_PageHeader_dataPageHeaderV2 = Core.Name "dataPageHeaderV2"--- | Wrapper struct to store key values-data KeyValue =- KeyValue {- keyValueKey :: String,- keyValueValue :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_KeyValue = Core.Name "hydra.parquet.format.KeyValue"-_KeyValue_key = Core.Name "key"-_KeyValue_value = Core.Name "value"--- | Wrapper struct to specify sort order-data SortingColumn =- SortingColumn {- -- | The column index (in this row group)- sortingColumnColumnIdx :: Int,- -- | If true, indicates this column is sorted in descending order.- sortingColumnDescending :: Bool,- -- | If true, nulls will come before non-null values, otherwise, nulls go at the end.- sortingColumnNullsFirst :: Bool}- deriving (Eq, Ord, Read, Show)-_SortingColumn = Core.Name "hydra.parquet.format.SortingColumn"-_SortingColumn_columnIdx = Core.Name "columnIdx"-_SortingColumn_descending = Core.Name "descending"-_SortingColumn_nullsFirst = Core.Name "nullsFirst"--- | statistics of a given page type and encoding-data PageEncodingStats =- PageEncodingStats {- -- | the page type (data/dic/...)- pageEncodingStatsPageType :: PageType,- -- | encoding of the page- pageEncodingStatsEncoding :: Encoding,- -- | number of pages of this type with this encoding- pageEncodingStatsCount :: Int}- deriving (Eq, Ord, Read, Show)-_PageEncodingStats = Core.Name "hydra.parquet.format.PageEncodingStats"-_PageEncodingStats_pageType = Core.Name "pageType"-_PageEncodingStats_encoding = Core.Name "encoding"-_PageEncodingStats_count = Core.Name "count"--- | Description for column metadata-data ColumnMetaData =- ColumnMetaData {- -- | Type of this column- columnMetaDataType :: Type,- -- | Set of all encodings used for this column. The purpose is to validate whether we can decode those pages.- columnMetaDataEncodings :: [Encoding],- -- | Path in schema- columnMetaDataPathInSchema :: [String],- -- | Compression codec- columnMetaDataCodec :: CompressionCodec,- -- | Number of values in this column- columnMetaDataNumValues :: I.Int64,- -- | total byte size of all uncompressed pages in this column chunk (including the headers)- columnMetaDataTotalUncompressedSize :: I.Int64,- -- | total byte size of all compressed, and potentially encrypted, pages in this column chunk (including the headers)- columnMetaDataTotalCompressedSize :: I.Int64,- -- | Optional key/value metadata- columnMetaDataKeyValueMetadata :: (Maybe [KeyValue]),- -- | Byte offset from beginning of file to first data page- columnMetaDataDataPageOffset :: I.Int64,- -- | Byte offset from beginning of file to root index page- columnMetaDataIndexPageOffset :: (Maybe I.Int64),- -- | Byte offset from the beginning of file to first (only) dictionary page- columnMetaDataDictionaryPageOffset :: (Maybe I.Int64),- -- | optional statistics for this column chunk- columnMetaDataStatistics :: (Maybe Statistics),- -- | Set of all encodings used for pages in this column chunk. This information can be used to determine if all data pages are dictionary encoded for example- columnMetaDataEncodingStats :: (Maybe [PageEncodingStats]),- -- | Byte offset from beginning of file to Bloom filter data.- columnMetaDataBloomFilterOffset :: (Maybe I.Int64)}- deriving (Eq, Ord, Read, Show)-_ColumnMetaData = Core.Name "hydra.parquet.format.ColumnMetaData"-_ColumnMetaData_type = Core.Name "type"-_ColumnMetaData_encodings = Core.Name "encodings"-_ColumnMetaData_pathInSchema = Core.Name "pathInSchema"-_ColumnMetaData_codec = Core.Name "codec"-_ColumnMetaData_numValues = Core.Name "numValues"-_ColumnMetaData_totalUncompressedSize = Core.Name "totalUncompressedSize"-_ColumnMetaData_totalCompressedSize = Core.Name "totalCompressedSize"-_ColumnMetaData_keyValueMetadata = Core.Name "keyValueMetadata"-_ColumnMetaData_dataPageOffset = Core.Name "dataPageOffset"-_ColumnMetaData_indexPageOffset = Core.Name "indexPageOffset"-_ColumnMetaData_dictionaryPageOffset = Core.Name "dictionaryPageOffset"-_ColumnMetaData_statistics = Core.Name "statistics"-_ColumnMetaData_encodingStats = Core.Name "encodingStats"-_ColumnMetaData_bloomFilterOffset = Core.Name "bloomFilterOffset"-data EncryptionWithFooterKey =- EncryptionWithFooterKey {}- deriving (Eq, Ord, Read, Show)-_EncryptionWithFooterKey = Core.Name "hydra.parquet.format.EncryptionWithFooterKey"-data EncryptionWithColumnKey =- EncryptionWithColumnKey {- -- | Column path in schema- encryptionWithColumnKeyPathInSchema :: [String],- -- | Retrieval metadata of column encryption key- encryptionWithColumnKeyKeyMetadata :: (Maybe B.ByteString)}- deriving (Eq, Ord, Read, Show)-_EncryptionWithColumnKey = Core.Name "hydra.parquet.format.EncryptionWithColumnKey"-_EncryptionWithColumnKey_pathInSchema = Core.Name "pathInSchema"-_EncryptionWithColumnKey_keyMetadata = Core.Name "keyMetadata"-data ColumnCryptoMetaData =- ColumnCryptoMetaDataEncryptionWithFooterKey EncryptionWithFooterKey |- ColumnCryptoMetaDataEncryptionWithColumnKey EncryptionWithColumnKey- deriving (Eq, Ord, Read, Show)-_ColumnCryptoMetaData = Core.Name "hydra.parquet.format.ColumnCryptoMetaData"-_ColumnCryptoMetaData_encryptionWithFooterKey = Core.Name "encryptionWithFooterKey"-_ColumnCryptoMetaData_encryptionWithColumnKey = Core.Name "encryptionWithColumnKey"-data ColumnChunk =- ColumnChunk {- -- | File where column data is stored. If not set, assumed to be same file as metadata. This path is relative to the current file.- columnChunkFilePath :: (Maybe String),- -- | Byte offset in file_path to the ColumnMetaData- columnChunkFileOffset :: I.Int64,- -- | Column metadata for this chunk. This is the same content as what is at file_path/file_offset. Having it here has it replicated in the file metadata.- columnChunkMetaData :: (Maybe ColumnMetaData),- -- | File offset of ColumnChunk's OffsetIndex- columnChunkOffsetIndexOffset :: (Maybe I.Int64),- -- | Size of ColumnChunk's OffsetIndex, in bytes- columnChunkOffsetIndexLength :: (Maybe Int),- -- | File offset of ColumnChunk's ColumnIndex- columnChunkColumnIndexOffset :: (Maybe I.Int64),- -- | Size of ColumnChunk's ColumnIndex, in bytes- columnChunkColumnIndexLength :: (Maybe Int),- -- | Crypto metadata of encrypted columns- columnChunkCryptoMetadata :: (Maybe ColumnCryptoMetaData),- -- | Encrypted column metadata for this chunk- columnChunkEncryptedColumnMetadata :: (Maybe B.ByteString)}- deriving (Eq, Ord, Read, Show)-_ColumnChunk = Core.Name "hydra.parquet.format.ColumnChunk"-_ColumnChunk_filePath = Core.Name "filePath"-_ColumnChunk_fileOffset = Core.Name "fileOffset"-_ColumnChunk_metaData = Core.Name "metaData"-_ColumnChunk_offsetIndexOffset = Core.Name "offsetIndexOffset"-_ColumnChunk_offsetIndexLength = Core.Name "offsetIndexLength"-_ColumnChunk_columnIndexOffset = Core.Name "columnIndexOffset"-_ColumnChunk_columnIndexLength = Core.Name "columnIndexLength"-_ColumnChunk_cryptoMetadata = Core.Name "cryptoMetadata"-_ColumnChunk_encryptedColumnMetadata = Core.Name "encryptedColumnMetadata"-data RowGroup =- RowGroup {- -- | Metadata for each column chunk in this row group. This list must have the same order as the SchemaElement list in FileMetaData.- rowGroupColumns :: [ColumnChunk],- -- | Total byte size of all the uncompressed column data in this row group- rowGroupTotalByteSize :: I.Int64,- -- | Number of rows in this row group- rowGroupNumRows :: I.Int64,- -- | If set, specifies a sort ordering of the rows in this RowGroup. The sorting columns can be a subset of all the columns.- rowGroupSortingColumns :: (Maybe [SortingColumn]),- -- | Byte offset from beginning of file to first page (data or dictionary) in this row group- rowGroupFileOffset :: (Maybe I.Int64),- -- | Total byte size of all compressed (and potentially encrypted) column data in this row group- rowGroupTotalCompressedSize :: (Maybe I.Int64),- -- | Row group ordinal in the file- rowGroupOrdinal :: (Maybe I.Int16)}- deriving (Eq, Ord, Read, Show)-_RowGroup = Core.Name "hydra.parquet.format.RowGroup"-_RowGroup_columns = Core.Name "columns"-_RowGroup_totalByteSize = Core.Name "totalByteSize"-_RowGroup_numRows = Core.Name "numRows"-_RowGroup_sortingColumns = Core.Name "sortingColumns"-_RowGroup_fileOffset = Core.Name "fileOffset"-_RowGroup_totalCompressedSize = Core.Name "totalCompressedSize"-_RowGroup_ordinal = Core.Name "ordinal"--- | Union to specify the order used for the min_value and max_value fields for a column. This union takes the role of an enhanced enum that allows rich elements (which will be needed for a collation-based ordering in the future). Possible values are:--- | * TypeDefinedOrder - the column uses the order defined by its logical or physical type (if there is no logical type).--- | If the reader does not support the value of this union, min and max stats for this column should be ignored. -data ColumnOrder =- -- | The sort orders for logical types are:- -- | UTF8 - unsigned byte-wise comparison- -- | INT8 - signed comparison- -- | INT16 - signed comparison- -- | INT32 - signed comparison- -- | INT64 - signed comparison- -- | UINT8 - unsigned comparison- -- | UINT16 - unsigned comparison- -- | UINT32 - unsigned comparison- -- | UINT64 - unsigned comparison- -- | DECIMAL - signed comparison of the represented value- -- | DATE - signed comparison- -- | TIME_MILLIS - signed comparison- -- | TIME_MICROS - signed comparison- -- | TIMESTAMP_MILLIS - signed comparison- -- | TIMESTAMP_MICROS - signed comparison- -- | INTERVAL - unsigned comparison- -- | JSON - unsigned byte-wise comparison- -- | BSON - unsigned byte-wise comparison- -- | ENUM - unsigned byte-wise comparison- -- | LIST - undefined- -- | MAP - undefined- -- | In the absence of logical types, the sort order is determined by the physical type:- -- | BOOLEAN - false, true- -- | INT32 - signed comparison- -- | INT64 - signed comparison- -- | INT96 (only used for legacy timestamps) - undefined- -- | FLOAT - signed comparison of the represented value (*)- -- | DOUBLE - signed comparison of the represented value (*)- -- | BYTE_ARRAY - unsigned byte-wise comparison- -- | FIXED_LEN_BYTE_ARRAY - unsigned byte-wise comparison- -- | (*) Because the sorting order is not specified properly for floating- -- | point values (relations vs. total ordering) the following- -- | compatibility rules should be applied when reading statistics:- -- | - If the min is a NaN, it should be ignored.- -- | - If the max is a NaN, it should be ignored.- -- | - If the min is +0, the row group may contain -0 values as well.- -- | - If the max is -0, the row group may contain +0 values as well.- -- | - When looking for NaN values, min and max should be ignored.- ColumnOrderTypeOrder- deriving (Eq, Ord, Read, Show)-_ColumnOrder = Core.Name "hydra.parquet.format.ColumnOrder"-_ColumnOrder_typeOrder = Core.Name "typeOrder"-data PageLocation =- PageLocation {- -- | Offset of the page in the file- pageLocationOffset :: I.Int64,- -- | Size of the page, including header. Sum of compressed_page_size and header length- pageLocationCompressedPageSize :: Int,- -- | Index within the RowGroup of the first row of the page; this means pages change on record boundaries (r = 0).- pageLocationFirstRowIndex :: I.Int64}- deriving (Eq, Ord, Read, Show)-_PageLocation = Core.Name "hydra.parquet.format.PageLocation"-_PageLocation_offset = Core.Name "offset"-_PageLocation_compressedPageSize = Core.Name "compressedPageSize"-_PageLocation_firstRowIndex = Core.Name "firstRowIndex"-data OffsetIndex =- OffsetIndex {- -- | PageLocations, ordered by increasing PageLocation.offset. It is required that page_locations[i].first_row_index < page_locations[i+1].first_row_index.- offsetIndexPageLocations :: [PageLocation]}- deriving (Eq, Ord, Read, Show)-_OffsetIndex = Core.Name "hydra.parquet.format.OffsetIndex"-_OffsetIndex_pageLocations = Core.Name "pageLocations"--- | Description for ColumnIndex. Each <array-field>[i] refers to the page at OffsetIndex.page_locations[i]-data ColumnIndex =- ColumnIndex {- -- | A list of Boolean values to determine the validity of the corresponding min and max values. If true, a page contains only null values, and writers have to set the corresponding entries in min_values and max_values to byte[0], so that all lists have the same length. If false, the corresponding entries in min_values and max_values must be valid.- columnIndexNullPages :: [Bool],- -- | minValues and maxValues are lists containing lower and upper bounds for the values of each page determined by the ColumnOrder of the column. These may be the actual minimum and maximum values found on a page, but can also be (more compact) values that do not exist on a page. For example, instead of storing "Blart Versenwald III", a writer may set min_values[i]="B", max_values[i]="C". Such more compact values must still be valid values within the column's logical type. Readers must make sure that list entries are populated before using them by inspecting null_pages.- columnIndexMinValues :: [B.ByteString],- columnIndexMaxValues :: [B.ByteString],- -- | Stores whether both min_values and max_values are orderd and if so, in which direction. This allows readers to perform binary searches in both lists. Readers cannot assume that max_values[i] <= min_values[i+1], even if the lists are ordered.- columnIndexBoundaryOrder :: BoundaryOrder,- -- | A list containing the number of null values for each page- columnIndexNullCounts :: (Maybe [I.Int64])}- deriving (Eq, Ord, Read, Show)-_ColumnIndex = Core.Name "hydra.parquet.format.ColumnIndex"-_ColumnIndex_nullPages = Core.Name "nullPages"-_ColumnIndex_minValues = Core.Name "minValues"-_ColumnIndex_maxValues = Core.Name "maxValues"-_ColumnIndex_boundaryOrder = Core.Name "boundaryOrder"-_ColumnIndex_nullCounts = Core.Name "nullCounts"-data AesGcmV1 =- AesGcmV1 {- -- | AAD prefix- aesGcmV1AadPrefix :: (Maybe B.ByteString),- -- | Unique file identifier part of AAD suffix- aesGcmV1AadFileUnique :: (Maybe B.ByteString),- -- | In files encrypted with AAD prefix without storing it, readers must supply the prefix- aesGcmV1SupplyAadPrefix :: (Maybe Bool)}- deriving (Eq, Ord, Read, Show)-_AesGcmV1 = Core.Name "hydra.parquet.format.AesGcmV1"-_AesGcmV1_aadPrefix = Core.Name "aadPrefix"-_AesGcmV1_aadFileUnique = Core.Name "aadFileUnique"-_AesGcmV1_supplyAadPrefix = Core.Name "supplyAadPrefix"-data AesGcmCtrV1 =- AesGcmCtrV1 {- -- | AAD prefix- aesGcmCtrV1AadPrefix :: (Maybe B.ByteString),- -- | Unique file identifier part of AAD suffix- aesGcmCtrV1AadFileUnique :: (Maybe B.ByteString),- -- | In files encrypted with AAD prefix without storing it, readers must supply the prefix- aesGcmCtrV1SupplyAadPrefix :: (Maybe Bool)}- deriving (Eq, Ord, Read, Show)-_AesGcmCtrV1 = Core.Name "hydra.parquet.format.AesGcmCtrV1"-_AesGcmCtrV1_aadPrefix = Core.Name "aadPrefix"-_AesGcmCtrV1_aadFileUnique = Core.Name "aadFileUnique"-_AesGcmCtrV1_supplyAadPrefix = Core.Name "supplyAadPrefix"-data EncryptionAlgorithm =- EncryptionAlgorithmAesGcmV1 AesGcmV1 |- EncryptionAlgorithmAesGcmCtrV1 AesGcmCtrV1- deriving (Eq, Ord, Read, Show)-_EncryptionAlgorithm = Core.Name "hydra.parquet.format.EncryptionAlgorithm"-_EncryptionAlgorithm_aesGcmV1 = Core.Name "aesGcmV1"-_EncryptionAlgorithm_aesGcmCtrV1 = Core.Name "aesGcmCtrV1"--- | Description for file metadata-data FileMetaData =- FileMetaData {- -- | Version of this file- fileMetaDataVersion :: Int,- -- | Parquet schema for this file. This schema contains metadata for all the columns. The schema is represented as a tree with a single root. The nodes of the tree are flattened to a list by doing a depth-first traversal. The column metadata contains the path in the schema for that column which can be used to map columns to nodes in the schema. The first element is the root- fileMetaDataSchema :: [SchemaElement],- -- | Number of rows in this file- fileMetaDataNumRows :: I.Int64,- -- | Row groups in this file- fileMetaDataRowGroups :: [RowGroup],- -- | Optional key/value metadata- fileMetaDataKeyValueMetadata :: (Maybe [KeyValue]),- -- | String for application that wrote this file. This should be in the format <Application> version <App Version> (build <App Build Hash>). e.g. impala version 1.0 (build 6cf94d29b2b7115df4de2c06e2ab4326d721eb55)- fileMetaDataCreatedBy :: (Maybe String),- -- | Sort order used for the min_value and max_value fields in the Statistics objects and the min_values and max_values fields in the ColumnIndex objects of each column in this file. Sort orders are listed in the order matching the columns in the schema. The indexes are not necessary the same though, because only leaf nodes of the schema are represented in the list of sort orders.- -- | Without column_orders, the meaning of the min_value and max_value fields in the Statistics object and the ColumnIndex object is undefined. To ensure well-defined behaviour, if these fields are written to a Parquet file, column_orders must be written as well.- -- | The obsolete min and max fields in the Statistics object are always sorted by signed comparison regardless of column_orders.- fileMetaDataColumnOrders :: (Maybe [ColumnOrder]),- -- | Encryption algorithm. This field is set only in encrypted files with plaintext footer. Files with encrypted footer store algorithm id in FileCryptoMetaData structure.- fileMetaDataEncryptionAlgorithm :: (Maybe EncryptionAlgorithm),- -- | Retrieval metadata of key used for signing the footer. Used only in encrypted files with plaintext footer.- fileMetaDataFooterSigningKeyMetadata :: (Maybe B.ByteString)}- deriving (Eq, Ord, Read, Show)-_FileMetaData = Core.Name "hydra.parquet.format.FileMetaData"-_FileMetaData_version = Core.Name "version"-_FileMetaData_schema = Core.Name "schema"-_FileMetaData_numRows = Core.Name "numRows"-_FileMetaData_rowGroups = Core.Name "rowGroups"-_FileMetaData_keyValueMetadata = Core.Name "keyValueMetadata"-_FileMetaData_createdBy = Core.Name "createdBy"-_FileMetaData_columnOrders = Core.Name "columnOrders"-_FileMetaData_encryptionAlgorithm = Core.Name "encryptionAlgorithm"-_FileMetaData_footerSigningKeyMetadata = Core.Name "footerSigningKeyMetadata"--- | Crypto metadata for files with encrypted footer-data FileCryptoMetaData =- FileCryptoMetaData {- -- | Encryption algorithm. This field is only used for files with encrypted footer. Files with plaintext footer store algorithm id inside footer (FileMetaData structure).- fileCryptoMetaDataEncryptionAlgorithm :: EncryptionAlgorithm,- -- | Retrieval metadata of key used for encryption of footer, and (possibly) columns- fileCryptoMetaDataKeyMetadata :: (Maybe B.ByteString)}- deriving (Eq, Ord, Read, Show)-_FileCryptoMetaData = Core.Name "hydra.parquet.format.FileCryptoMetaData"-_FileCryptoMetaData_encryptionAlgorithm = Core.Name "encryptionAlgorithm"-_FileCryptoMetaData_keyMetadata = Core.Name "keyMetadata"++-- | A model for the Parquet format. Based on the Thrift-based specification at:+-- | https://github.com/apache/parquet-format/blob/master/src/main/thrift/parquet.thrift++module Hydra.Parquet.Format where++import qualified Hydra.Core as Core+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci+import qualified Data.ByteString as B+import qualified Data.Int as I++-- | AES GCM CTR mode encryption parameters+data AesGcmCtrV1 =+ AesGcmCtrV1 {+ -- | AAD prefix+ aesGcmCtrV1AadPrefix :: (Maybe B.ByteString),+ -- | Unique file identifier part of AAD suffix+ aesGcmCtrV1AadFileUnique :: (Maybe B.ByteString),+ -- | In files encrypted with AAD prefix without storing it, readers must supply the prefix+ aesGcmCtrV1SupplyAadPrefix :: (Maybe Bool)}+ deriving (Eq, Ord, Read, Show)++_AesGcmCtrV1 = Core.Name "hydra.parquet.format.AesGcmCtrV1"++_AesGcmCtrV1_aadPrefix = Core.Name "aadPrefix"++_AesGcmCtrV1_aadFileUnique = Core.Name "aadFileUnique"++_AesGcmCtrV1_supplyAadPrefix = Core.Name "supplyAadPrefix"++-- | AES GCM mode encryption parameters+data AesGcmV1 =+ AesGcmV1 {+ -- | AAD prefix+ aesGcmV1AadPrefix :: (Maybe B.ByteString),+ -- | Unique file identifier part of AAD suffix+ aesGcmV1AadFileUnique :: (Maybe B.ByteString),+ -- | In files encrypted with AAD prefix without storing it, readers must supply the prefix+ aesGcmV1SupplyAadPrefix :: (Maybe Bool)}+ deriving (Eq, Ord, Read, Show)++_AesGcmV1 = Core.Name "hydra.parquet.format.AesGcmV1"++_AesGcmV1_aadPrefix = Core.Name "aadPrefix"++_AesGcmV1_aadFileUnique = Core.Name "aadFileUnique"++_AesGcmV1_supplyAadPrefix = Core.Name "supplyAadPrefix"++-- | The algorithm used in Bloom filter.+data BloomFilterAlgorithm =+ -- | Block-based Bloom filter.+ BloomFilterAlgorithmBlock+ deriving (Eq, Ord, Read, Show)++_BloomFilterAlgorithm = Core.Name "hydra.parquet.format.BloomFilterAlgorithm"++_BloomFilterAlgorithm_block = Core.Name "block"++-- | The compression used in the Bloom filter.+data BloomFilterCompression =+ BloomFilterCompressionUncompressed+ deriving (Eq, Ord, Read, Show)++_BloomFilterCompression = Core.Name "hydra.parquet.format.BloomFilterCompression"++_BloomFilterCompression_uncompressed = Core.Name "uncompressed"++-- | The hash function used in Bloom filter. This function takes the hash of a column value using plain encoding.+data BloomFilterHash =+ -- | xxHash Strategy.+ BloomFilterHashXxhash+ deriving (Eq, Ord, Read, Show)++_BloomFilterHash = Core.Name "hydra.parquet.format.BloomFilterHash"++_BloomFilterHash_xxhash = Core.Name "xxhash"++-- | Bloom filter header is stored at beginning of Bloom filter data of each column and followed by its bitset.+data BloomFilterHeader =+ BloomFilterHeader {+ -- | The size of bitset in bytes+ bloomFilterHeaderNumBytes :: Int,+ -- | The algorithm for setting bits.+ bloomFilterHeaderAlgorithm :: BloomFilterAlgorithm,+ -- | The hash function used for Bloom filter.+ bloomFilterHeaderHash :: BloomFilterHash,+ -- | The compression used in the Bloom filter+ bloomFilterHeaderCompression :: BloomFilterCompression}+ deriving (Eq, Ord, Read, Show)++_BloomFilterHeader = Core.Name "hydra.parquet.format.BloomFilterHeader"++_BloomFilterHeader_numBytes = Core.Name "numBytes"++_BloomFilterHeader_algorithm = Core.Name "algorithm"++_BloomFilterHeader_hash = Core.Name "hash"++_BloomFilterHeader_compression = Core.Name "compression"++-- | Enum to annotate whether lists of min/max elements inside ColumnIndex are ordered and if so, in which direction.+data BoundaryOrder =+ BoundaryOrderUnordered |+ BoundaryOrderAscending |+ BoundaryOrderDescending+ deriving (Eq, Ord, Read, Show)++_BoundaryOrder = Core.Name "hydra.parquet.format.BoundaryOrder"++_BoundaryOrder_unordered = Core.Name "unordered"++_BoundaryOrder_ascending = Core.Name "ascending"++_BoundaryOrder_descending = Core.Name "descending"++-- | Metadata and location of a single column's data within a row group+data ColumnChunk =+ ColumnChunk {+ -- | File where column data is stored. If not set, assumed to be same file as metadata. This path is relative to the current file.+ columnChunkFilePath :: (Maybe String),+ -- | Byte offset in file_path to the ColumnMetaData+ columnChunkFileOffset :: I.Int64,+ -- | Column metadata for this chunk. This is the same content as what is at file_path/file_offset. Having it here has it replicated in the file metadata.+ columnChunkMetaData :: (Maybe ColumnMetaData),+ -- | File offset of ColumnChunk's OffsetIndex+ columnChunkOffsetIndexOffset :: (Maybe I.Int64),+ -- | Size of ColumnChunk's OffsetIndex, in bytes+ columnChunkOffsetIndexLength :: (Maybe Int),+ -- | File offset of ColumnChunk's ColumnIndex+ columnChunkColumnIndexOffset :: (Maybe I.Int64),+ -- | Size of ColumnChunk's ColumnIndex, in bytes+ columnChunkColumnIndexLength :: (Maybe Int),+ -- | Crypto metadata of encrypted columns+ columnChunkCryptoMetadata :: (Maybe ColumnCryptoMetaData),+ -- | Encrypted column metadata for this chunk+ columnChunkEncryptedColumnMetadata :: (Maybe B.ByteString)}+ deriving (Eq, Ord, Read, Show)++_ColumnChunk = Core.Name "hydra.parquet.format.ColumnChunk"++_ColumnChunk_filePath = Core.Name "filePath"++_ColumnChunk_fileOffset = Core.Name "fileOffset"++_ColumnChunk_metaData = Core.Name "metaData"++_ColumnChunk_offsetIndexOffset = Core.Name "offsetIndexOffset"++_ColumnChunk_offsetIndexLength = Core.Name "offsetIndexLength"++_ColumnChunk_columnIndexOffset = Core.Name "columnIndexOffset"++_ColumnChunk_columnIndexLength = Core.Name "columnIndexLength"++_ColumnChunk_cryptoMetadata = Core.Name "cryptoMetadata"++_ColumnChunk_encryptedColumnMetadata = Core.Name "encryptedColumnMetadata"++-- | Crypto metadata for a column, specifying which key was used to encrypt it+data ColumnCryptoMetaData =+ ColumnCryptoMetaDataEncryptionWithFooterKey EncryptionWithFooterKey |+ ColumnCryptoMetaDataEncryptionWithColumnKey EncryptionWithColumnKey+ deriving (Eq, Ord, Read, Show)++_ColumnCryptoMetaData = Core.Name "hydra.parquet.format.ColumnCryptoMetaData"++_ColumnCryptoMetaData_encryptionWithFooterKey = Core.Name "encryptionWithFooterKey"++_ColumnCryptoMetaData_encryptionWithColumnKey = Core.Name "encryptionWithColumnKey"++-- | Description for ColumnIndex. Each <array-field>[i] refers to the page at OffsetIndex.page_locations[i]+data ColumnIndex =+ ColumnIndex {+ -- | A list of Boolean values to determine the validity of the corresponding min and max values. If true, a page contains only null values, and writers have to set the corresponding entries in min_values and max_values to byte[0], so that all lists have the same length. If false, the corresponding entries in min_values and max_values must be valid.+ columnIndexNullPages :: [Bool],+ -- | minValues and maxValues are lists containing lower and upper bounds for the values of each page determined by the ColumnOrder of the column. These may be the actual minimum and maximum values found on a page, but can also be (more compact) values that do not exist on a page. For example, instead of storing "Blart Versenwald III", a writer may set min_values[i]="B", max_values[i]="C". Such more compact values must still be valid values within the column's logical type. Readers must make sure that list entries are populated before using them by inspecting null_pages.+ columnIndexMinValues :: [B.ByteString],+ columnIndexMaxValues :: [B.ByteString],+ -- | Stores whether both min_values and max_values are orderd and if so, in which direction. This allows readers to perform binary searches in both lists. Readers cannot assume that max_values[i] <= min_values[i+1], even if the lists are ordered.+ columnIndexBoundaryOrder :: BoundaryOrder,+ -- | A list containing the number of null values for each page+ columnIndexNullCounts :: (Maybe [I.Int64])}+ deriving (Eq, Ord, Read, Show)++_ColumnIndex = Core.Name "hydra.parquet.format.ColumnIndex"++_ColumnIndex_nullPages = Core.Name "nullPages"++_ColumnIndex_minValues = Core.Name "minValues"++_ColumnIndex_maxValues = Core.Name "maxValues"++_ColumnIndex_boundaryOrder = Core.Name "boundaryOrder"++_ColumnIndex_nullCounts = Core.Name "nullCounts"++-- | Description for column metadata+data ColumnMetaData =+ ColumnMetaData {+ -- | Type of this column+ columnMetaDataType :: Type,+ -- | Set of all encodings used for this column. The purpose is to validate whether we can decode those pages.+ columnMetaDataEncodings :: [Encoding],+ -- | Path in schema+ columnMetaDataPathInSchema :: [String],+ -- | Compression codec+ columnMetaDataCodec :: CompressionCodec,+ -- | Number of values in this column+ columnMetaDataNumValues :: I.Int64,+ -- | total byte size of all uncompressed pages in this column chunk (including the headers)+ columnMetaDataTotalUncompressedSize :: I.Int64,+ -- | total byte size of all compressed, and potentially encrypted, pages in this column chunk (including the headers)+ columnMetaDataTotalCompressedSize :: I.Int64,+ -- | Optional key/value metadata+ columnMetaDataKeyValueMetadata :: (Maybe [KeyValue]),+ -- | Byte offset from beginning of file to first data page+ columnMetaDataDataPageOffset :: I.Int64,+ -- | Byte offset from beginning of file to root index page+ columnMetaDataIndexPageOffset :: (Maybe I.Int64),+ -- | Byte offset from the beginning of file to first (only) dictionary page+ columnMetaDataDictionaryPageOffset :: (Maybe I.Int64),+ -- | optional statistics for this column chunk+ columnMetaDataStatistics :: (Maybe Statistics),+ -- | Set of all encodings used for pages in this column chunk. This information can be used to determine if all data pages are dictionary encoded for example+ columnMetaDataEncodingStats :: (Maybe [PageEncodingStats]),+ -- | Byte offset from beginning of file to Bloom filter data.+ columnMetaDataBloomFilterOffset :: (Maybe I.Int64)}+ deriving (Eq, Ord, Read, Show)++_ColumnMetaData = Core.Name "hydra.parquet.format.ColumnMetaData"++_ColumnMetaData_type = Core.Name "type"++_ColumnMetaData_encodings = Core.Name "encodings"++_ColumnMetaData_pathInSchema = Core.Name "pathInSchema"++_ColumnMetaData_codec = Core.Name "codec"++_ColumnMetaData_numValues = Core.Name "numValues"++_ColumnMetaData_totalUncompressedSize = Core.Name "totalUncompressedSize"++_ColumnMetaData_totalCompressedSize = Core.Name "totalCompressedSize"++_ColumnMetaData_keyValueMetadata = Core.Name "keyValueMetadata"++_ColumnMetaData_dataPageOffset = Core.Name "dataPageOffset"++_ColumnMetaData_indexPageOffset = Core.Name "indexPageOffset"++_ColumnMetaData_dictionaryPageOffset = Core.Name "dictionaryPageOffset"++_ColumnMetaData_statistics = Core.Name "statistics"++_ColumnMetaData_encodingStats = Core.Name "encodingStats"++_ColumnMetaData_bloomFilterOffset = Core.Name "bloomFilterOffset"++-- | Union to specify the order used for the min_value and max_value fields for a column. This union takes the role of an enhanced enum that allows rich elements (which will be needed for a collation-based ordering in the future). Possible values are:+-- | * TypeDefinedOrder - the column uses the order defined by its logical or physical type (if there is no logical type).+-- | If the reader does not support the value of this union, min and max stats for this column should be ignored. +data ColumnOrder =+ -- | The sort orders for logical types are:+ -- | UTF8 - unsigned byte-wise comparison+ -- | INT8 - signed comparison+ -- | INT16 - signed comparison+ -- | INT32 - signed comparison+ -- | INT64 - signed comparison+ -- | UINT8 - unsigned comparison+ -- | UINT16 - unsigned comparison+ -- | UINT32 - unsigned comparison+ -- | UINT64 - unsigned comparison+ -- | DECIMAL - signed comparison of the represented value+ -- | DATE - signed comparison+ -- | TIME_MILLIS - signed comparison+ -- | TIME_MICROS - signed comparison+ -- | TIMESTAMP_MILLIS - signed comparison+ -- | TIMESTAMP_MICROS - signed comparison+ -- | INTERVAL - unsigned comparison+ -- | JSON - unsigned byte-wise comparison+ -- | BSON - unsigned byte-wise comparison+ -- | ENUM - unsigned byte-wise comparison+ -- | LIST - undefined+ -- | MAP - undefined+ -- | In the absence of logical types, the sort order is determined by the physical type:+ -- | BOOLEAN - false, true+ -- | INT32 - signed comparison+ -- | INT64 - signed comparison+ -- | INT96 (only used for legacy timestamps) - undefined+ -- | FLOAT - signed comparison of the represented value (*)+ -- | DOUBLE - signed comparison of the represented value (*)+ -- | BYTE_ARRAY - unsigned byte-wise comparison+ -- | FIXED_LEN_BYTE_ARRAY - unsigned byte-wise comparison+ -- | (*) Because the sorting order is not specified properly for floating+ -- | point values (relations vs. total ordering) the following+ -- | compatibility rules should be applied when reading statistics:+ -- | - If the min is a NaN, it should be ignored.+ -- | - If the max is a NaN, it should be ignored.+ -- | - If the min is +0, the row group may contain -0 values as well.+ -- | - If the max is -0, the row group may contain +0 values as well.+ -- | - When looking for NaN values, min and max should be ignored.+ ColumnOrderTypeOrder+ deriving (Eq, Ord, Read, Show)++_ColumnOrder = Core.Name "hydra.parquet.format.ColumnOrder"++_ColumnOrder_typeOrder = Core.Name "typeOrder"++-- | Supported compression algorithms. Codecs added in format version X.Y can be read by readers based on X.Y and later. Codec support may vary between readers based on the format version and libraries available at runtime. See Compression.md for a detailed specification of these algorithms.+data CompressionCodec =+ CompressionCodecUncompressed |+ CompressionCodecSnappy |+ CompressionCodecGzip |+ CompressionCodecLzo |+ -- | Added in 2.4+ CompressionCodecBrotli |+ -- | Added in 2.4+ CompressionCodecZstd |+ -- | Added in 2.9+ CompressionCodecLz4Raw+ deriving (Eq, Ord, Read, Show)++_CompressionCodec = Core.Name "hydra.parquet.format.CompressionCodec"++_CompressionCodec_uncompressed = Core.Name "uncompressed"++_CompressionCodec_snappy = Core.Name "snappy"++_CompressionCodec_gzip = Core.Name "gzip"++_CompressionCodec_lzo = Core.Name "lzo"++_CompressionCodec_brotli = Core.Name "brotli"++_CompressionCodec_zstd = Core.Name "zstd"++_CompressionCodec_lz4Raw = Core.Name "lz4Raw"++-- | Data page header+data DataPageHeader =+ DataPageHeader {+ -- | Number of values, including NULLs, in this data page.+ dataPageHeaderNumValues :: Int,+ -- | Encoding used for this data page+ dataPageHeaderEncoding :: Encoding,+ -- | Encoding used for definition levels+ dataPageHeaderDefinitionLevelEncoding :: Encoding,+ -- | Encoding used for repetition levels+ dataPageHeaderRepetitionLevelEncoding :: Encoding,+ -- | Optional statistics for the data in this page+ dataPageHeaderStatistics :: (Maybe Statistics)}+ deriving (Eq, Ord, Read, Show)++_DataPageHeader = Core.Name "hydra.parquet.format.DataPageHeader"++_DataPageHeader_numValues = Core.Name "numValues"++_DataPageHeader_encoding = Core.Name "encoding"++_DataPageHeader_definitionLevelEncoding = Core.Name "definitionLevelEncoding"++_DataPageHeader_repetitionLevelEncoding = Core.Name "repetitionLevelEncoding"++_DataPageHeader_statistics = Core.Name "statistics"++-- | New page format allowing reading levels without decompressing the data Repetition and definition levels are uncompressed The remaining section containing the data is compressed if is_compressed is true+data DataPageHeaderV2 =+ DataPageHeaderV2 {+ -- | Number of values, including NULLs, in this data page.+ dataPageHeaderV2NumValues :: Int,+ -- | Number of NULL values, in this data page. Number of non-null = num_values - num_nulls which is also the number of values in the data section+ dataPageHeaderV2NumNulls :: Int,+ -- | Number of rows in this data page. which means pages change on record boundaries (r = 0)+ dataPageHeaderV2NumRows :: Int,+ -- | Encoding used for data in this page+ dataPageHeaderV2Encoding :: Encoding,+ -- | length of the definition levels+ dataPageHeaderV2DefinitionLevelsByteLength :: Int,+ -- | length of the repetition levels+ dataPageHeaderV2RepetitionLevelsByteLength :: Int,+ -- | whether the values are compressed. Which means the section of the page between definition_levels_byte_length + repetition_levels_byte_length + 1 and compressed_page_size (included) is compressed with the compression_codec. If missing it is considered compressed+ dataPageHeaderV2IsCompressed :: (Maybe Bool),+ -- | optional statistics for the data in this page+ dataPageHeaderV2Statistics :: (Maybe Statistics)}+ deriving (Eq, Ord, Read, Show)++_DataPageHeaderV2 = Core.Name "hydra.parquet.format.DataPageHeaderV2"++_DataPageHeaderV2_numValues = Core.Name "numValues"++_DataPageHeaderV2_numNulls = Core.Name "numNulls"++_DataPageHeaderV2_numRows = Core.Name "numRows"++_DataPageHeaderV2_encoding = Core.Name "encoding"++_DataPageHeaderV2_definitionLevelsByteLength = Core.Name "definitionLevelsByteLength"++_DataPageHeaderV2_repetitionLevelsByteLength = Core.Name "repetitionLevelsByteLength"++_DataPageHeaderV2_isCompressed = Core.Name "isCompressed"++_DataPageHeaderV2_statistics = Core.Name "statistics"++-- | Decimal logical type annotation. To maintain forward-compatibility in v1, implementations using this logical type must also set scale and precision on the annotated SchemaElement. Allowed for physical types: INT32, INT64, FIXED, and BINARY+data DecimalType =+ DecimalType {+ decimalTypeScale :: Int,+ decimalTypePrecision :: Int}+ deriving (Eq, Ord, Read, Show)++_DecimalType = Core.Name "hydra.parquet.format.DecimalType"++_DecimalType_scale = Core.Name "scale"++_DecimalType_precision = Core.Name "precision"++-- | The dictionary page must be placed at the first position of the column chunk if it is partly or completely dictionary encoded. At most one dictionary page can be placed in a column chunk.+data DictionaryPageHeader =+ DictionaryPageHeader {+ -- | Number of values in the dictionary+ dictionaryPageHeaderNumValues :: Int,+ -- | Encoding using this dictionary page+ dictionaryPageHeaderEncoding :: Encoding,+ -- | If true, the entries in the dictionary are sorted in ascending order+ dictionaryPageHeaderIsSorted :: (Maybe Bool)}+ deriving (Eq, Ord, Read, Show)++_DictionaryPageHeader = Core.Name "hydra.parquet.format.DictionaryPageHeader"++_DictionaryPageHeader_numValues = Core.Name "numValues"++_DictionaryPageHeader_encoding = Core.Name "encoding"++_DictionaryPageHeader_isSorted = Core.Name "isSorted"++-- | Encodings supported by Parquet. Not all encodings are valid for all types. These enums are also used to specify the encoding of definition and repetition levels. See the accompanying doc for the details of the more complicated encodings.+data Encoding =+ -- | Default encoding.+ -- | BOOLEAN - 1 bit per value. 0 is false; 1 is true.+ -- | INT32 - 4 bytes per value. Stored as little-endian.+ -- | INT64 - 8 bytes per value. Stored as little-endian.+ -- | FLOAT - 4 bytes per value. IEEE. Stored as little-endian.+ -- | DOUBLE - 8 bytes per value. IEEE. Stored as little-endian.+ -- | BYTE_ARRAY - 4 byte length stored as little endian, followed by bytes.+ -- | FIXED_LEN_BYTE_ARRAY - Just the bytes.+ EncodingPlain |+ -- | Group packed run length encoding. Usable for definition/repetition levels encoding and Booleans (on one bit: 0 is false; 1 is true.)+ EncodingRle |+ -- | Bit packed encoding. This can only be used if the data has a known max width. Usable for definition/repetition levels encoding.+ EncodingBitPacked |+ -- | Delta encoding for integers. This can be used for int columns and works best on sorted data+ EncodingDeltaBinaryPacked |+ -- | Encoding for byte arrays to separate the length values and the data. The lengths are encoded using DELTA_BINARY_PACKED+ EncodingDeltaLengthByteArray |+ -- | Incremental-encoded byte array. Prefix lengths are encoded using DELTA_BINARY_PACKED. Suffixes are stored as delta length byte arrays.+ EncodingDeltaByteArray |+ -- | Dictionary encoding: the ids are encoded using the RLE encoding+ EncodingRleDictionary |+ -- | Encoding for floating-point data. K byte-streams are created where K is the size in bytes of the data type. The individual bytes of an FP value are scattered to the corresponding stream and the streams are concatenated. This itself does not reduce the size of the data but can lead to better compression afterwards.+ EncodingByteStreamSplit+ deriving (Eq, Ord, Read, Show)++_Encoding = Core.Name "hydra.parquet.format.Encoding"++_Encoding_plain = Core.Name "plain"++_Encoding_rle = Core.Name "rle"++_Encoding_bitPacked = Core.Name "bitPacked"++_Encoding_deltaBinaryPacked = Core.Name "deltaBinaryPacked"++_Encoding_deltaLengthByteArray = Core.Name "deltaLengthByteArray"++_Encoding_deltaByteArray = Core.Name "deltaByteArray"++_Encoding_rleDictionary = Core.Name "rleDictionary"++_Encoding_byteStreamSplit = Core.Name "byteStreamSplit"++-- | The encryption algorithm used to protect a Parquet file, with its parameters+data EncryptionAlgorithm =+ EncryptionAlgorithmAesGcmV1 AesGcmV1 |+ EncryptionAlgorithmAesGcmCtrV1 AesGcmCtrV1+ deriving (Eq, Ord, Read, Show)++_EncryptionAlgorithm = Core.Name "hydra.parquet.format.EncryptionAlgorithm"++_EncryptionAlgorithm_aesGcmV1 = Core.Name "aesGcmV1"++_EncryptionAlgorithm_aesGcmCtrV1 = Core.Name "aesGcmCtrV1"++-- | Identifies a column as encrypted with its own per-column encryption key+data EncryptionWithColumnKey =+ EncryptionWithColumnKey {+ -- | Column path in schema+ encryptionWithColumnKeyPathInSchema :: [String],+ -- | Retrieval metadata of column encryption key+ encryptionWithColumnKeyKeyMetadata :: (Maybe B.ByteString)}+ deriving (Eq, Ord, Read, Show)++_EncryptionWithColumnKey = Core.Name "hydra.parquet.format.EncryptionWithColumnKey"++_EncryptionWithColumnKey_pathInSchema = Core.Name "pathInSchema"++_EncryptionWithColumnKey_keyMetadata = Core.Name "keyMetadata"++-- | Identifies a column as encrypted with the same key used to encrypt the footer+type EncryptionWithFooterKey = ()++_EncryptionWithFooterKey = Core.Name "hydra.parquet.format.EncryptionWithFooterKey"++-- | Representation of Schemas+data FieldRepetitionType =+ -- | This field is required (can not be null) and each record has exactly 1 value.+ FieldRepetitionTypeRequired |+ -- | The field is optional (can be null) and each record has 0 or 1 values.+ FieldRepetitionTypeOptional |+ -- | The field is repeated and can contain 0 or more values+ FieldRepetitionTypeRepeated+ deriving (Eq, Ord, Read, Show)++_FieldRepetitionType = Core.Name "hydra.parquet.format.FieldRepetitionType"++_FieldRepetitionType_required = Core.Name "required"++_FieldRepetitionType_optional = Core.Name "optional"++_FieldRepetitionType_repeated = Core.Name "repeated"++-- | Crypto metadata for files with encrypted footer+data FileCryptoMetaData =+ FileCryptoMetaData {+ -- | Encryption algorithm. This field is only used for files with encrypted footer. Files with plaintext footer store algorithm id inside footer (FileMetaData structure).+ fileCryptoMetaDataEncryptionAlgorithm :: EncryptionAlgorithm,+ -- | Retrieval metadata of key used for encryption of footer, and (possibly) columns+ fileCryptoMetaDataKeyMetadata :: (Maybe B.ByteString)}+ deriving (Eq, Ord, Read, Show)++_FileCryptoMetaData = Core.Name "hydra.parquet.format.FileCryptoMetaData"++_FileCryptoMetaData_encryptionAlgorithm = Core.Name "encryptionAlgorithm"++_FileCryptoMetaData_keyMetadata = Core.Name "keyMetadata"++-- | Description for file metadata+data FileMetaData =+ FileMetaData {+ -- | Version of this file+ fileMetaDataVersion :: Int,+ -- | Parquet schema for this file. This schema contains metadata for all the columns. The schema is represented as a tree with a single root. The nodes of the tree are flattened to a list by doing a depth-first traversal. The column metadata contains the path in the schema for that column which can be used to map columns to nodes in the schema. The first element is the root+ fileMetaDataSchema :: [SchemaElement],+ -- | Number of rows in this file+ fileMetaDataNumRows :: I.Int64,+ -- | Row groups in this file+ fileMetaDataRowGroups :: [RowGroup],+ -- | Optional key/value metadata+ fileMetaDataKeyValueMetadata :: (Maybe [KeyValue]),+ -- | String for application that wrote this file. This should be in the format <Application> version <App Version> (build <App Build Hash>). e.g. impala version 1.0 (build 6cf94d29b2b7115df4de2c06e2ab4326d721eb55)+ fileMetaDataCreatedBy :: (Maybe String),+ -- | Sort order used for the min_value and max_value fields in the Statistics objects and the min_values and max_values fields in the ColumnIndex objects of each column in this file. Sort orders are listed in the order matching the columns in the schema. The indexes are not necessary the same though, because only leaf nodes of the schema are represented in the list of sort orders.+ -- | Without column_orders, the meaning of the min_value and max_value fields in the Statistics object and the ColumnIndex object is undefined. To ensure well-defined behaviour, if these fields are written to a Parquet file, column_orders must be written as well.+ -- | The obsolete min and max fields in the Statistics object are always sorted by signed comparison regardless of column_orders.+ fileMetaDataColumnOrders :: (Maybe [ColumnOrder]),+ -- | Encryption algorithm. This field is set only in encrypted files with plaintext footer. Files with encrypted footer store algorithm id in FileCryptoMetaData structure.+ fileMetaDataEncryptionAlgorithm :: (Maybe EncryptionAlgorithm),+ -- | Retrieval metadata of key used for signing the footer. Used only in encrypted files with plaintext footer.+ fileMetaDataFooterSigningKeyMetadata :: (Maybe B.ByteString)}+ deriving (Eq, Ord, Read, Show)++_FileMetaData = Core.Name "hydra.parquet.format.FileMetaData"++_FileMetaData_version = Core.Name "version"++_FileMetaData_schema = Core.Name "schema"++_FileMetaData_numRows = Core.Name "numRows"++_FileMetaData_rowGroups = Core.Name "rowGroups"++_FileMetaData_keyValueMetadata = Core.Name "keyValueMetadata"++_FileMetaData_createdBy = Core.Name "createdBy"++_FileMetaData_columnOrders = Core.Name "columnOrders"++_FileMetaData_encryptionAlgorithm = Core.Name "encryptionAlgorithm"++_FileMetaData_footerSigningKeyMetadata = Core.Name "footerSigningKeyMetadata"++-- | Header for an index page (currently unused in the Parquet format)+type IndexPageHeader = ()++_IndexPageHeader = Core.Name "hydra.parquet.format.IndexPageHeader"++-- | Integer logical type annotation. bitWidth must be 8, 16, 32, or 64. Allowed for physical types: INT32, INT64+data IntType =+ IntType {+ intTypeBitWidth :: I.Int16,+ intTypeIsSigned :: Bool}+ deriving (Eq, Ord, Read, Show)++_IntType = Core.Name "hydra.parquet.format.IntType"++_IntType_bitWidth = Core.Name "bitWidth"++_IntType_isSigned = Core.Name "isSigned"++-- | Wrapper struct to store key values+data KeyValue =+ KeyValue {+ keyValueKey :: String,+ keyValueValue :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_KeyValue = Core.Name "hydra.parquet.format.KeyValue"++_KeyValue_key = Core.Name "key"++_KeyValue_value = Core.Name "value"++-- | LogicalType annotations to replace ConvertedType. To maintain compatibility, implementations using LogicalType for a SchemaElement aust also set the corresponding ConvertedType (if any) from the following table.+data LogicalType =+ -- | use ConvertedType UTF8+ LogicalTypeString |+ -- | use ConvertedType MAP+ LogicalTypeMap |+ -- | use ConvertedType LIST+ LogicalTypeList |+ -- | use ConvertedType ENUM+ LogicalTypeEnum |+ -- | use ConvertedType DECIMAL + SchemaElement.{scale, precision}+ LogicalTypeDecimal DecimalType |+ -- | use ConvertedType DATE+ LogicalTypeDate |+ -- | use ConvertedType TIME_MICROS for TIME(isAdjustedToUTC = *, unit = MICROS). use ConvertedType TIME_MILLIS for TIME(isAdjustedToUTC = *, unit = MILLIS)+ LogicalTypeTime TimeType |+ -- | use ConvertedType TIMESTAMP_MICROS for TIMESTAMP(isAdjustedToUTC = *, unit = MICROS). use ConvertedType TIMESTAMP_MILLIS for TIMESTAMP(isAdjustedToUTC = *, unit = MILLIS)+ LogicalTypeTimestamp TimestampType |+ -- | use ConvertedType INT_* or UINT_*+ LogicalTypeInteger IntType |+ -- | no compatible ConvertedType+ LogicalTypeUnknown |+ -- | use ConvertedType JSON+ LogicalTypeJson |+ -- | use ConvertedType BSON+ LogicalTypeBson |+ -- | no compatible ConvertedType+ LogicalTypeUuid+ deriving (Eq, Ord, Read, Show)++_LogicalType = Core.Name "hydra.parquet.format.LogicalType"++_LogicalType_string = Core.Name "string"++_LogicalType_map = Core.Name "map"++_LogicalType_list = Core.Name "list"++_LogicalType_enum = Core.Name "enum"++_LogicalType_decimal = Core.Name "decimal"++_LogicalType_date = Core.Name "date"++_LogicalType_time = Core.Name "time"++_LogicalType_timestamp = Core.Name "timestamp"++_LogicalType_integer = Core.Name "integer"++_LogicalType_unknown = Core.Name "unknown"++_LogicalType_json = Core.Name "json"++_LogicalType_bson = Core.Name "bson"++_LogicalType_uuid = Core.Name "uuid"++-- | The offset index for a column chunk, giving byte offsets and row indices of its pages+data OffsetIndex =+ OffsetIndex {+ -- | PageLocations, ordered by increasing PageLocation.offset. It is required that page_locations[i].first_row_index < page_locations[i+1].first_row_index.+ offsetIndexPageLocations :: [PageLocation]}+ deriving (Eq, Ord, Read, Show)++_OffsetIndex = Core.Name "hydra.parquet.format.OffsetIndex"++_OffsetIndex_pageLocations = Core.Name "pageLocations"++-- | statistics of a given page type and encoding+data PageEncodingStats =+ PageEncodingStats {+ -- | the page type (data/dic/...)+ pageEncodingStatsPageType :: PageType,+ -- | encoding of the page+ pageEncodingStatsEncoding :: Encoding,+ -- | number of pages of this type with this encoding+ pageEncodingStatsCount :: Int}+ deriving (Eq, Ord, Read, Show)++_PageEncodingStats = Core.Name "hydra.parquet.format.PageEncodingStats"++_PageEncodingStats_pageType = Core.Name "pageType"++_PageEncodingStats_encoding = Core.Name "encoding"++_PageEncodingStats_count = Core.Name "count"++-- | Common header shared by all page types, wrapping a type-specific header+data PageHeader =+ PageHeader {+ -- | the type of the page: indicates which of the *_header fields is set+ pageHeaderType :: PageType,+ -- | Uncompressed page size in bytes (not including this header)+ pageHeaderUncompressedPageSize :: Int,+ -- | Compressed (and potentially encrypted) page size in bytes, not including this header+ pageHeaderCompressedPageSize :: Int,+ -- | The 32bit CRC for the page, to be be calculated as follows:+ -- | - Using the standard CRC32 algorithm+ -- | - On the data only, i.e. this header should not be included. 'Data'+ -- | hereby refers to the concatenation of the repetition levels, the+ -- | definition levels and the column value, in this exact order.+ -- | - On the encoded versions of the repetition levels, definition levels and+ -- | column values+ -- | - On the compressed versions of the repetition levels, definition levels+ -- | and column values where possible;+ -- | - For v1 data pages, the repetition levels, definition levels and column+ -- | values are always compressed together. If a compression scheme is+ -- | specified, the CRC shall be calculated on the compressed version of+ -- | this concatenation. If no compression scheme is specified, the CRC+ -- | shall be calculated on the uncompressed version of this concatenation.+ -- | - For v2 data pages, the repetition levels and definition levels are+ -- | handled separately from the data and are never compressed (only+ -- | encoded). If a compression scheme is specified, the CRC shall be+ -- | calculated on the concatenation of the uncompressed repetition levels,+ -- | uncompressed definition levels and the compressed column values.+ -- | If no compression scheme is specified, the CRC shall be calculated on+ -- | the uncompressed concatenation.+ -- | - In encrypted columns, CRC is calculated after page encryption; the+ -- | encryption itself is performed after page compression (if compressed)+ -- | If enabled, this allows for disabling checksumming in HDFS if only a few pages need to be read. + pageHeaderCrc :: (Maybe Int),+ pageHeaderDataPageHeader :: (Maybe DataPageHeader),+ pageHeaderIndexPageHeader :: (Maybe IndexPageHeader),+ pageHeaderDictionaryPageHeader :: (Maybe DictionaryPageHeader),+ pageHeaderDataPageHeaderV2 :: (Maybe DataPageHeaderV2)}+ deriving (Eq, Ord, Read, Show)++_PageHeader = Core.Name "hydra.parquet.format.PageHeader"++_PageHeader_type = Core.Name "type"++_PageHeader_uncompressedPageSize = Core.Name "uncompressedPageSize"++_PageHeader_compressedPageSize = Core.Name "compressedPageSize"++_PageHeader_crc = Core.Name "crc"++_PageHeader_dataPageHeader = Core.Name "dataPageHeader"++_PageHeader_indexPageHeader = Core.Name "indexPageHeader"++_PageHeader_dictionaryPageHeader = Core.Name "dictionaryPageHeader"++_PageHeader_dataPageHeaderV2 = Core.Name "dataPageHeaderV2"++-- | Location and size of a single page, used as an entry in an OffsetIndex+data PageLocation =+ PageLocation {+ -- | Offset of the page in the file+ pageLocationOffset :: I.Int64,+ -- | Size of the page, including header. Sum of compressed_page_size and header length+ pageLocationCompressedPageSize :: Int,+ -- | Index within the RowGroup of the first row of the page; this means pages change on record boundaries (r = 0).+ pageLocationFirstRowIndex :: I.Int64}+ deriving (Eq, Ord, Read, Show)++_PageLocation = Core.Name "hydra.parquet.format.PageLocation"++_PageLocation_offset = Core.Name "offset"++_PageLocation_compressedPageSize = Core.Name "compressedPageSize"++_PageLocation_firstRowIndex = Core.Name "firstRowIndex"++-- | The type of a page within a column chunk+data PageType =+ PageTypeDataPage |+ PageTypeIndexPage |+ PageTypeDictionaryPage |+ PageTypeDataPageV2+ deriving (Eq, Ord, Read, Show)++_PageType = Core.Name "hydra.parquet.format.PageType"++_PageType_dataPage = Core.Name "dataPage"++_PageType_indexPage = Core.Name "indexPage"++_PageType_dictionaryPage = Core.Name "dictionaryPage"++_PageType_dataPageV2 = Core.Name "dataPageV2"++-- | Metadata for a horizontal partition of the data into a row group+data RowGroup =+ RowGroup {+ -- | Metadata for each column chunk in this row group. This list must have the same order as the SchemaElement list in FileMetaData.+ rowGroupColumns :: [ColumnChunk],+ -- | Total byte size of all the uncompressed column data in this row group+ rowGroupTotalByteSize :: I.Int64,+ -- | Number of rows in this row group+ rowGroupNumRows :: I.Int64,+ -- | If set, specifies a sort ordering of the rows in this RowGroup. The sorting columns can be a subset of all the columns.+ rowGroupSortingColumns :: (Maybe [SortingColumn]),+ -- | Byte offset from beginning of file to first page (data or dictionary) in this row group+ rowGroupFileOffset :: (Maybe I.Int64),+ -- | Total byte size of all compressed (and potentially encrypted) column data in this row group+ rowGroupTotalCompressedSize :: (Maybe I.Int64),+ -- | Row group ordinal in the file+ rowGroupOrdinal :: (Maybe I.Int16)}+ deriving (Eq, Ord, Read, Show)++_RowGroup = Core.Name "hydra.parquet.format.RowGroup"++_RowGroup_columns = Core.Name "columns"++_RowGroup_totalByteSize = Core.Name "totalByteSize"++_RowGroup_numRows = Core.Name "numRows"++_RowGroup_sortingColumns = Core.Name "sortingColumns"++_RowGroup_fileOffset = Core.Name "fileOffset"++_RowGroup_totalCompressedSize = Core.Name "totalCompressedSize"++_RowGroup_ordinal = Core.Name "ordinal"++-- | Represents a element inside a schema definition.+-- | - if it is a group (inner node) then type is undefined and num_children is defined+-- | - if it is a primitive type (leaf) then type is defined and num_children is undefined+-- | the nodes are listed in depth first traversal order.+data SchemaElement =+ SchemaElement {+ -- | Data type for this field. Not set if the current element is a non-leaf node+ schemaElementType :: (Maybe Type),+ -- | If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the values. Otherwise, if specified, this is the maximum bit length to store any of the values. (e.g. a low cardinality INT col could have this set to 3). Note that this is in the schema, and therefore fixed for the entire file.+ schemaElementTypeLength :: (Maybe Int),+ -- | repetition of the field. The root of the schema does not have a repetition_type. All other nodes must have one+ schemaElementRepetitionType :: (Maybe FieldRepetitionType),+ -- | Name of the field in the schema+ schemaElementName :: String,+ -- | Nested fields. Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal. The children count is used to construct the nested relationship. This field is not set when the element is a primitive type+ schemaElementNumChildren :: (Maybe Int),+ -- | When the original schema supports field ids, this will save the original field id in the parquet schema+ schemaElementFieldId :: (Maybe Int),+ -- | The logical type of this SchemaElement. LogicalType replaces ConvertedType, but ConvertedType is still required for some logical types to ensure forward-compatibility in format v1.+ schemaElementLogicalType :: (Maybe LogicalType)}+ deriving (Eq, Ord, Read, Show)++_SchemaElement = Core.Name "hydra.parquet.format.SchemaElement"++_SchemaElement_type = Core.Name "type"++_SchemaElement_typeLength = Core.Name "typeLength"++_SchemaElement_repetitionType = Core.Name "repetitionType"++_SchemaElement_name = Core.Name "name"++_SchemaElement_numChildren = Core.Name "numChildren"++_SchemaElement_fieldId = Core.Name "fieldId"++_SchemaElement_logicalType = Core.Name "logicalType"++-- | Wrapper struct to specify sort order+data SortingColumn =+ SortingColumn {+ -- | The column index (in this row group)+ sortingColumnColumnIdx :: Int,+ -- | If true, indicates this column is sorted in descending order.+ sortingColumnDescending :: Bool,+ -- | If true, nulls will come before non-null values, otherwise, nulls go at the end.+ sortingColumnNullsFirst :: Bool}+ deriving (Eq, Ord, Read, Show)++_SortingColumn = Core.Name "hydra.parquet.format.SortingColumn"++_SortingColumn_columnIdx = Core.Name "columnIdx"++_SortingColumn_descending = Core.Name "descending"++_SortingColumn_nullsFirst = Core.Name "nullsFirst"++-- | Statistics per row group and per page. All fields are optional.+data Statistics =+ Statistics {+ statisticsNullCount :: (Maybe Integer),+ statisticsDistinctCount :: (Maybe Integer),+ -- | Max value for the column, determined by its ColumnOrder. Values are encoded using PLAIN encoding, except that variable-length byte arrays do not include a length prefix.+ statisticsMaxValue :: (Maybe B.ByteString),+ -- | Max value for the column, determined by its ColumnOrder. Values are encoded using PLAIN encoding, except that variable-length byte arrays do not include a length prefix.+ statisticsMinValue :: (Maybe B.ByteString)}+ deriving (Eq, Ord, Read, Show)++_Statistics = Core.Name "hydra.parquet.format.Statistics"++_Statistics_nullCount = Core.Name "nullCount"++_Statistics_distinctCount = Core.Name "distinctCount"++_Statistics_maxValue = Core.Name "maxValue"++_Statistics_minValue = Core.Name "minValue"++-- | Time logical type annotation. Allowed for physical types: INT32 (millis), INT64 (micros, nanos)+data TimeType =+ TimeType {+ timeTypeIsAdjustedToUtc :: Bool,+ timeTypeUnit :: TimeUnit}+ deriving (Eq, Ord, Read, Show)++_TimeType = Core.Name "hydra.parquet.format.TimeType"++_TimeType_isAdjustedToUtc = Core.Name "isAdjustedToUtc"++_TimeType_unit = Core.Name "unit"++-- | The unit of measurement for a TIME or TIMESTAMP logical type+data TimeUnit =+ TimeUnitMillis |+ TimeUnitMicros |+ TimeUnitNanos+ deriving (Eq, Ord, Read, Show)++_TimeUnit = Core.Name "hydra.parquet.format.TimeUnit"++_TimeUnit_millis = Core.Name "millis"++_TimeUnit_micros = Core.Name "micros"++_TimeUnit_nanos = Core.Name "nanos"++-- | Timestamp logical type annotation. Allowed for physical types: INT64+data TimestampType =+ TimestampType {+ timestampTypeIsAdjustedToUtc :: Bool,+ timestampTypeUnit :: TimeUnit}+ deriving (Eq, Ord, Read, Show)++_TimestampType = Core.Name "hydra.parquet.format.TimestampType"++_TimestampType_isAdjustedToUtc = Core.Name "isAdjustedToUtc"++_TimestampType_unit = Core.Name "unit"++-- | Types supported by Parquet. These types are intended to be used in combination with the encodings to control the on disk storage format. For example INT16 is not included as a type since a good encoding of INT32 would handle this.+data Type =+ TypeBoolean |+ TypeInt32 |+ TypeInt64 |+ TypeFloat |+ TypeDouble |+ TypeByteArray |+ TypeFixedLenByteArray+ deriving (Eq, Ord, Read, Show)++_Type = Core.Name "hydra.parquet.format.Type"++_Type_boolean = Core.Name "boolean"++_Type_int32 = Core.Name "int32"++_Type_int64 = Core.Name "int64"++_Type_float = Core.Name "float"++_Type_double = Core.Name "double"++_Type_byteArray = Core.Name "byteArray"++_Type_fixedLenByteArray = Core.Name "fixedLenByteArray"
src/main/haskell/Hydra/Pegasus/Coder.hs view
@@ -1,19 +1,24 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Pegasus PDL code generator: converts Hydra modules to PDL schema files module Hydra.Pegasus.Coder where+ import qualified Hydra.Analysis as Analysis import qualified Hydra.Annotations as Annotations import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core-import qualified Hydra.File as File import qualified Hydra.Dependencies as Dependencies+import qualified Hydra.Docs as Docs import qualified Hydra.Environment as Environment import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model@@ -23,6 +28,7 @@ import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals+import qualified Hydra.Overlay.Haskell.Lib.Ordering as Ordering import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings@@ -33,14 +39,17 @@ import qualified Hydra.Pegasus.Language as Language import qualified Hydra.Pegasus.Pdl as Pdl import qualified Hydra.Pegasus.Serde as Serde+import qualified Hydra.Print.Core as PrintCore import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Serialization as Serialization-import qualified Hydra.Show.Core as ShowCore import qualified Hydra.Sorting as Sorting import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -50,25 +59,31 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M+ -- | Construct PDL schema files from type definitions, with topological sorting and cycle detection constructModule :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Packaging.Module -> [Packaging.TypeDefinition] -> Either Errors.Error (M.Map String Pdl.SchemaFile) constructModule cx g aliases mod typeDefs = let groups = Dependencies.topologicalSortTypeDefinitions typeDefs- in (Optionals.cases (Lists.find (\grp -> Equality.gt (Lists.length grp) 1) groups) (+ in (Optionals.cases (Lists.find (\grp -> Ordering.gt (Lists.length grp) 1) groups) ( let sortedDefs = Lists.concat groups- in (Eithers.bind (Eithers.mapList (\typeDef -> typeToSchema cx g aliases mod typeDef) sortedDefs) (\schemas -> Right (Maps.fromList (Lists.map (toPair mod aliases) schemas))))) (\cycle -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "types form a cycle (unsupported in PDL): [" (Strings.cat2 (Strings.intercalate ", " (Lists.map (\td -> Core.unName (Packaging.typeDefinitionName td)) cycle)) "]"))))))+ in (Eithers.bind (Eithers.mapList (\typeDef -> typeToSchema cx g aliases mod typeDef) sortedDefs) (\schemas -> Right (Maps.fromList (Lists.map (toPair mod aliases) schemas))))) (\cycle -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "types form a cycle (unsupported in PDL): [" (Strings.concat2 (Strings.join ", " (Lists.map (\td -> Core.unName (Packaging.typeDefinitionName td)) cycle)) "]"))))))+ -- | Create PDL annotations from an optional doc string doc :: Maybe String -> Pdl.Annotations doc s = Pdl.Annotations { Pdl.annotationsDoc = s, Pdl.annotationsDeprecated = False}++-- | Encode a Hydra type as a PDL schema, failing if it resolves to a nested named schema encode :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Core.Type -> Either Errors.Error Pdl.Schema encode cx g aliases t = case (Strip.deannotateType t) of- Core.TypeRecord v0 -> Logic.ifElse (Lists.null v0) (encode cx g aliases (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) (Eithers.bind (encodeType cx g aliases t) (\res -> Eithers.either (\schema -> Right schema) (\_ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "type resolved to an unsupported nested named schema: " (ShowCore.type_ t))))) res))- _ -> Eithers.bind (encodeType cx g aliases t) (\res -> Eithers.either (\schema -> Right schema) (\_ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "type resolved to an unsupported nested named schema: " (ShowCore.type_ t))))) res)+ Core.TypeRecord v0 -> Logic.ifElse (Lists.null v0) (encode cx g aliases (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) (Eithers.bind (encodeType cx g aliases t) (\res -> Eithers.either (\schema -> Right schema) (\_ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "type resolved to an unsupported nested named schema: " (PrintCore.type_ t))))) res))+ _ -> Eithers.bind (encodeType cx g aliases t) (\res -> Eithers.either (\schema -> Right schema) (\_ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "type resolved to an unsupported nested named schema: " (PrintCore.type_ t))))) res)++-- | Encode a Hydra field type as a PDL enum field, converting the name to upper snake case encodeEnumField :: t0 -> Graph.Graph -> Core.FieldType -> Either Errors.Error Pdl.EnumField encodeEnumField cx g ft = @@ -77,6 +92,8 @@ in (Eithers.bind (getAnns cx g typ) (\anns -> Right (Pdl.EnumField { Pdl.enumFieldName = (Pdl.EnumFieldName (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionUpperSnake (Core.unName name))), Pdl.enumFieldAnnotations = anns})))++-- | Encode a type as a PDL schema together with a flag indicating whether it was optional encodePossiblyOptionalType :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Core.Type -> Either Errors.Error (Pdl.Schema, Bool) encodePossiblyOptionalType cx g aliases typ = case (Strip.deannotateType typ) of@@ -93,6 +110,8 @@ Core.TypePair _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False)) Core.TypeVoid -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False)) Core.TypeAnnotated v0 -> encodePossiblyOptionalType cx g aliases (Core.annotatedTypeBody v0)++-- | Encode a Hydra field type as a PDL record field encodeRecordField :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Core.FieldType -> Either Errors.Error Pdl.RecordField encodeRecordField cx g aliases ft = @@ -107,6 +126,7 @@ Pdl.recordFieldOptional = optional, Pdl.recordFieldDefault = Nothing, Pdl.recordFieldAnnotations = anns})))))+ -- | Encode a Hydra type as either a PDL Schema (Left) or a PDL NamedSchemaType (Right) encodeType :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Core.Type -> Either Errors.Error (Either Pdl.Schema Pdl.NamedSchemaType) encodeType cx g aliases typ =@@ -133,13 +153,13 @@ Core.LiteralTypeFloat v1 -> case v1 of Core.FloatTypeFloat32 -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeFloat)) Core.FloatTypeFloat64 -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeDouble))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected " (Strings.cat2 "float32 or float64" (Strings.cat2 ", found: " (ShowCore.type_ typ))))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected " (Strings.concat2 "float32 or float64" (Strings.concat2 ", found: " (PrintCore.type_ typ)))))) Core.LiteralTypeInteger v1 -> case v1 of Core.IntegerTypeInt32 -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeInt)) Core.IntegerTypeInt64 -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeLong))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected " (Strings.cat2 "int32 or int64" (Strings.cat2 ", found: " (ShowCore.type_ typ))))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected " (Strings.concat2 "int32 or int64" (Strings.concat2 ", found: " (PrintCore.type_ typ)))))) Core.LiteralTypeString -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeString))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected " (Strings.cat2 "PDL-supported literal type" (Strings.cat2 ", found: " (ShowCore.type_ typ))))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected " (Strings.concat2 "PDL-supported literal type" (Strings.concat2 ", found: " (PrintCore.type_ typ)))))) Core.TypeMap v0 -> Eithers.bind (encode cx g aliases (Core.mapTypeValues v0)) (\inner -> Right (Left (Pdl.SchemaMap inner))) Core.TypePair v0 -> Eithers.bind (encode cx g aliases (Core.pairTypeFirst v0)) (\firstSchema -> Eithers.bind (encode cx g aliases (Core.pairTypeSecond v0)) (\secondSchema -> let firstField =@@ -170,7 +190,9 @@ Pdl.recordSchemaIncludes = []})))) Core.TypeUnion v0 -> Logic.ifElse (Lists.foldl (\b -> \t -> Logic.and b (Equality.equal (Strip.deannotateType t) Core.TypeUnit)) True (Lists.map (\f -> Core.fieldTypeType f) v0)) (Eithers.bind (Eithers.mapList (encodeEnumField cx g) v0) (\fs -> Right (Right (Pdl.NamedSchemaTypeEnum (Pdl.EnumSchema { Pdl.enumSchemaFields = fs}))))) (Eithers.bind (Eithers.mapList (encodeUnionField cx g aliases) v0) (\members -> Right (Left (Pdl.SchemaUnion (Pdl.UnionSchema members)))))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected " (Strings.cat2 "PDL-supported type" (Strings.cat2 ", found: " (ShowCore.type_ typ))))))+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat2 "Expected " (Strings.concat2 "PDL-supported type" (Strings.concat2 ", found: " (PrintCore.type_ typ))))))++-- | Encode a Hydra field type as a PDL union member, wrapping optional types in a null union encodeUnionField :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> Core.FieldType -> Either Errors.Error Pdl.UnionMember encodeUnionField cx g aliases ft = @@ -187,16 +209,21 @@ Pdl.unionMemberAlias = (Just (Pdl.FieldName (Core.unName name))), Pdl.unionMemberValue = schema, Pdl.unionMemberAnnotations = anns})))))++-- | Get PDL annotations for a type by looking up its description in the graph getAnns :: t0 -> Graph.Graph -> Core.Type -> Either Errors.Error Pdl.Annotations getAnns cx g typ = Eithers.bind (Annotations.getTypeDescription cx g typ) (\r -> Right (doc r))+ -- | Compute import aliases for a module's dependencies importAliasesForModule :: t0 -> Graph.Graph -> Packaging.Module -> Either Errors.Error (M.Map Packaging.ModuleName String) importAliasesForModule cx g mod = Eithers.bind (Analysis.moduleDependencyModuleNames cx g False True True False mod) (\nss -> Right (Maps.fromList (Lists.map (\ns_ -> (ns_, (slashesToDots (Packaging.unModuleName ns_)))) (Sets.toList nss))))+ -- | Convert a Hydra module to a map of file paths to PDL schema strings moduleToPdl :: Packaging.Module -> [Packaging.Definition] -> t0 -> Graph.Graph -> Either Errors.Error (M.Map String String) moduleToPdl mod defs cx g = Eithers.bind (moduleToPegasusSchemas cx g mod defs) (\files -> Right (Maps.fromList (Lists.map (\pair -> (Pairs.first pair, (Serialization.printExpr (Serialization.parenthesize (Serde.schemaFileToExpr (Pairs.second pair)))))) (Maps.toList files))))+ -- | Convert a Hydra module and its definitions to PDL schema files moduleToPegasusSchemas :: t0 -> Graph.Graph -> Packaging.Module -> [Packaging.Definition] -> Either Errors.Error (M.Map String Pdl.SchemaFile) moduleToPegasusSchemas cx g mod defs =@@ -204,12 +231,14 @@ let partitioned = Environment.partitionDefinitions defs typeDefs = Pairs.first partitioned in (Eithers.bind (importAliasesForModule cx g mod) (\aliases -> constructModule cx g aliases mod typeDefs))+ -- | Empty PDL annotations noAnnotations :: Pdl.Annotations noAnnotations = Pdl.Annotations { Pdl.annotationsDoc = Nothing, Pdl.annotationsDeprecated = False}+ -- | Convert a Hydra element name to a PDL qualified name pdlNameForElement :: M.Map Packaging.ModuleName String -> Bool -> Core.Name -> Pdl.QualifiedName pdlNameForElement aliases withNs name =@@ -221,9 +250,11 @@ in Pdl.QualifiedName { Pdl.qualifiedNameName = (Pdl.Name local), Pdl.qualifiedNameNamespace = (Logic.ifElse withNs (Optionals.map (\a -> Pdl.Namespace a) alias) Nothing)}+ -- | Convert a module's namespace to a PDL namespace pdlNameForModule :: Packaging.Module -> Pdl.Namespace pdlNameForModule mod = Pdl.Namespace (slashesToDots (Packaging.unModuleName (Packaging.moduleName mod)))+ -- | Create a simple union member without an alias simpleUnionMember :: Pdl.Schema -> Pdl.UnionMember simpleUnionMember schema =@@ -231,9 +262,12 @@ Pdl.unionMemberAlias = Nothing, Pdl.unionMemberValue = schema, Pdl.unionMemberAnnotations = noAnnotations}+ -- | Replace all forward slashes with dots in a string slashesToDots :: String -> String-slashesToDots s = Strings.intercalate "." (Strings.splitOn "/" s)+slashesToDots s = Strings.join "." (Strings.splitOn "/" s)++-- | Pair a file path derived from a module and schema name with the resulting PDL schema file toPair :: Packaging.Module -> t0 -> (Pdl.NamedSchema, [Pdl.QualifiedName]) -> (String, Pdl.SchemaFile) toPair mod aliases schemaPair = @@ -242,7 +276,7 @@ ns_ = pdlNameForModule mod local = Pdl.unName (Pdl.qualifiedNameName (Pdl.namedSchemaQualifiedName schema)) path =- Names.moduleNameToFilePath Util.CaseConventionCamel (File.FileExtension "pdl") (Packaging.ModuleName (Strings.cat2 (Packaging.unModuleName (Packaging.moduleName mod)) (Strings.cat2 "/" local)))+ Names.moduleNameToFilePath Util.CaseConventionCamel (File.FileExtension "pdl") (Packaging.ModuleName (Strings.concat2 (Packaging.unModuleName (Packaging.moduleName mod)) (Strings.concat2 "/" local))) in ( path, Pdl.SchemaFile {@@ -251,6 +285,8 @@ Pdl.schemaFileImports = imports, Pdl.schemaFileSchemas = [ schema]})++-- | Convert a Hydra type definition into a named PDL schema together with its imports typeToSchema :: t0 -> Graph.Graph -> M.Map Packaging.ModuleName String -> t1 -> Packaging.TypeDefinition -> Either Errors.Error (Pdl.NamedSchema, [t2]) typeToSchema cx g aliases mod typeDef =
src/main/haskell/Hydra/Pegasus/Language.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Language constraints for LinkedIn Pegasus (PDL) module Hydra.Pegasus.Language where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Lexical as Lexical@@ -17,9 +23,12 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -28,6 +37,7 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Language constraints for LinkedIn Pegasus (PDL) pdlLanguage :: Coders.Language pdlLanguage =@@ -39,7 +49,23 @@ Coders.languageConstraintsIntegerTypes = integerTypes, Coders.languageConstraintsTermVariants = termVariants, Coders.languageConstraintsTypeVariants = typeVariants,- Coders.languageConstraintsTypes = typePredicate}}+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeaturePartialApplication,+ Coders.LanguageFeatureNestedCaseStatements,+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "pdl")} where literalVariants = Sets.fromList [
src/main/haskell/Hydra/Pegasus/Pdl.hs view
@@ -1,79 +1,123 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | A model for PDL (Pegasus Data Language) schemas. Based on the specification at: -- | https://linkedin.github.io/rest.li/pdl_schema module Hydra.Pegasus.Pdl where+ import qualified Hydra.Core as Core import qualified Hydra.Json.Model as Model import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Annotations which can be applied to record fields, aliased union members, enum symbols, or named schemas data Annotations = Annotations { annotationsDoc :: (Maybe String), annotationsDeprecated :: Bool} deriving (Eq, Ord, Read, Show)+ _Annotations = Core.Name "hydra.pegasus.pdl.Annotations"+ _Annotations_doc = Core.Name "doc"+ _Annotations_deprecated = Core.Name "deprecated"++-- | A single symbol of a PDL enum schema, with its optional annotations data EnumField = EnumField { enumFieldName :: EnumFieldName, enumFieldAnnotations :: Annotations} deriving (Eq, Ord, Read, Show)+ _EnumField = Core.Name "hydra.pegasus.pdl.EnumField"+ _EnumField_name = Core.Name "name"+ _EnumField_annotations = Core.Name "annotations"++-- | The name of a PDL enum symbol, conventionally in upper snake case newtype EnumFieldName = EnumFieldName { unEnumFieldName :: String} deriving (Eq, Ord, Read, Show)+ _EnumFieldName = Core.Name "hydra.pegasus.pdl.EnumFieldName"++-- | A PDL enum schema, defined as a fixed set of enumerated symbols data EnumSchema = EnumSchema { enumSchemaFields :: [EnumField]} deriving (Eq, Ord, Read, Show)+ _EnumSchema = Core.Name "hydra.pegasus.pdl.EnumSchema"+ _EnumSchema_fields = Core.Name "fields"++-- | The name of a record field or an aliased union member newtype FieldName = FieldName { unFieldName :: String} deriving (Eq, Ord, Read, Show)+ _FieldName = Core.Name "hydra.pegasus.pdl.FieldName"++-- | The unqualified (non-namespaced) name of a PDL named schema+newtype Name =+ Name {+ unName :: String}+ deriving (Eq, Ord, Read, Show)++_Name = Core.Name "hydra.pegasus.pdl.Name"++-- | A PDL schema that has a qualified name: a record, enum, or typeref data NamedSchema = NamedSchema { namedSchemaQualifiedName :: QualifiedName, namedSchemaType :: NamedSchemaType, namedSchemaAnnotations :: Annotations} deriving (Eq, Ord, Read, Show)+ _NamedSchema = Core.Name "hydra.pegasus.pdl.NamedSchema"+ _NamedSchema_qualifiedName = Core.Name "qualifiedName"+ _NamedSchema_type = Core.Name "type"+ _NamedSchema_annotations = Core.Name "annotations"++-- | The variety of a PDL named schema: record, enum, or typeref data NamedSchemaType = NamedSchemaTypeRecord RecordSchema | NamedSchemaTypeEnum EnumSchema | NamedSchemaTypeTyperef Schema deriving (Eq, Ord, Read, Show)+ _NamedSchemaType = Core.Name "hydra.pegasus.pdl.NamedSchemaType"+ _NamedSchemaType_record = Core.Name "record"+ _NamedSchemaType_enum = Core.Name "enum"+ _NamedSchemaType_typeref = Core.Name "typeref"-newtype Name =- Name {- unName :: String}- deriving (Eq, Ord, Read, Show)-_Name = Core.Name "hydra.pegasus.pdl.Name"++-- | A dot-separated PDL namespace, analogous to a Java package name newtype Namespace = Namespace { unNamespace :: String} deriving (Eq, Ord, Read, Show)+ _Namespace = Core.Name "hydra.pegasus.pdl.Namespace"++-- | The Java package under which generated bindings for a schema file are placed newtype Package = Package { unPackage :: String} deriving (Eq, Ord, Read, Show)+ _Package = Core.Name "hydra.pegasus.pdl.Package"++-- | One of the built-in PDL primitive types data PrimitiveType = PrimitiveTypeBoolean | PrimitiveTypeBytes |@@ -83,35 +127,57 @@ PrimitiveTypeLong | PrimitiveTypeString deriving (Eq, Ord, Read, Show)+ _PrimitiveType = Core.Name "hydra.pegasus.pdl.PrimitiveType"+ _PrimitiveType_boolean = Core.Name "boolean"+ _PrimitiveType_bytes = Core.Name "bytes"+ _PrimitiveType_double = Core.Name "double"+ _PrimitiveType_float = Core.Name "float"+ _PrimitiveType_int = Core.Name "int"+ _PrimitiveType_long = Core.Name "long"+ _PrimitiveType_string = Core.Name "string"-newtype PropertyKey =- PropertyKey {- unPropertyKey :: String}- deriving (Eq, Ord, Read, Show)-_PropertyKey = Core.Name "hydra.pegasus.pdl.PropertyKey"++-- | A custom key/value property attached to a PDL schema, field, or member data Property = Property { propertyKey :: PropertyKey, propertyValue :: (Maybe Model.Value)} deriving (Eq, Ord, Read, Show)+ _Property = Core.Name "hydra.pegasus.pdl.Property"+ _Property_key = Core.Name "key"+ _Property_value = Core.Name "value"++-- | The key of a custom PDL schema property, e.g. a dot-separated path+newtype PropertyKey =+ PropertyKey {+ unPropertyKey :: String}+ deriving (Eq, Ord, Read, Show)++_PropertyKey = Core.Name "hydra.pegasus.pdl.PropertyKey"++-- | A PDL name together with the optional namespace that qualifies it data QualifiedName = QualifiedName { qualifiedNameName :: Name, qualifiedNameNamespace :: (Maybe Namespace)} deriving (Eq, Ord, Read, Show)+ _QualifiedName = Core.Name "hydra.pegasus.pdl.QualifiedName"+ _QualifiedName_name = Core.Name "name"+ _QualifiedName_namespace = Core.Name "namespace"+ -- | Note: the default value for an enum-valued must be one of the enumerated string symbols data RecordField = RecordField {@@ -121,21 +187,33 @@ recordFieldDefault :: (Maybe Model.Value), recordFieldAnnotations :: Annotations} deriving (Eq, Ord, Read, Show)+ _RecordField = Core.Name "hydra.pegasus.pdl.RecordField"+ _RecordField_name = Core.Name "name"+ _RecordField_value = Core.Name "value"+ _RecordField_optional = Core.Name "optional"+ _RecordField_default = Core.Name "default"+ _RecordField_annotations = Core.Name "annotations"+ -- | Note: all included schemas must be record schemas data RecordSchema = RecordSchema { recordSchemaFields :: [RecordField], recordSchemaIncludes :: [NamedSchema]} deriving (Eq, Ord, Read, Show)+ _RecordSchema = Core.Name "hydra.pegasus.pdl.RecordSchema"+ _RecordSchema_fields = Core.Name "fields"+ _RecordSchema_includes = Core.Name "includes"++-- | A PDL data schema: either a primitive, a reference by name, or a complex type data Schema = SchemaArray Schema | SchemaFixed Int |@@ -146,15 +224,26 @@ SchemaPrimitive PrimitiveType | SchemaUnion UnionSchema deriving (Eq, Ord, Read, Show)+ _Schema = Core.Name "hydra.pegasus.pdl.Schema"+ _Schema_array = Core.Name "array"+ _Schema_fixed = Core.Name "fixed"+ _Schema_inline = Core.Name "inline"+ _Schema_map = Core.Name "map"+ _Schema_named = Core.Name "named"+ _Schema_null = Core.Name "null"+ _Schema_primitive = Core.Name "primitive"+ _Schema_union = Core.Name "union"++-- | A .pdl source file: a namespace declaration, imports, and one or more named schemas data SchemaFile = SchemaFile { schemaFileNamespace :: Namespace,@@ -162,11 +251,17 @@ schemaFileImports :: [QualifiedName], schemaFileSchemas :: [NamedSchema]} deriving (Eq, Ord, Read, Show)+ _SchemaFile = Core.Name "hydra.pegasus.pdl.SchemaFile"+ _SchemaFile_namespace = Core.Name "namespace"+ _SchemaFile_package = Core.Name "package"+ _SchemaFile_imports = Core.Name "imports"+ _SchemaFile_schemas = Core.Name "schemas"+ -- | Note: annotations are only available for aliased members data UnionMember = UnionMember {@@ -174,13 +269,19 @@ unionMemberValue :: Schema, unionMemberAnnotations :: Annotations} deriving (Eq, Ord, Read, Show)+ _UnionMember = Core.Name "hydra.pegasus.pdl.UnionMember"+ _UnionMember_alias = Core.Name "alias"+ _UnionMember_value = Core.Name "value"+ _UnionMember_annotations = Core.Name "annotations"+ -- | Note: unions are not allowed as member types of other unions newtype UnionSchema = UnionSchema { unUnionSchema :: [UnionMember]} deriving (Eq, Ord, Read, Show)+ _UnionSchema = Core.Name "hydra.pegasus.pdl.UnionSchema"
src/main/haskell/Hydra/Pegasus/Serde.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Serialization functions for converting Pegasus PDL AST to abstract expressions module Hydra.Pegasus.Serde where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model@@ -21,10 +27,13 @@ import qualified Hydra.Paths as Paths import qualified Hydra.Pegasus.Pdl as Pdl import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Serialization as Serialization+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -33,12 +42,14 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Convert PDL annotations to an optional expression (doc comment) annotationsToExpr :: Pdl.Annotations -> Maybe Ast.Expr annotationsToExpr anns = let d = Pdl.annotationsDoc anns in (Optionals.map (\s -> Serialization.cst (Formatting.javaStyleComment s)) d)+ -- | Convert a PDL enum field to an expression enumFieldToExpr :: Pdl.EnumField -> Ast.Expr enumFieldToExpr ef =@@ -46,12 +57,14 @@ let name = Pdl.unEnumFieldName (Pdl.enumFieldName ef) anns = Pdl.enumFieldAnnotations ef in (withAnnotations anns (Serialization.cst name))+ -- | Convert a qualified name to an import expression importToExpr :: Pdl.QualifiedName -> Ast.Expr importToExpr qn = Serialization.spaceSep [ Serialization.cst "import", (qualifiedNameToExpr qn)]+ -- | Convert a named schema to an expression namedSchemaToExpr :: Pdl.NamedSchema -> Ast.Expr namedSchemaToExpr ns =@@ -77,6 +90,7 @@ (qualifiedNameToExpr qn), (Serialization.cst "="), (schemaToExpr v0)]))+ -- | Convert a primitive type to an expression primitiveTypeToExpr :: Pdl.PrimitiveType -> Ast.Expr primitiveTypeToExpr pt =@@ -88,6 +102,7 @@ Pdl.PrimitiveTypeInt -> "int" Pdl.PrimitiveTypeLong -> "long" Pdl.PrimitiveTypeString -> "string")+ -- | Convert a qualified name to an expression qualifiedNameToExpr :: Pdl.QualifiedName -> Ast.Expr qualifiedNameToExpr qn =@@ -95,10 +110,11 @@ let name = Pdl.unName (Pdl.qualifiedNameName qn) ns = Pdl.qualifiedNameNamespace qn parts =- Optionals.cat [+ Optionals.givens [ Optionals.map (\n -> Pdl.unNamespace n) ns, (Optionals.pure name)]- in (Serialization.cst (Strings.intercalate "." parts))+ in (Serialization.cst (Strings.join "." parts))+ -- | Convert a record field to an expression recordFieldToExpr :: Pdl.RecordField -> Ast.Expr recordFieldToExpr rf =@@ -107,10 +123,11 @@ schema = Pdl.recordFieldValue rf optional = Pdl.recordFieldOptional rf anns = Pdl.recordFieldAnnotations rf- in (withAnnotations anns (Serialization.spaceSep (Optionals.cat [- Optionals.pure (Serialization.cst (Strings.cat2 name ":")),+ in (withAnnotations anns (Serialization.spaceSep (Optionals.givens [+ Optionals.pure (Serialization.cst (Strings.concat2 name ":")), (Logic.ifElse optional (Optionals.pure (Serialization.cst "optional")) Nothing), (Optionals.pure (schemaToExpr schema))])))+ -- | Convert a schema file to an expression schemaFileToExpr :: Pdl.SchemaFile -> Ast.Expr schemaFileToExpr sf =@@ -130,12 +147,13 @@ importsSec = Logic.ifElse (Lists.null imports) Nothing (Optionals.pure (Serialization.newlineSep (Lists.map importToExpr imports))) schemaSecs = Lists.map (\s -> Optionals.pure (namedSchemaToExpr s)) schemas- in (Serialization.doubleNewlineSep (Optionals.cat (Lists.concat [+ in (Serialization.doubleNewlineSep (Optionals.givens (Lists.concat [ [ namespaceSec, packageSec, importsSec], schemaSecs])))+ -- | Convert a schema to an expression schemaToExpr :: Pdl.Schema -> Ast.Expr schemaToExpr schema =@@ -155,6 +173,7 @@ Pdl.SchemaUnion v0 -> Serialization.noSep [ Serialization.cst "union", (Serialization.bracketList Serialization.fullBlockStyle (Lists.map unionMemberToExpr (Pdl.unUnionSchema v0)))]+ -- | Convert a union member to an expression unionMemberToExpr :: Pdl.UnionMember -> Ast.Expr unionMemberToExpr um =@@ -162,12 +181,13 @@ let alias = Pdl.unionMemberAlias um schema = Pdl.unionMemberValue um anns = Pdl.unionMemberAnnotations um- in (withAnnotations anns (Serialization.spaceSep (Optionals.cat [- Optionals.map (\fn -> Serialization.cst (Strings.cat2 (Pdl.unFieldName fn) ":")) alias,+ in (withAnnotations anns (Serialization.spaceSep (Optionals.givens [+ Optionals.map (\fn -> Serialization.cst (Strings.concat2 (Pdl.unFieldName fn) ":")) alias, (Optionals.pure (schemaToExpr schema))])))+ -- | Prepend annotations (doc comment) to an expression withAnnotations :: Pdl.Annotations -> Ast.Expr -> Ast.Expr withAnnotations anns expr =- Serialization.newlineSep (Optionals.cat [+ Serialization.newlineSep (Optionals.givens [ annotationsToExpr anns, (Optionals.pure expr)])
src/main/haskell/Hydra/Protobuf/Any.hs view
@@ -1,11 +1,14 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/any.proto module Hydra.Protobuf.Any where+ import qualified Hydra.Core as Core import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.ByteString as B+ -- | `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. data Any = Any {@@ -14,6 +17,9 @@ -- | Must be a valid serialized protocol buffer of the above specified type. anyValue :: B.ByteString} deriving (Eq, Ord, Read, Show)+ _Any = Core.Name "hydra.protobuf.any.Any"+ _Any_typeUrl = Core.Name "typeUrl"+ _Any_value = Core.Name "value"
src/main/haskell/Hydra/Protobuf/Coder.hs view
@@ -1,7 +1,9 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Protobuf code generator: converts Hydra modules to Protocol Buffers v3 definitions module Hydra.Protobuf.Coder where+ import qualified Hydra.Adapt as Adapt import qualified Hydra.Analysis as Analysis import qualified Hydra.Annotations as Annotations@@ -10,12 +12,16 @@ import qualified Hydra.Constants as Constants import qualified Hydra.Core as Core import qualified Hydra.Decode.Core as DecodeCore+import qualified Hydra.Docs as Docs import qualified Hydra.Environment as Environment import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Core as ExtractCore+import qualified Hydra.File as File import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model@@ -35,19 +41,22 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Predicates as Predicates+import qualified Hydra.Print.Core as PrintCore+import qualified Hydra.Print.Errors as PrintErrors import qualified Hydra.Protobuf.Environment as ProtobufEnvironment import qualified Hydra.Protobuf.Language as Language import qualified Hydra.Protobuf.Proto3 as Proto3 import qualified Hydra.Protobuf.Serde as Serde import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Rewriting as Rewriting import qualified Hydra.Serialization as Serialization-import qualified Hydra.Show.Core as ShowCore-import qualified Hydra.Show.Errors as ShowErrors import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -59,19 +68,22 @@ import qualified Data.Scientific as Sci import qualified Data.Map as M import qualified Data.Set as S+ -- | Collect all structural type references (Either, Pair) from a list of types collectStructuralTypes :: [Core.Type] -> S.Set ProtobufEnvironment.StructuralTypeRef collectStructuralTypes types =- Lists.foldl (\acc -> \t -> Sets.union acc (collectStructuralTypes_collectFromType t)) Sets.empty types+ Lists.foldl (\acc -> \t -> Sets.union acc (collectStructuralTypesFromType t)) Sets.empty types+ -- | Collect structural type references from a single type-collectStructuralTypes_collectFromType :: Core.Type -> S.Set ProtobufEnvironment.StructuralTypeRef-collectStructuralTypes_collectFromType typ =+collectStructuralTypesFromType :: Core.Type -> S.Set ProtobufEnvironment.StructuralTypeRef+collectStructuralTypesFromType typ = Rewriting.foldOverType Coders.TraversalOrderPre (\acc -> \t -> let st = simplifyType t in case st of Core.TypeEither v0 -> Sets.insert (ProtobufEnvironment.StructuralTypeRefEither (Core.eitherTypeLeft v0, (Core.eitherTypeRight v0))) acc Core.TypePair v0 -> Sets.insert (ProtobufEnvironment.StructuralTypeRefPair (Core.pairTypeFirst v0, (Core.pairTypeSecond v0))) acc _ -> acc) Sets.empty typ+ -- | Construct a Protobuf file from a Hydra module and its type definitions constructModule :: ProtobufEnvironment.EncoderState -> Graph.Graph -> Packaging.Module -> [Packaging.TypeDefinition] -> Either Errors.Error Proto3.ProtoFile constructModule cx g mod typeDefs =@@ -101,7 +113,7 @@ descOption = Proto3.Option { Proto3.optionName = Serde.descriptionOptionName,- Proto3.optionValue = (Proto3.ValueString (Strings.cat2 (Optionals.cases desc "" (\d -> Strings.cat2 d "\n\n")) Constants.warningAutoGeneratedFile))}+ Proto3.optionValue = (Proto3.ValueString (Strings.concat2 (Optionals.cases desc "" (\d -> Strings.concat2 d "\n\n")) Constants.warningAutoGeneratedFile))} checkFieldType_wrapper = \typ -> case (Strip.deannotateType typ) of Core.TypeOptional v0 -> case (Strip.deannotateType v0) of@@ -137,6 +149,7 @@ helperDefs, definitions]), Proto3.protoFileOptions = (Lists.cons descOption javaOptions)})))))))+ -- | Encode a Hydra type as a Protobuf definition encodeDefinition :: ProtobufEnvironment.EncoderState -> Graph.Graph -> Packaging.ModuleName -> Core.Name -> Core.Type -> Either Errors.Error Proto3.Definition encodeDefinition cx g localNs name typ =@@ -163,6 +176,7 @@ Core.TypeUnion v0 -> Logic.ifElse (isEnumDefinition t) (Eithers.map (\ed -> Proto3.DefinitionEnum ed) (toEitherString (encodeEnumDefinition cx0 g options name v0))) (encode cx0 options (wrapAsRecordType (Core.TypeUnion v0))) _ -> encode cx0 options (wrapAsRecordType t) in (Eithers.bind (toEitherString (findOptions cx g typ)) (\options -> encode cx2 options typ))+ -- | Encode a Hydra union type as a Protobuf enum definition encodeEnumDefinition :: ProtobufEnvironment.EncoderState -> Graph.Graph -> [Proto3.Option] -> Core.Name -> [Core.FieldType] -> Either Errors.Error Proto3.EnumDefinition encodeEnumDefinition cx g options tname fts =@@ -185,20 +199,23 @@ Proto3.enumDefinitionName = (encodeTypeName tname), Proto3.enumDefinitionValues = (Lists.cons unspecifiedField values), Proto3.enumDefinitionOptions = options})))+ -- | Encode an enum value name from type name and field name encodeEnumValueName :: Core.Name -> Core.Name -> Proto3.EnumValueName encodeEnumValueName tname fname = let prefix = Formatting.nonAlnumToUnderscores (Formatting.convertCaseCamelToUpperSnake (Names.localNameOf tname)) suffix = Formatting.nonAlnumToUnderscores (Formatting.convertCaseCamelToUpperSnake (Core.unName fname))- in (Proto3.EnumValueName (Strings.cat [+ in (Proto3.EnumValueName (Strings.concat [ prefix, "_", suffix]))+ -- | Encode a field name, optionally preserving the original case encodeFieldName :: Bool -> Core.Name -> Proto3.FieldName encodeFieldName preserve name = Proto3.FieldName (Logic.ifElse preserve (Core.unName name) (Formatting.convertCaseCamelToLowerSnake (Core.unName name)))+ -- | Encode a Hydra field type as a Protobuf field encodeFieldType :: ProtobufEnvironment.EncoderState -> Graph.Graph -> Packaging.ModuleName -> Core.FieldType -> Either Errors.Error (Proto3.Field, ProtobufEnvironment.EncoderState) encodeFieldType cx g localNs ft =@@ -236,7 +253,7 @@ Core.TypeVariable v0 -> Logic.ifElse noms (forNominal v0) (Eithers.bind (Lexical.requireBinding g0 v0) (\el -> let term = Core.bindingTerm el in (Eithers.bind (Eithers.bimap (\de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError de))) (\t -> t) (DecodeCore.type_ g0 term)) (\resolvedTyp -> encodeSimpleType_ cx0 g0 ns0 noms resolvedTyp))))- _ -> unexpectedE cx0 "simple type" (ShowCore.type_ (Strip.removeTypeAnnotations typ))+ _ -> unexpectedE cx0 "simple type" (PrintCore.type_ (Strip.removeTypeAnnotations typ)) in (Eithers.bind (findOptions cx g ftype) (\options -> Eithers.bind (encodeType_ cx g localNs ftype) (\ft_ -> let idxPair = (@@ -254,6 +271,7 @@ Proto3.fieldNumber = idx, Proto3.fieldOptions = options}, cx1))))))+ -- | Encode a Hydra record type as a Protobuf message definition encodeRecordType :: ProtobufEnvironment.EncoderState -> Graph.Graph -> Packaging.ModuleName -> [Proto3.Option] -> Core.Name -> [Core.FieldType] -> Either Errors.Error Proto3.MessageDefinition encodeRecordType cx g localNs options tname fts =@@ -263,6 +281,7 @@ Proto3.messageDefinitionName = (encodeTypeName tname), Proto3.messageDefinitionFields = pfields, Proto3.messageDefinitionOptions = options})))+ -- | Encode a Hydra literal type as a Protobuf scalar type encodeScalarType :: t0 -> Core.LiteralType -> Either Errors.Error Proto3.ScalarType encodeScalarType cx lt =@@ -272,21 +291,22 @@ Core.LiteralTypeFloat v0 -> case v0 of Core.FloatTypeFloat32 -> Right Proto3.ScalarTypeFloat Core.FloatTypeFloat64 -> Right Proto3.ScalarTypeDouble- _ -> unexpectedE cx "32-bit or 64-bit floating-point type" (ShowCore.floatType v0)+ _ -> unexpectedE cx "32-bit or 64-bit floating-point type" (PrintCore.floatType v0) Core.LiteralTypeInteger v0 -> case v0 of Core.IntegerTypeInt32 -> Right Proto3.ScalarTypeInt32 Core.IntegerTypeInt64 -> Right Proto3.ScalarTypeInt64 Core.IntegerTypeUint32 -> Right Proto3.ScalarTypeUint32 Core.IntegerTypeUint64 -> Right Proto3.ScalarTypeUint64- _ -> unexpectedE cx "32-bit or 64-bit integer type" (ShowCore.integerType v0)+ _ -> unexpectedE cx "32-bit or 64-bit integer type" (PrintCore.integerType v0) Core.LiteralTypeString -> Right Proto3.ScalarTypeString- _ -> unexpectedE cx "supported literal type" (ShowCore.literalType lt)+ _ -> unexpectedE cx "supported literal type" (PrintCore.literalType lt)+ -- | Encode a Hydra literal type as a wrapped Protobuf type (for optional scalars) encodeScalarTypeWrapped :: t0 -> Core.LiteralType -> Either Errors.Error Proto3.SimpleType encodeScalarTypeWrapped cx lt = let toType =- \label -> Right (Proto3.SimpleTypeReference (Proto3.TypeName (Strings.cat [+ \label -> Right (Proto3.SimpleTypeReference (Proto3.TypeName (Strings.concat [ "google.protobuf.", label, "Value"])))@@ -296,15 +316,16 @@ Core.LiteralTypeFloat v0 -> case v0 of Core.FloatTypeFloat32 -> toType "Float" Core.FloatTypeFloat64 -> toType "Double"- _ -> unexpectedE cx "32-bit or 64-bit floating-point type" (ShowCore.floatType v0)+ _ -> unexpectedE cx "32-bit or 64-bit floating-point type" (PrintCore.floatType v0) Core.LiteralTypeInteger v0 -> case v0 of Core.IntegerTypeInt32 -> toType "Int32" Core.IntegerTypeInt64 -> toType "Int64" Core.IntegerTypeUint32 -> toType "UInt32" Core.IntegerTypeUint64 -> toType "UInt64"- _ -> unexpectedE cx "32-bit or 64-bit integer type" (ShowCore.integerType v0)+ _ -> unexpectedE cx "32-bit or 64-bit integer type" (PrintCore.integerType v0) Core.LiteralTypeString -> toType "String"- _ -> unexpectedE cx "supported literal type" (ShowCore.literalType lt)+ _ -> unexpectedE cx "supported literal type" (PrintCore.literalType lt)+ -- | Encode a simple type for helper message fields encodeSimpleTypeForHelper :: t0 -> Packaging.ModuleName -> Core.Type -> Either Errors.Error Proto3.SimpleType encodeSimpleTypeForHelper cx localNs typ =@@ -316,10 +337,12 @@ Core.TypeUnion _ -> unexpectedE cx "named type reference" "anonymous union type" Core.TypeUnit -> Right (Proto3.SimpleTypeReference (Proto3.TypeName "google.protobuf.Empty")) Core.TypeVariable v0 -> forNominal v0- _ -> unexpectedE cx "simple type in structural type helper" (ShowCore.type_ (Strip.removeTypeAnnotations typ))+ _ -> unexpectedE cx "simple type in structural type helper" (PrintCore.type_ (Strip.removeTypeAnnotations typ))+ -- | Encode a Hydra type name as a Protobuf type name encodeTypeName :: Core.Name -> Proto3.TypeName encodeTypeName name = Proto3.TypeName (Names.localNameOf name)+ -- | Encode a Hydra name as a Protobuf type reference encodeTypeReference :: Packaging.ModuleName -> Core.Name -> Proto3.TypeName encodeTypeReference localNs name =@@ -327,15 +350,18 @@ let qn = Names.qualifyName name local = Util.qualifiedNameLocal qn ns_ = Util.qualifiedNameModuleName qn- localNsParts = Optionals.fromOptional [] (Lists.maybeInit (Strings.splitOn "." (Packaging.unModuleName localNs)))+ localNsParts = Optionals.withDefault [] (Lists.init (Strings.splitOn "." (Packaging.unModuleName localNs))) in (Proto3.TypeName (Optionals.cases ns_ local (\nsVal ->- let nsParts = Optionals.fromOptional [] (Lists.maybeInit (Strings.splitOn "." (Packaging.unModuleName nsVal)))- in (Logic.ifElse (Equality.equal nsParts localNsParts) local (Strings.intercalate "." (Lists.concat [+ let nsParts = Optionals.withDefault [] (Lists.init (Strings.splitOn "." (Packaging.unModuleName nsVal)))+ in (Logic.ifElse (Equality.equal nsParts localNsParts) local (Strings.join "." (Lists.concat [ nsParts, [ local]]))))))++-- | Construct a Left error result from an error message, ignoring the encoder state err :: t0 -> String -> Either Errors.Error t1 err cx msg = Left (Errors.ErrorOther (Errors.OtherError msg))+ -- | Find Protobuf options for a type (description and deprecated) findOptions :: ProtobufEnvironment.EncoderState -> Graph.Graph -> Core.Type -> Either Errors.Error [Proto3.Option] findOptions cx g typ =@@ -348,9 +374,10 @@ Logic.ifElse bdep (Just (Proto3.Option { Proto3.optionName = "deprecated", Proto3.optionValue = (Proto3.ValueBoolean True)})) Nothing- in (Right (Optionals.cat [+ in (Right (Optionals.givens [ mdescAnn, mdepAnn]))))+ -- | Eliminate type lambdas and type applications, replacing type variables with the string type flattenType :: Core.Type -> Core.Type flattenType typ =@@ -358,8 +385,11 @@ Core.TypeForall v0 -> recurse (Variables.replaceFreeTypeVariable (Core.forallTypeParameter v0) (Core.TypeLiteral Core.LiteralTypeString) (Core.forallTypeBody v0)) Core.TypeApplication v0 -> recurse (Core.applicationTypeFunction v0) _ -> recurse t) typ++-- | Convert an Either String result into an Either Error result fromEitherString :: t0 -> Either String t1 -> Either Errors.Error t1 fromEitherString cx e = Eithers.bimap (\msg -> Errors.ErrorOther (Errors.OtherError msg)) (\a -> a) e+ -- | Generate a helper message definition for a structural type generateStructuralTypeMessage :: ProtobufEnvironment.EncoderState -> t0 -> Packaging.ModuleName -> ProtobufEnvironment.StructuralTypeRef -> Either Errors.Error (Proto3.Definition, ProtobufEnvironment.EncoderState) generateStructuralTypeMessage cx g localNs ref =@@ -427,22 +457,31 @@ secondField], Proto3.messageDefinitionOptions = []}), cx4))))))+ -- | Check if a type is an enum definition isEnumDefinition :: Core.Type -> Bool isEnumDefinition typ = case (simplifyType typ) of Core.TypeUnion v0 -> isEnumFields v0 _ -> False+ -- | Check if all fields are unit types (i.e., this is an enum) isEnumFields :: [Core.FieldType] -> Bool isEnumFields fts = Lists.foldl (\b -> \f -> Logic.and b (Predicates.isUnitType (simplifyType (Core.fieldTypeType f)))) True fts++-- | The name of the Protobuf java_multiple_files option javaMultipleFilesOptionName :: String javaMultipleFilesOptionName = "java_multiple_files"++-- | The name of the Protobuf java_package option javaPackageOptionName :: String javaPackageOptionName = "java_package"-key_proto_field_index :: Core.Name-key_proto_field_index = Core.Name "proto_field_index"++-- | Annotation key under which the assigned Protobuf field index is recorded+keyProtoFieldIndex :: Core.Name+keyProtoFieldIndex = Core.Name "proto_field_index"+ -- | Thread context through a list, accumulating results mapAccumResult :: (t0 -> t1 -> Either t2 (t3, t0)) -> t0 -> [t1] -> Either t2 ([t3], t0) mapAccumResult f cx0 xs =@@ -455,6 +494,7 @@ [ Pairs.first resultPair]], (Pairs.second resultPair))) (f cxN x)))) (Right ([], cx0)) xs+ -- | Convert a Hydra module to Protocol Buffers v3 source files moduleToProtobuf :: Packaging.Module -> [Packaging.Definition] -> Typing.InferenceContext -> Graph.Graph -> Either Errors.Error (M.Map String String) moduleToProtobuf mod defs cx g =@@ -470,27 +510,32 @@ let content = Serialization.printExpr (Serialization.parenthesize (Serde.protoFileToExpr pfile)) path = Proto3.unFileReference (namespaceToFileReference ns_) in (Right (Maps.singleton path content))))+ -- | Convert a Hydra namespace to a Protobuf file reference namespaceToFileReference :: Packaging.ModuleName -> Proto3.FileReference namespaceToFileReference ns_ = let pns =- Strings.intercalate "/" (Lists.map (\s -> Formatting.convertCaseCamelToLowerSnake s) (Strings.splitOn "." (Packaging.unModuleName ns_)))- in (Proto3.FileReference (Strings.cat2 pns ".proto"))+ Strings.join "/" (Lists.map (\s -> Formatting.convertCaseCamelToLowerSnake s) (Strings.splitOn "." (Packaging.unModuleName ns_)))+ in (Proto3.FileReference (Strings.concat2 pns ".proto"))+ -- | Convert a Hydra namespace to a Protobuf package name namespaceToPackageName :: Packaging.ModuleName -> Proto3.PackageName namespaceToPackageName ns_ =- Proto3.PackageName (Strings.intercalate "." (Lists.map (\s -> Formatting.convertCaseCamelToLowerSnake s) (Optionals.fromOptional [] (Lists.maybeInit (Strings.splitOn "." (Packaging.unModuleName ns_))))))+ Proto3.PackageName (Strings.join "." (Lists.map (\s -> Formatting.convertCaseCamelToLowerSnake s) (Optionals.withDefault [] (Lists.init (Strings.splitOn "." (Packaging.unModuleName ns_))))))+ -- | Read a boolean annotation from a type readBooleanAnnotation :: t0 -> Graph.Graph -> Core.Name -> Core.Type -> Either Errors.Error Bool readBooleanAnnotation cx g key typ = Optionals.cases (Maps.lookup key (Annotations.typeAnnotationInternal typ)) (Right False) (\term -> ExtractCore.boolean g term)+ -- | Simplify a type by removing annotations and unwrapping newtypes simplifyType :: Core.Type -> Core.Type simplifyType typ = case (Strip.deannotateType typ) of Core.TypeWrap v0 -> simplifyType v0 _ -> Strip.deannotateType typ+ -- | Generate a message name for a structural type reference structuralTypeName :: t0 -> ProtobufEnvironment.StructuralTypeRef -> Proto3.TypeName structuralTypeName localNs ref =@@ -521,22 +566,24 @@ Core.TypeList _ -> "list" Core.TypeSet _ -> "set" Core.TypeMap _ -> "map"- Core.TypeOptional _ -> "maybe"+ Core.TypeOptional _ -> "optional" _ -> "value" in (Proto3.TypeName (case ref of- ProtobufEnvironment.StructuralTypeRefEither v0 -> Strings.cat [+ ProtobufEnvironment.StructuralTypeRefEither v0 -> Strings.concat [ "Either_", (typeSuffix (Pairs.first v0)), "_", (typeSuffix (Pairs.second v0))]- ProtobufEnvironment.StructuralTypeRefPair v0 -> Strings.cat [+ ProtobufEnvironment.StructuralTypeRefPair v0 -> Strings.concat [ "Pair_", (typeSuffix (Pairs.first v0)), "_", (typeSuffix (Pairs.second v0))]))++-- | Construct an error reporting an expected construct versus what was actually found unexpectedE :: t0 -> String -> String -> Either Errors.Error t1 unexpectedE cx expected found =- err cx (Strings.cat [+ err cx (Strings.concat [ "Expected ", expected, ", found: ",
src/main/haskell/Hydra/Protobuf/Environment.hs view
@@ -1,11 +1,14 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Type definitions for the Protobuf code generation environment module Hydra.Protobuf.Environment where+ import qualified Hydra.Core as Core import qualified Hydra.Typing as Typing import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | State threaded through Protobuf encoding: inference context plus field-index counter data EncoderState = EncoderState {@@ -14,9 +17,13 @@ -- | Counter used to assign the next Protobuf field index within the current message encoderStateFieldIndex :: Int} deriving (Eq, Ord, Read, Show)+ _EncoderState = Core.Name "hydra.protobuf.environment.EncoderState"+ _EncoderState_context = Core.Name "context"+ _EncoderState_fieldIndex = Core.Name "fieldIndex"+ -- | A reference to a structural type (Either or Pair) with its component types data StructuralTypeRef = -- | An Either type with left and right component types@@ -24,6 +31,9 @@ -- | A Pair type with first and second component types StructuralTypeRefPair (Core.Type, Core.Type) deriving (Eq, Ord, Read, Show)+ _StructuralTypeRef = Core.Name "hydra.protobuf.environment.StructuralTypeRef"+ _StructuralTypeRef_either = Core.Name "either"+ _StructuralTypeRef_pair = Core.Name "pair"
src/main/haskell/Hydra/Protobuf/Language.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Language constraints for Protobuf v3 module Hydra.Protobuf.Language where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Lexical as Lexical@@ -18,10 +24,13 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -31,6 +40,7 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Set as S+ -- | Language constraints for Protocol Buffers v3 protobufLanguage :: Coders.Language protobufLanguage =@@ -42,7 +52,23 @@ Coders.languageConstraintsIntegerTypes = integerTypes, Coders.languageConstraintsTermVariants = termVariants, Coders.languageConstraintsTypeVariants = typeVariants,- Coders.languageConstraintsTypes = typePredicate}}+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeaturePartialApplication,+ Coders.LanguageFeatureNestedCaseStatements,+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "proto")} where literalVariants = Sets.fromList [@@ -99,6 +125,7 @@ Core.TypeOptional _ -> False _ -> True _ -> True+ -- | A set of reserved words in Protobuf protobufReservedWords :: S.Set String protobufReservedWords = Sets.fromList (Lists.concat [
src/main/haskell/Hydra/Protobuf/Proto3.hs view
@@ -1,17 +1,25 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | A model for Protocol Buffers v3 enum and message types, designed as a target for transformations.This model is loosely based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/type.proto, as well as the proto3 reference documentation module Hydra.Protobuf.Proto3 where+ import qualified Hydra.Core as Core import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci++-- | A top-level Protobuf definition, either an enum or a message type data Definition = DefinitionEnum EnumDefinition | DefinitionMessage MessageDefinition deriving (Eq, Ord, Read, Show)+ _Definition = Core.Name "hydra.protobuf.proto3.Definition"+ _Definition_enum = Core.Name "enum"+ _Definition_message = Core.Name "message"+ -- | Enum type definition data EnumDefinition = EnumDefinition {@@ -22,10 +30,15 @@ -- | Protocol buffer options enumDefinitionOptions :: [Option]} deriving (Eq, Ord, Read, Show)+ _EnumDefinition = Core.Name "hydra.protobuf.proto3.EnumDefinition"+ _EnumDefinition_name = Core.Name "name"+ _EnumDefinition_values = Core.Name "values"+ _EnumDefinition_options = Core.Name "options"+ -- | Enum value definition data EnumValue = EnumValue {@@ -36,15 +49,23 @@ -- | Protocol buffer options enumValueOptions :: [Option]} deriving (Eq, Ord, Read, Show)+ _EnumValue = Core.Name "hydra.protobuf.proto3.EnumValue"+ _EnumValue_name = Core.Name "name"+ _EnumValue_number = Core.Name "number"+ _EnumValue_options = Core.Name "options"++-- | The name of an enum value, conventionally an upper-snake-case identifier newtype EnumValueName = EnumValueName { unEnumValueName :: String} deriving (Eq, Ord, Read, Show)+ _EnumValueName = Core.Name "hydra.protobuf.proto3.EnumValueName"+ -- | A single field of a message type data Field = Field {@@ -59,42 +80,66 @@ -- | The protocol buffer options fieldOptions :: [Option]} deriving (Eq, Ord, Read, Show)+ _Field = Core.Name "hydra.protobuf.proto3.Field"+ _Field_name = Core.Name "name"+ _Field_jsonName = Core.Name "jsonName"+ _Field_type = Core.Name "type"+ _Field_number = Core.Name "number"+ _Field_options = Core.Name "options"+ -- | The name of a field newtype FieldName = FieldName { unFieldName :: String} deriving (Eq, Ord, Read, Show)+ _FieldName = Core.Name "hydra.protobuf.proto3.FieldName"++-- | The type of a message field: a map, a oneof group, a repeated field, or a simple field data FieldType = FieldTypeMap MapType | FieldTypeOneof [Field] | FieldTypeRepeated SimpleType | FieldTypeSimple SimpleType deriving (Eq, Ord, Read, Show)+ _FieldType = Core.Name "hydra.protobuf.proto3.FieldType"+ _FieldType_map = Core.Name "map"+ _FieldType_oneof = Core.Name "oneof"+ _FieldType_repeated = Core.Name "repeated"+ _FieldType_simple = Core.Name "simple"++-- | A path to a .proto file, as used in import statements newtype FileReference = FileReference { unFileReference :: String} deriving (Eq, Ord, Read, Show)+ _FileReference = Core.Name "hydra.protobuf.proto3.FileReference"++-- | The key and value types of a proto3 map field data MapType = MapType { mapTypeKeys :: SimpleType, mapTypeValues :: SimpleType} deriving (Eq, Ord, Read, Show)+ _MapType = Core.Name "hydra.protobuf.proto3.MapType"+ _MapType_keys = Core.Name "keys"+ _MapType_values = Core.Name "values"+ -- | A protocol buffer message type data MessageDefinition = MessageDefinition {@@ -105,10 +150,15 @@ -- | The protocol buffer options messageDefinitionOptions :: [Option]} deriving (Eq, Ord, Read, Show)+ _MessageDefinition = Core.Name "hydra.protobuf.proto3.MessageDefinition"+ _MessageDefinition_name = Core.Name "name"+ _MessageDefinition_fields = Core.Name "fields"+ _MessageDefinition_options = Core.Name "options"+ -- | A protocol buffer option, which can be attached to a message, field, enumeration, etc data Option = Option {@@ -117,14 +167,21 @@ -- | The option's value optionValue :: Value} deriving (Eq, Ord, Read, Show)+ _Option = Core.Name "hydra.protobuf.proto3.Option"+ _Option_name = Core.Name "name"+ _Option_value = Core.Name "value"++-- | A Protobuf package name, i.e. the value of a package declaration newtype PackageName = PackageName { unPackageName :: String} deriving (Eq, Ord, Read, Show)+ _PackageName = Core.Name "hydra.protobuf.proto3.PackageName"+ -- | A .proto file, usually containing one or more enum or message type definitions data ProtoFile = ProtoFile {@@ -133,11 +190,17 @@ protoFileTypes :: [Definition], protoFileOptions :: [Option]} deriving (Eq, Ord, Read, Show)+ _ProtoFile = Core.Name "hydra.protobuf.proto3.ProtoFile"+ _ProtoFile_package = Core.Name "package"+ _ProtoFile_imports = Core.Name "imports"+ _ProtoFile_types = Core.Name "types"+ _ProtoFile_options = Core.Name "options"+ -- | One of several Proto3 scalar types data ScalarType = ScalarTypeBool |@@ -156,47 +219,75 @@ ScalarTypeUint32 | ScalarTypeUint64 deriving (Eq, Ord, Read, Show)+ _ScalarType = Core.Name "hydra.protobuf.proto3.ScalarType"+ _ScalarType_bool = Core.Name "bool"+ _ScalarType_bytes = Core.Name "bytes"+ _ScalarType_double = Core.Name "double"+ _ScalarType_fixed32 = Core.Name "fixed32"+ _ScalarType_fixed64 = Core.Name "fixed64"+ _ScalarType_float = Core.Name "float"+ _ScalarType_int32 = Core.Name "int32"+ _ScalarType_int64 = Core.Name "int64"+ _ScalarType_sfixed32 = Core.Name "sfixed32"+ _ScalarType_sfixed64 = Core.Name "sfixed64"+ _ScalarType_sint32 = Core.Name "sint32"+ _ScalarType_sint64 = Core.Name "sint64"+ _ScalarType_string = Core.Name "string"+ _ScalarType_uint32 = Core.Name "uint32"+ _ScalarType_uint64 = Core.Name "uint64"+ -- | A scalar type or a reference to an enum type or message type data SimpleType = SimpleTypeReference TypeName | SimpleTypeScalar ScalarType deriving (Eq, Ord, Read, Show)+ _SimpleType = Core.Name "hydra.protobuf.proto3.SimpleType"+ _SimpleType_reference = Core.Name "reference"+ _SimpleType_scalar = Core.Name "scalar"+ -- | The local name of an enum type or message type newtype TypeName = TypeName { unTypeName :: String} deriving (Eq, Ord, Read, Show)+ _TypeName = Core.Name "hydra.protobuf.proto3.TypeName"+ -- | A reference to an enum type or message type newtype TypeReference = TypeReference { unTypeReference :: String} deriving (Eq, Ord, Read, Show)+ _TypeReference = Core.Name "hydra.protobuf.proto3.TypeReference"+ -- | A scalar value data Value = ValueBoolean Bool | ValueString String deriving (Eq, Ord, Read, Show)+ _Value = Core.Name "hydra.protobuf.proto3.Value"+ _Value_boolean = Core.Name "boolean"+ _Value_string = Core.Name "string"
src/main/haskell/Hydra/Protobuf/Serde.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Serialization functions for converting Protocol Buffers v3 AST to abstract expressions module Hydra.Protobuf.Serde where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model@@ -23,10 +29,13 @@ import qualified Hydra.Paths as Paths import qualified Hydra.Protobuf.Proto3 as Proto3 import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Serialization as Serialization+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -35,18 +44,22 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Convert a definition to an expression definitionToExpr :: Proto3.Definition -> Ast.Expr definitionToExpr def = case def of Proto3.DefinitionEnum v0 -> enumDefinitionToExpr v0 Proto3.DefinitionMessage v0 -> messageDefinitionToExpr v0+ -- | The name of the deprecated option deprecatedOptionName :: String deprecatedOptionName = "deprecated"+ -- | A special Protobuf option name for descriptions (documentation) descriptionOptionName :: String descriptionOptionName = "_description"+ -- | Convert an enum definition to an expression enumDefinitionToExpr :: Proto3.EnumDefinition -> Ast.Expr enumDefinitionToExpr ed =@@ -58,6 +71,7 @@ Serialization.cst "enum", (Serialization.cst (Proto3.unTypeName name)), (protoBlock (Lists.map enumValueToExpr values))]))+ -- | Convert an enum value to an expression enumValueToExpr :: Proto3.EnumValue -> Ast.Expr enumValueToExpr ev =@@ -69,10 +83,12 @@ Serialization.cst (Proto3.unEnumValueName name), (Serialization.cst "="), (Serialization.cst (Literals.showInt32 number))])))+ -- | Filter out internal options (those whose names start with underscore) excludeInternalOptions :: [Proto3.Option] -> [Proto3.Option] excludeInternalOptions opts =- Lists.filter (\opt -> Logic.not (Equality.equal (Optionals.fromOptional 0 (Strings.maybeCharAt 0 (Proto3.optionName opt))) 95)) opts+ Lists.filter (\opt -> Logic.not (Equality.equal (Optionals.withDefault 0 (Strings.charAt 0 (Proto3.optionName opt))) 95)) opts+ -- | Convert a field option to an expression fieldOptionToExpr :: Proto3.Option -> Ast.Expr fieldOptionToExpr opt =@@ -83,12 +99,14 @@ Serialization.cst name, (Serialization.cst "="), (valueToExpr value)])+ -- | Convert field options to an optional bracket-enclosed expression fieldOptionsToExpr :: [Proto3.Option] -> Maybe Ast.Expr fieldOptionsToExpr opts0 = let opts = excludeInternalOptions opts0 in (Logic.ifElse (Lists.null opts) Nothing (Optionals.pure (Serialization.bracketList Serialization.inlineStyle (Lists.map fieldOptionToExpr opts))))+ -- | Convert a field to an expression fieldToExpr :: Proto3.Field -> Ast.Expr fieldToExpr f =@@ -105,24 +123,25 @@ Proto3.FieldTypeMap v0 -> let kt = Proto3.mapTypeKeys v0 vt = Proto3.mapTypeValues v0- in (semi (Serialization.spaceSep (Optionals.cat [+ in (semi (Serialization.spaceSep (Optionals.givens [ Optionals.pure (fieldTypeToExpr typ), (Optionals.pure (Serialization.cst (Proto3.unFieldName name))), (Optionals.pure (Serialization.cst "=")), (Optionals.pure (Serialization.cst (Literals.showInt32 num))), (fieldOptionsToExpr options)])))- Proto3.FieldTypeRepeated _ -> semi (Serialization.spaceSep (Optionals.cat [+ Proto3.FieldTypeRepeated _ -> semi (Serialization.spaceSep (Optionals.givens [ Optionals.pure (fieldTypeToExpr typ), (Optionals.pure (Serialization.cst (Proto3.unFieldName name))), (Optionals.pure (Serialization.cst "=")), (Optionals.pure (Serialization.cst (Literals.showInt32 num))), (fieldOptionsToExpr options)]))- Proto3.FieldTypeSimple _ -> semi (Serialization.spaceSep (Optionals.cat [+ Proto3.FieldTypeSimple _ -> semi (Serialization.spaceSep (Optionals.givens [ Optionals.pure (fieldTypeToExpr typ), (Optionals.pure (Serialization.cst (Proto3.unFieldName name))), (Optionals.pure (Serialization.cst "=")), (Optionals.pure (Serialization.cst (Literals.showInt32 num))), (fieldOptionsToExpr options)]))))+ -- | Convert a field type to an expression fieldTypeToExpr :: Proto3.FieldType -> Ast.Expr fieldTypeToExpr ftyp =@@ -140,6 +159,7 @@ (simpleTypeToExpr v0)] Proto3.FieldTypeSimple v0 -> simpleTypeToExpr v0 Proto3.FieldTypeOneof _ -> Serialization.cst "oneof"+ -- | Convert a file-level option to an expression fileOptionToExpr :: Proto3.Option -> Ast.Expr fileOptionToExpr opt =@@ -151,18 +171,21 @@ (Serialization.cst name), (Serialization.cst "="), (valueToExpr value)]))+ -- | Convert file-level options to an optional newline-separated expression fileOptionsToExpr :: [Proto3.Option] -> Maybe Ast.Expr fileOptionsToExpr opts0 = let opts = excludeInternalOptions opts0 in (Logic.ifElse (Lists.null opts) Nothing (Optionals.pure (Serialization.newlineSep (Lists.map fileOptionToExpr opts))))+ -- | Convert a file reference to an import expression importToExpr :: Proto3.FileReference -> Ast.Expr importToExpr ref = semi (Serialization.spaceSep [ Serialization.cst "import",- (Serialization.cst (Literals.showString (Proto3.unFileReference ref)))])+ (Serialization.cst (Literals.printString (Proto3.unFileReference ref)))])+ -- | Convert a message definition to an expression messageDefinitionToExpr :: Proto3.MessageDefinition -> Ast.Expr messageDefinitionToExpr md =@@ -174,20 +197,21 @@ Serialization.cst "message", (Serialization.cst (Proto3.unTypeName name)), (protoBlock (Lists.map fieldToExpr fields))]))+ -- | Prepend an optional description comment to an expression optDesc :: Bool -> [Proto3.Option] -> Ast.Expr -> Ast.Expr optDesc doubleNewline opts expr = let descs = Lists.filter (\opt -> Equality.equal (Proto3.optionName opt) "_description") opts- in (Optionals.cases (Lists.maybeHead descs) expr (\firstDesc ->+ in (Optionals.cases (Lists.head descs) expr (\firstDesc -> let descValue = Proto3.optionValue firstDesc descStr = case descValue of Proto3.ValueBoolean v0 -> Logic.ifElse v0 "true" "false" Proto3.ValueString v0 -> v0 commentLines =- Lists.map (\line -> Logic.ifElse (Equality.equal line "") "//" (Strings.cat2 "// " line)) (Strings.lines descStr)- comment = Serialization.cst (Strings.intercalate "\n" commentLines)+ Lists.map (\line -> Logic.ifElse (Equality.equal line "") "//" (Strings.concat2 "// " line)) (Strings.lines descStr)+ comment = Serialization.cst (Strings.join "\n" commentLines) sep = Logic.ifElse doubleNewline (Serialization.doubleNewlineSep [ comment,@@ -195,10 +219,12 @@ comment, expr]) in sep))+ -- | Wrap expressions in a curly-braced block with double-newline separation protoBlock :: [Ast.Expr] -> Ast.Expr protoBlock exprs = Serialization.brackets Serialization.curlyBraces Serialization.fullBlockStyle (Serialization.doubleNewlineSep exprs)+ -- | Convert a proto file to an expression protoFileToExpr :: Proto3.ProtoFile -> Ast.Expr protoFileToExpr pf =@@ -219,11 +245,12 @@ optionsSec = fileOptionsToExpr options1 defsSec = Logic.ifElse (Lists.null defs) Nothing (Optionals.pure (Serialization.doubleNewlineSep (Lists.map definitionToExpr defs)))- in (optDesc True options (Serialization.doubleNewlineSep (Optionals.cat [+ in (optDesc True options (Serialization.doubleNewlineSep (Optionals.givens [ headerSec, importsSec, optionsSec, defsSec])))+ -- | Convert a scalar type to an expression scalarTypeToExpr :: Proto3.ScalarType -> Ast.Expr scalarTypeToExpr sct =@@ -243,21 +270,24 @@ Proto3.ScalarTypeString -> "string" Proto3.ScalarTypeUint32 -> "uint32" Proto3.ScalarTypeUint64 -> "uint64")+ -- | Append a semicolon to an expression semi :: Ast.Expr -> Ast.Expr semi e = Serialization.noSep [ e, (Serialization.cst ";")]+ -- | Convert a simple type to an expression simpleTypeToExpr :: Proto3.SimpleType -> Ast.Expr simpleTypeToExpr st = case st of Proto3.SimpleTypeReference v0 -> Serialization.cst (Proto3.unTypeName v0) Proto3.SimpleTypeScalar v0 -> scalarTypeToExpr v0+ -- | Convert a value to an expression valueToExpr :: Proto3.Value -> Ast.Expr valueToExpr v = Serialization.cst (case v of Proto3.ValueBoolean v0 -> Logic.ifElse v0 "true" "false"- Proto3.ValueString v0 -> Literals.showString v0)+ Proto3.ValueString v0 -> Literals.printString v0)
src/main/haskell/Hydra/Protobuf/SourceContext.hs view
@@ -1,15 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/source_context.proto module Hydra.Protobuf.SourceContext where+ import qualified Hydra.Core as Core import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | `SourceContext` represents information about the source of a protobuf element, like the file in which it is defined. data SourceContext = SourceContext { -- | The path-qualified name of the .proto file that contained the associated protobuf element. For example: `"google/protobuf/source_context.proto"`. sourceContextFileName :: String} deriving (Eq, Ord, Read, Show)+ _SourceContext = Core.Name "hydra.protobuf.sourceContext.SourceContext"+ _SourceContext_fileName = Core.Name "fileName"
src/main/haskell/Hydra/Rust/Coder.hs view
@@ -1,16 +1,21 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Rust code generator: converts Hydra type and term modules to Rust source code module Hydra.Rust.Coder where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core-import qualified Hydra.File as File+import qualified Hydra.Docs as Docs import qualified Hydra.Environment as Environment import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model@@ -30,6 +35,7 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Rust.Language as Language import qualified Hydra.Rust.Serde as Serde@@ -37,8 +43,10 @@ import qualified Hydra.Scoping as Scoping import qualified Hydra.Serialization as Serialization import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -49,6 +57,8 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M++-- | Encode a Hydra union field as a Rust enum variant encodeEnumVariant :: t0 -> t1 -> Core.FieldType -> Either Errors.Error Syntax.EnumVariant encodeEnumVariant cx g ft = @@ -73,6 +83,8 @@ Syntax.enumVariantBody = (Syntax.EnumVariantBodyTuple [ sftyp]), Syntax.enumVariantDoc = Nothing}))))++-- | Encode a Hydra literal value as a Rust expression encodeLiteral :: Core.Literal -> Syntax.Expression encodeLiteral lit = case lit of@@ -113,6 +125,8 @@ Core.IntegerValueBigint v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral { Syntax.integerLiteralValue = v1, Syntax.integerLiteralSuffix = Nothing}))++-- | Encode a Hydra literal type as a Rust type encodeLiteralType :: Core.LiteralType -> Syntax.Type encodeLiteralType lt = case lt of@@ -134,6 +148,8 @@ Core.IntegerTypeUint32 -> rustPath "u32" Core.IntegerTypeUint64 -> rustPath "u64" Core.LiteralTypeString -> rustPath "String"++-- | Encode a Hydra record projection as a Rust expression. Takes an optional argument for applied projections. encodeProjectionElim :: t0 -> t1 -> Core.Projection -> Maybe Core.Term -> Either Errors.Error Syntax.Expression encodeProjectionElim cx g proj marg = @@ -144,6 +160,8 @@ Syntax.fieldAccessExprField = fname})))) (\arg -> Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Syntax.ExpressionFieldAccess (Syntax.FieldAccessExpr { Syntax.fieldAccessExprObject = sarg, Syntax.fieldAccessExprField = fname})))))++-- | Encode a Hydra record field as a Rust struct field encodeStructField :: t0 -> t1 -> Core.FieldType -> Either Errors.Error Syntax.StructField encodeStructField cx g ft = @@ -154,6 +172,8 @@ Syntax.structFieldType = sftyp, Syntax.structFieldPublic = True, Syntax.structFieldDoc = Nothing})))++-- | Encode a Hydra term as a Rust expression encodeTerm :: t0 -> t1 -> Core.Term -> Either Errors.Error Syntax.Expression encodeTerm cx g term = case term of@@ -217,7 +237,7 @@ Core.TermUnit -> True Core.TermRecord v1 -> Lists.null (Core.recordFields v1) _ -> False- in (Logic.ifElse isUnit (Right (rustExprPath (Strings.cat2 (Strings.cat2 tname "::") fname))) (Eithers.bind (encodeTerm cx g fterm) (\sval -> Right (rustCall (rustExprPath (Strings.cat2 (Strings.cat2 tname "::") fname)) [+ in (Logic.ifElse isUnit (Right (rustExprPath (Strings.concat2 (Strings.concat2 tname "::") fname))) (Eithers.bind (encodeTerm cx g fterm) (\sval -> Right (rustCall (rustExprPath (Strings.concat2 (Strings.concat2 tname "::") fname)) [ sval])))) Core.TermUnit -> Right (Syntax.ExpressionTuple []) Core.TermVariable v0 -> Right (rustExprPath (Formatting.convertCaseCamelToLowerSnake (Formatting.sanitizeWithUnderscores Language.rustReservedWords (Core.unName v0))))@@ -226,6 +246,8 @@ in (Eithers.bind (encodeTerm cx g (Core.wrappedTermBody v0)) (\inner -> Right (rustCall (rustExprPath tname) [ inner]))) _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected term variant"))++-- | Encode a Hydra term definition as a Rust function item encodeTermDefinition :: t0 -> t1 -> Packaging.TermDefinition -> Either Errors.Error Syntax.ItemWithComments encodeTermDefinition cx g tdef = @@ -251,6 +273,8 @@ Syntax.fnDefConst = False, Syntax.fnDefUnsafe = False, Syntax.fnDefDoc = Nothing}))}))))++-- | Encode a Hydra type as a Rust syntax type encodeType :: t0 -> t1 -> Core.Type -> Either Errors.Error Syntax.Type encodeType cx g t = @@ -284,6 +308,8 @@ Core.TypeWrap _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous wrap type")) Core.TypeVariable v0 -> Right (rustPath (Formatting.capitalize (Core.unName v0))) Core.TypeForall v0 -> encodeType cx g (Core.forallTypeBody v0)++-- | Encode a Hydra type definition as a Rust item encodeTypeDefinition :: t0 -> t1 -> Packaging.TypeDefinition -> Either Errors.Error Syntax.ItemWithComments encodeTypeDefinition cx g tdef = @@ -334,6 +360,8 @@ Syntax.itemWithCommentsDoc = Nothing, Syntax.itemWithCommentsVisibility = Syntax.VisibilityPublic, Syntax.itemWithCommentsItem = item})))++-- | Encode a Hydra case statement (union elimination) as a Rust expression. Takes an optional argument for applied case statements. encodeUnionElim :: t0 -> t1 -> Core.CaseStatement -> Maybe Core.Term -> Either Errors.Error Syntax.Expression encodeUnionElim cx g cs marg = @@ -351,7 +379,7 @@ Syntax.exprPathGlobal = False, Syntax.exprPathSegments = [ Syntax.PathSegment {- Syntax.pathSegmentName = (Strings.cat2 (Strings.cat2 tname "::") cfname),+ Syntax.pathSegmentName = (Strings.concat2 (Strings.concat2 tname "::") cfname), Syntax.pathSegmentArguments = Syntax.GenericArgumentsNone}]}, Syntax.tupleStructPatternElements = [ Syntax.PatternIdentifier (Syntax.IdentifierPattern {@@ -371,6 +399,8 @@ Syntax.matchExprArms = allArms})))) (\arg -> Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Syntax.ExpressionMatch (Syntax.MatchExpr { Syntax.matchExprScrutinee = sarg, Syntax.matchExprArms = allArms})))))))++-- | Encode a Hydra wrap elimination (unwrap) as a Rust expression. Takes an optional argument for applied unwraps. encodeUnwrapElim :: t0 -> t1 -> Core.Name -> Maybe Core.Term -> Either Errors.Error Syntax.Expression encodeUnwrapElim cx g name marg = Optionals.cases marg (Right (rustClosure [@@ -379,6 +409,8 @@ Syntax.tupleIndexExprIndex = 0})))) (\arg -> Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Syntax.ExpressionTupleIndex (Syntax.TupleIndexExpr { Syntax.tupleIndexExprTuple = sarg, Syntax.tupleIndexExprIndex = 0}))))++-- | Convert a Hydra module to a map of file paths to Rust source code strings moduleToRust :: Packaging.Module -> [Packaging.Definition] -> t0 -> t1 -> Either Errors.Error (M.Map String String) moduleToRust mod defs cx g = @@ -392,6 +424,8 @@ code = Serialization.printExpr (Serialization.parenthesize (Serde.crateToExpr crate)) filePath = Names.moduleNameToFilePath Util.CaseConventionLowerSnake (File.FileExtension "rs") (Packaging.moduleName mod) in (Right (Maps.singleton filePath code)))))++-- | Apply a type constructor to one type argument (e.g., Vec<T>) rustApply1 :: String -> Syntax.Type -> Syntax.Type rustApply1 name arg = Syntax.TypePath_ (Syntax.TypePath {@@ -402,6 +436,8 @@ Syntax.pathSegmentArguments = (Syntax.GenericArgumentsAngleBracketed (Syntax.AngleBracketedArgs { Syntax.angleBracketedArgsArgs = [ Syntax.GenericArgType arg]}))}]})++-- | Apply a type constructor to two type arguments (e.g., BTreeMap<K, V>) rustApply2 :: String -> Syntax.Type -> Syntax.Type -> Syntax.Type rustApply2 name arg1 arg2 = Syntax.TypePath_ (Syntax.TypePath {@@ -413,16 +449,22 @@ Syntax.angleBracketedArgsArgs = [ Syntax.GenericArgType arg1, (Syntax.GenericArgType arg2)]}))}]})++-- | Block expression with statements and trailing expression rustBlock :: [Syntax.Statement] -> Syntax.Expression -> Syntax.Expression rustBlock stmts expr = Syntax.ExpressionBlock (Syntax.Block { Syntax.blockStatements = stmts, Syntax.blockExpression = (Just expr)})++-- | Function call expression rustCall :: Syntax.Expression -> [Syntax.Expression] -> Syntax.Expression rustCall fun args = Syntax.ExpressionCall (Syntax.CallExpr { Syntax.callExprFunction = fun, Syntax.callExprArgs = args})++-- | Closure expression: |params| body rustClosure :: [String] -> Syntax.Expression -> Syntax.Expression rustClosure params body = Syntax.ExpressionClosure (Syntax.ClosureExpr {@@ -435,6 +477,8 @@ Syntax.closureParamType = Nothing}) params), Syntax.closureExprReturnType = Nothing, Syntax.closureExprBody = body})++-- | Variable reference as a path expression rustExprPath :: String -> Syntax.Expression rustExprPath name = Syntax.ExpressionPath (Syntax.ExprPath {@@ -443,6 +487,8 @@ Syntax.PathSegment { Syntax.pathSegmentName = name, Syntax.pathSegmentArguments = Syntax.GenericArgumentsNone}]})++-- | Let statement: let name = expr; rustLetStmt :: String -> Syntax.Expression -> Syntax.Statement rustLetStmt name expr = Syntax.StatementLet (Syntax.LetStatement {@@ -453,6 +499,8 @@ Syntax.letStatementMutable = False, Syntax.letStatementType = Nothing, Syntax.letStatementInit = (Just expr)})++-- | Construct a simple Rust path type (e.g., "String" -> String) rustPath :: String -> Syntax.Type rustPath name = Syntax.TypePath_ (Syntax.TypePath {@@ -461,6 +509,8 @@ Syntax.PathSegment { Syntax.pathSegmentName = name, Syntax.pathSegmentArguments = Syntax.GenericArgumentsNone}]})++-- | Construct a Rust path type with multiple segments (e.g., ["num", "BigInt"] -> num::BigInt) rustPathSegmented :: [String] -> Syntax.Type rustPathSegmented segs = Syntax.TypePath_ (Syntax.TypePath {@@ -468,8 +518,12 @@ Syntax.typePathSegments = (Lists.map (\s -> Syntax.PathSegment { Syntax.pathSegmentName = s, Syntax.pathSegmentArguments = Syntax.GenericArgumentsNone}) segs)})++-- | The Rust unit type () rustUnit :: Syntax.Type rustUnit = Syntax.TypeUnit++-- | The standard set of derive macros applied to generated structs and enums standardDerives :: [String] standardDerives = [
src/main/haskell/Hydra/Rust/Language.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Language constraints and reserved words for Rust module Hydra.Rust.Language where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Lexical as Lexical@@ -18,9 +24,12 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -30,6 +39,7 @@ import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Set as S+ -- | Language constraints for Rust rustLanguage :: Coders.Language rustLanguage =@@ -41,7 +51,23 @@ Coders.languageConstraintsIntegerTypes = integerTypes, Coders.languageConstraintsTermVariants = termVariants, Coders.languageConstraintsTypeVariants = typeVariants,- Coders.languageConstraintsTypes = typePredicate}}+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeaturePartialApplication,+ Coders.LanguageFeatureNestedCaseStatements,+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "rs")} where literalVariants = Sets.fromList [@@ -107,6 +133,7 @@ Variants.TypeVariantVoid, Variants.TypeVariantWrap] typePredicate = \_ -> True+ -- | A set of reserved words in Rust rustReservedWords :: S.Set String rustReservedWords =
src/main/haskell/Hydra/Rust/Operators.hs view
@@ -1,24 +1,33 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | AST operators for Rust serialization module Hydra.Rust.Operators where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Packaging as Packaging import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Serialization as Serialization+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -27,15 +36,19 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Add-assign operator (+=) addAssignOp :: Ast.Op addAssignOp = Serialization.op "+=" 1 Ast.AssociativityRight+ -- | Addition operator (+) addOp :: Ast.Op addOp = Serialization.op "+" 10 Ast.AssociativityLeft+ -- | Logical AND operator (&&) andOp :: Ast.Op andOp = Serialization.op "&&" 4 Ast.AssociativityLeft+ -- | Function application operator (whitespace) appOp :: Ast.Op appOp =@@ -46,39 +59,51 @@ Ast.paddingRight = Ast.WsSpace}, Ast.opPrecedence = (Ast.Precedence 0), Ast.opAssociativity = Ast.AssociativityLeft}+ -- | Return type arrow (->) arrowOp :: Ast.Op arrowOp = Serialization.op "->" 0 Ast.AssociativityRight+ -- | Type cast operator (as) asOp :: Ast.Op asOp = Serialization.op "as" 12 Ast.AssociativityLeft+ -- | Assignment operator (=) assignOp :: Ast.Op assignOp = Serialization.op "=" 1 Ast.AssociativityRight+ -- | Bitwise and-assign operator (&=) bitAndAssignOp :: Ast.Op bitAndAssignOp = Serialization.op "&=" 1 Ast.AssociativityRight+ -- | Bitwise AND operator (&) bitAndOp :: Ast.Op bitAndOp = Serialization.op "&" 8 Ast.AssociativityLeft+ -- | Bitwise or-assign operator (|=) bitOrAssignOp :: Ast.Op bitOrAssignOp = Serialization.op "|=" 1 Ast.AssociativityRight+ -- | Bitwise OR operator (|) bitOrOp :: Ast.Op bitOrOp = Serialization.op "|" 6 Ast.AssociativityLeft+ -- | Bitwise xor-assign operator (^=) bitXorAssignOp :: Ast.Op bitXorAssignOp = Serialization.op "^=" 1 Ast.AssociativityRight+ -- | Bitwise XOR operator (^) bitXorOp :: Ast.Op bitXorOp = Serialization.op "^" 7 Ast.AssociativityLeft+ -- | Type annotation (::) for let statements colonColonOp :: Ast.Op colonColonOp = Serialization.op ":" 0 Ast.AssociativityNone+ -- | Type ascription operator (:) colonOp :: Ast.Op colonOp = Serialization.op ":" 12 Ast.AssociativityLeft+ -- | Dereference operator (*) derefOp :: Ast.Op derefOp =@@ -89,12 +114,15 @@ Ast.paddingRight = Ast.WsNone}, Ast.opPrecedence = (Ast.Precedence 13), Ast.opAssociativity = Ast.AssociativityNone}+ -- | Div-assign operator (/=) divAssignOp :: Ast.Op divAssignOp = Serialization.op "/=" 1 Ast.AssociativityRight+ -- | Division operator (/) divOp :: Ast.Op divOp = Serialization.op "/" 11 Ast.AssociativityLeft+ -- | Path separator (::) doubleColonOp :: Ast.Op doubleColonOp =@@ -105,12 +133,15 @@ Ast.paddingRight = Ast.WsNone}, Ast.opPrecedence = (Ast.Precedence 15), Ast.opAssociativity = Ast.AssociativityLeft}+ -- | Equality operator (==) eqOp :: Ast.Op eqOp = Serialization.op "==" 5 Ast.AssociativityNone+ -- | Match arm arrow (=>) fatArrowOp :: Ast.Op fatArrowOp = Serialization.op "=>" 0 Ast.AssociativityNone+ -- | Field access operator (.) fieldOp :: Ast.Op fieldOp =@@ -121,18 +152,23 @@ Ast.paddingRight = Ast.WsNone}, Ast.opPrecedence = (Ast.Precedence 14), Ast.opAssociativity = Ast.AssociativityLeft}+ -- | Greater-than-or-equal operator (>=) geOp :: Ast.Op geOp = Serialization.op ">=" 5 Ast.AssociativityNone+ -- | Greater-than operator (>) gtOp :: Ast.Op gtOp = Serialization.op ">" 5 Ast.AssociativityNone+ -- | Less-than-or-equal operator (<=) leOp :: Ast.Op leOp = Serialization.op "<=" 5 Ast.AssociativityNone+ -- | Less-than operator (<) ltOp :: Ast.Op ltOp = Serialization.op "<" 5 Ast.AssociativityNone+ -- | Method call operator (.) methodOp :: Ast.Op methodOp =@@ -143,15 +179,19 @@ Ast.paddingRight = Ast.WsNone}, Ast.opPrecedence = (Ast.Precedence 14), Ast.opAssociativity = Ast.AssociativityLeft}+ -- | Mul-assign operator (*=) mulAssignOp :: Ast.Op mulAssignOp = Serialization.op "*=" 1 Ast.AssociativityRight+ -- | Multiplication operator (*) mulOp :: Ast.Op mulOp = Serialization.op "*" 11 Ast.AssociativityLeft+ -- | Not-equal operator (!=) neOp :: Ast.Op neOp = Serialization.op "!=" 5 Ast.AssociativityNone+ -- | Unary negation operator (-) negOp :: Ast.Op negOp =@@ -162,6 +202,7 @@ Ast.paddingRight = Ast.WsNone}, Ast.opPrecedence = (Ast.Precedence 13), Ast.opAssociativity = Ast.AssociativityNone}+ -- | Unary logical not operator (!) notOp :: Ast.Op notOp =@@ -172,15 +213,19 @@ Ast.paddingRight = Ast.WsNone}, Ast.opPrecedence = (Ast.Precedence 13), Ast.opAssociativity = Ast.AssociativityNone}+ -- | Logical OR operator (||) orOp :: Ast.Op orOp = Serialization.op "||" 3 Ast.AssociativityLeft+ -- | Inclusive range operator (..=) rangeInclusiveOp :: Ast.Op rangeInclusiveOp = Serialization.op "..=" 2 Ast.AssociativityNone+ -- | Range operator (..) rangeOp :: Ast.Op rangeOp = Serialization.op ".." 2 Ast.AssociativityNone+ -- | Reference operator (&) refOp :: Ast.Op refOp =@@ -191,27 +236,35 @@ Ast.paddingRight = Ast.WsNone}, Ast.opPrecedence = (Ast.Precedence 13), Ast.opAssociativity = Ast.AssociativityNone}+ -- | Rem-assign operator (%=) remAssignOp :: Ast.Op remAssignOp = Serialization.op "%=" 1 Ast.AssociativityRight+ -- | Remainder operator (%) remOp :: Ast.Op remOp = Serialization.op "%" 11 Ast.AssociativityLeft+ -- | Shift-left assign operator (<<=) shlAssignOp :: Ast.Op shlAssignOp = Serialization.op "<<=" 1 Ast.AssociativityRight+ -- | Shift-left operator (<<) shlOp :: Ast.Op shlOp = Serialization.op "<<" 9 Ast.AssociativityLeft+ -- | Shift-right assign operator (>>=) shrAssignOp :: Ast.Op shrAssignOp = Serialization.op ">>=" 1 Ast.AssociativityRight+ -- | Shift-right operator (>>) shrOp :: Ast.Op shrOp = Serialization.op ">>" 9 Ast.AssociativityLeft+ -- | Sub-assign operator (-=) subAssignOp :: Ast.Op subAssignOp = Serialization.op "-=" 1 Ast.AssociativityRight+ -- | Subtraction operator (-) subOp :: Ast.Op subOp = Serialization.op "-" 10 Ast.AssociativityLeft
src/main/haskell/Hydra/Rust/Serde.hs view
@@ -1,15 +1,21 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Rust serializer: converts Rust AST to concrete syntax module Hydra.Rust.Serde where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Constants as Constants import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality@@ -22,12 +28,15 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Rust.Operators as Operators import qualified Hydra.Rust.Syntax as Syntax import qualified Hydra.Serialization as Serialization+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -36,6 +45,7 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Serialize an array expression arrayExprToExpr :: Syntax.ArrayExpr -> Ast.Expr arrayExprToExpr a =@@ -44,12 +54,13 @@ Syntax.ArrayExprRepeat v0 -> let elem = Syntax.arrayRepeatElement v0 len = Syntax.arrayRepeatLength v0- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ "[", (Serialization.printExpr (expressionToExpr elem)), "; ", (Serialization.printExpr (expressionToExpr len)), "]"]))+ -- | Serialize an assignment expression assignExprToExpr :: Syntax.AssignExpr -> Ast.Expr assignExprToExpr a =@@ -60,6 +71,7 @@ expressionToExpr target, (Serialization.cst "="), (expressionToExpr val)])+ -- | Serialize an attribute attributeToExpr :: Syntax.Attribute -> Ast.Expr attributeToExpr attr =@@ -68,17 +80,18 @@ path = Syntax.attributePath attr tokens = Syntax.attributeTokens attr prefix = Logic.ifElse inner "#![" "#["- pathStr = Strings.intercalate "::" path+ pathStr = Strings.join "::" path tokensPart =- Optionals.cases tokens "" (\t -> Strings.cat [+ Optionals.cases tokens "" (\t -> Strings.concat [ "(", t, ")"])- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ prefix, pathStr, tokensPart, "]"]))+ -- | Serialize a binary expression binaryExprToExpr :: Syntax.BinaryExpr -> Ast.Expr binaryExprToExpr b =@@ -90,6 +103,7 @@ expressionToExpr left, (binaryOpToExpr op), (expressionToExpr right)])+ -- | Serialize a binary operator binaryOpToExpr :: Syntax.BinaryOp -> Ast.Expr binaryOpToExpr op =@@ -112,6 +126,7 @@ Syntax.BinaryOpLe -> "<=" Syntax.BinaryOpGt -> ">" Syntax.BinaryOpGe -> ">=")+ -- | Serialize a block blockToExpr :: Syntax.Block -> Ast.Expr blockToExpr b =@@ -123,6 +138,7 @@ expressionToExpr e]) allParts = Lists.concat2 stmtExprs exprPart in (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle allParts)+ -- | Serialize a function call expression callExprToExpr :: Syntax.CallExpr -> Ast.Expr callExprToExpr c =@@ -132,6 +148,7 @@ in (Serialization.spaceSep [ expressionToExpr func, (Serialization.parenListAdaptive (Lists.map expressionToExpr args))])+ -- | Serialize a cast expression castExprToExpr :: Syntax.CastExpr -> Ast.Expr castExprToExpr c =@@ -142,6 +159,7 @@ expressionToExpr expr, (Serialization.cst "as"), (typeToExpr typ)])+ -- | Serialize a closure expression closureExprToExpr :: Syntax.ClosureExpr -> Ast.Expr closureExprToExpr c =@@ -152,19 +170,20 @@ body = Syntax.closureExprBody c moveKw = Logic.ifElse move (Just (Serialization.cst "move")) Nothing paramsStr =- Strings.cat [+ Strings.concat [ "|",- (Strings.intercalate ", " (Lists.map closureParamToStr params)),+ (Strings.join ", " (Lists.map closureParamToStr params)), "|"] retPart = Optionals.cases retType Nothing (\t -> Just (Serialization.spaceSep [ Serialization.cst "->", (typeToExpr t)]))- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ moveKw, (Just (Serialization.cst paramsStr)), retPart, (Just (expressionToExpr body))]))+ -- | Serialize a closure parameter to string closureParamToStr :: Syntax.ClosureParam -> String closureParamToStr cp =@@ -172,10 +191,11 @@ let pat = Syntax.closureParamPattern cp typ = Syntax.closureParamType cp patStr = Serialization.printExpr (patternToExpr pat)- in (Optionals.cases typ patStr (\t -> Strings.cat [+ in (Optionals.cases typ patStr (\t -> Strings.concat [ patStr, ": ", (Serialization.printExpr (typeToExpr t))]))+ -- | Serialize a compound assignment expression compoundAssignExprToExpr :: Syntax.CompoundAssignExpr -> Ast.Expr compoundAssignExprToExpr c =@@ -199,6 +219,7 @@ expressionToExpr target, (Serialization.cst opStr), (expressionToExpr val)])+ -- | Serialize a const definition constDefToExpr :: Syntax.ConstDef -> Ast.Expr constDefToExpr c =@@ -208,21 +229,24 @@ val = Syntax.constDefValue c in (Serialization.spaceSep [ Serialization.cst "const",- (Serialization.cst (Strings.cat2 name ":")),+ (Serialization.cst (Strings.concat2 name ":")), (typeToExpr typ), (Serialization.cst "="), (expressionToExpr val), (Serialization.cst ";")])+ -- | Serialize a Rust crate to an AST expression crateToExpr :: Syntax.Crate -> Ast.Expr crateToExpr crate = Serialization.doubleNewlineSep (Lists.map itemWithCommentsToExpr (Syntax.crateItems crate))+ -- | Serialize derive macros to an attribute expression derivesToExpr :: [String] -> Maybe Ast.Expr derivesToExpr derives =- Logic.ifElse (Lists.null derives) Nothing (Just (Serialization.cst (Strings.cat [+ Logic.ifElse (Lists.null derives) Nothing (Just (Serialization.cst (Strings.concat [ "#[derive(",- (Strings.intercalate ", " derives),+ (Strings.join ", " derives), ")]"])))+ -- | Serialize an enum definition enumDefToExpr :: Syntax.EnumDef -> Ast.Expr enumDefToExpr e =@@ -237,7 +261,7 @@ docPart = Optionals.cases docC [] (\d -> [ Serialization.cst (toRustDocComment d)]) header =- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "enum"), (Just (Serialization.cst name)), (genericParamsToExpr generics)])@@ -248,10 +272,11 @@ (Optionals.cases derivesAttr [] (\d -> [ d])), [- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ Just header, wherePart, (Just body)])]]))+ -- | Serialize an enum variant body enumVariantBodyToExpr :: Syntax.EnumVariantBody -> Ast.Expr enumVariantBodyToExpr body =@@ -259,6 +284,7 @@ Syntax.EnumVariantBodyUnit -> Serialization.cst "" Syntax.EnumVariantBodyTuple v0 -> Serialization.parenListAdaptive (Lists.map typeToExpr v0) Syntax.EnumVariantBodyStruct v0 -> Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map structFieldToExpr v0)+ -- | Serialize an enum variant enumVariantToExpr :: Syntax.EnumVariant -> Ast.Expr enumVariantToExpr v =@@ -274,6 +300,7 @@ Serialization.spaceSep [ Serialization.cst name, (enumVariantBodyToExpr body)]]]))+ -- | Serialize an expression path exprPathToExpr :: Syntax.ExprPath -> Ast.Expr exprPathToExpr ep =@@ -282,7 +309,8 @@ segs = Syntax.exprPathSegments ep prefix = Logic.ifElse global "::" "" segStrs = Lists.map (\s -> Serialization.printExpr (pathSegmentToExpr s)) segs- in (Serialization.cst (Strings.cat2 prefix (Strings.intercalate "::" segStrs)))+ in (Serialization.cst (Strings.concat2 prefix (Strings.join "::" segStrs)))+ -- | Serialize a Rust expression expressionToExpr :: Syntax.Expression -> Ast.Expr expressionToExpr expr =@@ -316,24 +344,26 @@ Serialization.cst "break", (expressionToExpr e)]) Syntax.ExpressionContinue -> Serialization.cst "continue"- Syntax.ExpressionTry v0 -> Serialization.cst (Strings.cat2 (Serialization.printExpr (expressionToExpr v0)) "?")+ Syntax.ExpressionTry v0 -> Serialization.cst (Strings.concat2 (Serialization.printExpr (expressionToExpr v0)) "?") Syntax.ExpressionCast v0 -> castExprToExpr v0 Syntax.ExpressionTypeAscription v0 -> typeAscriptionExprToExpr v0- Syntax.ExpressionAwait v0 -> Serialization.cst (Strings.cat2 (Serialization.printExpr (expressionToExpr v0)) ".await")+ Syntax.ExpressionAwait v0 -> Serialization.cst (Strings.concat2 (Serialization.printExpr (expressionToExpr v0)) ".await") Syntax.ExpressionAssign v0 -> assignExprToExpr v0 Syntax.ExpressionCompoundAssign v0 -> compoundAssignExprToExpr v0 Syntax.ExpressionMacro v0 -> macroInvocationToExpr v0 Syntax.ExpressionParen v0 -> Serialization.parenthesize (expressionToExpr v0)+ -- | Serialize a field access expression fieldAccessExprToExpr :: Syntax.FieldAccessExpr -> Ast.Expr fieldAccessExprToExpr f = let obj = Syntax.fieldAccessExprObject f field = Syntax.fieldAccessExprField f- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ Serialization.printExpr (expressionToExpr obj), ".", field]))+ -- | Serialize a field pattern fieldPatternToExpr :: Syntax.FieldPattern -> Ast.Expr fieldPatternToExpr fp =@@ -341,8 +371,9 @@ let name = Syntax.fieldPatternName fp pat = Syntax.fieldPatternPattern fp in (Optionals.cases pat (Serialization.cst name) (\p -> Serialization.spaceSep [- Serialization.cst (Strings.cat2 name ":"),+ Serialization.cst (Strings.concat2 name ":"), (patternToExpr p)]))+ -- | Serialize a field-value pair fieldValueToExpr :: Syntax.FieldValue -> Ast.Expr fieldValueToExpr fv =@@ -350,8 +381,9 @@ let name = Syntax.fieldValueName fv val = Syntax.fieldValueValue fv in (Optionals.cases val (Serialization.cst name) (\v -> Serialization.spaceSep [- Serialization.cst (Strings.cat2 name ":"),+ Serialization.cst (Strings.concat2 name ":"), (expressionToExpr v)]))+ -- | Serialize a float literal floatLiteralToExpr :: Syntax.FloatLiteral -> Ast.Expr floatLiteralToExpr fl =@@ -360,7 +392,8 @@ suf = Syntax.floatLiteralSuffix fl valStr = Literals.showFloat64 val sufStr = Optionals.cases suf "" (\s -> s)- in (Serialization.cst (Strings.cat2 valStr sufStr))+ in (Serialization.cst (Strings.concat2 valStr sufStr))+ -- | Serialize a function definition fnDefToExpr :: Syntax.FnDef -> Ast.Expr fnDefToExpr f =@@ -390,7 +423,7 @@ (typeToExpr t)])) whereExpr = Optionals.cases whereC Nothing (\w -> Just (whereClauseToExpr w)) header =- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ asyncKw, constKw, unsafeKw,@@ -406,6 +439,7 @@ Serialization.spaceSep [ header, (blockToExpr body)]]]))+ -- | Serialize a function parameter fnParamToExpr :: Syntax.FnParam -> Ast.Expr fnParamToExpr param =@@ -413,8 +447,9 @@ let pat = Syntax.fnParamPattern param typ = Syntax.fnParamType param in (Serialization.spaceSep [- Serialization.cst (Strings.cat2 (Serialization.printExpr (patternToExpr pat)) ":"),+ Serialization.cst (Strings.concat2 (Serialization.printExpr (patternToExpr pat)) ":"), (typeToExpr typ)])+ -- | Serialize a for expression forExprToExpr :: Syntax.ForExpr -> Ast.Expr forExprToExpr f =@@ -423,20 +458,22 @@ pat = Syntax.forExprPattern f iter = Syntax.forExprIter f body = Syntax.forExprBody f- labelPart = Optionals.cases label Nothing (\lbl -> Just (Serialization.cst (Strings.cat2 "'" (Strings.cat2 lbl ":"))))- in (Serialization.spaceSep (Optionals.cat [+ labelPart =+ Optionals.cases label Nothing (\lbl -> Just (Serialization.cst (Strings.concat2 "'" (Strings.concat2 lbl ":"))))+ in (Serialization.spaceSep (Optionals.givens [ labelPart, (Just (Serialization.cst "for")), (Just (patternToExpr pat)), (Just (Serialization.cst "in")), (Just (expressionToExpr iter)), (Just (blockToExpr body))]))+ -- | Serialize a generic argument genericArgToExpr :: Syntax.GenericArg -> Ast.Expr genericArgToExpr arg = case arg of Syntax.GenericArgType v0 -> typeToExpr v0- Syntax.GenericArgLifetime v0 -> Serialization.cst (Strings.cat2 "'" (Syntax.lifetimeName v0))+ Syntax.GenericArgLifetime v0 -> Serialization.cst (Strings.concat2 "'" (Syntax.lifetimeName v0)) Syntax.GenericArgConst v0 -> expressionToExpr v0 Syntax.GenericArgBinding v0 -> let name = Syntax.typeBindingName v0@@ -445,6 +482,7 @@ Serialization.cst name, (Serialization.cst "="), (typeToExpr typ)])+ -- | Serialize generic arguments genericArgumentsToExpr :: Syntax.GenericArguments -> Maybe Ast.Expr genericArgumentsToExpr args =@@ -461,9 +499,10 @@ Optionals.cases output Nothing (\t -> Just (Serialization.spaceSep [ Serialization.cst "->", (typeToExpr t)]))- in (Just (Serialization.spaceSep (Optionals.cat [+ in (Just (Serialization.spaceSep (Optionals.givens [ Just inputPart, outputPart])))+ -- | Serialize a generic parameter genericParamToExpr :: Syntax.GenericParam -> Ast.Expr genericParamToExpr gp =@@ -471,12 +510,14 @@ let name = Syntax.genericParamName gp bounds = Syntax.genericParamBounds gp in (Logic.ifElse (Lists.null bounds) (Serialization.cst name) (Serialization.spaceSep [- Serialization.cst (Strings.cat2 name ":"),- (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) bounds)))]))+ Serialization.cst (Strings.concat2 name ":"),+ (Serialization.cst (Strings.join " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) bounds)))]))+ -- | Serialize a list of generic parameters genericParamsToExpr :: [Syntax.GenericParam] -> Maybe Ast.Expr genericParamsToExpr gps = Logic.ifElse (Lists.null gps) Nothing (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map genericParamToExpr gps)))+ -- | Serialize an identifier pattern identifierPatternToExpr :: Syntax.IdentifierPattern -> Ast.Expr identifierPatternToExpr ip =@@ -489,10 +530,11 @@ Optionals.cases atPat Nothing (\p -> Just (Serialization.spaceSep [ Serialization.cst "@", (patternToExpr p)]))- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ mutKw, (Just (Serialization.cst name)), atPart]))+ -- | Serialize an if expression ifExprToExpr :: Syntax.IfExpr -> Ast.Expr ifExprToExpr i =@@ -515,11 +557,12 @@ Optionals.cases elseB Nothing (\e -> Just (Serialization.spaceSep [ Serialization.cst "else", (expressionToExpr e)]))- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "if"), (Just condExpr), (Just (blockToExpr thenB)), elsePart]))+ -- | Serialize an impl block implBlockToExpr :: Syntax.ImplBlock -> Ast.Expr implBlockToExpr i =@@ -536,7 +579,7 @@ (Serialization.cst "for")])) wherePart = Optionals.cases whereC Nothing (\w -> Just (whereClauseToExpr w)) header =- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "impl"), genericsExpr, traitPart,@@ -546,6 +589,7 @@ in (Serialization.spaceSep [ header, body])+ -- | Serialize an impl item implItemToExpr :: Syntax.ImplItem -> Ast.Expr implItemToExpr item =@@ -553,6 +597,7 @@ Syntax.ImplItemMethod v0 -> implMethodToExpr v0 Syntax.ImplItemType v0 -> typeAliasToExpr v0 Syntax.ImplItemConst v0 -> constDefToExpr v0+ -- | Serialize an impl method implMethodToExpr :: Syntax.ImplMethod -> Ast.Expr implMethodToExpr m =@@ -576,7 +621,7 @@ (typeToExpr t)])) whereExpr = Optionals.cases whereC Nothing (\w -> Just (whereClauseToExpr w)) header =- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ pubKw, (Just (Serialization.cst "fn")), (Just (Serialization.cst name)),@@ -590,17 +635,19 @@ Serialization.spaceSep [ header, (blockToExpr body)]]]))+ -- | Serialize an index expression indexExprToExpr :: Syntax.IndexExpr -> Ast.Expr indexExprToExpr i = let obj = Syntax.indexExprObject i idx = Syntax.indexExprIndex i- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ Serialization.printExpr (expressionToExpr obj), "[", (Serialization.printExpr (expressionToExpr idx)), "]"]))+ -- | Serialize an integer literal integerLiteralToExpr :: Syntax.IntegerLiteral -> Ast.Expr integerLiteralToExpr il =@@ -609,7 +656,8 @@ suf = Syntax.integerLiteralSuffix il valStr = Literals.showBigint val sufStr = Optionals.cases suf "" (\s -> s)- in (Serialization.cst (Strings.cat2 valStr sufStr))+ in (Serialization.cst (Strings.concat2 valStr sufStr))+ -- | Serialize a Rust item to an AST expression itemToExpr :: Syntax.Item -> Ast.Expr itemToExpr item =@@ -625,6 +673,7 @@ Syntax.ItemConst v0 -> constDefToExpr v0 Syntax.ItemStatic v0 -> staticDefToExpr v0 Syntax.ItemMacro v0 -> macroInvocationToExpr v0+ -- | Serialize an item with optional doc comments and visibility itemWithCommentsToExpr :: Syntax.ItemWithComments -> Ast.Expr itemWithCommentsToExpr iwc =@@ -639,9 +688,10 @@ in (Serialization.newlineSep (Lists.concat [ docPart, [- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ visPart, (Just itemPart)])]]))+ -- | Serialize a let statement letStatementToExpr :: Syntax.LetStatement -> Ast.Expr letStatementToExpr l =@@ -659,45 +709,49 @@ Optionals.cases init Nothing (\e -> Just (Serialization.spaceSep [ Serialization.cst "=", (expressionToExpr e)]))- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "let"), mutKw, (Just (patternToExpr pat)), typPart, initPart, (Just (Serialization.cst ";"))]))+ -- | Serialize a literal literalToExpr :: Syntax.Literal -> Ast.Expr literalToExpr lit = case lit of Syntax.LiteralInteger v0 -> integerLiteralToExpr v0 Syntax.LiteralFloat v0 -> floatLiteralToExpr v0- Syntax.LiteralString v0 -> Serialization.cst (Literals.showString v0)- Syntax.LiteralRawString v0 -> Serialization.cst (Strings.cat [+ Syntax.LiteralString v0 -> Serialization.cst (Literals.printString v0)+ Syntax.LiteralRawString v0 -> Serialization.cst (Strings.concat [ "r\"", v0, "\""]) Syntax.LiteralByteString _ -> Serialization.cst "b\"...\""- Syntax.LiteralChar v0 -> Serialization.cst (Strings.cat [+ Syntax.LiteralChar v0 -> Serialization.cst (Strings.concat [ "'", (Literals.showUint32 v0), "'"])- Syntax.LiteralByte v0 -> Serialization.cst (Strings.cat [+ Syntax.LiteralByte v0 -> Serialization.cst (Strings.concat [ "b'", (Literals.showUint8 v0), "'"]) Syntax.LiteralBool v0 -> Serialization.cst (Logic.ifElse v0 "true" "false")+ -- | Serialize a loop expression loopExprToExpr :: Syntax.LoopExpr -> Ast.Expr loopExprToExpr l = let label = Syntax.loopExprLabel l body = Syntax.loopExprBody l- labelPart = Optionals.cases label Nothing (\lbl -> Just (Serialization.cst (Strings.cat2 "'" (Strings.cat2 lbl ":"))))- in (Serialization.spaceSep (Optionals.cat [+ labelPart =+ Optionals.cases label Nothing (\lbl -> Just (Serialization.cst (Strings.concat2 "'" (Strings.concat2 lbl ":"))))+ in (Serialization.spaceSep (Optionals.givens [ labelPart, (Just (Serialization.cst "loop")), (Just (blockToExpr body))]))+ -- | Serialize a macro invocation macroInvocationToExpr :: Syntax.MacroInvocation -> Ast.Expr macroInvocationToExpr m =@@ -705,7 +759,7 @@ let path = Syntax.macroInvocationPath m delim = Syntax.macroInvocationDelimiter m tokens = Syntax.macroInvocationTokens m- pathStr = Strings.intercalate "::" path+ pathStr = Strings.join "::" path open = case delim of Syntax.MacroDelimiterParen -> "("@@ -716,12 +770,13 @@ Syntax.MacroDelimiterParen -> ")" Syntax.MacroDelimiterBracket -> "]" Syntax.MacroDelimiterBrace -> "}"- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ pathStr, "!", open, tokens, close]))+ -- | Serialize a match arm matchArmToExpr :: Syntax.MatchArm -> Ast.Expr matchArmToExpr arm =@@ -733,12 +788,13 @@ Optionals.cases guard Nothing (\g -> Just (Serialization.spaceSep [ Serialization.cst "if", (expressionToExpr g)]))- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ Just (patternToExpr pat), guardPart, (Just (Serialization.cst "=>")), (Just (expressionToExpr body)), (Just (Serialization.cst ","))]))+ -- | Serialize a match expression matchExprToExpr :: Syntax.MatchExpr -> Ast.Expr matchExprToExpr m =@@ -749,6 +805,7 @@ Serialization.cst "match", (expressionToExpr scrut), (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map matchArmToExpr arms))])+ -- | Serialize a method call expression methodCallExprToExpr :: Syntax.MethodCallExpr -> Ast.Expr methodCallExprToExpr m =@@ -758,18 +815,19 @@ turbo = Syntax.methodCallExprTurbofish m args = Syntax.methodCallExprArgs m turboPart =- Logic.ifElse (Lists.null turbo) "" (Strings.cat [+ Logic.ifElse (Lists.null turbo) "" (Strings.concat [ "::<",- (Strings.intercalate ", " (Lists.map (\t -> Serialization.printExpr (typeToExpr t)) turbo)),+ (Strings.join ", " (Lists.map (\t -> Serialization.printExpr (typeToExpr t)) turbo)), ">"])- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ Serialization.printExpr (expressionToExpr recv), ".", method, turboPart, "(",- (Strings.intercalate ", " (Lists.map (\a -> Serialization.printExpr (expressionToExpr a)) args)),+ (Strings.join ", " (Lists.map (\a -> Serialization.printExpr (expressionToExpr a)) args)), ")"]))+ -- | Serialize a method parameter methodParamToExpr :: Syntax.MethodParam -> Ast.Expr methodParamToExpr param =@@ -779,6 +837,7 @@ Syntax.SelfParamRef -> Serialization.cst "&self" Syntax.SelfParamRefMut -> Serialization.cst "&mut self" Syntax.MethodParamRegular v0 -> fnParamToExpr v0+ -- | Serialize a module definition modDefToExpr :: Syntax.ModDef -> Ast.Expr modDefToExpr m =@@ -792,15 +851,17 @@ Serialization.cst "mod", (Serialization.cst name), (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map itemToExpr items))]))+ -- | Serialize a path segment pathSegmentToExpr :: Syntax.PathSegment -> Ast.Expr pathSegmentToExpr seg = let name = Syntax.pathSegmentName seg args = Syntax.pathSegmentArguments seg- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst name), (genericArgumentsToExpr args)]))+ -- | Serialize a pattern patternToExpr :: Syntax.Pattern -> Ast.Expr patternToExpr pat =@@ -813,11 +874,12 @@ Syntax.PatternTupleStruct v0 -> tupleStructPatternToExpr v0 Syntax.PatternTuple v0 -> Serialization.parenListAdaptive (Lists.map patternToExpr v0) Syntax.PatternSlice v0 -> Serialization.bracketList Serialization.halfBlockStyle (Lists.map patternToExpr v0)- Syntax.PatternOr v0 -> Serialization.cst (Strings.intercalate " | " (Lists.map (\p -> Serialization.printExpr (patternToExpr p)) v0))+ Syntax.PatternOr v0 -> Serialization.cst (Strings.join " | " (Lists.map (\p -> Serialization.printExpr (patternToExpr p)) v0)) Syntax.PatternPath v0 -> exprPathToExpr v0 Syntax.PatternRange v0 -> rangePatternToExpr v0 Syntax.PatternRest -> Serialization.cst ".." Syntax.PatternParen v0 -> Serialization.parenthesize (patternToExpr v0)+ -- | Serialize a range expression rangeExprToExpr :: Syntax.RangeExpr -> Ast.Expr rangeExprToExpr r =@@ -828,10 +890,11 @@ fromStr = Optionals.cases from "" (\f -> Serialization.printExpr (expressionToExpr f)) toStr = Optionals.cases to "" (\t -> Serialization.printExpr (expressionToExpr t)) op = Logic.ifElse incl "..=" ".."- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ fromStr, op, toStr]))+ -- | Serialize a range pattern rangePatternToExpr :: Syntax.RangePattern -> Ast.Expr rangePatternToExpr rp =@@ -842,10 +905,11 @@ fromStr = Optionals.cases from "" (\p -> Serialization.printExpr (patternToExpr p)) toStr = Optionals.cases to "" (\p -> Serialization.printExpr (patternToExpr p)) op = Logic.ifElse incl "..=" ".."- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ fromStr, op, toStr]))+ -- | Serialize a reference expression refExprToExpr :: Syntax.RefExpr -> Ast.Expr refExprToExpr r =@@ -853,7 +917,8 @@ let mut = Syntax.refExprMutable r expr = Syntax.refExprExpr r prefix = Logic.ifElse mut "&mut " "&"- in (Serialization.cst (Strings.cat2 prefix (Serialization.printExpr (expressionToExpr expr))))+ in (Serialization.cst (Strings.concat2 prefix (Serialization.printExpr (expressionToExpr expr))))+ -- | Serialize a reference pattern refPatternToExpr :: Syntax.RefPattern -> Ast.Expr refPatternToExpr rp =@@ -861,7 +926,8 @@ let mut = Syntax.refPatternMutable rp pat = Syntax.refPatternPattern rp prefix = Logic.ifElse mut "&mut " "&"- in (Serialization.cst (Strings.cat2 prefix (Serialization.printExpr (patternToExpr pat))))+ in (Serialization.cst (Strings.concat2 prefix (Serialization.printExpr (patternToExpr pat))))+ -- | Serialize a reference type referenceTypeToExpr :: Syntax.ReferenceType -> Ast.Expr referenceTypeToExpr rt =@@ -869,13 +935,14 @@ let lt = Syntax.referenceTypeLifetime rt mut = Syntax.referenceTypeMutable rt t = Syntax.referenceTypeType rt- ltPart = Optionals.cases lt "" (\l -> Strings.cat2 "'" (Strings.cat2 (Syntax.lifetimeName l) " "))+ ltPart = Optionals.cases lt "" (\l -> Strings.concat2 "'" (Strings.concat2 (Syntax.lifetimeName l) " ")) mutPart = Logic.ifElse mut "mut " ""- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ "&", ltPart, mutPart, (Serialization.printExpr (typeToExpr t))]))+ -- | Serialize a statement statementToExpr :: Syntax.Statement -> Ast.Expr statementToExpr stmt =@@ -886,6 +953,7 @@ (Serialization.cst ";")] Syntax.StatementItem v0 -> itemToExpr v0 Syntax.StatementEmpty -> Serialization.cst ";"+ -- | Serialize a static definition staticDefToExpr :: Syntax.StaticDef -> Ast.Expr staticDefToExpr s =@@ -895,14 +963,15 @@ val = Syntax.staticDefValue s mut = Syntax.staticDefMutable s mutKw = Logic.ifElse mut (Just (Serialization.cst "mut")) Nothing- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "static"), mutKw,- (Just (Serialization.cst (Strings.cat2 name ":"))),+ (Just (Serialization.cst (Strings.concat2 name ":"))), (Just (typeToExpr typ)), (Just (Serialization.cst "=")), (Just (expressionToExpr val)), (Just (Serialization.cst ";"))]))+ -- | Serialize a struct body structBodyToExpr :: Syntax.StructBody -> Ast.Expr structBodyToExpr body =@@ -912,6 +981,7 @@ Serialization.parenListAdaptive (Lists.map (\f -> typeToExpr (Syntax.tupleFieldType f)) v0), (Serialization.cst ";")] Syntax.StructBodyUnit -> Serialization.cst ";"+ -- | Serialize a struct definition structDefToExpr :: Syntax.StructDef -> Ast.Expr structDefToExpr s =@@ -926,7 +996,7 @@ docPart = Optionals.cases docC [] (\d -> [ Serialization.cst (toRustDocComment d)]) header =- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "struct"), (Just (Serialization.cst name)), (genericParamsToExpr generics)])@@ -936,10 +1006,11 @@ (Optionals.cases derivesAttr [] (\d -> [ d])), [- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ Just header, wherePart, (Just (structBodyToExpr body))])]]))+ -- | Serialize a struct literal expression structExprToExpr :: Syntax.StructExpr -> Ast.Expr structExprToExpr s =@@ -957,6 +1028,7 @@ in (Serialization.spaceSep [ exprPathToExpr path, (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle allFields)])+ -- | Serialize a struct field structFieldToExpr :: Syntax.StructField -> Ast.Expr structFieldToExpr field =@@ -971,10 +1043,11 @@ in (Serialization.newlineSep (Lists.concat [ docPart, [- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ pubKw,- (Just (Serialization.cst (Strings.cat2 name ":"))),+ (Just (Serialization.cst (Strings.concat2 name ":"))), (Just (typeToExpr typ))])]]))+ -- | Serialize a struct pattern structPatternToExpr :: Syntax.StructPattern -> Ast.Expr structPatternToExpr sp =@@ -989,14 +1062,17 @@ in (Serialization.spaceSep [ exprPathToExpr path, (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle allFields)])+ -- | Convert a string to Rust line comments. Empty source lines emit `//` (no trailing space). toRustComment :: String -> String toRustComment c =- Strings.intercalate "\n" (Lists.map (\s -> Logic.ifElse (Equality.equal s "") "//" (Strings.cat2 "// " s)) (Strings.lines c))+ Strings.join "\n" (Lists.map (\s -> Logic.ifElse (Equality.equal s "") "//" (Strings.concat2 "// " s)) (Strings.lines c))+ -- | Convert a string to Rust doc comments. Empty source lines emit `///` (no trailing space) so blank doc lines don't carry trailing whitespace. toRustDocComment :: String -> String toRustDocComment c =- Strings.intercalate "\n" (Lists.map (\s -> Logic.ifElse (Equality.equal s "") "///" (Strings.cat2 "/// " s)) (Strings.lines c))+ Strings.join "\n" (Lists.map (\s -> Logic.ifElse (Equality.equal s "") "///" (Strings.concat2 "/// " s)) (Strings.lines c))+ -- | Serialize a trait associated constant traitConstToExpr :: Syntax.TraitConst -> Ast.Expr traitConstToExpr c =@@ -1008,12 +1084,13 @@ Optionals.cases def Nothing (\d -> Just (Serialization.spaceSep [ Serialization.cst "=", (expressionToExpr d)]))- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "const"),- (Just (Serialization.cst (Strings.cat2 name ":"))),+ (Just (Serialization.cst (Strings.concat2 name ":"))), (Just (typeToExpr typ)), defPart, (Just (Serialization.cst ";"))]))+ -- | Serialize a trait definition traitDefToExpr :: Syntax.TraitDef -> Ast.Expr traitDefToExpr t =@@ -1032,10 +1109,10 @@ superPart = Logic.ifElse (Lists.null supers) Nothing (Just (Serialization.spaceSep [ Serialization.cst ":",- (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) supers)))]))+ (Serialization.cst (Strings.join " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) supers)))])) wherePart = Optionals.cases whereC Nothing (\w -> Just (whereClauseToExpr w)) header =- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ unsafeKw, (Just (Serialization.cst "trait")), (Just (Serialization.cst name)),@@ -1049,6 +1126,7 @@ Serialization.spaceSep [ header, body]]]))+ -- | Serialize a trait item traitItemToExpr :: Syntax.TraitItem -> Ast.Expr traitItemToExpr item =@@ -1056,6 +1134,7 @@ Syntax.TraitItemMethod v0 -> traitMethodToExpr v0 Syntax.TraitItemType v0 -> traitTypeToExpr v0 Syntax.TraitItemConst v0 -> traitConstToExpr v0+ -- | Serialize a trait method traitMethodToExpr :: Syntax.TraitMethod -> Ast.Expr traitMethodToExpr m =@@ -1072,7 +1151,7 @@ Serialization.cst "->", (typeToExpr t)])) header =- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "fn"), (Just (Serialization.cst name)), genericsExpr,@@ -1083,6 +1162,7 @@ (Serialization.cst ";")]) (\body -> Serialization.spaceSep [ header, (blockToExpr body)]))+ -- | Serialize a trait associated type traitTypeToExpr :: Syntax.TraitType -> Ast.Expr traitTypeToExpr t =@@ -1093,27 +1173,29 @@ boundsPart = Logic.ifElse (Lists.null bounds) Nothing (Just (Serialization.spaceSep [ Serialization.cst ":",- (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) bounds)))]))+ (Serialization.cst (Strings.join " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) bounds)))])) defPart = Optionals.cases def Nothing (\d -> Just (Serialization.spaceSep [ Serialization.cst "=", (typeToExpr d)]))- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "type"), (Just (Serialization.cst name)), boundsPart, defPart, (Just (Serialization.cst ";"))]))+ -- | Serialize a tuple index expression tupleIndexExprToExpr :: Syntax.TupleIndexExpr -> Ast.Expr tupleIndexExprToExpr t = let tuple = Syntax.tupleIndexExprTuple t idx = Syntax.tupleIndexExprIndex t- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ Serialization.printExpr (expressionToExpr tuple), ".", (Literals.showInt32 idx)]))+ -- | Serialize a tuple struct pattern tupleStructPatternToExpr :: Syntax.TupleStructPattern -> Ast.Expr tupleStructPatternToExpr tsp =@@ -1123,6 +1205,7 @@ in (Serialization.spaceSep [ exprPathToExpr path, (Serialization.parenListAdaptive (Lists.map patternToExpr elems))])+ -- | Serialize a type alias typeAliasToExpr :: Syntax.TypeAlias -> Ast.Expr typeAliasToExpr ta =@@ -1136,13 +1219,14 @@ in (Serialization.newlineSep (Lists.concat [ docPart, [- Serialization.spaceSep (Optionals.cat [+ Serialization.spaceSep (Optionals.givens [ Just (Serialization.cst "type"), (Just (Serialization.cst name)), (genericParamsToExpr generics), (Just (Serialization.cst "=")), (Just (typeToExpr typ)), (Just (Serialization.cst ";"))])]]))+ -- | Serialize a type ascription expression typeAscriptionExprToExpr :: Syntax.TypeAscriptionExpr -> Ast.Expr typeAscriptionExprToExpr t =@@ -1153,12 +1237,14 @@ expressionToExpr expr, (Serialization.cst ":"), (typeToExpr typ)])+ -- | Serialize a type parameter bound typeParamBoundToExpr :: Syntax.TypeParamBound -> Ast.Expr typeParamBoundToExpr bound = case bound of Syntax.TypeParamBoundTrait v0 -> typePathToExpr v0- Syntax.TypeParamBoundLifetime v0 -> Serialization.cst (Strings.cat2 "'" (Syntax.lifetimeName v0))+ Syntax.TypeParamBoundLifetime v0 -> Serialization.cst (Strings.concat2 "'" (Syntax.lifetimeName v0))+ -- | Serialize a type path typePathToExpr :: Syntax.TypePath -> Ast.Expr typePathToExpr tp =@@ -1167,7 +1253,8 @@ segs = Syntax.typePathSegments tp prefix = Logic.ifElse global "::" "" segStrs = Lists.map (\s -> Serialization.printExpr (pathSegmentToExpr s)) segs- in (Serialization.cst (Strings.cat2 prefix (Strings.intercalate "::" segStrs)))+ in (Serialization.cst (Strings.concat2 prefix (Strings.join "::" segStrs)))+ -- | Serialize a Rust type typeToExpr :: Syntax.Type -> Ast.Expr typeToExpr typ =@@ -1179,7 +1266,7 @@ Syntax.TypeArray v0 -> let elem = Syntax.arrayTypeElement v0 len = Syntax.arrayTypeLength v0- in (Serialization.cst (Strings.cat [+ in (Serialization.cst (Strings.concat [ "[", (Serialization.printExpr (typeToExpr elem)), "; ",@@ -1196,10 +1283,10 @@ (typeToExpr ret)]) Syntax.TypeImplTrait v0 -> Serialization.spaceSep [ Serialization.cst "impl",- (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) v0)))]+ (Serialization.cst (Strings.join " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) v0)))] Syntax.TypeDynTrait v0 -> Serialization.spaceSep [ Serialization.cst "dyn",- (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) v0)))]+ (Serialization.cst (Strings.join " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) v0)))] Syntax.TypeInferred -> Serialization.cst "_" Syntax.TypeUnit -> Serialization.cst "()" Syntax.TypeNever -> Serialization.cst "!"@@ -1211,6 +1298,7 @@ Serialization.cst kw, (typeToExpr t)]) Syntax.TypeMacro v0 -> macroInvocationToExpr v0+ -- | Serialize a unary expression unaryExprToExpr :: Syntax.UnaryExpr -> Ast.Expr unaryExprToExpr u =@@ -1221,7 +1309,8 @@ case op of Syntax.UnaryOpNeg -> "-" Syntax.UnaryOpNot -> "!"- in (Serialization.cst (Strings.cat2 opStr (Serialization.printExpr (expressionToExpr operand))))+ in (Serialization.cst (Strings.concat2 opStr (Serialization.printExpr (expressionToExpr operand))))+ -- | Serialize a use declaration useDeclarationToExpr :: Syntax.UseDeclaration -> Ast.Expr useDeclarationToExpr use =@@ -1229,44 +1318,47 @@ let pub = Syntax.useDeclarationPublic use tree = Syntax.useDeclarationTree use pubKw = Logic.ifElse pub (Just (Serialization.cst "pub")) Nothing- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ pubKw, (Just (Serialization.cst "use")), (Just (useTreeToExpr tree)), (Just (Serialization.cst ";"))]))+ -- | Serialize a use tree useTreeToExpr :: Syntax.UseTree -> Ast.Expr useTreeToExpr tree = case tree of- Syntax.UseTreePath v0 -> Serialization.cst (Strings.intercalate "::" (Syntax.usePathSegments v0))+ Syntax.UseTreePath v0 -> Serialization.cst (Strings.join "::" (Syntax.usePathSegments v0)) Syntax.UseTreeRename v0 -> let path = Syntax.useRenamePath v0 alias = Syntax.useRenameAlias v0 in (Serialization.spaceSep [- Serialization.cst (Strings.intercalate "::" path),+ Serialization.cst (Strings.join "::" path), (Serialization.cst "as"), (Serialization.cst alias)])- Syntax.UseTreeGlob v0 -> Serialization.cst (Strings.cat2 (Strings.intercalate "::" v0) "::*")+ Syntax.UseTreeGlob v0 -> Serialization.cst (Strings.concat2 (Strings.join "::" v0) "::*") Syntax.UseTreeGroup v0 -> let prefix = Syntax.useGroupPrefix v0 trees = Syntax.useGroupTrees v0- prefixStr = Logic.ifElse (Lists.null prefix) "" (Strings.cat2 (Strings.intercalate "::" prefix) "::")- in (Serialization.cst (Strings.cat [+ prefixStr = Logic.ifElse (Lists.null prefix) "" (Strings.concat2 (Strings.join "::" prefix) "::")+ in (Serialization.cst (Strings.concat [ prefixStr, "{",- (Strings.intercalate ", " (Lists.map (\t -> Serialization.printExpr (useTreeToExpr t)) trees)),+ (Strings.join ", " (Lists.map (\t -> Serialization.printExpr (useTreeToExpr t)) trees)), "}"]))+ -- | Serialize visibility to an optional expression visibilityToExpr :: Syntax.Visibility -> Maybe Ast.Expr visibilityToExpr vis = case vis of Syntax.VisibilityPublic -> Just (Serialization.cst "pub") Syntax.VisibilityCrate -> Just (Serialization.cst "pub(crate)")- Syntax.VisibilityRestricted v0 -> Just (Serialization.cst (Strings.cat [+ Syntax.VisibilityRestricted v0 -> Just (Serialization.cst (Strings.concat [ "pub(in ",- (Strings.intercalate "::" v0),+ (Strings.join "::" v0), ")"])) Syntax.VisibilityPrivate -> Nothing+ -- | Serialize a where clause whereClauseToExpr :: Syntax.WhereClause -> Ast.Expr whereClauseToExpr wc =@@ -1279,10 +1371,11 @@ in (Serialization.spaceSep [ typeToExpr typ, (Serialization.cst ":"),- (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) bounds)))])) preds+ (Serialization.cst (Strings.join " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) bounds)))])) preds in (Serialization.spaceSep [ Serialization.cst "where", (Serialization.commaSep Serialization.inlineStyle predExprs)])+ -- | Serialize a while expression whileExprToExpr :: Syntax.WhileExpr -> Ast.Expr whileExprToExpr w =@@ -1290,7 +1383,8 @@ let label = Syntax.whileExprLabel w cond = Syntax.whileExprCondition w body = Syntax.whileExprBody w- labelPart = Optionals.cases label Nothing (\lbl -> Just (Serialization.cst (Strings.cat2 "'" (Strings.cat2 lbl ":"))))+ labelPart =+ Optionals.cases label Nothing (\lbl -> Just (Serialization.cst (Strings.concat2 "'" (Strings.concat2 lbl ":")))) condExpr = case cond of Syntax.IfConditionBool v0 -> expressionToExpr v0@@ -1302,7 +1396,7 @@ (patternToExpr pat), (Serialization.cst "="), (expressionToExpr expr)])- in (Serialization.spaceSep (Optionals.cat [+ in (Serialization.spaceSep (Optionals.givens [ labelPart, (Just (Serialization.cst "while")), (Just condExpr),
src/main/haskell/Hydra/Rust/Syntax.hs view
@@ -1,1569 +1,2143 @@ -- Note: this is an automatically generated file. Do not edit.--- | A Rust syntax model, based on the Rust Reference grammar (https://doc.rust-lang.org/reference/), retrieved 2025-01-29--module Hydra.Rust.Syntax where-import qualified Hydra.Core as Core-import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.Scientific as Sci-import qualified Data.ByteString as B-import qualified Data.Int as I--- | A Rust crate, represented as a collection of top-level items-data Crate =- Crate {- -- | The top-level items in the crate- crateItems :: [ItemWithComments]}- deriving (Eq, Ord, Read, Show)-_Crate = Core.Name "hydra.rust.syntax.Crate"-_Crate_items = Core.Name "items"--- | A top-level item in a Rust module or crate-data Item =- -- | A use declaration- ItemUse UseDeclaration |- -- | A struct definition- ItemStruct StructDef |- -- | An enum definition- ItemEnum EnumDef |- -- | A function definition- ItemFn FnDef |- -- | A type alias- ItemTypeAlias TypeAlias |- -- | An impl block- ItemImpl ImplBlock |- -- | A trait definition- ItemTrait TraitDef |- -- | A module definition- ItemMod ModDef |- -- | A constant item- ItemConst ConstDef |- -- | A static item- ItemStatic StaticDef |- -- | A macro invocation as an item- ItemMacro MacroInvocation- deriving (Eq, Ord, Read, Show)-_Item = Core.Name "hydra.rust.syntax.Item"-_Item_use = Core.Name "use"-_Item_struct = Core.Name "struct"-_Item_enum = Core.Name "enum"-_Item_fn = Core.Name "fn"-_Item_typeAlias = Core.Name "typeAlias"-_Item_impl = Core.Name "impl"-_Item_trait = Core.Name "trait"-_Item_mod = Core.Name "mod"-_Item_const = Core.Name "const"-_Item_static = Core.Name "static"-_Item_macro = Core.Name "macro"--- | An item together with optional doc comments and visibility-data ItemWithComments =- ItemWithComments {- -- | Optional documentation comment- itemWithCommentsDoc :: (Maybe String),- -- | The item's visibility- itemWithCommentsVisibility :: Visibility,- -- | The item itself- itemWithCommentsItem :: Item}- deriving (Eq, Ord, Read, Show)-_ItemWithComments = Core.Name "hydra.rust.syntax.ItemWithComments"-_ItemWithComments_doc = Core.Name "doc"-_ItemWithComments_visibility = Core.Name "visibility"-_ItemWithComments_item = Core.Name "item"--- | A use declaration (e.g., use std::collections::BTreeMap;)-data UseDeclaration =- UseDeclaration {- -- | Whether the use is public (pub use)- useDeclarationPublic :: Bool,- -- | The use tree describing what is imported- useDeclarationTree :: UseTree}- deriving (Eq, Ord, Read, Show)-_UseDeclaration = Core.Name "hydra.rust.syntax.UseDeclaration"-_UseDeclaration_public = Core.Name "public"-_UseDeclaration_tree = Core.Name "tree"--- | A use tree, representing the structure of a use path-data UseTree =- -- | A simple path import- UseTreePath UsePath |- -- | A renamed import (e.g., BTreeMap as Map)- UseTreeRename UseRename |- -- | A glob import (e.g., std::collections::*)- UseTreeGlob [String] |- -- | A grouped import (e.g., {BTreeMap, BTreeSet})- UseTreeGroup UseGroup- deriving (Eq, Ord, Read, Show)-_UseTree = Core.Name "hydra.rust.syntax.UseTree"-_UseTree_path = Core.Name "path"-_UseTree_rename = Core.Name "rename"-_UseTree_glob = Core.Name "glob"-_UseTree_group = Core.Name "group"--- | A simple path import within a use tree-data UsePath =- UsePath {- -- | The path segments- usePathSegments :: [String]}- deriving (Eq, Ord, Read, Show)-_UsePath = Core.Name "hydra.rust.syntax.UsePath"-_UsePath_segments = Core.Name "segments"--- | A renamed import (e.g., BTreeMap as Map)-data UseRename =- UseRename {- -- | The original path segments- useRenamePath :: [String],- -- | The alias name- useRenameAlias :: String}- deriving (Eq, Ord, Read, Show)-_UseRename = Core.Name "hydra.rust.syntax.UseRename"-_UseRename_path = Core.Name "path"-_UseRename_alias = Core.Name "alias"--- | A grouped import (e.g., std::collections::{BTreeMap, BTreeSet})-data UseGroup =- UseGroup {- -- | The common prefix path segments- useGroupPrefix :: [String],- -- | The individual subtrees within the group- useGroupTrees :: [UseTree]}- deriving (Eq, Ord, Read, Show)-_UseGroup = Core.Name "hydra.rust.syntax.UseGroup"-_UseGroup_prefix = Core.Name "prefix"-_UseGroup_trees = Core.Name "trees"--- | A struct definition (e.g., struct Foo<T> { bar: T })-data StructDef =- StructDef {- -- | The struct name- structDefName :: String,- -- | Generic type parameters- structDefGenerics :: [GenericParam],- -- | Optional where clause- structDefWhereClause :: (Maybe WhereClause),- -- | The struct body (named fields, tuple fields, or unit)- structDefBody :: StructBody,- -- | Derive macros to apply- structDefDerives :: [String],- -- | Whether the struct is public- structDefPublic :: Bool,- -- | Optional doc comment- structDefDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_StructDef = Core.Name "hydra.rust.syntax.StructDef"-_StructDef_name = Core.Name "name"-_StructDef_generics = Core.Name "generics"-_StructDef_whereClause = Core.Name "whereClause"-_StructDef_body = Core.Name "body"-_StructDef_derives = Core.Name "derives"-_StructDef_public = Core.Name "public"-_StructDef_doc = Core.Name "doc"--- | The body of a struct definition-data StructBody =- -- | A struct with named fields- StructBodyNamed [StructField] |- -- | A tuple struct- StructBodyTuple [TupleField] |- -- | A unit struct- StructBodyUnit- deriving (Eq, Ord, Read, Show)-_StructBody = Core.Name "hydra.rust.syntax.StructBody"-_StructBody_named = Core.Name "named"-_StructBody_tuple = Core.Name "tuple"-_StructBody_unit = Core.Name "unit"--- | A named field within a struct definition-data StructField =- StructField {- -- | The field name- structFieldName :: String,- -- | The field type- structFieldType :: Type,- -- | Whether the field is public- structFieldPublic :: Bool,- -- | Optional doc comment for the field- structFieldDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_StructField = Core.Name "hydra.rust.syntax.StructField"-_StructField_name = Core.Name "name"-_StructField_type = Core.Name "type"-_StructField_public = Core.Name "public"-_StructField_doc = Core.Name "doc"--- | A positional field within a tuple struct-data TupleField =- TupleField {- -- | The field type- tupleFieldType :: Type,- -- | Whether the field is public- tupleFieldPublic :: Bool}- deriving (Eq, Ord, Read, Show)-_TupleField = Core.Name "hydra.rust.syntax.TupleField"-_TupleField_type = Core.Name "type"-_TupleField_public = Core.Name "public"--- | An enum definition (e.g., enum Foo<T> { Bar(T), Baz { x: i32 } })-data EnumDef =- EnumDef {- -- | The enum name- enumDefName :: String,- -- | Generic type parameters- enumDefGenerics :: [GenericParam],- -- | Optional where clause- enumDefWhereClause :: (Maybe WhereClause),- -- | The enum variants- enumDefVariants :: [EnumVariant],- -- | Derive macros to apply- enumDefDerives :: [String],- -- | Whether the enum is public- enumDefPublic :: Bool,- -- | Optional doc comment- enumDefDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_EnumDef = Core.Name "hydra.rust.syntax.EnumDef"-_EnumDef_name = Core.Name "name"-_EnumDef_generics = Core.Name "generics"-_EnumDef_whereClause = Core.Name "whereClause"-_EnumDef_variants = Core.Name "variants"-_EnumDef_derives = Core.Name "derives"-_EnumDef_public = Core.Name "public"-_EnumDef_doc = Core.Name "doc"--- | A variant of an enum definition-data EnumVariant =- EnumVariant {- -- | The variant name- enumVariantName :: String,- -- | The variant body- enumVariantBody :: EnumVariantBody,- -- | Optional doc comment for the variant- enumVariantDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_EnumVariant = Core.Name "hydra.rust.syntax.EnumVariant"-_EnumVariant_name = Core.Name "name"-_EnumVariant_body = Core.Name "body"-_EnumVariant_doc = Core.Name "doc"--- | The body of an enum variant-data EnumVariantBody =- -- | A unit variant (e.g., Foo)- EnumVariantBodyUnit |- -- | A tuple variant (e.g., Foo(i32, String))- EnumVariantBodyTuple [Type] |- -- | A struct variant (e.g., Foo { x: i32 })- EnumVariantBodyStruct [StructField]- deriving (Eq, Ord, Read, Show)-_EnumVariantBody = Core.Name "hydra.rust.syntax.EnumVariantBody"-_EnumVariantBody_unit = Core.Name "unit"-_EnumVariantBody_tuple = Core.Name "tuple"-_EnumVariantBody_struct = Core.Name "struct"--- | A function definition (e.g., fn foo<T>(x: T) -> String { ... })-data FnDef =- FnDef {- -- | The function name- fnDefName :: String,- -- | Generic type parameters- fnDefGenerics :: [GenericParam],- -- | Optional where clause- fnDefWhereClause :: (Maybe WhereClause),- -- | The function parameters- fnDefParams :: [FnParam],- -- | The return type (None means ())- fnDefReturnType :: (Maybe Type),- -- | The function body- fnDefBody :: Block,- -- | Whether the function is public- fnDefPublic :: Bool,- -- | Whether the function is async- fnDefAsync :: Bool,- -- | Whether the function is const- fnDefConst :: Bool,- -- | Whether the function is unsafe- fnDefUnsafe :: Bool,- -- | Optional doc comment- fnDefDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_FnDef = Core.Name "hydra.rust.syntax.FnDef"-_FnDef_name = Core.Name "name"-_FnDef_generics = Core.Name "generics"-_FnDef_whereClause = Core.Name "whereClause"-_FnDef_params = Core.Name "params"-_FnDef_returnType = Core.Name "returnType"-_FnDef_body = Core.Name "body"-_FnDef_public = Core.Name "public"-_FnDef_async = Core.Name "async"-_FnDef_const = Core.Name "const"-_FnDef_unsafe = Core.Name "unsafe"-_FnDef_doc = Core.Name "doc"--- | A function parameter-data FnParam =- FnParam {- -- | The parameter pattern- fnParamPattern :: Pattern,- -- | The parameter type- fnParamType :: Type}- deriving (Eq, Ord, Read, Show)-_FnParam = Core.Name "hydra.rust.syntax.FnParam"-_FnParam_pattern = Core.Name "pattern"-_FnParam_type = Core.Name "type"--- | A self parameter in a method-data SelfParam =- SelfParamOwned |- SelfParamRef |- SelfParamRefMut- deriving (Eq, Ord, Read, Show)-_SelfParam = Core.Name "hydra.rust.syntax.SelfParam"-_SelfParam_owned = Core.Name "owned"-_SelfParam_ref = Core.Name "ref"-_SelfParam_refMut = Core.Name "refMut"--- | A method parameter, which may be self or a regular parameter-data MethodParam =- -- | A self parameter- MethodParamSelf SelfParam |- -- | A regular function parameter- MethodParamRegular FnParam- deriving (Eq, Ord, Read, Show)-_MethodParam = Core.Name "hydra.rust.syntax.MethodParam"-_MethodParam_self = Core.Name "self"-_MethodParam_regular = Core.Name "regular"--- | A type alias definition (e.g., type Foo<T> = Bar<T>;)-data TypeAlias =- TypeAlias {- -- | The alias name- typeAliasName :: String,- -- | Generic type parameters- typeAliasGenerics :: [GenericParam],- -- | The aliased type- typeAliasType :: Type,- -- | Whether the alias is public- typeAliasPublic :: Bool,- -- | Optional doc comment- typeAliasDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_TypeAlias = Core.Name "hydra.rust.syntax.TypeAlias"-_TypeAlias_name = Core.Name "name"-_TypeAlias_generics = Core.Name "generics"-_TypeAlias_type = Core.Name "type"-_TypeAlias_public = Core.Name "public"-_TypeAlias_doc = Core.Name "doc"--- | A constant item (e.g., const FOO: u32 = 42;)-data ConstDef =- ConstDef {- -- | The constant name- constDefName :: String,- -- | The constant type- constDefType :: Type,- -- | The constant value expression- constDefValue :: Expression,- -- | Whether the constant is public- constDefPublic :: Bool,- -- | Optional doc comment- constDefDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_ConstDef = Core.Name "hydra.rust.syntax.ConstDef"-_ConstDef_name = Core.Name "name"-_ConstDef_type = Core.Name "type"-_ConstDef_value = Core.Name "value"-_ConstDef_public = Core.Name "public"-_ConstDef_doc = Core.Name "doc"--- | A static item (e.g., static FOO: u32 = 42;)-data StaticDef =- StaticDef {- -- | The static name- staticDefName :: String,- -- | The static type- staticDefType :: Type,- -- | The static value expression- staticDefValue :: Expression,- -- | Whether the static is mutable- staticDefMutable :: Bool,- -- | Whether the static is public- staticDefPublic :: Bool,- -- | Optional doc comment- staticDefDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_StaticDef = Core.Name "hydra.rust.syntax.StaticDef"-_StaticDef_name = Core.Name "name"-_StaticDef_type = Core.Name "type"-_StaticDef_value = Core.Name "value"-_StaticDef_mutable = Core.Name "mutable"-_StaticDef_public = Core.Name "public"-_StaticDef_doc = Core.Name "doc"--- | A module definition (either inline or external)-data ModDef =- ModDef {- -- | The module name- modDefName :: String,- -- | The module body (None for external file)- modDefBody :: (Maybe [Item]),- -- | Whether the module is public- modDefPublic :: Bool,- -- | Optional doc comment- modDefDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_ModDef = Core.Name "hydra.rust.syntax.ModDef"-_ModDef_name = Core.Name "name"-_ModDef_body = Core.Name "body"-_ModDef_public = Core.Name "public"-_ModDef_doc = Core.Name "doc"--- | An impl block (e.g., impl<T> Trait for Foo<T> { ... })-data ImplBlock =- ImplBlock {- -- | Generic type parameters- implBlockGenerics :: [GenericParam],- -- | Optional where clause- implBlockWhereClause :: (Maybe WhereClause),- -- | The trait being implemented, if any- implBlockTrait :: (Maybe TypePath),- -- | Whether this is a negative impl- implBlockNegative :: Bool,- -- | The type being implemented for- implBlockSelfType :: Type,- -- | The items within the impl block- implBlockItems :: [ImplItem]}- deriving (Eq, Ord, Read, Show)-_ImplBlock = Core.Name "hydra.rust.syntax.ImplBlock"-_ImplBlock_generics = Core.Name "generics"-_ImplBlock_whereClause = Core.Name "whereClause"-_ImplBlock_trait = Core.Name "trait"-_ImplBlock_negative = Core.Name "negative"-_ImplBlock_selfType = Core.Name "selfType"-_ImplBlock_items = Core.Name "items"--- | An item within an impl block-data ImplItem =- -- | A method definition- ImplItemMethod ImplMethod |- -- | An associated type definition- ImplItemType TypeAlias |- -- | An associated constant- ImplItemConst ConstDef- deriving (Eq, Ord, Read, Show)-_ImplItem = Core.Name "hydra.rust.syntax.ImplItem"-_ImplItem_method = Core.Name "method"-_ImplItem_type = Core.Name "type"-_ImplItem_const = Core.Name "const"--- | A method within an impl block-data ImplMethod =- ImplMethod {- -- | The method name- implMethodName :: String,- -- | Generic type parameters- implMethodGenerics :: [GenericParam],- -- | Optional where clause- implMethodWhereClause :: (Maybe WhereClause),- -- | The method parameters (including self)- implMethodParams :: [MethodParam],- -- | The return type (None means ())- implMethodReturnType :: (Maybe Type),- -- | The method body- implMethodBody :: Block,- -- | Whether the method is public- implMethodPublic :: Bool,- -- | Whether the method has a default implementation- implMethodDefault :: Bool,- -- | Optional doc comment- implMethodDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_ImplMethod = Core.Name "hydra.rust.syntax.ImplMethod"-_ImplMethod_name = Core.Name "name"-_ImplMethod_generics = Core.Name "generics"-_ImplMethod_whereClause = Core.Name "whereClause"-_ImplMethod_params = Core.Name "params"-_ImplMethod_returnType = Core.Name "returnType"-_ImplMethod_body = Core.Name "body"-_ImplMethod_public = Core.Name "public"-_ImplMethod_default = Core.Name "default"-_ImplMethod_doc = Core.Name "doc"--- | A trait definition (e.g., trait Foo<T>: Bar + Baz { ... })-data TraitDef =- TraitDef {- -- | The trait name- traitDefName :: String,- -- | Generic type parameters- traitDefGenerics :: [GenericParam],- -- | Optional where clause- traitDefWhereClause :: (Maybe WhereClause),- -- | Supertraits- traitDefSuperTraits :: [TypeParamBound],- -- | The items within the trait- traitDefItems :: [TraitItem],- -- | Whether the trait is public- traitDefPublic :: Bool,- -- | Whether the trait is unsafe- traitDefUnsafe :: Bool,- -- | Optional doc comment- traitDefDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_TraitDef = Core.Name "hydra.rust.syntax.TraitDef"-_TraitDef_name = Core.Name "name"-_TraitDef_generics = Core.Name "generics"-_TraitDef_whereClause = Core.Name "whereClause"-_TraitDef_superTraits = Core.Name "superTraits"-_TraitDef_items = Core.Name "items"-_TraitDef_public = Core.Name "public"-_TraitDef_unsafe = Core.Name "unsafe"-_TraitDef_doc = Core.Name "doc"--- | An item within a trait definition-data TraitItem =- -- | A method signature or default method- TraitItemMethod TraitMethod |- -- | An associated type- TraitItemType TraitType |- -- | An associated constant- TraitItemConst TraitConst- deriving (Eq, Ord, Read, Show)-_TraitItem = Core.Name "hydra.rust.syntax.TraitItem"-_TraitItem_method = Core.Name "method"-_TraitItem_type = Core.Name "type"-_TraitItem_const = Core.Name "const"--- | A method signature or default method within a trait-data TraitMethod =- TraitMethod {- -- | The method name- traitMethodName :: String,- -- | Generic type parameters- traitMethodGenerics :: [GenericParam],- -- | Optional where clause- traitMethodWhereClause :: (Maybe WhereClause),- -- | The method parameters (including self)- traitMethodParams :: [MethodParam],- -- | The return type- traitMethodReturnType :: (Maybe Type),- -- | Optional default body- traitMethodDefaultBody :: (Maybe Block),- -- | Optional doc comment- traitMethodDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_TraitMethod = Core.Name "hydra.rust.syntax.TraitMethod"-_TraitMethod_name = Core.Name "name"-_TraitMethod_generics = Core.Name "generics"-_TraitMethod_whereClause = Core.Name "whereClause"-_TraitMethod_params = Core.Name "params"-_TraitMethod_returnType = Core.Name "returnType"-_TraitMethod_defaultBody = Core.Name "defaultBody"-_TraitMethod_doc = Core.Name "doc"--- | An associated type within a trait-data TraitType =- TraitType {- -- | The associated type name- traitTypeName :: String,- -- | Type parameter bounds- traitTypeBounds :: [TypeParamBound],- -- | Optional default type- traitTypeDefault :: (Maybe Type),- -- | Optional doc comment- traitTypeDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_TraitType = Core.Name "hydra.rust.syntax.TraitType"-_TraitType_name = Core.Name "name"-_TraitType_bounds = Core.Name "bounds"-_TraitType_default = Core.Name "default"-_TraitType_doc = Core.Name "doc"--- | An associated constant within a trait-data TraitConst =- TraitConst {- -- | The constant name- traitConstName :: String,- -- | The constant type- traitConstType :: Type,- -- | Optional default value- traitConstDefault :: (Maybe Expression),- -- | Optional doc comment- traitConstDoc :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_TraitConst = Core.Name "hydra.rust.syntax.TraitConst"-_TraitConst_name = Core.Name "name"-_TraitConst_type = Core.Name "type"-_TraitConst_default = Core.Name "default"-_TraitConst_doc = Core.Name "doc"--- | A generic type parameter (e.g., T: Clone + Debug)-data GenericParam =- GenericParam {- -- | The parameter name- genericParamName :: String,- -- | Trait bounds on the parameter- genericParamBounds :: [TypeParamBound]}- deriving (Eq, Ord, Read, Show)-_GenericParam = Core.Name "hydra.rust.syntax.GenericParam"-_GenericParam_name = Core.Name "name"-_GenericParam_bounds = Core.Name "bounds"--- | A bound on a type parameter-data TypeParamBound =- -- | A trait bound- TypeParamBoundTrait TypePath |- -- | A lifetime bound- TypeParamBoundLifetime Lifetime- deriving (Eq, Ord, Read, Show)-_TypeParamBound = Core.Name "hydra.rust.syntax.TypeParamBound"-_TypeParamBound_trait = Core.Name "trait"-_TypeParamBound_lifetime = Core.Name "lifetime"--- | A lifetime (e.g., 'a, 'static)-data Lifetime =- Lifetime {- -- | The lifetime name (without the leading quote)- lifetimeName :: String}- deriving (Eq, Ord, Read, Show)-_Lifetime = Core.Name "hydra.rust.syntax.Lifetime"-_Lifetime_name = Core.Name "name"--- | A where clause (e.g., where T: Clone, U: Debug)-data WhereClause =- WhereClause {- -- | The predicates in the where clause- whereClausePredicates :: [WherePredicate]}- deriving (Eq, Ord, Read, Show)-_WhereClause = Core.Name "hydra.rust.syntax.WhereClause"-_WhereClause_predicates = Core.Name "predicates"--- | A single predicate in a where clause-data WherePredicate =- WherePredicate {- -- | The type being constrained- wherePredicateType :: Type,- -- | The bounds on the type- wherePredicateBounds :: [TypeParamBound]}- deriving (Eq, Ord, Read, Show)-_WherePredicate = Core.Name "hydra.rust.syntax.WherePredicate"-_WherePredicate_type = Core.Name "type"-_WherePredicate_bounds = Core.Name "bounds"--- | A Rust type expression-data Type =- -- | A path type, possibly with generic arguments- TypePath_ TypePath |- -- | A reference type- TypeReference ReferenceType |- -- | A slice type- TypeSlice Type |- -- | An array type with a fixed size- TypeArray ArrayType |- -- | A tuple type- TypeTuple [Type] |- -- | A function pointer type- TypeFnPointer FnPointerType |- -- | An impl Trait type- TypeImplTrait [TypeParamBound] |- -- | A dyn Trait type- TypeDynTrait [TypeParamBound] |- -- | The inferred type placeholder (_)- TypeInferred |- -- | The unit type (())- TypeUnit |- -- | The never type (!)- TypeNever |- -- | A raw pointer type- TypeRawPointer RawPointerType |- -- | A macro invocation in type position- TypeMacro MacroInvocation- deriving (Eq, Ord, Read, Show)-_Type = Core.Name "hydra.rust.syntax.Type"-_Type_path = Core.Name "path"-_Type_reference = Core.Name "reference"-_Type_slice = Core.Name "slice"-_Type_array = Core.Name "array"-_Type_tuple = Core.Name "tuple"-_Type_fnPointer = Core.Name "fnPointer"-_Type_implTrait = Core.Name "implTrait"-_Type_dynTrait = Core.Name "dynTrait"-_Type_inferred = Core.Name "inferred"-_Type_unit = Core.Name "unit"-_Type_never = Core.Name "never"-_Type_rawPointer = Core.Name "rawPointer"-_Type_macro = Core.Name "macro"--- | A path-based type, possibly with generic arguments-data TypePath =- TypePath {- -- | Whether the path is absolute (starts with ::)- typePathGlobal :: Bool,- -- | The segments of the path- typePathSegments :: [PathSegment]}- deriving (Eq, Ord, Read, Show)-_TypePath = Core.Name "hydra.rust.syntax.TypePath"-_TypePath_global = Core.Name "global"-_TypePath_segments = Core.Name "segments"--- | A segment within a type path-data PathSegment =- PathSegment {- -- | The segment name- pathSegmentName :: String,- -- | Generic arguments, if any- pathSegmentArguments :: GenericArguments}- deriving (Eq, Ord, Read, Show)-_PathSegment = Core.Name "hydra.rust.syntax.PathSegment"-_PathSegment_name = Core.Name "name"-_PathSegment_arguments = Core.Name "arguments"--- | Generic arguments to a path segment-data GenericArguments =- -- | No generic arguments- GenericArgumentsNone |- -- | Angle-bracketed arguments- GenericArgumentsAngleBracketed AngleBracketedArgs |- -- | Parenthesized arguments for Fn traits- GenericArgumentsParenthesized ParenthesizedArgs- deriving (Eq, Ord, Read, Show)-_GenericArguments = Core.Name "hydra.rust.syntax.GenericArguments"-_GenericArguments_none = Core.Name "none"-_GenericArguments_angleBracketed = Core.Name "angleBracketed"-_GenericArguments_parenthesized = Core.Name "parenthesized"--- | Angle-bracketed generic arguments-data AngleBracketedArgs =- AngleBracketedArgs {- -- | The generic arguments- angleBracketedArgsArgs :: [GenericArg]}- deriving (Eq, Ord, Read, Show)-_AngleBracketedArgs = Core.Name "hydra.rust.syntax.AngleBracketedArgs"-_AngleBracketedArgs_args = Core.Name "args"--- | A single generic argument-data GenericArg =- -- | A type argument- GenericArgType Type |- -- | A lifetime argument- GenericArgLifetime Lifetime |- -- | A const expression argument- GenericArgConst Expression |- -- | An associated type binding- GenericArgBinding TypeBinding- deriving (Eq, Ord, Read, Show)-_GenericArg = Core.Name "hydra.rust.syntax.GenericArg"-_GenericArg_type = Core.Name "type"-_GenericArg_lifetime = Core.Name "lifetime"-_GenericArg_const = Core.Name "const"-_GenericArg_binding = Core.Name "binding"--- | An associated type binding within generic arguments-data TypeBinding =- TypeBinding {- -- | The associated type name- typeBindingName :: String,- -- | The bound type- typeBindingType :: Type}- deriving (Eq, Ord, Read, Show)-_TypeBinding = Core.Name "hydra.rust.syntax.TypeBinding"-_TypeBinding_name = Core.Name "name"-_TypeBinding_type = Core.Name "type"--- | Parenthesized generic arguments for Fn traits-data ParenthesizedArgs =- ParenthesizedArgs {- -- | The input types- parenthesizedArgsInputs :: [Type],- -- | The output type- parenthesizedArgsOutput :: (Maybe Type)}- deriving (Eq, Ord, Read, Show)-_ParenthesizedArgs = Core.Name "hydra.rust.syntax.ParenthesizedArgs"-_ParenthesizedArgs_inputs = Core.Name "inputs"-_ParenthesizedArgs_output = Core.Name "output"--- | A reference type (e.g., &T, &mut T, &'a T)-data ReferenceType =- ReferenceType {- -- | Optional lifetime annotation- referenceTypeLifetime :: (Maybe Lifetime),- -- | Whether the reference is mutable- referenceTypeMutable :: Bool,- -- | The referenced type- referenceTypeType :: Type}- deriving (Eq, Ord, Read, Show)-_ReferenceType = Core.Name "hydra.rust.syntax.ReferenceType"-_ReferenceType_lifetime = Core.Name "lifetime"-_ReferenceType_mutable = Core.Name "mutable"-_ReferenceType_type = Core.Name "type"--- | An array type with a fixed size (e.g., [T; 3])-data ArrayType =- ArrayType {- -- | The element type- arrayTypeElement :: Type,- -- | The array length (as a constant expression)- arrayTypeLength :: Expression}- deriving (Eq, Ord, Read, Show)-_ArrayType = Core.Name "hydra.rust.syntax.ArrayType"-_ArrayType_element = Core.Name "element"-_ArrayType_length = Core.Name "length"--- | A function pointer type (e.g., fn(i32, i32) -> i32)-data FnPointerType =- FnPointerType {- -- | The parameter types- fnPointerTypeParams :: [Type],- -- | The return type- fnPointerTypeReturnType :: Type}- deriving (Eq, Ord, Read, Show)-_FnPointerType = Core.Name "hydra.rust.syntax.FnPointerType"-_FnPointerType_params = Core.Name "params"-_FnPointerType_returnType = Core.Name "returnType"--- | A raw pointer type (e.g., *const T, *mut T)-data RawPointerType =- RawPointerType {- -- | Whether the pointer is mutable (*mut vs *const)- rawPointerTypeMutable :: Bool,- -- | The pointed-to type- rawPointerTypeType :: Type}- deriving (Eq, Ord, Read, Show)-_RawPointerType = Core.Name "hydra.rust.syntax.RawPointerType"-_RawPointerType_mutable = Core.Name "mutable"-_RawPointerType_type = Core.Name "type"--- | A Rust expression-data Expression =- -- | A literal value- ExpressionLiteral Literal |- -- | A path expression- ExpressionPath ExprPath |- -- | A block expression- ExpressionBlock Block |- -- | A function call expression- ExpressionCall CallExpr |- -- | A method call expression- ExpressionMethodCall MethodCallExpr |- -- | A field access expression- ExpressionFieldAccess FieldAccessExpr |- -- | A tuple index expression- ExpressionTupleIndex TupleIndexExpr |- -- | A closure expression- ExpressionClosure ClosureExpr |- -- | An if expression, including if let- ExpressionIf IfExpr |- -- | A match expression- ExpressionMatch MatchExpr |- -- | A loop expression- ExpressionLoop LoopExpr |- -- | A while expression, including while let- ExpressionWhile WhileExpr |- -- | A for expression- ExpressionFor ForExpr |- -- | A binary operation- ExpressionBinary BinaryExpr |- -- | A unary operation- ExpressionUnary UnaryExpr |- -- | A reference expression- ExpressionReference RefExpr |- -- | A dereference expression- ExpressionDereference Expression |- -- | A struct literal expression- ExpressionStruct StructExpr |- -- | A tuple expression- ExpressionTuple [Expression] |- -- | An array expression- ExpressionArray ArrayExpr |- -- | An index expression- ExpressionIndex IndexExpr |- -- | A range expression- ExpressionRange RangeExpr |- -- | A return expression- ExpressionReturn (Maybe Expression) |- -- | A break expression- ExpressionBreak (Maybe Expression) |- -- | A continue expression- ExpressionContinue |- -- | A try expression (expr?)- ExpressionTry Expression |- -- | A type cast expression- ExpressionCast CastExpr |- -- | A type ascription expression- ExpressionTypeAscription TypeAscriptionExpr |- -- | An await expression- ExpressionAwait Expression |- -- | An assignment expression- ExpressionAssign AssignExpr |- -- | A compound assignment expression- ExpressionCompoundAssign CompoundAssignExpr |- -- | A macro invocation expression- ExpressionMacro MacroInvocation |- -- | A parenthesized expression- ExpressionParen Expression- deriving (Eq, Ord, Read, Show)-_Expression = Core.Name "hydra.rust.syntax.Expression"-_Expression_literal = Core.Name "literal"-_Expression_path = Core.Name "path"-_Expression_block = Core.Name "block"-_Expression_call = Core.Name "call"-_Expression_methodCall = Core.Name "methodCall"-_Expression_fieldAccess = Core.Name "fieldAccess"-_Expression_tupleIndex = Core.Name "tupleIndex"-_Expression_closure = Core.Name "closure"-_Expression_if = Core.Name "if"-_Expression_match = Core.Name "match"-_Expression_loop = Core.Name "loop"-_Expression_while = Core.Name "while"-_Expression_for = Core.Name "for"-_Expression_binary = Core.Name "binary"-_Expression_unary = Core.Name "unary"-_Expression_reference = Core.Name "reference"-_Expression_dereference = Core.Name "dereference"-_Expression_struct = Core.Name "struct"-_Expression_tuple = Core.Name "tuple"-_Expression_array = Core.Name "array"-_Expression_index = Core.Name "index"-_Expression_range = Core.Name "range"-_Expression_return = Core.Name "return"-_Expression_break = Core.Name "break"-_Expression_continue = Core.Name "continue"-_Expression_try = Core.Name "try"-_Expression_cast = Core.Name "cast"-_Expression_typeAscription = Core.Name "typeAscription"-_Expression_await = Core.Name "await"-_Expression_assign = Core.Name "assign"-_Expression_compoundAssign = Core.Name "compoundAssign"-_Expression_macro = Core.Name "macro"-_Expression_paren = Core.Name "paren"--- | A path used as an expression-data ExprPath =- ExprPath {- -- | Whether the path is global- exprPathGlobal :: Bool,- -- | The path segments- exprPathSegments :: [PathSegment]}- deriving (Eq, Ord, Read, Show)-_ExprPath = Core.Name "hydra.rust.syntax.ExprPath"-_ExprPath_global = Core.Name "global"-_ExprPath_segments = Core.Name "segments"--- | A function call expression-data CallExpr =- CallExpr {- -- | The function being called- callExprFunction :: Expression,- -- | The arguments- callExprArgs :: [Expression]}- deriving (Eq, Ord, Read, Show)-_CallExpr = Core.Name "hydra.rust.syntax.CallExpr"-_CallExpr_function = Core.Name "function"-_CallExpr_args = Core.Name "args"--- | A method call expression-data MethodCallExpr =- MethodCallExpr {- -- | The receiver expression- methodCallExprReceiver :: Expression,- -- | The method name- methodCallExprMethod :: String,- -- | Optional turbofish generic arguments- methodCallExprTurbofish :: [Type],- -- | The arguments (excluding the receiver)- methodCallExprArgs :: [Expression]}- deriving (Eq, Ord, Read, Show)-_MethodCallExpr = Core.Name "hydra.rust.syntax.MethodCallExpr"-_MethodCallExpr_receiver = Core.Name "receiver"-_MethodCallExpr_method = Core.Name "method"-_MethodCallExpr_turbofish = Core.Name "turbofish"-_MethodCallExpr_args = Core.Name "args"--- | A field access expression-data FieldAccessExpr =- FieldAccessExpr {- -- | The expression being accessed- fieldAccessExprObject :: Expression,- -- | The field name- fieldAccessExprField :: String}- deriving (Eq, Ord, Read, Show)-_FieldAccessExpr = Core.Name "hydra.rust.syntax.FieldAccessExpr"-_FieldAccessExpr_object = Core.Name "object"-_FieldAccessExpr_field = Core.Name "field"--- | A tuple index expression-data TupleIndexExpr =- TupleIndexExpr {- -- | The tuple expression- tupleIndexExprTuple :: Expression,- -- | The index (0-based)- tupleIndexExprIndex :: Int}- deriving (Eq, Ord, Read, Show)-_TupleIndexExpr = Core.Name "hydra.rust.syntax.TupleIndexExpr"-_TupleIndexExpr_tuple = Core.Name "tuple"-_TupleIndexExpr_index = Core.Name "index"--- | A closure expression-data ClosureExpr =- ClosureExpr {- -- | Whether the closure captures by move- closureExprMove :: Bool,- -- | The closure parameters- closureExprParams :: [ClosureParam],- -- | Optional return type annotation- closureExprReturnType :: (Maybe Type),- -- | The closure body- closureExprBody :: Expression}- deriving (Eq, Ord, Read, Show)-_ClosureExpr = Core.Name "hydra.rust.syntax.ClosureExpr"-_ClosureExpr_move = Core.Name "move"-_ClosureExpr_params = Core.Name "params"-_ClosureExpr_returnType = Core.Name "returnType"-_ClosureExpr_body = Core.Name "body"--- | A closure parameter-data ClosureParam =- ClosureParam {- -- | The parameter pattern- closureParamPattern :: Pattern,- -- | Optional type annotation- closureParamType :: (Maybe Type)}- deriving (Eq, Ord, Read, Show)-_ClosureParam = Core.Name "hydra.rust.syntax.ClosureParam"-_ClosureParam_pattern = Core.Name "pattern"-_ClosureParam_type = Core.Name "type"--- | An if expression, optionally with if let-data IfExpr =- IfExpr {- -- | The condition- ifExprCondition :: IfCondition,- -- | The then block- ifExprThenBlock :: Block,- -- | An optional else branch- ifExprElseBranch :: (Maybe Expression)}- deriving (Eq, Ord, Read, Show)-_IfExpr = Core.Name "hydra.rust.syntax.IfExpr"-_IfExpr_condition = Core.Name "condition"-_IfExpr_thenBlock = Core.Name "thenBlock"-_IfExpr_elseBranch = Core.Name "elseBranch"--- | The condition of an if expression-data IfCondition =- -- | A boolean condition- IfConditionBool Expression |- -- | A let condition- IfConditionLet LetCondition- deriving (Eq, Ord, Read, Show)-_IfCondition = Core.Name "hydra.rust.syntax.IfCondition"-_IfCondition_bool = Core.Name "bool"-_IfCondition_let = Core.Name "let"--- | A match expression-data MatchExpr =- MatchExpr {- -- | The expression being matched- matchExprScrutinee :: Expression,- -- | The match arms- matchExprArms :: [MatchArm]}- deriving (Eq, Ord, Read, Show)-_MatchExpr = Core.Name "hydra.rust.syntax.MatchExpr"-_MatchExpr_scrutinee = Core.Name "scrutinee"-_MatchExpr_arms = Core.Name "arms"--- | A single arm in a match expression-data MatchArm =- MatchArm {- -- | The pattern to match- matchArmPattern :: Pattern,- -- | Optional guard expression- matchArmGuard :: (Maybe Expression),- -- | The body expression- matchArmBody :: Expression}- deriving (Eq, Ord, Read, Show)-_MatchArm = Core.Name "hydra.rust.syntax.MatchArm"-_MatchArm_pattern = Core.Name "pattern"-_MatchArm_guard = Core.Name "guard"-_MatchArm_body = Core.Name "body"--- | A loop expression-data LoopExpr =- LoopExpr {- -- | Optional loop label- loopExprLabel :: (Maybe String),- -- | The loop body- loopExprBody :: Block}- deriving (Eq, Ord, Read, Show)-_LoopExpr = Core.Name "hydra.rust.syntax.LoopExpr"-_LoopExpr_label = Core.Name "label"-_LoopExpr_body = Core.Name "body"--- | A while expression, optionally with while let-data WhileExpr =- WhileExpr {- -- | Optional loop label- whileExprLabel :: (Maybe String),- -- | The condition- whileExprCondition :: IfCondition,- -- | The loop body- whileExprBody :: Block}- deriving (Eq, Ord, Read, Show)-_WhileExpr = Core.Name "hydra.rust.syntax.WhileExpr"-_WhileExpr_label = Core.Name "label"-_WhileExpr_condition = Core.Name "condition"-_WhileExpr_body = Core.Name "body"--- | A for expression-data ForExpr =- ForExpr {- -- | Optional loop label- forExprLabel :: (Maybe String),- -- | The loop variable pattern- forExprPattern :: Pattern,- -- | The iterator expression- forExprIter :: Expression,- -- | The loop body- forExprBody :: Block}- deriving (Eq, Ord, Read, Show)-_ForExpr = Core.Name "hydra.rust.syntax.ForExpr"-_ForExpr_label = Core.Name "label"-_ForExpr_pattern = Core.Name "pattern"-_ForExpr_iter = Core.Name "iter"-_ForExpr_body = Core.Name "body"--- | A binary operation-data BinaryExpr =- BinaryExpr {- -- | The left-hand operand- binaryExprLeft :: Expression,- -- | The binary operator- binaryExprOp :: BinaryOp,- -- | The right-hand operand- binaryExprRight :: Expression}- deriving (Eq, Ord, Read, Show)-_BinaryExpr = Core.Name "hydra.rust.syntax.BinaryExpr"-_BinaryExpr_left = Core.Name "left"-_BinaryExpr_op = Core.Name "op"-_BinaryExpr_right = Core.Name "right"--- | A binary operator-data BinaryOp =- BinaryOpAdd |- BinaryOpSub |- BinaryOpMul |- BinaryOpDiv |- BinaryOpRem |- BinaryOpAnd |- BinaryOpOr |- BinaryOpBitAnd |- BinaryOpBitOr |- BinaryOpBitXor |- BinaryOpShl |- BinaryOpShr |- BinaryOpEq |- BinaryOpNe |- BinaryOpLt |- BinaryOpLe |- BinaryOpGt |- BinaryOpGe- deriving (Eq, Ord, Read, Show)-_BinaryOp = Core.Name "hydra.rust.syntax.BinaryOp"-_BinaryOp_add = Core.Name "add"-_BinaryOp_sub = Core.Name "sub"-_BinaryOp_mul = Core.Name "mul"-_BinaryOp_div = Core.Name "div"-_BinaryOp_rem = Core.Name "rem"-_BinaryOp_and = Core.Name "and"-_BinaryOp_or = Core.Name "or"-_BinaryOp_bitAnd = Core.Name "bitAnd"-_BinaryOp_bitOr = Core.Name "bitOr"-_BinaryOp_bitXor = Core.Name "bitXor"-_BinaryOp_shl = Core.Name "shl"-_BinaryOp_shr = Core.Name "shr"-_BinaryOp_eq = Core.Name "eq"-_BinaryOp_ne = Core.Name "ne"-_BinaryOp_lt = Core.Name "lt"-_BinaryOp_le = Core.Name "le"-_BinaryOp_gt = Core.Name "gt"-_BinaryOp_ge = Core.Name "ge"--- | A unary operation-data UnaryExpr =- UnaryExpr {- -- | The unary operator- unaryExprOp :: UnaryOp,- -- | The operand- unaryExprOperand :: Expression}- deriving (Eq, Ord, Read, Show)-_UnaryExpr = Core.Name "hydra.rust.syntax.UnaryExpr"-_UnaryExpr_op = Core.Name "op"-_UnaryExpr_operand = Core.Name "operand"--- | A unary operator-data UnaryOp =- UnaryOpNeg |- UnaryOpNot- deriving (Eq, Ord, Read, Show)-_UnaryOp = Core.Name "hydra.rust.syntax.UnaryOp"-_UnaryOp_neg = Core.Name "neg"-_UnaryOp_not = Core.Name "not"--- | A reference expression-data RefExpr =- RefExpr {- -- | Whether the reference is mutable- refExprMutable :: Bool,- -- | The expression being referenced- refExprExpr :: Expression}- deriving (Eq, Ord, Read, Show)-_RefExpr = Core.Name "hydra.rust.syntax.RefExpr"-_RefExpr_mutable = Core.Name "mutable"-_RefExpr_expr = Core.Name "expr"--- | A struct literal expression-data StructExpr =- StructExpr {- -- | The struct path- structExprPath :: ExprPath,- -- | The field assignments- structExprFields :: [FieldValue],- -- | Optional base expression for struct update syntax- structExprRest :: (Maybe Expression)}- deriving (Eq, Ord, Read, Show)-_StructExpr = Core.Name "hydra.rust.syntax.StructExpr"-_StructExpr_path = Core.Name "path"-_StructExpr_fields = Core.Name "fields"-_StructExpr_rest = Core.Name "rest"--- | A field-value pair in a struct literal-data FieldValue =- FieldValue {- -- | The field name- fieldValueName :: String,- -- | The field value (None for shorthand syntax)- fieldValueValue :: (Maybe Expression)}- deriving (Eq, Ord, Read, Show)-_FieldValue = Core.Name "hydra.rust.syntax.FieldValue"-_FieldValue_name = Core.Name "name"-_FieldValue_value = Core.Name "value"--- | An array expression-data ArrayExpr =- -- | An array literal- ArrayExprElements [Expression] |- -- | An array repeat expression- ArrayExprRepeat ArrayRepeat- deriving (Eq, Ord, Read, Show)-_ArrayExpr = Core.Name "hydra.rust.syntax.ArrayExpr"-_ArrayExpr_elements = Core.Name "elements"-_ArrayExpr_repeat = Core.Name "repeat"--- | An index expression-data IndexExpr =- IndexExpr {- -- | The expression being indexed- indexExprObject :: Expression,- -- | The index expression- indexExprIndex :: Expression}- deriving (Eq, Ord, Read, Show)-_IndexExpr = Core.Name "hydra.rust.syntax.IndexExpr"-_IndexExpr_object = Core.Name "object"-_IndexExpr_index = Core.Name "index"--- | A range expression-data RangeExpr =- RangeExpr {- -- | The lower bound (optional)- rangeExprFrom :: (Maybe Expression),- -- | The upper bound (optional)- rangeExprTo :: (Maybe Expression),- -- | Whether the range is inclusive- rangeExprInclusive :: Bool}- deriving (Eq, Ord, Read, Show)-_RangeExpr = Core.Name "hydra.rust.syntax.RangeExpr"-_RangeExpr_from = Core.Name "from"-_RangeExpr_to = Core.Name "to"-_RangeExpr_inclusive = Core.Name "inclusive"--- | A type cast expression-data CastExpr =- CastExpr {- -- | The expression being cast- castExprExpr :: Expression,- -- | The target type- castExprType :: Type}- deriving (Eq, Ord, Read, Show)-_CastExpr = Core.Name "hydra.rust.syntax.CastExpr"-_CastExpr_expr = Core.Name "expr"-_CastExpr_type = Core.Name "type"--- | A type ascription expression-data TypeAscriptionExpr =- TypeAscriptionExpr {- -- | The expression- typeAscriptionExprExpr :: Expression,- -- | The ascribed type- typeAscriptionExprType :: Type}- deriving (Eq, Ord, Read, Show)-_TypeAscriptionExpr = Core.Name "hydra.rust.syntax.TypeAscriptionExpr"-_TypeAscriptionExpr_expr = Core.Name "expr"-_TypeAscriptionExpr_type = Core.Name "type"--- | An assignment expression-data AssignExpr =- AssignExpr {- -- | The left-hand side (target)- assignExprTarget :: Expression,- -- | The right-hand side (value)- assignExprValue :: Expression}- deriving (Eq, Ord, Read, Show)-_AssignExpr = Core.Name "hydra.rust.syntax.AssignExpr"-_AssignExpr_target = Core.Name "target"-_AssignExpr_value = Core.Name "value"--- | A compound assignment expression-data CompoundAssignExpr =- CompoundAssignExpr {- -- | The left-hand side (target)- compoundAssignExprTarget :: Expression,- -- | The compound assignment operator- compoundAssignExprOp :: CompoundAssignOp,- -- | The right-hand side (value)- compoundAssignExprValue :: Expression}- deriving (Eq, Ord, Read, Show)-_CompoundAssignExpr = Core.Name "hydra.rust.syntax.CompoundAssignExpr"-_CompoundAssignExpr_target = Core.Name "target"-_CompoundAssignExpr_op = Core.Name "op"-_CompoundAssignExpr_value = Core.Name "value"--- | A compound assignment operator-data CompoundAssignOp =- CompoundAssignOpAddAssign |- CompoundAssignOpSubAssign |- CompoundAssignOpMulAssign |- CompoundAssignOpDivAssign |- CompoundAssignOpRemAssign |- CompoundAssignOpBitAndAssign |- CompoundAssignOpBitOrAssign |- CompoundAssignOpBitXorAssign |- CompoundAssignOpShlAssign |- CompoundAssignOpShrAssign- deriving (Eq, Ord, Read, Show)-_CompoundAssignOp = Core.Name "hydra.rust.syntax.CompoundAssignOp"-_CompoundAssignOp_addAssign = Core.Name "addAssign"-_CompoundAssignOp_subAssign = Core.Name "subAssign"-_CompoundAssignOp_mulAssign = Core.Name "mulAssign"-_CompoundAssignOp_divAssign = Core.Name "divAssign"-_CompoundAssignOp_remAssign = Core.Name "remAssign"-_CompoundAssignOp_bitAndAssign = Core.Name "bitAndAssign"-_CompoundAssignOp_bitOrAssign = Core.Name "bitOrAssign"-_CompoundAssignOp_bitXorAssign = Core.Name "bitXorAssign"-_CompoundAssignOp_shlAssign = Core.Name "shlAssign"-_CompoundAssignOp_shrAssign = Core.Name "shrAssign"--- | A macro invocation-data MacroInvocation =- MacroInvocation {- -- | The macro path- macroInvocationPath :: [String],- -- | The delimiter style used- macroInvocationDelimiter :: MacroDelimiter,- -- | The token stream as a raw string- macroInvocationTokens :: String}- deriving (Eq, Ord, Read, Show)-_MacroInvocation = Core.Name "hydra.rust.syntax.MacroInvocation"-_MacroInvocation_path = Core.Name "path"-_MacroInvocation_delimiter = Core.Name "delimiter"-_MacroInvocation_tokens = Core.Name "tokens"--- | The delimiter style for a macro invocation-data MacroDelimiter =- MacroDelimiterParen |- MacroDelimiterBracket |- MacroDelimiterBrace- deriving (Eq, Ord, Read, Show)-_MacroDelimiter = Core.Name "hydra.rust.syntax.MacroDelimiter"-_MacroDelimiter_paren = Core.Name "paren"-_MacroDelimiter_bracket = Core.Name "bracket"-_MacroDelimiter_brace = Core.Name "brace"--- | A statement within a block-data Statement =- -- | A let binding- StatementLet LetStatement |- -- | An expression statement- StatementExpression Expression |- -- | An item declaration within a block- StatementItem Item |- -- | An empty statement- StatementEmpty- deriving (Eq, Ord, Read, Show)-_Statement = Core.Name "hydra.rust.syntax.Statement"-_Statement_let = Core.Name "let"-_Statement_expression = Core.Name "expression"-_Statement_item = Core.Name "item"-_Statement_empty = Core.Name "empty"--- | A let statement-data LetStatement =- LetStatement {- -- | The binding pattern- letStatementPattern :: Pattern,- -- | Whether the binding is mutable- letStatementMutable :: Bool,- -- | Optional type annotation- letStatementType :: (Maybe Type),- -- | Optional initializer expression- letStatementInit :: (Maybe Expression)}- deriving (Eq, Ord, Read, Show)-_LetStatement = Core.Name "hydra.rust.syntax.LetStatement"-_LetStatement_pattern = Core.Name "pattern"-_LetStatement_mutable = Core.Name "mutable"-_LetStatement_type = Core.Name "type"-_LetStatement_init = Core.Name "init"--- | A block expression-data Block =- Block {- -- | The statements in the block- blockStatements :: [Statement],- -- | An optional trailing expression- blockExpression :: (Maybe Expression)}- deriving (Eq, Ord, Read, Show)-_Block = Core.Name "hydra.rust.syntax.Block"-_Block_statements = Core.Name "statements"-_Block_expression = Core.Name "expression"--- | A Rust pattern (used in let, match, function parameters, etc.)-data Pattern =- -- | A wildcard pattern (_)- PatternWildcard |- -- | An identifier pattern- PatternIdentifier IdentifierPattern |- -- | A literal pattern- PatternLiteral Literal |- -- | A reference pattern- PatternReference RefPattern |- -- | A struct pattern- PatternStruct StructPattern |- -- | A tuple struct pattern- PatternTupleStruct TupleStructPattern |- -- | A tuple pattern- PatternTuple [Pattern] |- -- | A slice pattern- PatternSlice [Pattern] |- -- | An or-pattern- PatternOr [Pattern] |- -- | A path pattern- PatternPath ExprPath |- -- | A range pattern- PatternRange RangePattern |- -- | A rest pattern (..)- PatternRest |- -- | A parenthesized pattern- PatternParen Pattern- deriving (Eq, Ord, Read, Show)-_Pattern = Core.Name "hydra.rust.syntax.Pattern"-_Pattern_wildcard = Core.Name "wildcard"-_Pattern_identifier = Core.Name "identifier"-_Pattern_literal = Core.Name "literal"-_Pattern_reference = Core.Name "reference"-_Pattern_struct = Core.Name "struct"-_Pattern_tupleStruct = Core.Name "tupleStruct"-_Pattern_tuple = Core.Name "tuple"-_Pattern_slice = Core.Name "slice"-_Pattern_or = Core.Name "or"-_Pattern_path = Core.Name "path"-_Pattern_range = Core.Name "range"-_Pattern_rest = Core.Name "rest"-_Pattern_paren = Core.Name "paren"--- | An identifier pattern-data IdentifierPattern =- IdentifierPattern {- -- | The identifier name- identifierPatternName :: String,- -- | Whether the binding is mutable- identifierPatternMutable :: Bool,- -- | Optional sub-pattern (e.g., x @ Some(_))- identifierPatternAtPattern :: (Maybe Pattern)}- deriving (Eq, Ord, Read, Show)-_IdentifierPattern = Core.Name "hydra.rust.syntax.IdentifierPattern"-_IdentifierPattern_name = Core.Name "name"-_IdentifierPattern_mutable = Core.Name "mutable"-_IdentifierPattern_atPattern = Core.Name "atPattern"--- | A reference pattern-data RefPattern =- RefPattern {- -- | Whether the reference is mutable- refPatternMutable :: Bool,- -- | The inner pattern- refPatternPattern :: Pattern}- deriving (Eq, Ord, Read, Show)-_RefPattern = Core.Name "hydra.rust.syntax.RefPattern"-_RefPattern_mutable = Core.Name "mutable"-_RefPattern_pattern = Core.Name "pattern"--- | A struct pattern-data StructPattern =- StructPattern {- -- | The struct path- structPatternPath :: ExprPath,- -- | The field patterns- structPatternFields :: [FieldPattern],- -- | Whether the pattern has a rest (..) at the end- structPatternRest :: Bool}- deriving (Eq, Ord, Read, Show)-_StructPattern = Core.Name "hydra.rust.syntax.StructPattern"-_StructPattern_path = Core.Name "path"-_StructPattern_fields = Core.Name "fields"-_StructPattern_rest = Core.Name "rest"--- | A field pattern within a struct pattern-data FieldPattern =- FieldPattern {- -- | The field name- fieldPatternName :: String,- -- | The field pattern (None for shorthand)- fieldPatternPattern :: (Maybe Pattern)}- deriving (Eq, Ord, Read, Show)-_FieldPattern = Core.Name "hydra.rust.syntax.FieldPattern"-_FieldPattern_name = Core.Name "name"-_FieldPattern_pattern = Core.Name "pattern"--- | A tuple struct pattern-data TupleStructPattern =- TupleStructPattern {- -- | The path to the tuple struct or variant- tupleStructPatternPath :: ExprPath,- -- | The element patterns- tupleStructPatternElements :: [Pattern]}- deriving (Eq, Ord, Read, Show)-_TupleStructPattern = Core.Name "hydra.rust.syntax.TupleStructPattern"-_TupleStructPattern_path = Core.Name "path"-_TupleStructPattern_elements = Core.Name "elements"--- | A range pattern-data RangePattern =- RangePattern {- -- | The lower bound- rangePatternFrom :: (Maybe Pattern),- -- | The upper bound- rangePatternTo :: (Maybe Pattern),- -- | Whether the range is inclusive- rangePatternInclusive :: Bool}- deriving (Eq, Ord, Read, Show)-_RangePattern = Core.Name "hydra.rust.syntax.RangePattern"-_RangePattern_from = Core.Name "from"-_RangePattern_to = Core.Name "to"-_RangePattern_inclusive = Core.Name "inclusive"--- | A literal value-data Literal =- -- | An integer literal- LiteralInteger IntegerLiteral |- -- | A floating-point literal- LiteralFloat FloatLiteral |- -- | A string literal- LiteralString String |- -- | A raw string literal- LiteralRawString String |- -- | A byte string literal- LiteralByteString B.ByteString |- -- | A character literal- LiteralChar I.Int64 |- -- | A byte literal- LiteralByte I.Int16 |- -- | A boolean literal- LiteralBool Bool- deriving (Eq, Ord, Read, Show)-_Literal = Core.Name "hydra.rust.syntax.Literal"-_Literal_integer = Core.Name "integer"-_Literal_float = Core.Name "float"-_Literal_string = Core.Name "string"-_Literal_rawString = Core.Name "rawString"-_Literal_byteString = Core.Name "byteString"-_Literal_char = Core.Name "char"-_Literal_byte = Core.Name "byte"-_Literal_bool = Core.Name "bool"--- | An integer literal with optional suffix-data IntegerLiteral =- IntegerLiteral {- -- | The integer value- integerLiteralValue :: Integer,- -- | Optional type suffix- integerLiteralSuffix :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_IntegerLiteral = Core.Name "hydra.rust.syntax.IntegerLiteral"-_IntegerLiteral_value = Core.Name "value"-_IntegerLiteral_suffix = Core.Name "suffix"--- | A floating-point literal with optional suffix-data FloatLiteral =- FloatLiteral {- -- | The float value- floatLiteralValue :: Double,- -- | Optional type suffix- floatLiteralSuffix :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_FloatLiteral = Core.Name "hydra.rust.syntax.FloatLiteral"-_FloatLiteral_value = Core.Name "value"-_FloatLiteral_suffix = Core.Name "suffix"--- | An attribute (e.g., #[derive(Clone)], #[cfg(test)])-data Attribute =- Attribute {- -- | Whether the attribute is an inner attribute (#![...] vs #[...])- attributeInner :: Bool,- -- | The attribute path- attributePath :: [String],- -- | The attribute arguments as a raw token string- attributeTokens :: (Maybe String)}- deriving (Eq, Ord, Read, Show)-_Attribute = Core.Name "hydra.rust.syntax.Attribute"-_Attribute_inner = Core.Name "inner"-_Attribute_path = Core.Name "path"-_Attribute_tokens = Core.Name "tokens"--- | A visibility qualifier-data Visibility =- -- | Public (pub)- VisibilityPublic |- -- | Crate-visible (pub(crate))- VisibilityCrate |- -- | Visible to a specific path (pub(in path))- VisibilityRestricted [String] |- -- | Private (default)- VisibilityPrivate- deriving (Eq, Ord, Read, Show)-_Visibility = Core.Name "hydra.rust.syntax.Visibility"-_Visibility_public = Core.Name "public"-_Visibility_crate = Core.Name "crate"-_Visibility_restricted = Core.Name "restricted"-_Visibility_private = Core.Name "private"--- | A let condition (e.g., let Some(x) = opt)-data LetCondition =- LetCondition {- -- | The pattern- letConditionPattern :: Pattern,- -- | The expression being matched- letConditionExpr :: Expression}- deriving (Eq, Ord, Read, Show)-_LetCondition = Core.Name "hydra.rust.syntax.LetCondition"-_LetCondition_pattern = Core.Name "pattern"-_LetCondition_expr = Core.Name "expr"--- | An array repeat expression (e.g., [0; 10])-data ArrayRepeat =- ArrayRepeat {- -- | The element expression- arrayRepeatElement :: Expression,- -- | The length expression- arrayRepeatLength :: Expression}- deriving (Eq, Ord, Read, Show)-_ArrayRepeat = Core.Name "hydra.rust.syntax.ArrayRepeat"-_ArrayRepeat_element = Core.Name "element"-_ArrayRepeat_length = Core.Name "length"++-- | A Rust syntax model, based on the Rust Reference grammar (https://doc.rust-lang.org/reference/), retrieved 2025-01-29++module Hydra.Rust.Syntax where++import qualified Hydra.Core as Core+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci+import qualified Data.ByteString as B+import qualified Data.Int as I++-- | Angle-bracketed generic arguments+data AngleBracketedArgs =+ AngleBracketedArgs {+ -- | The generic arguments+ angleBracketedArgsArgs :: [GenericArg]}+ deriving (Eq, Ord, Read, Show)++_AngleBracketedArgs = Core.Name "hydra.rust.syntax.AngleBracketedArgs"++_AngleBracketedArgs_args = Core.Name "args"++-- | An array expression+data ArrayExpr =+ -- | An array literal+ ArrayExprElements [Expression] |+ -- | An array repeat expression+ ArrayExprRepeat ArrayRepeat+ deriving (Eq, Ord, Read, Show)++_ArrayExpr = Core.Name "hydra.rust.syntax.ArrayExpr"++_ArrayExpr_elements = Core.Name "elements"++_ArrayExpr_repeat = Core.Name "repeat"++-- | An array repeat expression (e.g., [0; 10])+data ArrayRepeat =+ ArrayRepeat {+ -- | The element expression+ arrayRepeatElement :: Expression,+ -- | The length expression+ arrayRepeatLength :: Expression}+ deriving (Eq, Ord, Read, Show)++_ArrayRepeat = Core.Name "hydra.rust.syntax.ArrayRepeat"++_ArrayRepeat_element = Core.Name "element"++_ArrayRepeat_length = Core.Name "length"++-- | An array type with a fixed size (e.g., [T; 3])+data ArrayType =+ ArrayType {+ -- | The element type+ arrayTypeElement :: Type,+ -- | The array length (as a constant expression)+ arrayTypeLength :: Expression}+ deriving (Eq, Ord, Read, Show)++_ArrayType = Core.Name "hydra.rust.syntax.ArrayType"++_ArrayType_element = Core.Name "element"++_ArrayType_length = Core.Name "length"++-- | An assignment expression+data AssignExpr =+ AssignExpr {+ -- | The left-hand side (target)+ assignExprTarget :: Expression,+ -- | The right-hand side (value)+ assignExprValue :: Expression}+ deriving (Eq, Ord, Read, Show)++_AssignExpr = Core.Name "hydra.rust.syntax.AssignExpr"++_AssignExpr_target = Core.Name "target"++_AssignExpr_value = Core.Name "value"++-- | An attribute (e.g., #[derive(Clone)], #[cfg(test)])+data Attribute =+ Attribute {+ -- | Whether the attribute is an inner attribute (#![...] vs #[...])+ attributeInner :: Bool,+ -- | The attribute path+ attributePath :: [String],+ -- | The attribute arguments as a raw token string+ attributeTokens :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_Attribute = Core.Name "hydra.rust.syntax.Attribute"++_Attribute_inner = Core.Name "inner"++_Attribute_path = Core.Name "path"++_Attribute_tokens = Core.Name "tokens"++-- | A binary operation+data BinaryExpr =+ BinaryExpr {+ -- | The left-hand operand+ binaryExprLeft :: Expression,+ -- | The binary operator+ binaryExprOp :: BinaryOp,+ -- | The right-hand operand+ binaryExprRight :: Expression}+ deriving (Eq, Ord, Read, Show)++_BinaryExpr = Core.Name "hydra.rust.syntax.BinaryExpr"++_BinaryExpr_left = Core.Name "left"++_BinaryExpr_op = Core.Name "op"++_BinaryExpr_right = Core.Name "right"++-- | A binary operator+data BinaryOp =+ BinaryOpAdd |+ BinaryOpSub |+ BinaryOpMul |+ BinaryOpDiv |+ BinaryOpRem |+ BinaryOpAnd |+ BinaryOpOr |+ BinaryOpBitAnd |+ BinaryOpBitOr |+ BinaryOpBitXor |+ BinaryOpShl |+ BinaryOpShr |+ BinaryOpEq |+ BinaryOpNe |+ BinaryOpLt |+ BinaryOpLe |+ BinaryOpGt |+ BinaryOpGe+ deriving (Eq, Ord, Read, Show)++_BinaryOp = Core.Name "hydra.rust.syntax.BinaryOp"++_BinaryOp_add = Core.Name "add"++_BinaryOp_sub = Core.Name "sub"++_BinaryOp_mul = Core.Name "mul"++_BinaryOp_div = Core.Name "div"++_BinaryOp_rem = Core.Name "rem"++_BinaryOp_and = Core.Name "and"++_BinaryOp_or = Core.Name "or"++_BinaryOp_bitAnd = Core.Name "bitAnd"++_BinaryOp_bitOr = Core.Name "bitOr"++_BinaryOp_bitXor = Core.Name "bitXor"++_BinaryOp_shl = Core.Name "shl"++_BinaryOp_shr = Core.Name "shr"++_BinaryOp_eq = Core.Name "eq"++_BinaryOp_ne = Core.Name "ne"++_BinaryOp_lt = Core.Name "lt"++_BinaryOp_le = Core.Name "le"++_BinaryOp_gt = Core.Name "gt"++_BinaryOp_ge = Core.Name "ge"++-- | A block expression+data Block =+ Block {+ -- | The statements in the block+ blockStatements :: [Statement],+ -- | An optional trailing expression+ blockExpression :: (Maybe Expression)}+ deriving (Eq, Ord, Read, Show)++_Block = Core.Name "hydra.rust.syntax.Block"++_Block_statements = Core.Name "statements"++_Block_expression = Core.Name "expression"++-- | A function call expression+data CallExpr =+ CallExpr {+ -- | The function being called+ callExprFunction :: Expression,+ -- | The arguments+ callExprArgs :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_CallExpr = Core.Name "hydra.rust.syntax.CallExpr"++_CallExpr_function = Core.Name "function"++_CallExpr_args = Core.Name "args"++-- | A type cast expression+data CastExpr =+ CastExpr {+ -- | The expression being cast+ castExprExpr :: Expression,+ -- | The target type+ castExprType :: Type}+ deriving (Eq, Ord, Read, Show)++_CastExpr = Core.Name "hydra.rust.syntax.CastExpr"++_CastExpr_expr = Core.Name "expr"++_CastExpr_type = Core.Name "type"++-- | A closure expression+data ClosureExpr =+ ClosureExpr {+ -- | Whether the closure captures by move+ closureExprMove :: Bool,+ -- | The closure parameters+ closureExprParams :: [ClosureParam],+ -- | Optional return type annotation+ closureExprReturnType :: (Maybe Type),+ -- | The closure body+ closureExprBody :: Expression}+ deriving (Eq, Ord, Read, Show)++_ClosureExpr = Core.Name "hydra.rust.syntax.ClosureExpr"++_ClosureExpr_move = Core.Name "move"++_ClosureExpr_params = Core.Name "params"++_ClosureExpr_returnType = Core.Name "returnType"++_ClosureExpr_body = Core.Name "body"++-- | A closure parameter+data ClosureParam =+ ClosureParam {+ -- | The parameter pattern+ closureParamPattern :: Pattern,+ -- | Optional type annotation+ closureParamType :: (Maybe Type)}+ deriving (Eq, Ord, Read, Show)++_ClosureParam = Core.Name "hydra.rust.syntax.ClosureParam"++_ClosureParam_pattern = Core.Name "pattern"++_ClosureParam_type = Core.Name "type"++-- | A compound assignment expression+data CompoundAssignExpr =+ CompoundAssignExpr {+ -- | The left-hand side (target)+ compoundAssignExprTarget :: Expression,+ -- | The compound assignment operator+ compoundAssignExprOp :: CompoundAssignOp,+ -- | The right-hand side (value)+ compoundAssignExprValue :: Expression}+ deriving (Eq, Ord, Read, Show)++_CompoundAssignExpr = Core.Name "hydra.rust.syntax.CompoundAssignExpr"++_CompoundAssignExpr_target = Core.Name "target"++_CompoundAssignExpr_op = Core.Name "op"++_CompoundAssignExpr_value = Core.Name "value"++-- | A compound assignment operator+data CompoundAssignOp =+ CompoundAssignOpAddAssign |+ CompoundAssignOpSubAssign |+ CompoundAssignOpMulAssign |+ CompoundAssignOpDivAssign |+ CompoundAssignOpRemAssign |+ CompoundAssignOpBitAndAssign |+ CompoundAssignOpBitOrAssign |+ CompoundAssignOpBitXorAssign |+ CompoundAssignOpShlAssign |+ CompoundAssignOpShrAssign+ deriving (Eq, Ord, Read, Show)++_CompoundAssignOp = Core.Name "hydra.rust.syntax.CompoundAssignOp"++_CompoundAssignOp_addAssign = Core.Name "addAssign"++_CompoundAssignOp_subAssign = Core.Name "subAssign"++_CompoundAssignOp_mulAssign = Core.Name "mulAssign"++_CompoundAssignOp_divAssign = Core.Name "divAssign"++_CompoundAssignOp_remAssign = Core.Name "remAssign"++_CompoundAssignOp_bitAndAssign = Core.Name "bitAndAssign"++_CompoundAssignOp_bitOrAssign = Core.Name "bitOrAssign"++_CompoundAssignOp_bitXorAssign = Core.Name "bitXorAssign"++_CompoundAssignOp_shlAssign = Core.Name "shlAssign"++_CompoundAssignOp_shrAssign = Core.Name "shrAssign"++-- | A constant item (e.g., const FOO: u32 = 42;)+data ConstDef =+ ConstDef {+ -- | The constant name+ constDefName :: String,+ -- | The constant type+ constDefType :: Type,+ -- | The constant value expression+ constDefValue :: Expression,+ -- | Whether the constant is public+ constDefPublic :: Bool,+ -- | Optional doc comment+ constDefDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_ConstDef = Core.Name "hydra.rust.syntax.ConstDef"++_ConstDef_name = Core.Name "name"++_ConstDef_type = Core.Name "type"++_ConstDef_value = Core.Name "value"++_ConstDef_public = Core.Name "public"++_ConstDef_doc = Core.Name "doc"++-- | A Rust crate, represented as a collection of top-level items+data Crate =+ Crate {+ -- | The top-level items in the crate+ crateItems :: [ItemWithComments]}+ deriving (Eq, Ord, Read, Show)++_Crate = Core.Name "hydra.rust.syntax.Crate"++_Crate_items = Core.Name "items"++-- | An enum definition (e.g., enum Foo<T> { Bar(T), Baz { x: i32 } })+data EnumDef =+ EnumDef {+ -- | The enum name+ enumDefName :: String,+ -- | Generic type parameters+ enumDefGenerics :: [GenericParam],+ -- | Optional where clause+ enumDefWhereClause :: (Maybe WhereClause),+ -- | The enum variants+ enumDefVariants :: [EnumVariant],+ -- | Derive macros to apply+ enumDefDerives :: [String],+ -- | Whether the enum is public+ enumDefPublic :: Bool,+ -- | Optional doc comment+ enumDefDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_EnumDef = Core.Name "hydra.rust.syntax.EnumDef"++_EnumDef_name = Core.Name "name"++_EnumDef_generics = Core.Name "generics"++_EnumDef_whereClause = Core.Name "whereClause"++_EnumDef_variants = Core.Name "variants"++_EnumDef_derives = Core.Name "derives"++_EnumDef_public = Core.Name "public"++_EnumDef_doc = Core.Name "doc"++-- | A variant of an enum definition+data EnumVariant =+ EnumVariant {+ -- | The variant name+ enumVariantName :: String,+ -- | The variant body+ enumVariantBody :: EnumVariantBody,+ -- | Optional doc comment for the variant+ enumVariantDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_EnumVariant = Core.Name "hydra.rust.syntax.EnumVariant"++_EnumVariant_name = Core.Name "name"++_EnumVariant_body = Core.Name "body"++_EnumVariant_doc = Core.Name "doc"++-- | The body of an enum variant+data EnumVariantBody =+ -- | A unit variant (e.g., Foo)+ EnumVariantBodyUnit |+ -- | A tuple variant (e.g., Foo(i32, String))+ EnumVariantBodyTuple [Type] |+ -- | A struct variant (e.g., Foo { x: i32 })+ EnumVariantBodyStruct [StructField]+ deriving (Eq, Ord, Read, Show)++_EnumVariantBody = Core.Name "hydra.rust.syntax.EnumVariantBody"++_EnumVariantBody_unit = Core.Name "unit"++_EnumVariantBody_tuple = Core.Name "tuple"++_EnumVariantBody_struct = Core.Name "struct"++-- | A path used as an expression+data ExprPath =+ ExprPath {+ -- | Whether the path is global+ exprPathGlobal :: Bool,+ -- | The path segments+ exprPathSegments :: [PathSegment]}+ deriving (Eq, Ord, Read, Show)++_ExprPath = Core.Name "hydra.rust.syntax.ExprPath"++_ExprPath_global = Core.Name "global"++_ExprPath_segments = Core.Name "segments"++-- | A Rust expression+data Expression =+ -- | A literal value+ ExpressionLiteral Literal |+ -- | A path expression+ ExpressionPath ExprPath |+ -- | A block expression+ ExpressionBlock Block |+ -- | A function call expression+ ExpressionCall CallExpr |+ -- | A method call expression+ ExpressionMethodCall MethodCallExpr |+ -- | A field access expression+ ExpressionFieldAccess FieldAccessExpr |+ -- | A tuple index expression+ ExpressionTupleIndex TupleIndexExpr |+ -- | A closure expression+ ExpressionClosure ClosureExpr |+ -- | An if expression, including if let+ ExpressionIf IfExpr |+ -- | A match expression+ ExpressionMatch MatchExpr |+ -- | A loop expression+ ExpressionLoop LoopExpr |+ -- | A while expression, including while let+ ExpressionWhile WhileExpr |+ -- | A for expression+ ExpressionFor ForExpr |+ -- | A binary operation+ ExpressionBinary BinaryExpr |+ -- | A unary operation+ ExpressionUnary UnaryExpr |+ -- | A reference expression+ ExpressionReference RefExpr |+ -- | A dereference expression+ ExpressionDereference Expression |+ -- | A struct literal expression+ ExpressionStruct StructExpr |+ -- | A tuple expression+ ExpressionTuple [Expression] |+ -- | An array expression+ ExpressionArray ArrayExpr |+ -- | An index expression+ ExpressionIndex IndexExpr |+ -- | A range expression+ ExpressionRange RangeExpr |+ -- | A return expression+ ExpressionReturn (Maybe Expression) |+ -- | A break expression+ ExpressionBreak (Maybe Expression) |+ -- | A continue expression+ ExpressionContinue |+ -- | A try expression (expr?)+ ExpressionTry Expression |+ -- | A type cast expression+ ExpressionCast CastExpr |+ -- | A type ascription expression+ ExpressionTypeAscription TypeAscriptionExpr |+ -- | An await expression+ ExpressionAwait Expression |+ -- | An assignment expression+ ExpressionAssign AssignExpr |+ -- | A compound assignment expression+ ExpressionCompoundAssign CompoundAssignExpr |+ -- | A macro invocation expression+ ExpressionMacro MacroInvocation |+ -- | A parenthesized expression+ ExpressionParen Expression+ deriving (Eq, Ord, Read, Show)++_Expression = Core.Name "hydra.rust.syntax.Expression"++_Expression_literal = Core.Name "literal"++_Expression_path = Core.Name "path"++_Expression_block = Core.Name "block"++_Expression_call = Core.Name "call"++_Expression_methodCall = Core.Name "methodCall"++_Expression_fieldAccess = Core.Name "fieldAccess"++_Expression_tupleIndex = Core.Name "tupleIndex"++_Expression_closure = Core.Name "closure"++_Expression_if = Core.Name "if"++_Expression_match = Core.Name "match"++_Expression_loop = Core.Name "loop"++_Expression_while = Core.Name "while"++_Expression_for = Core.Name "for"++_Expression_binary = Core.Name "binary"++_Expression_unary = Core.Name "unary"++_Expression_reference = Core.Name "reference"++_Expression_dereference = Core.Name "dereference"++_Expression_struct = Core.Name "struct"++_Expression_tuple = Core.Name "tuple"++_Expression_array = Core.Name "array"++_Expression_index = Core.Name "index"++_Expression_range = Core.Name "range"++_Expression_return = Core.Name "return"++_Expression_break = Core.Name "break"++_Expression_continue = Core.Name "continue"++_Expression_try = Core.Name "try"++_Expression_cast = Core.Name "cast"++_Expression_typeAscription = Core.Name "typeAscription"++_Expression_await = Core.Name "await"++_Expression_assign = Core.Name "assign"++_Expression_compoundAssign = Core.Name "compoundAssign"++_Expression_macro = Core.Name "macro"++_Expression_paren = Core.Name "paren"++-- | A field access expression+data FieldAccessExpr =+ FieldAccessExpr {+ -- | The expression being accessed+ fieldAccessExprObject :: Expression,+ -- | The field name+ fieldAccessExprField :: String}+ deriving (Eq, Ord, Read, Show)++_FieldAccessExpr = Core.Name "hydra.rust.syntax.FieldAccessExpr"++_FieldAccessExpr_object = Core.Name "object"++_FieldAccessExpr_field = Core.Name "field"++-- | A field pattern within a struct pattern+data FieldPattern =+ FieldPattern {+ -- | The field name+ fieldPatternName :: String,+ -- | The field pattern (None for shorthand)+ fieldPatternPattern :: (Maybe Pattern)}+ deriving (Eq, Ord, Read, Show)++_FieldPattern = Core.Name "hydra.rust.syntax.FieldPattern"++_FieldPattern_name = Core.Name "name"++_FieldPattern_pattern = Core.Name "pattern"++-- | A field-value pair in a struct literal+data FieldValue =+ FieldValue {+ -- | The field name+ fieldValueName :: String,+ -- | The field value (None for shorthand syntax)+ fieldValueValue :: (Maybe Expression)}+ deriving (Eq, Ord, Read, Show)++_FieldValue = Core.Name "hydra.rust.syntax.FieldValue"++_FieldValue_name = Core.Name "name"++_FieldValue_value = Core.Name "value"++-- | A floating-point literal with optional suffix+data FloatLiteral =+ FloatLiteral {+ -- | The float value+ floatLiteralValue :: Double,+ -- | Optional type suffix+ floatLiteralSuffix :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_FloatLiteral = Core.Name "hydra.rust.syntax.FloatLiteral"++_FloatLiteral_value = Core.Name "value"++_FloatLiteral_suffix = Core.Name "suffix"++-- | A function definition (e.g., fn foo<T>(x: T) -> String { ... })+data FnDef =+ FnDef {+ -- | The function name+ fnDefName :: String,+ -- | Generic type parameters+ fnDefGenerics :: [GenericParam],+ -- | Optional where clause+ fnDefWhereClause :: (Maybe WhereClause),+ -- | The function parameters+ fnDefParams :: [FnParam],+ -- | The return type (None means ())+ fnDefReturnType :: (Maybe Type),+ -- | The function body+ fnDefBody :: Block,+ -- | Whether the function is public+ fnDefPublic :: Bool,+ -- | Whether the function is async+ fnDefAsync :: Bool,+ -- | Whether the function is const+ fnDefConst :: Bool,+ -- | Whether the function is unsafe+ fnDefUnsafe :: Bool,+ -- | Optional doc comment+ fnDefDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_FnDef = Core.Name "hydra.rust.syntax.FnDef"++_FnDef_name = Core.Name "name"++_FnDef_generics = Core.Name "generics"++_FnDef_whereClause = Core.Name "whereClause"++_FnDef_params = Core.Name "params"++_FnDef_returnType = Core.Name "returnType"++_FnDef_body = Core.Name "body"++_FnDef_public = Core.Name "public"++_FnDef_async = Core.Name "async"++_FnDef_const = Core.Name "const"++_FnDef_unsafe = Core.Name "unsafe"++_FnDef_doc = Core.Name "doc"++-- | A function parameter+data FnParam =+ FnParam {+ -- | The parameter pattern+ fnParamPattern :: Pattern,+ -- | The parameter type+ fnParamType :: Type}+ deriving (Eq, Ord, Read, Show)++_FnParam = Core.Name "hydra.rust.syntax.FnParam"++_FnParam_pattern = Core.Name "pattern"++_FnParam_type = Core.Name "type"++-- | A function pointer type (e.g., fn(i32, i32) -> i32)+data FnPointerType =+ FnPointerType {+ -- | The parameter types+ fnPointerTypeParams :: [Type],+ -- | The return type+ fnPointerTypeReturnType :: Type}+ deriving (Eq, Ord, Read, Show)++_FnPointerType = Core.Name "hydra.rust.syntax.FnPointerType"++_FnPointerType_params = Core.Name "params"++_FnPointerType_returnType = Core.Name "returnType"++-- | A for expression+data ForExpr =+ ForExpr {+ -- | Optional loop label+ forExprLabel :: (Maybe String),+ -- | The loop variable pattern+ forExprPattern :: Pattern,+ -- | The iterator expression+ forExprIter :: Expression,+ -- | The loop body+ forExprBody :: Block}+ deriving (Eq, Ord, Read, Show)++_ForExpr = Core.Name "hydra.rust.syntax.ForExpr"++_ForExpr_label = Core.Name "label"++_ForExpr_pattern = Core.Name "pattern"++_ForExpr_iter = Core.Name "iter"++_ForExpr_body = Core.Name "body"++-- | A single generic argument+data GenericArg =+ -- | A type argument+ GenericArgType Type |+ -- | A lifetime argument+ GenericArgLifetime Lifetime |+ -- | A const expression argument+ GenericArgConst Expression |+ -- | An associated type binding+ GenericArgBinding TypeBinding+ deriving (Eq, Ord, Read, Show)++_GenericArg = Core.Name "hydra.rust.syntax.GenericArg"++_GenericArg_type = Core.Name "type"++_GenericArg_lifetime = Core.Name "lifetime"++_GenericArg_const = Core.Name "const"++_GenericArg_binding = Core.Name "binding"++-- | Generic arguments to a path segment+data GenericArguments =+ -- | No generic arguments+ GenericArgumentsNone |+ -- | Angle-bracketed arguments+ GenericArgumentsAngleBracketed AngleBracketedArgs |+ -- | Parenthesized arguments for Fn traits+ GenericArgumentsParenthesized ParenthesizedArgs+ deriving (Eq, Ord, Read, Show)++_GenericArguments = Core.Name "hydra.rust.syntax.GenericArguments"++_GenericArguments_none = Core.Name "none"++_GenericArguments_angleBracketed = Core.Name "angleBracketed"++_GenericArguments_parenthesized = Core.Name "parenthesized"++-- | A generic type parameter (e.g., T: Clone + Debug)+data GenericParam =+ GenericParam {+ -- | The parameter name+ genericParamName :: String,+ -- | Trait bounds on the parameter+ genericParamBounds :: [TypeParamBound]}+ deriving (Eq, Ord, Read, Show)++_GenericParam = Core.Name "hydra.rust.syntax.GenericParam"++_GenericParam_name = Core.Name "name"++_GenericParam_bounds = Core.Name "bounds"++-- | An identifier pattern+data IdentifierPattern =+ IdentifierPattern {+ -- | The identifier name+ identifierPatternName :: String,+ -- | Whether the binding is mutable+ identifierPatternMutable :: Bool,+ -- | Optional sub-pattern (e.g., x @ Some(_))+ identifierPatternAtPattern :: (Maybe Pattern)}+ deriving (Eq, Ord, Read, Show)++_IdentifierPattern = Core.Name "hydra.rust.syntax.IdentifierPattern"++_IdentifierPattern_name = Core.Name "name"++_IdentifierPattern_mutable = Core.Name "mutable"++_IdentifierPattern_atPattern = Core.Name "atPattern"++-- | The condition of an if expression+data IfCondition =+ -- | A boolean condition+ IfConditionBool Expression |+ -- | A let condition+ IfConditionLet LetCondition+ deriving (Eq, Ord, Read, Show)++_IfCondition = Core.Name "hydra.rust.syntax.IfCondition"++_IfCondition_bool = Core.Name "bool"++_IfCondition_let = Core.Name "let"++-- | An if expression, optionally with if let+data IfExpr =+ IfExpr {+ -- | The condition+ ifExprCondition :: IfCondition,+ -- | The then block+ ifExprThenBlock :: Block,+ -- | An optional else branch+ ifExprElseBranch :: (Maybe Expression)}+ deriving (Eq, Ord, Read, Show)++_IfExpr = Core.Name "hydra.rust.syntax.IfExpr"++_IfExpr_condition = Core.Name "condition"++_IfExpr_thenBlock = Core.Name "thenBlock"++_IfExpr_elseBranch = Core.Name "elseBranch"++-- | An impl block (e.g., impl<T> Trait for Foo<T> { ... })+data ImplBlock =+ ImplBlock {+ -- | Generic type parameters+ implBlockGenerics :: [GenericParam],+ -- | Optional where clause+ implBlockWhereClause :: (Maybe WhereClause),+ -- | The trait being implemented, if any+ implBlockTrait :: (Maybe TypePath),+ -- | Whether this is a negative impl+ implBlockNegative :: Bool,+ -- | The type being implemented for+ implBlockSelfType :: Type,+ -- | The items within the impl block+ implBlockItems :: [ImplItem]}+ deriving (Eq, Ord, Read, Show)++_ImplBlock = Core.Name "hydra.rust.syntax.ImplBlock"++_ImplBlock_generics = Core.Name "generics"++_ImplBlock_whereClause = Core.Name "whereClause"++_ImplBlock_trait = Core.Name "trait"++_ImplBlock_negative = Core.Name "negative"++_ImplBlock_selfType = Core.Name "selfType"++_ImplBlock_items = Core.Name "items"++-- | An item within an impl block+data ImplItem =+ -- | A method definition+ ImplItemMethod ImplMethod |+ -- | An associated type definition+ ImplItemType TypeAlias |+ -- | An associated constant+ ImplItemConst ConstDef+ deriving (Eq, Ord, Read, Show)++_ImplItem = Core.Name "hydra.rust.syntax.ImplItem"++_ImplItem_method = Core.Name "method"++_ImplItem_type = Core.Name "type"++_ImplItem_const = Core.Name "const"++-- | A method within an impl block+data ImplMethod =+ ImplMethod {+ -- | The method name+ implMethodName :: String,+ -- | Generic type parameters+ implMethodGenerics :: [GenericParam],+ -- | Optional where clause+ implMethodWhereClause :: (Maybe WhereClause),+ -- | The method parameters (including self)+ implMethodParams :: [MethodParam],+ -- | The return type (None means ())+ implMethodReturnType :: (Maybe Type),+ -- | The method body+ implMethodBody :: Block,+ -- | Whether the method is public+ implMethodPublic :: Bool,+ -- | Whether the method has a default implementation+ implMethodDefault :: Bool,+ -- | Optional doc comment+ implMethodDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_ImplMethod = Core.Name "hydra.rust.syntax.ImplMethod"++_ImplMethod_name = Core.Name "name"++_ImplMethod_generics = Core.Name "generics"++_ImplMethod_whereClause = Core.Name "whereClause"++_ImplMethod_params = Core.Name "params"++_ImplMethod_returnType = Core.Name "returnType"++_ImplMethod_body = Core.Name "body"++_ImplMethod_public = Core.Name "public"++_ImplMethod_default = Core.Name "default"++_ImplMethod_doc = Core.Name "doc"++-- | An index expression+data IndexExpr =+ IndexExpr {+ -- | The expression being indexed+ indexExprObject :: Expression,+ -- | The index expression+ indexExprIndex :: Expression}+ deriving (Eq, Ord, Read, Show)++_IndexExpr = Core.Name "hydra.rust.syntax.IndexExpr"++_IndexExpr_object = Core.Name "object"++_IndexExpr_index = Core.Name "index"++-- | An integer literal with optional suffix+data IntegerLiteral =+ IntegerLiteral {+ -- | The integer value+ integerLiteralValue :: Integer,+ -- | Optional type suffix+ integerLiteralSuffix :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_IntegerLiteral = Core.Name "hydra.rust.syntax.IntegerLiteral"++_IntegerLiteral_value = Core.Name "value"++_IntegerLiteral_suffix = Core.Name "suffix"++-- | A top-level item in a Rust module or crate+data Item =+ -- | A use declaration+ ItemUse UseDeclaration |+ -- | A struct definition+ ItemStruct StructDef |+ -- | An enum definition+ ItemEnum EnumDef |+ -- | A function definition+ ItemFn FnDef |+ -- | A type alias+ ItemTypeAlias TypeAlias |+ -- | An impl block+ ItemImpl ImplBlock |+ -- | A trait definition+ ItemTrait TraitDef |+ -- | A module definition+ ItemMod ModDef |+ -- | A constant item+ ItemConst ConstDef |+ -- | A static item+ ItemStatic StaticDef |+ -- | A macro invocation as an item+ ItemMacro MacroInvocation+ deriving (Eq, Ord, Read, Show)++_Item = Core.Name "hydra.rust.syntax.Item"++_Item_use = Core.Name "use"++_Item_struct = Core.Name "struct"++_Item_enum = Core.Name "enum"++_Item_fn = Core.Name "fn"++_Item_typeAlias = Core.Name "typeAlias"++_Item_impl = Core.Name "impl"++_Item_trait = Core.Name "trait"++_Item_mod = Core.Name "mod"++_Item_const = Core.Name "const"++_Item_static = Core.Name "static"++_Item_macro = Core.Name "macro"++-- | An item together with optional doc comments and visibility+data ItemWithComments =+ ItemWithComments {+ -- | Optional documentation comment+ itemWithCommentsDoc :: (Maybe String),+ -- | The item's visibility+ itemWithCommentsVisibility :: Visibility,+ -- | The item itself+ itemWithCommentsItem :: Item}+ deriving (Eq, Ord, Read, Show)++_ItemWithComments = Core.Name "hydra.rust.syntax.ItemWithComments"++_ItemWithComments_doc = Core.Name "doc"++_ItemWithComments_visibility = Core.Name "visibility"++_ItemWithComments_item = Core.Name "item"++-- | A let condition (e.g., let Some(x) = opt)+data LetCondition =+ LetCondition {+ -- | The pattern+ letConditionPattern :: Pattern,+ -- | The expression being matched+ letConditionExpr :: Expression}+ deriving (Eq, Ord, Read, Show)++_LetCondition = Core.Name "hydra.rust.syntax.LetCondition"++_LetCondition_pattern = Core.Name "pattern"++_LetCondition_expr = Core.Name "expr"++-- | A let statement+data LetStatement =+ LetStatement {+ -- | The binding pattern+ letStatementPattern :: Pattern,+ -- | Whether the binding is mutable+ letStatementMutable :: Bool,+ -- | Optional type annotation+ letStatementType :: (Maybe Type),+ -- | Optional initializer expression+ letStatementInit :: (Maybe Expression)}+ deriving (Eq, Ord, Read, Show)++_LetStatement = Core.Name "hydra.rust.syntax.LetStatement"++_LetStatement_pattern = Core.Name "pattern"++_LetStatement_mutable = Core.Name "mutable"++_LetStatement_type = Core.Name "type"++_LetStatement_init = Core.Name "init"++-- | A lifetime (e.g., 'a, 'static)+data Lifetime =+ Lifetime {+ -- | The lifetime name (without the leading quote)+ lifetimeName :: String}+ deriving (Eq, Ord, Read, Show)++_Lifetime = Core.Name "hydra.rust.syntax.Lifetime"++_Lifetime_name = Core.Name "name"++-- | A literal value+data Literal =+ -- | An integer literal+ LiteralInteger IntegerLiteral |+ -- | A floating-point literal+ LiteralFloat FloatLiteral |+ -- | A string literal+ LiteralString String |+ -- | A raw string literal+ LiteralRawString String |+ -- | A byte string literal+ LiteralByteString B.ByteString |+ -- | A character literal+ LiteralChar I.Int64 |+ -- | A byte literal+ LiteralByte I.Int16 |+ -- | A boolean literal+ LiteralBool Bool+ deriving (Eq, Ord, Read, Show)++_Literal = Core.Name "hydra.rust.syntax.Literal"++_Literal_integer = Core.Name "integer"++_Literal_float = Core.Name "float"++_Literal_string = Core.Name "string"++_Literal_rawString = Core.Name "rawString"++_Literal_byteString = Core.Name "byteString"++_Literal_char = Core.Name "char"++_Literal_byte = Core.Name "byte"++_Literal_bool = Core.Name "bool"++-- | A loop expression+data LoopExpr =+ LoopExpr {+ -- | Optional loop label+ loopExprLabel :: (Maybe String),+ -- | The loop body+ loopExprBody :: Block}+ deriving (Eq, Ord, Read, Show)++_LoopExpr = Core.Name "hydra.rust.syntax.LoopExpr"++_LoopExpr_label = Core.Name "label"++_LoopExpr_body = Core.Name "body"++-- | The delimiter style for a macro invocation+data MacroDelimiter =+ MacroDelimiterParen |+ MacroDelimiterBracket |+ MacroDelimiterBrace+ deriving (Eq, Ord, Read, Show)++_MacroDelimiter = Core.Name "hydra.rust.syntax.MacroDelimiter"++_MacroDelimiter_paren = Core.Name "paren"++_MacroDelimiter_bracket = Core.Name "bracket"++_MacroDelimiter_brace = Core.Name "brace"++-- | A macro invocation+data MacroInvocation =+ MacroInvocation {+ -- | The macro path+ macroInvocationPath :: [String],+ -- | The delimiter style used+ macroInvocationDelimiter :: MacroDelimiter,+ -- | The token stream as a raw string+ macroInvocationTokens :: String}+ deriving (Eq, Ord, Read, Show)++_MacroInvocation = Core.Name "hydra.rust.syntax.MacroInvocation"++_MacroInvocation_path = Core.Name "path"++_MacroInvocation_delimiter = Core.Name "delimiter"++_MacroInvocation_tokens = Core.Name "tokens"++-- | A single arm in a match expression+data MatchArm =+ MatchArm {+ -- | The pattern to match+ matchArmPattern :: Pattern,+ -- | Optional guard expression+ matchArmGuard :: (Maybe Expression),+ -- | The body expression+ matchArmBody :: Expression}+ deriving (Eq, Ord, Read, Show)++_MatchArm = Core.Name "hydra.rust.syntax.MatchArm"++_MatchArm_pattern = Core.Name "pattern"++_MatchArm_guard = Core.Name "guard"++_MatchArm_body = Core.Name "body"++-- | A match expression+data MatchExpr =+ MatchExpr {+ -- | The expression being matched+ matchExprScrutinee :: Expression,+ -- | The match arms+ matchExprArms :: [MatchArm]}+ deriving (Eq, Ord, Read, Show)++_MatchExpr = Core.Name "hydra.rust.syntax.MatchExpr"++_MatchExpr_scrutinee = Core.Name "scrutinee"++_MatchExpr_arms = Core.Name "arms"++-- | A method call expression+data MethodCallExpr =+ MethodCallExpr {+ -- | The receiver expression+ methodCallExprReceiver :: Expression,+ -- | The method name+ methodCallExprMethod :: String,+ -- | Optional turbofish generic arguments+ methodCallExprTurbofish :: [Type],+ -- | The arguments (excluding the receiver)+ methodCallExprArgs :: [Expression]}+ deriving (Eq, Ord, Read, Show)++_MethodCallExpr = Core.Name "hydra.rust.syntax.MethodCallExpr"++_MethodCallExpr_receiver = Core.Name "receiver"++_MethodCallExpr_method = Core.Name "method"++_MethodCallExpr_turbofish = Core.Name "turbofish"++_MethodCallExpr_args = Core.Name "args"++-- | A method parameter, which may be self or a regular parameter+data MethodParam =+ -- | A self parameter+ MethodParamSelf SelfParam |+ -- | A regular function parameter+ MethodParamRegular FnParam+ deriving (Eq, Ord, Read, Show)++_MethodParam = Core.Name "hydra.rust.syntax.MethodParam"++_MethodParam_self = Core.Name "self"++_MethodParam_regular = Core.Name "regular"++-- | A module definition (either inline or external)+data ModDef =+ ModDef {+ -- | The module name+ modDefName :: String,+ -- | The module body (None for external file)+ modDefBody :: (Maybe [Item]),+ -- | Whether the module is public+ modDefPublic :: Bool,+ -- | Optional doc comment+ modDefDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_ModDef = Core.Name "hydra.rust.syntax.ModDef"++_ModDef_name = Core.Name "name"++_ModDef_body = Core.Name "body"++_ModDef_public = Core.Name "public"++_ModDef_doc = Core.Name "doc"++-- | Parenthesized generic arguments for Fn traits+data ParenthesizedArgs =+ ParenthesizedArgs {+ -- | The input types+ parenthesizedArgsInputs :: [Type],+ -- | The output type+ parenthesizedArgsOutput :: (Maybe Type)}+ deriving (Eq, Ord, Read, Show)++_ParenthesizedArgs = Core.Name "hydra.rust.syntax.ParenthesizedArgs"++_ParenthesizedArgs_inputs = Core.Name "inputs"++_ParenthesizedArgs_output = Core.Name "output"++-- | A segment within a type path+data PathSegment =+ PathSegment {+ -- | The segment name+ pathSegmentName :: String,+ -- | Generic arguments, if any+ pathSegmentArguments :: GenericArguments}+ deriving (Eq, Ord, Read, Show)++_PathSegment = Core.Name "hydra.rust.syntax.PathSegment"++_PathSegment_name = Core.Name "name"++_PathSegment_arguments = Core.Name "arguments"++-- | A Rust pattern (used in let, match, function parameters, etc.)+data Pattern =+ -- | A wildcard pattern (_)+ PatternWildcard |+ -- | An identifier pattern+ PatternIdentifier IdentifierPattern |+ -- | A literal pattern+ PatternLiteral Literal |+ -- | A reference pattern+ PatternReference RefPattern |+ -- | A struct pattern+ PatternStruct StructPattern |+ -- | A tuple struct pattern+ PatternTupleStruct TupleStructPattern |+ -- | A tuple pattern+ PatternTuple [Pattern] |+ -- | A slice pattern+ PatternSlice [Pattern] |+ -- | An or-pattern+ PatternOr [Pattern] |+ -- | A path pattern+ PatternPath ExprPath |+ -- | A range pattern+ PatternRange RangePattern |+ -- | A rest pattern (..)+ PatternRest |+ -- | A parenthesized pattern+ PatternParen Pattern+ deriving (Eq, Ord, Read, Show)++_Pattern = Core.Name "hydra.rust.syntax.Pattern"++_Pattern_wildcard = Core.Name "wildcard"++_Pattern_identifier = Core.Name "identifier"++_Pattern_literal = Core.Name "literal"++_Pattern_reference = Core.Name "reference"++_Pattern_struct = Core.Name "struct"++_Pattern_tupleStruct = Core.Name "tupleStruct"++_Pattern_tuple = Core.Name "tuple"++_Pattern_slice = Core.Name "slice"++_Pattern_or = Core.Name "or"++_Pattern_path = Core.Name "path"++_Pattern_range = Core.Name "range"++_Pattern_rest = Core.Name "rest"++_Pattern_paren = Core.Name "paren"++-- | A range expression+data RangeExpr =+ RangeExpr {+ -- | The lower bound (optional)+ rangeExprFrom :: (Maybe Expression),+ -- | The upper bound (optional)+ rangeExprTo :: (Maybe Expression),+ -- | Whether the range is inclusive+ rangeExprInclusive :: Bool}+ deriving (Eq, Ord, Read, Show)++_RangeExpr = Core.Name "hydra.rust.syntax.RangeExpr"++_RangeExpr_from = Core.Name "from"++_RangeExpr_to = Core.Name "to"++_RangeExpr_inclusive = Core.Name "inclusive"++-- | A range pattern+data RangePattern =+ RangePattern {+ -- | The lower bound+ rangePatternFrom :: (Maybe Pattern),+ -- | The upper bound+ rangePatternTo :: (Maybe Pattern),+ -- | Whether the range is inclusive+ rangePatternInclusive :: Bool}+ deriving (Eq, Ord, Read, Show)++_RangePattern = Core.Name "hydra.rust.syntax.RangePattern"++_RangePattern_from = Core.Name "from"++_RangePattern_to = Core.Name "to"++_RangePattern_inclusive = Core.Name "inclusive"++-- | A raw pointer type (e.g., *const T, *mut T)+data RawPointerType =+ RawPointerType {+ -- | Whether the pointer is mutable (*mut vs *const)+ rawPointerTypeMutable :: Bool,+ -- | The pointed-to type+ rawPointerTypeType :: Type}+ deriving (Eq, Ord, Read, Show)++_RawPointerType = Core.Name "hydra.rust.syntax.RawPointerType"++_RawPointerType_mutable = Core.Name "mutable"++_RawPointerType_type = Core.Name "type"++-- | A reference expression+data RefExpr =+ RefExpr {+ -- | Whether the reference is mutable+ refExprMutable :: Bool,+ -- | The expression being referenced+ refExprExpr :: Expression}+ deriving (Eq, Ord, Read, Show)++_RefExpr = Core.Name "hydra.rust.syntax.RefExpr"++_RefExpr_mutable = Core.Name "mutable"++_RefExpr_expr = Core.Name "expr"++-- | A reference pattern+data RefPattern =+ RefPattern {+ -- | Whether the reference is mutable+ refPatternMutable :: Bool,+ -- | The inner pattern+ refPatternPattern :: Pattern}+ deriving (Eq, Ord, Read, Show)++_RefPattern = Core.Name "hydra.rust.syntax.RefPattern"++_RefPattern_mutable = Core.Name "mutable"++_RefPattern_pattern = Core.Name "pattern"++-- | A reference type (e.g., &T, &mut T, &'a T)+data ReferenceType =+ ReferenceType {+ -- | Optional lifetime annotation+ referenceTypeLifetime :: (Maybe Lifetime),+ -- | Whether the reference is mutable+ referenceTypeMutable :: Bool,+ -- | The referenced type+ referenceTypeType :: Type}+ deriving (Eq, Ord, Read, Show)++_ReferenceType = Core.Name "hydra.rust.syntax.ReferenceType"++_ReferenceType_lifetime = Core.Name "lifetime"++_ReferenceType_mutable = Core.Name "mutable"++_ReferenceType_type = Core.Name "type"++-- | A self parameter in a method+data SelfParam =+ SelfParamOwned |+ SelfParamRef |+ SelfParamRefMut+ deriving (Eq, Ord, Read, Show)++_SelfParam = Core.Name "hydra.rust.syntax.SelfParam"++_SelfParam_owned = Core.Name "owned"++_SelfParam_ref = Core.Name "ref"++_SelfParam_refMut = Core.Name "refMut"++-- | A statement within a block+data Statement =+ -- | A let binding+ StatementLet LetStatement |+ -- | An expression statement+ StatementExpression Expression |+ -- | An item declaration within a block+ StatementItem Item |+ -- | An empty statement+ StatementEmpty+ deriving (Eq, Ord, Read, Show)++_Statement = Core.Name "hydra.rust.syntax.Statement"++_Statement_let = Core.Name "let"++_Statement_expression = Core.Name "expression"++_Statement_item = Core.Name "item"++_Statement_empty = Core.Name "empty"++-- | A static item (e.g., static FOO: u32 = 42;)+data StaticDef =+ StaticDef {+ -- | The static name+ staticDefName :: String,+ -- | The static type+ staticDefType :: Type,+ -- | The static value expression+ staticDefValue :: Expression,+ -- | Whether the static is mutable+ staticDefMutable :: Bool,+ -- | Whether the static is public+ staticDefPublic :: Bool,+ -- | Optional doc comment+ staticDefDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_StaticDef = Core.Name "hydra.rust.syntax.StaticDef"++_StaticDef_name = Core.Name "name"++_StaticDef_type = Core.Name "type"++_StaticDef_value = Core.Name "value"++_StaticDef_mutable = Core.Name "mutable"++_StaticDef_public = Core.Name "public"++_StaticDef_doc = Core.Name "doc"++-- | The body of a struct definition+data StructBody =+ -- | A struct with named fields+ StructBodyNamed [StructField] |+ -- | A tuple struct+ StructBodyTuple [TupleField] |+ -- | A unit struct+ StructBodyUnit+ deriving (Eq, Ord, Read, Show)++_StructBody = Core.Name "hydra.rust.syntax.StructBody"++_StructBody_named = Core.Name "named"++_StructBody_tuple = Core.Name "tuple"++_StructBody_unit = Core.Name "unit"++-- | A struct definition (e.g., struct Foo<T> { bar: T })+data StructDef =+ StructDef {+ -- | The struct name+ structDefName :: String,+ -- | Generic type parameters+ structDefGenerics :: [GenericParam],+ -- | Optional where clause+ structDefWhereClause :: (Maybe WhereClause),+ -- | The struct body (named fields, tuple fields, or unit)+ structDefBody :: StructBody,+ -- | Derive macros to apply+ structDefDerives :: [String],+ -- | Whether the struct is public+ structDefPublic :: Bool,+ -- | Optional doc comment+ structDefDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_StructDef = Core.Name "hydra.rust.syntax.StructDef"++_StructDef_name = Core.Name "name"++_StructDef_generics = Core.Name "generics"++_StructDef_whereClause = Core.Name "whereClause"++_StructDef_body = Core.Name "body"++_StructDef_derives = Core.Name "derives"++_StructDef_public = Core.Name "public"++_StructDef_doc = Core.Name "doc"++-- | A struct literal expression+data StructExpr =+ StructExpr {+ -- | The struct path+ structExprPath :: ExprPath,+ -- | The field assignments+ structExprFields :: [FieldValue],+ -- | Optional base expression for struct update syntax+ structExprRest :: (Maybe Expression)}+ deriving (Eq, Ord, Read, Show)++_StructExpr = Core.Name "hydra.rust.syntax.StructExpr"++_StructExpr_path = Core.Name "path"++_StructExpr_fields = Core.Name "fields"++_StructExpr_rest = Core.Name "rest"++-- | A named field within a struct definition+data StructField =+ StructField {+ -- | The field name+ structFieldName :: String,+ -- | The field type+ structFieldType :: Type,+ -- | Whether the field is public+ structFieldPublic :: Bool,+ -- | Optional doc comment for the field+ structFieldDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_StructField = Core.Name "hydra.rust.syntax.StructField"++_StructField_name = Core.Name "name"++_StructField_type = Core.Name "type"++_StructField_public = Core.Name "public"++_StructField_doc = Core.Name "doc"++-- | A struct pattern+data StructPattern =+ StructPattern {+ -- | The struct path+ structPatternPath :: ExprPath,+ -- | The field patterns+ structPatternFields :: [FieldPattern],+ -- | Whether the pattern has a rest (..) at the end+ structPatternRest :: Bool}+ deriving (Eq, Ord, Read, Show)++_StructPattern = Core.Name "hydra.rust.syntax.StructPattern"++_StructPattern_path = Core.Name "path"++_StructPattern_fields = Core.Name "fields"++_StructPattern_rest = Core.Name "rest"++-- | An associated constant within a trait+data TraitConst =+ TraitConst {+ -- | The constant name+ traitConstName :: String,+ -- | The constant type+ traitConstType :: Type,+ -- | Optional default value+ traitConstDefault :: (Maybe Expression),+ -- | Optional doc comment+ traitConstDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_TraitConst = Core.Name "hydra.rust.syntax.TraitConst"++_TraitConst_name = Core.Name "name"++_TraitConst_type = Core.Name "type"++_TraitConst_default = Core.Name "default"++_TraitConst_doc = Core.Name "doc"++-- | A trait definition (e.g., trait Foo<T>: Bar + Baz { ... })+data TraitDef =+ TraitDef {+ -- | The trait name+ traitDefName :: String,+ -- | Generic type parameters+ traitDefGenerics :: [GenericParam],+ -- | Optional where clause+ traitDefWhereClause :: (Maybe WhereClause),+ -- | Supertraits+ traitDefSuperTraits :: [TypeParamBound],+ -- | The items within the trait+ traitDefItems :: [TraitItem],+ -- | Whether the trait is public+ traitDefPublic :: Bool,+ -- | Whether the trait is unsafe+ traitDefUnsafe :: Bool,+ -- | Optional doc comment+ traitDefDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_TraitDef = Core.Name "hydra.rust.syntax.TraitDef"++_TraitDef_name = Core.Name "name"++_TraitDef_generics = Core.Name "generics"++_TraitDef_whereClause = Core.Name "whereClause"++_TraitDef_superTraits = Core.Name "superTraits"++_TraitDef_items = Core.Name "items"++_TraitDef_public = Core.Name "public"++_TraitDef_unsafe = Core.Name "unsafe"++_TraitDef_doc = Core.Name "doc"++-- | An item within a trait definition+data TraitItem =+ -- | A method signature or default method+ TraitItemMethod TraitMethod |+ -- | An associated type+ TraitItemType TraitType |+ -- | An associated constant+ TraitItemConst TraitConst+ deriving (Eq, Ord, Read, Show)++_TraitItem = Core.Name "hydra.rust.syntax.TraitItem"++_TraitItem_method = Core.Name "method"++_TraitItem_type = Core.Name "type"++_TraitItem_const = Core.Name "const"++-- | A method signature or default method within a trait+data TraitMethod =+ TraitMethod {+ -- | The method name+ traitMethodName :: String,+ -- | Generic type parameters+ traitMethodGenerics :: [GenericParam],+ -- | Optional where clause+ traitMethodWhereClause :: (Maybe WhereClause),+ -- | The method parameters (including self)+ traitMethodParams :: [MethodParam],+ -- | The return type+ traitMethodReturnType :: (Maybe Type),+ -- | Optional default body+ traitMethodDefaultBody :: (Maybe Block),+ -- | Optional doc comment+ traitMethodDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_TraitMethod = Core.Name "hydra.rust.syntax.TraitMethod"++_TraitMethod_name = Core.Name "name"++_TraitMethod_generics = Core.Name "generics"++_TraitMethod_whereClause = Core.Name "whereClause"++_TraitMethod_params = Core.Name "params"++_TraitMethod_returnType = Core.Name "returnType"++_TraitMethod_defaultBody = Core.Name "defaultBody"++_TraitMethod_doc = Core.Name "doc"++-- | An associated type within a trait+data TraitType =+ TraitType {+ -- | The associated type name+ traitTypeName :: String,+ -- | Type parameter bounds+ traitTypeBounds :: [TypeParamBound],+ -- | Optional default type+ traitTypeDefault :: (Maybe Type),+ -- | Optional doc comment+ traitTypeDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_TraitType = Core.Name "hydra.rust.syntax.TraitType"++_TraitType_name = Core.Name "name"++_TraitType_bounds = Core.Name "bounds"++_TraitType_default = Core.Name "default"++_TraitType_doc = Core.Name "doc"++-- | A positional field within a tuple struct+data TupleField =+ TupleField {+ -- | The field type+ tupleFieldType :: Type,+ -- | Whether the field is public+ tupleFieldPublic :: Bool}+ deriving (Eq, Ord, Read, Show)++_TupleField = Core.Name "hydra.rust.syntax.TupleField"++_TupleField_type = Core.Name "type"++_TupleField_public = Core.Name "public"++-- | A tuple index expression+data TupleIndexExpr =+ TupleIndexExpr {+ -- | The tuple expression+ tupleIndexExprTuple :: Expression,+ -- | The index (0-based)+ tupleIndexExprIndex :: Int}+ deriving (Eq, Ord, Read, Show)++_TupleIndexExpr = Core.Name "hydra.rust.syntax.TupleIndexExpr"++_TupleIndexExpr_tuple = Core.Name "tuple"++_TupleIndexExpr_index = Core.Name "index"++-- | A tuple struct pattern+data TupleStructPattern =+ TupleStructPattern {+ -- | The path to the tuple struct or variant+ tupleStructPatternPath :: ExprPath,+ -- | The element patterns+ tupleStructPatternElements :: [Pattern]}+ deriving (Eq, Ord, Read, Show)++_TupleStructPattern = Core.Name "hydra.rust.syntax.TupleStructPattern"++_TupleStructPattern_path = Core.Name "path"++_TupleStructPattern_elements = Core.Name "elements"++-- | A Rust type expression+data Type =+ -- | A path type, possibly with generic arguments+ TypePath_ TypePath |+ -- | A reference type+ TypeReference ReferenceType |+ -- | A slice type+ TypeSlice Type |+ -- | An array type with a fixed size+ TypeArray ArrayType |+ -- | A tuple type+ TypeTuple [Type] |+ -- | A function pointer type+ TypeFnPointer FnPointerType |+ -- | An impl Trait type+ TypeImplTrait [TypeParamBound] |+ -- | A dyn Trait type+ TypeDynTrait [TypeParamBound] |+ -- | The inferred type placeholder (_)+ TypeInferred |+ -- | The unit type (())+ TypeUnit |+ -- | The never type (!)+ TypeNever |+ -- | A raw pointer type+ TypeRawPointer RawPointerType |+ -- | A macro invocation in type position+ TypeMacro MacroInvocation+ deriving (Eq, Ord, Read, Show)++_Type = Core.Name "hydra.rust.syntax.Type"++_Type_path = Core.Name "path"++_Type_reference = Core.Name "reference"++_Type_slice = Core.Name "slice"++_Type_array = Core.Name "array"++_Type_tuple = Core.Name "tuple"++_Type_fnPointer = Core.Name "fnPointer"++_Type_implTrait = Core.Name "implTrait"++_Type_dynTrait = Core.Name "dynTrait"++_Type_inferred = Core.Name "inferred"++_Type_unit = Core.Name "unit"++_Type_never = Core.Name "never"++_Type_rawPointer = Core.Name "rawPointer"++_Type_macro = Core.Name "macro"++-- | A type alias definition (e.g., type Foo<T> = Bar<T>;)+data TypeAlias =+ TypeAlias {+ -- | The alias name+ typeAliasName :: String,+ -- | Generic type parameters+ typeAliasGenerics :: [GenericParam],+ -- | The aliased type+ typeAliasType :: Type,+ -- | Whether the alias is public+ typeAliasPublic :: Bool,+ -- | Optional doc comment+ typeAliasDoc :: (Maybe String)}+ deriving (Eq, Ord, Read, Show)++_TypeAlias = Core.Name "hydra.rust.syntax.TypeAlias"++_TypeAlias_name = Core.Name "name"++_TypeAlias_generics = Core.Name "generics"++_TypeAlias_type = Core.Name "type"++_TypeAlias_public = Core.Name "public"++_TypeAlias_doc = Core.Name "doc"++-- | A type ascription expression+data TypeAscriptionExpr =+ TypeAscriptionExpr {+ -- | The expression+ typeAscriptionExprExpr :: Expression,+ -- | The ascribed type+ typeAscriptionExprType :: Type}+ deriving (Eq, Ord, Read, Show)++_TypeAscriptionExpr = Core.Name "hydra.rust.syntax.TypeAscriptionExpr"++_TypeAscriptionExpr_expr = Core.Name "expr"++_TypeAscriptionExpr_type = Core.Name "type"++-- | An associated type binding within generic arguments+data TypeBinding =+ TypeBinding {+ -- | The associated type name+ typeBindingName :: String,+ -- | The bound type+ typeBindingType :: Type}+ deriving (Eq, Ord, Read, Show)++_TypeBinding = Core.Name "hydra.rust.syntax.TypeBinding"++_TypeBinding_name = Core.Name "name"++_TypeBinding_type = Core.Name "type"++-- | A bound on a type parameter+data TypeParamBound =+ -- | A trait bound+ TypeParamBoundTrait TypePath |+ -- | A lifetime bound+ TypeParamBoundLifetime Lifetime+ deriving (Eq, Ord, Read, Show)++_TypeParamBound = Core.Name "hydra.rust.syntax.TypeParamBound"++_TypeParamBound_trait = Core.Name "trait"++_TypeParamBound_lifetime = Core.Name "lifetime"++-- | A path-based type, possibly with generic arguments+data TypePath =+ TypePath {+ -- | Whether the path is absolute (starts with ::)+ typePathGlobal :: Bool,+ -- | The segments of the path+ typePathSegments :: [PathSegment]}+ deriving (Eq, Ord, Read, Show)++_TypePath = Core.Name "hydra.rust.syntax.TypePath"++_TypePath_global = Core.Name "global"++_TypePath_segments = Core.Name "segments"++-- | A unary operation+data UnaryExpr =+ UnaryExpr {+ -- | The unary operator+ unaryExprOp :: UnaryOp,+ -- | The operand+ unaryExprOperand :: Expression}+ deriving (Eq, Ord, Read, Show)++_UnaryExpr = Core.Name "hydra.rust.syntax.UnaryExpr"++_UnaryExpr_op = Core.Name "op"++_UnaryExpr_operand = Core.Name "operand"++-- | A unary operator+data UnaryOp =+ UnaryOpNeg |+ UnaryOpNot+ deriving (Eq, Ord, Read, Show)++_UnaryOp = Core.Name "hydra.rust.syntax.UnaryOp"++_UnaryOp_neg = Core.Name "neg"++_UnaryOp_not = Core.Name "not"++-- | A use declaration (e.g., use std::collections::BTreeMap;)+data UseDeclaration =+ UseDeclaration {+ -- | Whether the use is public (pub use)+ useDeclarationPublic :: Bool,+ -- | The use tree describing what is imported+ useDeclarationTree :: UseTree}+ deriving (Eq, Ord, Read, Show)++_UseDeclaration = Core.Name "hydra.rust.syntax.UseDeclaration"++_UseDeclaration_public = Core.Name "public"++_UseDeclaration_tree = Core.Name "tree"++-- | A grouped import (e.g., std::collections::{BTreeMap, BTreeSet})+data UseGroup =+ UseGroup {+ -- | The common prefix path segments+ useGroupPrefix :: [String],+ -- | The individual subtrees within the group+ useGroupTrees :: [UseTree]}+ deriving (Eq, Ord, Read, Show)++_UseGroup = Core.Name "hydra.rust.syntax.UseGroup"++_UseGroup_prefix = Core.Name "prefix"++_UseGroup_trees = Core.Name "trees"++-- | A simple path import within a use tree+data UsePath =+ UsePath {+ -- | The path segments+ usePathSegments :: [String]}+ deriving (Eq, Ord, Read, Show)++_UsePath = Core.Name "hydra.rust.syntax.UsePath"++_UsePath_segments = Core.Name "segments"++-- | A renamed import (e.g., BTreeMap as Map)+data UseRename =+ UseRename {+ -- | The original path segments+ useRenamePath :: [String],+ -- | The alias name+ useRenameAlias :: String}+ deriving (Eq, Ord, Read, Show)++_UseRename = Core.Name "hydra.rust.syntax.UseRename"++_UseRename_path = Core.Name "path"++_UseRename_alias = Core.Name "alias"++-- | A use tree, representing the structure of a use path+data UseTree =+ -- | A simple path import+ UseTreePath UsePath |+ -- | A renamed import (e.g., BTreeMap as Map)+ UseTreeRename UseRename |+ -- | A glob import (e.g., std::collections::*)+ UseTreeGlob [String] |+ -- | A grouped import (e.g., {BTreeMap, BTreeSet})+ UseTreeGroup UseGroup+ deriving (Eq, Ord, Read, Show)++_UseTree = Core.Name "hydra.rust.syntax.UseTree"++_UseTree_path = Core.Name "path"++_UseTree_rename = Core.Name "rename"++_UseTree_glob = Core.Name "glob"++_UseTree_group = Core.Name "group"++-- | A visibility qualifier+data Visibility =+ -- | Public (pub)+ VisibilityPublic |+ -- | Crate-visible (pub(crate))+ VisibilityCrate |+ -- | Visible to a specific path (pub(in path))+ VisibilityRestricted [String] |+ -- | Private (default)+ VisibilityPrivate+ deriving (Eq, Ord, Read, Show)++_Visibility = Core.Name "hydra.rust.syntax.Visibility"++_Visibility_public = Core.Name "public"++_Visibility_crate = Core.Name "crate"++_Visibility_restricted = Core.Name "restricted"++_Visibility_private = Core.Name "private"++-- | A where clause (e.g., where T: Clone, U: Debug)+data WhereClause =+ WhereClause {+ -- | The predicates in the where clause+ whereClausePredicates :: [WherePredicate]}+ deriving (Eq, Ord, Read, Show)++_WhereClause = Core.Name "hydra.rust.syntax.WhereClause"++_WhereClause_predicates = Core.Name "predicates"++-- | A single predicate in a where clause+data WherePredicate =+ WherePredicate {+ -- | The type being constrained+ wherePredicateType :: Type,+ -- | The bounds on the type+ wherePredicateBounds :: [TypeParamBound]}+ deriving (Eq, Ord, Read, Show)++_WherePredicate = Core.Name "hydra.rust.syntax.WherePredicate"++_WherePredicate_type = Core.Name "type"++_WherePredicate_bounds = Core.Name "bounds"++-- | A while expression, optionally with while let+data WhileExpr =+ WhileExpr {+ -- | Optional loop label+ whileExprLabel :: (Maybe String),+ -- | The condition+ whileExprCondition :: IfCondition,+ -- | The loop body+ whileExprBody :: Block}+ deriving (Eq, Ord, Read, Show)++_WhileExpr = Core.Name "hydra.rust.syntax.WhileExpr"++_WhileExpr_label = Core.Name "label"++_WhileExpr_condition = Core.Name "condition"++_WhileExpr_body = Core.Name "body"
src/main/haskell/Hydra/Sql/Syntax.hs view
@@ -1,976 +1,1576 @@ -- Note: this is an automatically generated file. Do not edit.--- | A subset of ANSI SQL:2003, capturing selected productions of the BNF grammar provided at https://ronsavage.github.io/SQL/sql-2003-2.bnf.html, which is based on the Final Committee Draft (FCD) of ISO/IEC 9075-2:2003--module Hydra.Sql.Syntax where-import qualified Hydra.Core as Core-import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.Scientific as Sci-newtype ApproximateNumericLiteral =- ApproximateNumericLiteral {- unApproximateNumericLiteral :: String}- deriving (Eq, Ord, Read, Show)-_ApproximateNumericLiteral = Core.Name "hydra.sql.syntax.ApproximateNumericLiteral"-newtype BinaryStringLiteral =- BinaryStringLiteral {- unBinaryStringLiteral :: ()}- deriving (Eq, Ord, Read, Show)-_BinaryStringLiteral = Core.Name "hydra.sql.syntax.BinaryStringLiteral"-newtype CharacterStringLiteral =- CharacterStringLiteral {- unCharacterStringLiteral :: String}- deriving (Eq, Ord, Read, Show)-_CharacterStringLiteral = Core.Name "hydra.sql.syntax.CharacterStringLiteral"-newtype ColumnName =- ColumnName {- unColumnName :: String}- deriving (Eq, Ord, Read, Show)-_ColumnName = Core.Name "hydra.sql.syntax.ColumnName"-newtype DateString =- DateString {- unDateString :: ()}- deriving (Eq, Ord, Read, Show)-_DateString = Core.Name "hydra.sql.syntax.DateString"-newtype DomainName =- DomainName {- unDomainName :: String}- deriving (Eq, Ord, Read, Show)-_DomainName = Core.Name "hydra.sql.syntax.DomainName"-newtype ExactNumericLiteral =- ExactNumericLiteral {- unExactNumericLiteral :: String}- deriving (Eq, Ord, Read, Show)-_ExactNumericLiteral = Core.Name "hydra.sql.syntax.ExactNumericLiteral"-newtype LeftBracketOrTrigraph =- LeftBracketOrTrigraph {- unLeftBracketOrTrigraph :: String}- deriving (Eq, Ord, Read, Show)-_LeftBracketOrTrigraph = Core.Name "hydra.sql.syntax.LeftBracketOrTrigraph"-newtype RightBracketOrTrigraph =- RightBracketOrTrigraph {- unRightBracketOrTrigraph :: String}- deriving (Eq, Ord, Read, Show)-_RightBracketOrTrigraph = Core.Name "hydra.sql.syntax.RightBracketOrTrigraph"-newtype NationalCharacterStringLiteral =- NationalCharacterStringLiteral {- unNationalCharacterStringLiteral :: ()}- deriving (Eq, Ord, Read, Show)-_NationalCharacterStringLiteral = Core.Name "hydra.sql.syntax.NationalCharacterStringLiteral"-newtype PathResolvedUserDefinedTypeName =- PathResolvedUserDefinedTypeName {- unPathResolvedUserDefinedTypeName :: String}- deriving (Eq, Ord, Read, Show)-_PathResolvedUserDefinedTypeName = Core.Name "hydra.sql.syntax.PathResolvedUserDefinedTypeName"-newtype TableName =- TableName {- unTableName :: String}- deriving (Eq, Ord, Read, Show)-_TableName = Core.Name "hydra.sql.syntax.TableName"-newtype TimeString =- TimeString {- unTimeString :: ()}- deriving (Eq, Ord, Read, Show)-_TimeString = Core.Name "hydra.sql.syntax.TimeString"-newtype TimestampLiteral =- TimestampLiteral {- unTimestampLiteral :: ()}- deriving (Eq, Ord, Read, Show)-_TimestampLiteral = Core.Name "hydra.sql.syntax.TimestampLiteral"-newtype UnicodeCharacterStringLiteral =- UnicodeCharacterStringLiteral {- unUnicodeCharacterStringLiteral :: ()}- deriving (Eq, Ord, Read, Show)-_UnicodeCharacterStringLiteral = Core.Name "hydra.sql.syntax.UnicodeCharacterStringLiteral"-newtype UnsignedInteger =- UnsignedInteger {- unUnsignedInteger :: String}- deriving (Eq, Ord, Read, Show)-_UnsignedInteger = Core.Name "hydra.sql.syntax.UnsignedInteger"-data ApproximateNumericType =- ApproximateNumericTypeFloat (Maybe Precision) |- ApproximateNumericTypeReal |- ApproximateNumericTypeDouble- deriving (Eq, Ord, Read, Show)-_ApproximateNumericType = Core.Name "hydra.sql.syntax.ApproximateNumericType"-_ApproximateNumericType_float = Core.Name "float"-_ApproximateNumericType_real = Core.Name "real"-_ApproximateNumericType_double = Core.Name "double"-newtype ArrayElement =- ArrayElement {- unArrayElement :: ValueExpression}- deriving (Eq, Ord, Read, Show)-_ArrayElement = Core.Name "hydra.sql.syntax.ArrayElement"-data ArrayElementList =- ArrayElementList {- arrayElementListFirst :: ArrayElement,- arrayElementListRest :: [ArrayElement]}- deriving (Eq, Ord, Read, Show)-_ArrayElementList = Core.Name "hydra.sql.syntax.ArrayElementList"-_ArrayElementList_first = Core.Name "first"-_ArrayElementList_rest = Core.Name "rest"-newtype ArrayElementReference =- ArrayElementReference {- unArrayElementReference :: ()}- deriving (Eq, Ord, Read, Show)-_ArrayElementReference = Core.Name "hydra.sql.syntax.ArrayElementReference"-newtype ArrayType =- ArrayType {- unArrayType :: ()}- deriving (Eq, Ord, Read, Show)-_ArrayType = Core.Name "hydra.sql.syntax.ArrayType"-data ArrayValueConstructor =- ArrayValueConstructorEnumeration ArrayValueConstructorByEnumeration |- ArrayValueConstructorQuery ArrayValueConstructorByQuery- deriving (Eq, Ord, Read, Show)-_ArrayValueConstructor = Core.Name "hydra.sql.syntax.ArrayValueConstructor"-_ArrayValueConstructor_enumeration = Core.Name "enumeration"-_ArrayValueConstructor_query = Core.Name "query"-newtype ArrayValueConstructorByQuery =- ArrayValueConstructorByQuery {- unArrayValueConstructorByQuery :: ()}- deriving (Eq, Ord, Read, Show)-_ArrayValueConstructorByQuery = Core.Name "hydra.sql.syntax.ArrayValueConstructorByQuery"-data ArrayValueConstructorByEnumeration =- ArrayValueConstructorByEnumeration {- arrayValueConstructorByEnumerationLeftBracketOrTrigraph :: LeftBracketOrTrigraph,- arrayValueConstructorByEnumerationArrayElementList :: ArrayElementList,- arrayValueConstructorByEnumerationRightBracketOrTrigraph :: RightBracketOrTrigraph}- deriving (Eq, Ord, Read, Show)-_ArrayValueConstructorByEnumeration = Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"-_ArrayValueConstructorByEnumeration_LeftBracketOrTrigraph = Core.Name "LeftBracketOrTrigraph"-_ArrayValueConstructorByEnumeration_ArrayElementList = Core.Name "ArrayElementList"-_ArrayValueConstructorByEnumeration_RightBracketOrTrigraph = Core.Name "RightBracketOrTrigraph"-newtype ArrayValueExpression =- ArrayValueExpression {- unArrayValueExpression :: ()}- deriving (Eq, Ord, Read, Show)-_ArrayValueExpression = Core.Name "hydra.sql.syntax.ArrayValueExpression"-newtype AsSubqueryClause =- AsSubqueryClause {- unAsSubqueryClause :: ()}- deriving (Eq, Ord, Read, Show)-_AsSubqueryClause = Core.Name "hydra.sql.syntax.AsSubqueryClause"-newtype AttributeOrMethodReference =- AttributeOrMethodReference {- unAttributeOrMethodReference :: ()}- deriving (Eq, Ord, Read, Show)-_AttributeOrMethodReference = Core.Name "hydra.sql.syntax.AttributeOrMethodReference"-data BinaryLargeObjectStringType =- BinaryLargeObjectStringTypeBinary (Maybe LargeObjectLength) |- BinaryLargeObjectStringTypeBlob (Maybe LargeObjectLength)- deriving (Eq, Ord, Read, Show)-_BinaryLargeObjectStringType = Core.Name "hydra.sql.syntax.BinaryLargeObjectStringType"-_BinaryLargeObjectStringType_binary = Core.Name "binary"-_BinaryLargeObjectStringType_blob = Core.Name "blob"-data BooleanFactor =- BooleanFactor {- booleanFactorNOT :: (Maybe ()),- booleanFactorBooleanTest :: BooleanTest}- deriving (Eq, Ord, Read, Show)-_BooleanFactor = Core.Name "hydra.sql.syntax.BooleanFactor"-_BooleanFactor_NOT = Core.Name "NOT"-_BooleanFactor_BooleanTest = Core.Name "BooleanTest"-data BooleanLiteral =- BooleanLiteralTRUE |- BooleanLiteralFALSE |- BooleanLiteralUNKNOWN- deriving (Eq, Ord, Read, Show)-_BooleanLiteral = Core.Name "hydra.sql.syntax.BooleanLiteral"-_BooleanLiteral_TRUE = Core.Name "TRUE"-_BooleanLiteral_FALSE = Core.Name "FALSE"-_BooleanLiteral_UNKNOWN = Core.Name "UNKNOWN"-newtype BooleanPredicand =- BooleanPredicand {- unBooleanPredicand :: ()}- deriving (Eq, Ord, Read, Show)-_BooleanPredicand = Core.Name "hydra.sql.syntax.BooleanPredicand"-data BooleanPrimary =- BooleanPrimaryPredicate Predicate |- BooleanPrimaryPredicand BooleanPredicand- deriving (Eq, Ord, Read, Show)-_BooleanPrimary = Core.Name "hydra.sql.syntax.BooleanPrimary"-_BooleanPrimary_predicate = Core.Name "predicate"-_BooleanPrimary_predicand = Core.Name "predicand"-data BooleanTerm =- BooleanTermFactor BooleanFactor |- BooleanTermAnd BooleanTerm_And- deriving (Eq, Ord, Read, Show)-_BooleanTerm = Core.Name "hydra.sql.syntax.BooleanTerm"-_BooleanTerm_factor = Core.Name "factor"-_BooleanTerm_and = Core.Name "and"-data BooleanTerm_And =- BooleanTerm_And {- booleanTerm_AndLhs :: BooleanTerm,- booleanTerm_AndRhs :: BooleanFactor}- deriving (Eq, Ord, Read, Show)-_BooleanTerm_And = Core.Name "hydra.sql.syntax.BooleanTerm_And"-_BooleanTerm_And_lhs = Core.Name "lhs"-_BooleanTerm_And_rhs = Core.Name "rhs"-data BooleanTest =- BooleanTest {- booleanTestBooleanPrimary :: BooleanPrimary,- booleanTestSequence :: (Maybe BooleanTest_Sequence_Option)}- deriving (Eq, Ord, Read, Show)-_BooleanTest = Core.Name "hydra.sql.syntax.BooleanTest"-_BooleanTest_BooleanPrimary = Core.Name "BooleanPrimary"-_BooleanTest_Sequence = Core.Name "Sequence"-data BooleanTest_Sequence_Option =- BooleanTest_Sequence_Option {- booleanTest_Sequence_OptionNOT :: (Maybe ()),- booleanTest_Sequence_OptionTruthValue :: TruthValue}- deriving (Eq, Ord, Read, Show)-_BooleanTest_Sequence_Option = Core.Name "hydra.sql.syntax.BooleanTest_Sequence_Option"-_BooleanTest_Sequence_Option_NOT = Core.Name "NOT"-_BooleanTest_Sequence_Option_TruthValue = Core.Name "TruthValue"-newtype BooleanType =- BooleanType {- unBooleanType :: ()}- deriving (Eq, Ord, Read, Show)-_BooleanType = Core.Name "hydra.sql.syntax.BooleanType"-data BooleanValueExpression =- BooleanValueExpressionTerm BooleanTerm |- BooleanValueExpressionOr BooleanValueExpression_Or- deriving (Eq, Ord, Read, Show)-_BooleanValueExpression = Core.Name "hydra.sql.syntax.BooleanValueExpression"-_BooleanValueExpression_term = Core.Name "term"-_BooleanValueExpression_or = Core.Name "or"-data BooleanValueExpression_Or =- BooleanValueExpression_Or {- booleanValueExpression_OrLhs :: BooleanValueExpression,- booleanValueExpression_OrRhs :: BooleanTerm}- deriving (Eq, Ord, Read, Show)-_BooleanValueExpression_Or = Core.Name "hydra.sql.syntax.BooleanValueExpression_Or"-_BooleanValueExpression_Or_lhs = Core.Name "lhs"-_BooleanValueExpression_Or_rhs = Core.Name "rhs"-newtype CaseExpression =- CaseExpression {- unCaseExpression :: ()}- deriving (Eq, Ord, Read, Show)-_CaseExpression = Core.Name "hydra.sql.syntax.CaseExpression"-newtype CastSpecification =- CastSpecification {- unCastSpecification :: ()}- deriving (Eq, Ord, Read, Show)-_CastSpecification = Core.Name "hydra.sql.syntax.CastSpecification"-newtype CharacterSetSpecification =- CharacterSetSpecification {- unCharacterSetSpecification :: ()}- deriving (Eq, Ord, Read, Show)-_CharacterSetSpecification = Core.Name "hydra.sql.syntax.CharacterSetSpecification"-data CharacterStringType =- CharacterStringTypeCharacter (Maybe Length) |- CharacterStringTypeChar (Maybe Length) |- CharacterStringTypeCharacterVarying Length |- CharacterStringTypeCharVarying Length |- CharacterStringTypeVarchar Length |- CharacterStringTypeCharacterLargeObject (Maybe LargeObjectLength) |- CharacterStringTypeCharLargeObject (Maybe LargeObjectLength) |- CharacterStringTypeClob (Maybe LargeObjectLength)- deriving (Eq, Ord, Read, Show)-_CharacterStringType = Core.Name "hydra.sql.syntax.CharacterStringType"-_CharacterStringType_character = Core.Name "character"-_CharacterStringType_char = Core.Name "char"-_CharacterStringType_characterVarying = Core.Name "characterVarying"-_CharacterStringType_charVarying = Core.Name "charVarying"-_CharacterStringType_varchar = Core.Name "varchar"-_CharacterStringType_characterLargeObject = Core.Name "characterLargeObject"-_CharacterStringType_charLargeObject = Core.Name "charLargeObject"-_CharacterStringType_clob = Core.Name "clob"-newtype CollateClause =- CollateClause {- unCollateClause :: ()}- deriving (Eq, Ord, Read, Show)-_CollateClause = Core.Name "hydra.sql.syntax.CollateClause"-data CollectionType =- CollectionTypeArray ArrayType |- CollectionTypeMultiset MultisetType- deriving (Eq, Ord, Read, Show)-_CollectionType = Core.Name "hydra.sql.syntax.CollectionType"-_CollectionType_array = Core.Name "array"-_CollectionType_multiset = Core.Name "multiset"-data CollectionValueConstructor =- CollectionValueConstructorArray ArrayValueConstructor |- CollectionValueConstructorMultiset MultisetValueConstructor- deriving (Eq, Ord, Read, Show)-_CollectionValueConstructor = Core.Name "hydra.sql.syntax.CollectionValueConstructor"-_CollectionValueConstructor_array = Core.Name "array"-_CollectionValueConstructor_multiset = Core.Name "multiset"-data CollectionValueExpression =- CollectionValueExpressionArray ArrayValueExpression |- CollectionValueExpressionMultiset MultisetValueExpression- deriving (Eq, Ord, Read, Show)-_CollectionValueExpression = Core.Name "hydra.sql.syntax.CollectionValueExpression"-_CollectionValueExpression_array = Core.Name "array"-_CollectionValueExpression_multiset = Core.Name "multiset"-newtype ColumnConstraintDefinition =- ColumnConstraintDefinition {- unColumnConstraintDefinition :: ()}- deriving (Eq, Ord, Read, Show)-_ColumnConstraintDefinition = Core.Name "hydra.sql.syntax.ColumnConstraintDefinition"-data ColumnDefinition =- ColumnDefinition {- columnDefinitionName :: ColumnName,- columnDefinitionTypeOrDomain :: (Maybe ColumnDefinition_TypeOrDomain_Option),- columnDefinitionRefScope :: (Maybe ReferenceScopeCheck),- columnDefinitionDefaultOrIdentityOrGeneration :: (Maybe ColumnDefinition_DefaultOrIdentityOrGeneration_Option),- columnDefinitionConstraints :: [ColumnConstraintDefinition],- columnDefinitionCollate :: (Maybe CollateClause)}- deriving (Eq, Ord, Read, Show)-_ColumnDefinition = Core.Name "hydra.sql.syntax.ColumnDefinition"-_ColumnDefinition_name = Core.Name "name"-_ColumnDefinition_typeOrDomain = Core.Name "typeOrDomain"-_ColumnDefinition_refScope = Core.Name "refScope"-_ColumnDefinition_defaultOrIdentityOrGeneration = Core.Name "defaultOrIdentityOrGeneration"-_ColumnDefinition_constraints = Core.Name "constraints"-_ColumnDefinition_collate = Core.Name "collate"-data ColumnDefinition_TypeOrDomain_Option =- ColumnDefinition_TypeOrDomain_OptionDataType DataType |- ColumnDefinition_TypeOrDomain_OptionDomainName DomainName- deriving (Eq, Ord, Read, Show)-_ColumnDefinition_TypeOrDomain_Option = Core.Name "hydra.sql.syntax.ColumnDefinition_TypeOrDomain_Option"-_ColumnDefinition_TypeOrDomain_Option_DataType = Core.Name "DataType"-_ColumnDefinition_TypeOrDomain_Option_DomainName = Core.Name "DomainName"-data ColumnDefinition_DefaultOrIdentityOrGeneration_Option =- ColumnDefinition_DefaultOrIdentityOrGeneration_OptionDefaultClause DefaultClause |- ColumnDefinition_DefaultOrIdentityOrGeneration_OptionIdentityColumnSpecification IdentityColumnSpecification |- ColumnDefinition_DefaultOrIdentityOrGeneration_OptionGenerationClause GenerationClause- deriving (Eq, Ord, Read, Show)-_ColumnDefinition_DefaultOrIdentityOrGeneration_Option =- Core.Name "hydra.sql.syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option"-_ColumnDefinition_DefaultOrIdentityOrGeneration_Option_DefaultClause = Core.Name "DefaultClause"-_ColumnDefinition_DefaultOrIdentityOrGeneration_Option_IdentityColumnSpecification =- Core.Name "IdentityColumnSpecification"-_ColumnDefinition_DefaultOrIdentityOrGeneration_Option_GenerationClause = Core.Name "GenerationClause"-data ColumnNameList =- ColumnNameList {- columnNameListFirst :: ColumnName,- columnNameListRest :: [ColumnName]}- deriving (Eq, Ord, Read, Show)-_ColumnNameList = Core.Name "hydra.sql.syntax.ColumnNameList"-_ColumnNameList_first = Core.Name "first"-_ColumnNameList_rest = Core.Name "rest"-newtype ColumnOptions =- ColumnOptions {- unColumnOptions :: ()}- deriving (Eq, Ord, Read, Show)-_ColumnOptions = Core.Name "hydra.sql.syntax.ColumnOptions"-newtype ColumnReference =- ColumnReference {- unColumnReference :: ()}- deriving (Eq, Ord, Read, Show)-_ColumnReference = Core.Name "hydra.sql.syntax.ColumnReference"-data CommonValueExpression =- CommonValueExpressionNumeric NumericValueExpression |- CommonValueExpressionString StringValueExpression |- CommonValueExpressionDatetime DatetimeValueExpression |- CommonValueExpressionInterval IntervalValueExpression |- CommonValueExpressionUserDefined UserDefinedTypeValueExpression |- CommonValueExpressionReference ReferenceValueExpression |- CommonValueExpressionCollection CollectionValueExpression- deriving (Eq, Ord, Read, Show)-_CommonValueExpression = Core.Name "hydra.sql.syntax.CommonValueExpression"-_CommonValueExpression_numeric = Core.Name "numeric"-_CommonValueExpression_string = Core.Name "string"-_CommonValueExpression_datetime = Core.Name "datetime"-_CommonValueExpression_interval = Core.Name "interval"-_CommonValueExpression_userDefined = Core.Name "userDefined"-_CommonValueExpression_reference = Core.Name "reference"-_CommonValueExpression_collection = Core.Name "collection"-data ContextuallyTypedRowValueExpression =- ContextuallyTypedRowValueExpressionSpecialCase RowValueSpecialCase |- ContextuallyTypedRowValueExpressionConstructor ContextuallyTypedRowValueConstructor- deriving (Eq, Ord, Read, Show)-_ContextuallyTypedRowValueExpression = Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpression"-_ContextuallyTypedRowValueExpression_specialCase = Core.Name "specialCase"-_ContextuallyTypedRowValueExpression_constructor = Core.Name "constructor"-newtype ContextuallyTypedRowValueConstructor =- ContextuallyTypedRowValueConstructor {- unContextuallyTypedRowValueConstructor :: ()}- deriving (Eq, Ord, Read, Show)-_ContextuallyTypedRowValueConstructor = Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueConstructor"-data ContextuallyTypedRowValueExpressionList =- ContextuallyTypedRowValueExpressionList {- contextuallyTypedRowValueExpressionListFirst :: ContextuallyTypedRowValueExpression,- contextuallyTypedRowValueExpressionListRest :: [ContextuallyTypedRowValueExpression]}- deriving (Eq, Ord, Read, Show)-_ContextuallyTypedRowValueExpressionList = Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"-_ContextuallyTypedRowValueExpressionList_first = Core.Name "first"-_ContextuallyTypedRowValueExpressionList_rest = Core.Name "rest"-newtype ContextuallyTypedTableValueConstructor =- ContextuallyTypedTableValueConstructor {- unContextuallyTypedTableValueConstructor :: ContextuallyTypedRowValueExpressionList}- deriving (Eq, Ord, Read, Show)-_ContextuallyTypedTableValueConstructor = Core.Name "hydra.sql.syntax.ContextuallyTypedTableValueConstructor"-data DataType =- DataTypePredefined PredefinedType |- DataTypeRow RowType |- DataTypeNamed PathResolvedUserDefinedTypeName |- DataTypeReference ReferenceType |- DataTypeCollection CollectionType- deriving (Eq, Ord, Read, Show)-_DataType = Core.Name "hydra.sql.syntax.DataType"-_DataType_predefined = Core.Name "predefined"-_DataType_row = Core.Name "row"-_DataType_named = Core.Name "named"-_DataType_reference = Core.Name "reference"-_DataType_collection = Core.Name "collection"-newtype DateLiteral =- DateLiteral {- unDateLiteral :: DateString}- deriving (Eq, Ord, Read, Show)-_DateLiteral = Core.Name "hydra.sql.syntax.DateLiteral"-data DatetimeLiteral =- DatetimeLiteralDate DateLiteral |- DatetimeLiteralTime TimeLiteral |- DatetimeLiteralTimestamp TimestampLiteral- deriving (Eq, Ord, Read, Show)-_DatetimeLiteral = Core.Name "hydra.sql.syntax.DatetimeLiteral"-_DatetimeLiteral_date = Core.Name "date"-_DatetimeLiteral_time = Core.Name "time"-_DatetimeLiteral_timestamp = Core.Name "timestamp"-newtype DatetimeType =- DatetimeType {- unDatetimeType :: ()}- deriving (Eq, Ord, Read, Show)-_DatetimeType = Core.Name "hydra.sql.syntax.DatetimeType"-newtype DatetimeValueExpression =- DatetimeValueExpression {- unDatetimeValueExpression :: ()}- deriving (Eq, Ord, Read, Show)-_DatetimeValueExpression = Core.Name "hydra.sql.syntax.DatetimeValueExpression"-newtype DefaultClause =- DefaultClause {- unDefaultClause :: ()}- deriving (Eq, Ord, Read, Show)-_DefaultClause = Core.Name "hydra.sql.syntax.DefaultClause"-data ExactNumericType =- ExactNumericTypeNumeric (Maybe ExactNumericType_Numeric_Option) |- ExactNumericTypeDecimal (Maybe ExactNumericType_Decimal_Option) |- ExactNumericTypeDec (Maybe ExactNumericType_Dec_Option) |- ExactNumericTypeSmallint |- ExactNumericTypeInteger |- ExactNumericTypeInt |- ExactNumericTypeBigint- deriving (Eq, Ord, Read, Show)-_ExactNumericType = Core.Name "hydra.sql.syntax.ExactNumericType"-_ExactNumericType_numeric = Core.Name "numeric"-_ExactNumericType_decimal = Core.Name "decimal"-_ExactNumericType_dec = Core.Name "dec"-_ExactNumericType_smallint = Core.Name "smallint"-_ExactNumericType_integer = Core.Name "integer"-_ExactNumericType_int = Core.Name "int"-_ExactNumericType_bigint = Core.Name "bigint"-data ExactNumericType_Numeric_Option =- ExactNumericType_Numeric_Option {- exactNumericType_Numeric_OptionPrecision :: Precision,- exactNumericType_Numeric_OptionSequence :: (Maybe Scale)}- deriving (Eq, Ord, Read, Show)-_ExactNumericType_Numeric_Option = Core.Name "hydra.sql.syntax.ExactNumericType_Numeric_Option"-_ExactNumericType_Numeric_Option_Precision = Core.Name "Precision"-_ExactNumericType_Numeric_Option_Sequence = Core.Name "Sequence"-data ExactNumericType_Decimal_Option =- ExactNumericType_Decimal_Option {- exactNumericType_Decimal_OptionPrecision :: Precision,- exactNumericType_Decimal_OptionSequence :: (Maybe Scale)}- deriving (Eq, Ord, Read, Show)-_ExactNumericType_Decimal_Option = Core.Name "hydra.sql.syntax.ExactNumericType_Decimal_Option"-_ExactNumericType_Decimal_Option_Precision = Core.Name "Precision"-_ExactNumericType_Decimal_Option_Sequence = Core.Name "Sequence"-data ExactNumericType_Dec_Option =- ExactNumericType_Dec_Option {- exactNumericType_Dec_OptionPrecision :: Precision,- exactNumericType_Dec_OptionSequence :: (Maybe Scale)}- deriving (Eq, Ord, Read, Show)-_ExactNumericType_Dec_Option = Core.Name "hydra.sql.syntax.ExactNumericType_Dec_Option"-_ExactNumericType_Dec_Option_Precision = Core.Name "Precision"-_ExactNumericType_Dec_Option_Sequence = Core.Name "Sequence"-newtype FieldReference =- FieldReference {- unFieldReference :: ()}- deriving (Eq, Ord, Read, Show)-_FieldReference = Core.Name "hydra.sql.syntax.FieldReference"-data FromConstructor =- FromConstructor {- fromConstructorColumns :: (Maybe InsertColumnList),- fromConstructorOverride :: (Maybe OverrideClause),- fromConstructorValues :: ContextuallyTypedTableValueConstructor}- deriving (Eq, Ord, Read, Show)-_FromConstructor = Core.Name "hydra.sql.syntax.FromConstructor"-_FromConstructor_columns = Core.Name "columns"-_FromConstructor_override = Core.Name "override"-_FromConstructor_values = Core.Name "values"-newtype FromDefault =- FromDefault {- unFromDefault :: ()}- deriving (Eq, Ord, Read, Show)-_FromDefault = Core.Name "hydra.sql.syntax.FromDefault"-newtype FromSubquery =- FromSubquery {- unFromSubquery :: ()}- deriving (Eq, Ord, Read, Show)-_FromSubquery = Core.Name "hydra.sql.syntax.FromSubquery"-data GeneralLiteral =- GeneralLiteralString CharacterStringLiteral |- GeneralLiteralNationalString NationalCharacterStringLiteral |- GeneralLiteralUnicode UnicodeCharacterStringLiteral |- GeneralLiteralBinary BinaryStringLiteral |- GeneralLiteralDateTime DatetimeLiteral |- GeneralLiteralInterval IntervalLiteral |- GeneralLiteralBoolean BooleanLiteral- deriving (Eq, Ord, Read, Show)-_GeneralLiteral = Core.Name "hydra.sql.syntax.GeneralLiteral"-_GeneralLiteral_string = Core.Name "string"-_GeneralLiteral_nationalString = Core.Name "nationalString"-_GeneralLiteral_unicode = Core.Name "unicode"-_GeneralLiteral_binary = Core.Name "binary"-_GeneralLiteral_dateTime = Core.Name "dateTime"-_GeneralLiteral_interval = Core.Name "interval"-_GeneralLiteral_boolean = Core.Name "boolean"-newtype GeneralValueSpecification =- GeneralValueSpecification {- unGeneralValueSpecification :: ()}- deriving (Eq, Ord, Read, Show)-_GeneralValueSpecification = Core.Name "hydra.sql.syntax.GeneralValueSpecification"-newtype GenerationClause =- GenerationClause {- unGenerationClause :: ()}- deriving (Eq, Ord, Read, Show)-_GenerationClause = Core.Name "hydra.sql.syntax.GenerationClause"-data GlobalOrLocal =- GlobalOrLocalGlobal |- GlobalOrLocalLocal- deriving (Eq, Ord, Read, Show)-_GlobalOrLocal = Core.Name "hydra.sql.syntax.GlobalOrLocal"-_GlobalOrLocal_global = Core.Name "global"-_GlobalOrLocal_local = Core.Name "local"-newtype IdentityColumnSpecification =- IdentityColumnSpecification {- unIdentityColumnSpecification :: ()}- deriving (Eq, Ord, Read, Show)-_IdentityColumnSpecification = Core.Name "hydra.sql.syntax.IdentityColumnSpecification"-newtype InsertColumnList =- InsertColumnList {- unInsertColumnList :: ColumnNameList}- deriving (Eq, Ord, Read, Show)-_InsertColumnList = Core.Name "hydra.sql.syntax.InsertColumnList"-data InsertColumnsAndSource =- InsertColumnsAndSourceSubquery FromSubquery |- InsertColumnsAndSourceConstructor FromConstructor |- InsertColumnsAndSourceDefault FromDefault- deriving (Eq, Ord, Read, Show)-_InsertColumnsAndSource = Core.Name "hydra.sql.syntax.InsertColumnsAndSource"-_InsertColumnsAndSource_subquery = Core.Name "subquery"-_InsertColumnsAndSource_constructor = Core.Name "constructor"-_InsertColumnsAndSource_default = Core.Name "default"-data InsertStatement =- InsertStatement {- insertStatementTarget :: InsertionTarget,- insertStatementColumnsAndSource :: InsertColumnsAndSource}- deriving (Eq, Ord, Read, Show)-_InsertStatement = Core.Name "hydra.sql.syntax.InsertStatement"-_InsertStatement_target = Core.Name "target"-_InsertStatement_columnsAndSource = Core.Name "columnsAndSource"-newtype InsertionTarget =- InsertionTarget {- unInsertionTarget :: TableName}- deriving (Eq, Ord, Read, Show)-_InsertionTarget = Core.Name "hydra.sql.syntax.InsertionTarget"-newtype IntervalLiteral =- IntervalLiteral {- unIntervalLiteral :: ()}- deriving (Eq, Ord, Read, Show)-_IntervalLiteral = Core.Name "hydra.sql.syntax.IntervalLiteral"-newtype IntervalType =- IntervalType {- unIntervalType :: ()}- deriving (Eq, Ord, Read, Show)-_IntervalType = Core.Name "hydra.sql.syntax.IntervalType"-newtype IntervalValueExpression =- IntervalValueExpression {- unIntervalValueExpression :: ()}- deriving (Eq, Ord, Read, Show)-_IntervalValueExpression = Core.Name "hydra.sql.syntax.IntervalValueExpression"-newtype LargeObjectLength =- LargeObjectLength {- unLargeObjectLength :: ()}- deriving (Eq, Ord, Read, Show)-_LargeObjectLength = Core.Name "hydra.sql.syntax.LargeObjectLength"-newtype Length =- Length {- unLength :: UnsignedInteger}- deriving (Eq, Ord, Read, Show)-_Length = Core.Name "hydra.sql.syntax.Length"-newtype LikeClause =- LikeClause {- unLikeClause :: ()}- deriving (Eq, Ord, Read, Show)-_LikeClause = Core.Name "hydra.sql.syntax.LikeClause"-newtype MethodInvocation =- MethodInvocation {- unMethodInvocation :: ()}- deriving (Eq, Ord, Read, Show)-_MethodInvocation = Core.Name "hydra.sql.syntax.MethodInvocation"-newtype MultisetElementReference =- MultisetElementReference {- unMultisetElementReference :: ()}- deriving (Eq, Ord, Read, Show)-_MultisetElementReference = Core.Name "hydra.sql.syntax.MultisetElementReference"-newtype MultisetType =- MultisetType {- unMultisetType :: DataType}- deriving (Eq, Ord, Read, Show)-_MultisetType = Core.Name "hydra.sql.syntax.MultisetType"-newtype MultisetValueConstructor =- MultisetValueConstructor {- unMultisetValueConstructor :: ()}- deriving (Eq, Ord, Read, Show)-_MultisetValueConstructor = Core.Name "hydra.sql.syntax.MultisetValueConstructor"-newtype MultisetValueExpression =- MultisetValueExpression {- unMultisetValueExpression :: ()}- deriving (Eq, Ord, Read, Show)-_MultisetValueExpression = Core.Name "hydra.sql.syntax.MultisetValueExpression"-newtype NationalCharacterStringType =- NationalCharacterStringType {- unNationalCharacterStringType :: ()}- deriving (Eq, Ord, Read, Show)-_NationalCharacterStringType = Core.Name "hydra.sql.syntax.NationalCharacterStringType"-newtype NewSpecification =- NewSpecification {- unNewSpecification :: ()}- deriving (Eq, Ord, Read, Show)-_NewSpecification = Core.Name "hydra.sql.syntax.NewSpecification"-newtype NextValueExpression =- NextValueExpression {- unNextValueExpression :: ()}- deriving (Eq, Ord, Read, Show)-_NextValueExpression = Core.Name "hydra.sql.syntax.NextValueExpression"-data NumericType =- NumericTypeExact ExactNumericType |- NumericTypeApproximate ApproximateNumericType- deriving (Eq, Ord, Read, Show)-_NumericType = Core.Name "hydra.sql.syntax.NumericType"-_NumericType_exact = Core.Name "exact"-_NumericType_approximate = Core.Name "approximate"-newtype NumericValueExpression =- NumericValueExpression {- unNumericValueExpression :: ()}- deriving (Eq, Ord, Read, Show)-_NumericValueExpression = Core.Name "hydra.sql.syntax.NumericValueExpression"-data OverrideClause =- OverrideClauseOVERRIDINGspUSERspVALUE |- OverrideClauseOVERRIDINGspSYSTEMspVALUE- deriving (Eq, Ord, Read, Show)-_OverrideClause = Core.Name "hydra.sql.syntax.OverrideClause"-_OverrideClause_OVERRIDINGspUSERspVALUE = Core.Name "OVERRIDINGspUSERspVALUE"-_OverrideClause_OVERRIDINGspSYSTEMspVALUE = Core.Name "OVERRIDINGspSYSTEMspVALUE"-newtype ParenthesizedValueExpression =- ParenthesizedValueExpression {- unParenthesizedValueExpression :: ValueExpression}- deriving (Eq, Ord, Read, Show)-_ParenthesizedValueExpression = Core.Name "hydra.sql.syntax.ParenthesizedValueExpression"-newtype Precision =- Precision {- unPrecision :: UnsignedInteger}- deriving (Eq, Ord, Read, Show)-_Precision = Core.Name "hydra.sql.syntax.Precision"-data PredefinedType =- PredefinedTypeString PredefinedType_String |- PredefinedTypeNationalString PredefinedType_NationalString |- PredefinedTypeBlob BinaryLargeObjectStringType |- PredefinedTypeNumeric NumericType |- PredefinedTypeBoolean BooleanType |- PredefinedTypeDatetime DatetimeType |- PredefinedTypeInterval IntervalType- deriving (Eq, Ord, Read, Show)-_PredefinedType = Core.Name "hydra.sql.syntax.PredefinedType"-_PredefinedType_string = Core.Name "string"-_PredefinedType_nationalString = Core.Name "nationalString"-_PredefinedType_blob = Core.Name "blob"-_PredefinedType_numeric = Core.Name "numeric"-_PredefinedType_boolean = Core.Name "boolean"-_PredefinedType_datetime = Core.Name "datetime"-_PredefinedType_interval = Core.Name "interval"-data PredefinedType_String =- PredefinedType_String {- predefinedType_StringType :: CharacterStringType,- predefinedType_StringCharacters :: (Maybe CharacterSetSpecification),- predefinedType_StringCollate :: (Maybe CollateClause)}- deriving (Eq, Ord, Read, Show)-_PredefinedType_String = Core.Name "hydra.sql.syntax.PredefinedType_String"-_PredefinedType_String_type = Core.Name "type"-_PredefinedType_String_characters = Core.Name "characters"-_PredefinedType_String_collate = Core.Name "collate"-data PredefinedType_NationalString =- PredefinedType_NationalString {- predefinedType_NationalStringType :: NationalCharacterStringType,- predefinedType_NationalStringCollate :: (Maybe CollateClause)}- deriving (Eq, Ord, Read, Show)-_PredefinedType_NationalString = Core.Name "hydra.sql.syntax.PredefinedType_NationalString"-_PredefinedType_NationalString_type = Core.Name "type"-_PredefinedType_NationalString_collate = Core.Name "collate"-newtype Predicate =- Predicate {- unPredicate :: ()}- deriving (Eq, Ord, Read, Show)-_Predicate = Core.Name "hydra.sql.syntax.Predicate"-newtype QueryExpression =- QueryExpression {- unQueryExpression :: ()}- deriving (Eq, Ord, Read, Show)-_QueryExpression = Core.Name "hydra.sql.syntax.QueryExpression"-newtype ReferenceScopeCheck =- ReferenceScopeCheck {- unReferenceScopeCheck :: ()}- deriving (Eq, Ord, Read, Show)-_ReferenceScopeCheck = Core.Name "hydra.sql.syntax.ReferenceScopeCheck"-newtype ReferenceType =- ReferenceType {- unReferenceType :: ()}- deriving (Eq, Ord, Read, Show)-_ReferenceType = Core.Name "hydra.sql.syntax.ReferenceType"-newtype RowType =- RowType {- unRowType :: ()}- deriving (Eq, Ord, Read, Show)-_RowType = Core.Name "hydra.sql.syntax.RowType"-newtype RowValueSpecialCase =- RowValueSpecialCase {- unRowValueSpecialCase :: NonparenthesizedValueExpressionPrimary}- deriving (Eq, Ord, Read, Show)-_RowValueSpecialCase = Core.Name "hydra.sql.syntax.RowValueSpecialCase"-data NonparenthesizedValueExpressionPrimary =- NonparenthesizedValueExpressionPrimaryUnsigned UnsignedValueSpecification |- NonparenthesizedValueExpressionPrimaryColumn ColumnReference |- NonparenthesizedValueExpressionPrimarySetFunction SetFunctionSpecification |- NonparenthesizedValueExpressionPrimaryWindowFunction WindowFunction |- NonparenthesizedValueExpressionPrimaryScalarSubquery ScalarSubquery |- NonparenthesizedValueExpressionPrimaryCases CaseExpression |- NonparenthesizedValueExpressionPrimaryCast CastSpecification |- NonparenthesizedValueExpressionPrimaryField FieldReference |- NonparenthesizedValueExpressionPrimarySubtype SubtypeTreatment |- NonparenthesizedValueExpressionPrimaryMethod MethodInvocation |- NonparenthesizedValueExpressionPrimaryStaticMethod StaticMethodInvocation |- NonparenthesizedValueExpressionPrimaryNew NewSpecification |- NonparenthesizedValueExpressionPrimaryAttributeOrMethod AttributeOrMethodReference |- NonparenthesizedValueExpressionPrimaryReference ReferenceResolution |- NonparenthesizedValueExpressionPrimaryCollection CollectionValueConstructor |- NonparenthesizedValueExpressionPrimaryArrayElement ArrayElementReference |- NonparenthesizedValueExpressionPrimaryMultisetElement MultisetElementReference |- NonparenthesizedValueExpressionPrimaryRoutine RoutineInvocation |- NonparenthesizedValueExpressionPrimaryNext NextValueExpression- deriving (Eq, Ord, Read, Show)-_NonparenthesizedValueExpressionPrimary = Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"-_NonparenthesizedValueExpressionPrimary_unsigned = Core.Name "unsigned"-_NonparenthesizedValueExpressionPrimary_column = Core.Name "column"-_NonparenthesizedValueExpressionPrimary_setFunction = Core.Name "setFunction"-_NonparenthesizedValueExpressionPrimary_windowFunction = Core.Name "windowFunction"-_NonparenthesizedValueExpressionPrimary_scalarSubquery = Core.Name "scalarSubquery"-_NonparenthesizedValueExpressionPrimary_cases = Core.Name "cases"-_NonparenthesizedValueExpressionPrimary_cast = Core.Name "cast"-_NonparenthesizedValueExpressionPrimary_field = Core.Name "field"-_NonparenthesizedValueExpressionPrimary_subtype = Core.Name "subtype"-_NonparenthesizedValueExpressionPrimary_method = Core.Name "method"-_NonparenthesizedValueExpressionPrimary_staticMethod = Core.Name "staticMethod"-_NonparenthesizedValueExpressionPrimary_new = Core.Name "new"-_NonparenthesizedValueExpressionPrimary_attributeOrMethod = Core.Name "attributeOrMethod"-_NonparenthesizedValueExpressionPrimary_reference = Core.Name "reference"-_NonparenthesizedValueExpressionPrimary_collection = Core.Name "collection"-_NonparenthesizedValueExpressionPrimary_arrayElement = Core.Name "arrayElement"-_NonparenthesizedValueExpressionPrimary_multisetElement = Core.Name "multisetElement"-_NonparenthesizedValueExpressionPrimary_routine = Core.Name "routine"-_NonparenthesizedValueExpressionPrimary_next = Core.Name "next"-newtype ReferenceResolution =- ReferenceResolution {- unReferenceResolution :: ()}- deriving (Eq, Ord, Read, Show)-_ReferenceResolution = Core.Name "hydra.sql.syntax.ReferenceResolution"-newtype ReferenceValueExpression =- ReferenceValueExpression {- unReferenceValueExpression :: ValueExpressionPrimary}- deriving (Eq, Ord, Read, Show)-_ReferenceValueExpression = Core.Name "hydra.sql.syntax.ReferenceValueExpression"-newtype RowValueExpression =- RowValueExpression {- unRowValueExpression :: ()}- deriving (Eq, Ord, Read, Show)-_RowValueExpression = Core.Name "hydra.sql.syntax.RowValueExpression"-newtype RoutineInvocation =- RoutineInvocation {- unRoutineInvocation :: ()}- deriving (Eq, Ord, Read, Show)-_RoutineInvocation = Core.Name "hydra.sql.syntax.RoutineInvocation"-newtype ScalarSubquery =- ScalarSubquery {- unScalarSubquery :: Subquery}- deriving (Eq, Ord, Read, Show)-_ScalarSubquery = Core.Name "hydra.sql.syntax.ScalarSubquery"-newtype Scale =- Scale {- unScale :: UnsignedInteger}- deriving (Eq, Ord, Read, Show)-_Scale = Core.Name "hydra.sql.syntax.Scale"-newtype SelfReferencingColumnSpecification =- SelfReferencingColumnSpecification {- unSelfReferencingColumnSpecification :: ()}- deriving (Eq, Ord, Read, Show)-_SelfReferencingColumnSpecification = Core.Name "hydra.sql.syntax.SelfReferencingColumnSpecification"-newtype SetFunctionSpecification =- SetFunctionSpecification {- unSetFunctionSpecification :: ()}- deriving (Eq, Ord, Read, Show)-_SetFunctionSpecification = Core.Name "hydra.sql.syntax.SetFunctionSpecification"-newtype StaticMethodInvocation =- StaticMethodInvocation {- unStaticMethodInvocation :: ()}- deriving (Eq, Ord, Read, Show)-_StaticMethodInvocation = Core.Name "hydra.sql.syntax.StaticMethodInvocation"-newtype StringValueExpression =- StringValueExpression {- unStringValueExpression :: ()}- deriving (Eq, Ord, Read, Show)-_StringValueExpression = Core.Name "hydra.sql.syntax.StringValueExpression"-newtype Subquery =- Subquery {- unSubquery :: QueryExpression}- deriving (Eq, Ord, Read, Show)-_Subquery = Core.Name "hydra.sql.syntax.Subquery"-newtype SubtableClause =- SubtableClause {- unSubtableClause :: ()}- deriving (Eq, Ord, Read, Show)-_SubtableClause = Core.Name "hydra.sql.syntax.SubtableClause"-newtype SubtypeTreatment =- SubtypeTreatment {- unSubtypeTreatment :: ()}- deriving (Eq, Ord, Read, Show)-_SubtypeTreatment = Core.Name "hydra.sql.syntax.SubtypeTreatment"-data TableCommitAction =- TableCommitActionPreserve |- TableCommitActionDelete- deriving (Eq, Ord, Read, Show)-_TableCommitAction = Core.Name "hydra.sql.syntax.TableCommitAction"-_TableCommitAction_preserve = Core.Name "preserve"-_TableCommitAction_delete = Core.Name "delete"-newtype TableConstraintDefinition =- TableConstraintDefinition {- unTableConstraintDefinition :: ()}- deriving (Eq, Ord, Read, Show)-_TableConstraintDefinition = Core.Name "hydra.sql.syntax.TableConstraintDefinition"-data TableContentsSource =- TableContentsSourceList TableElementList |- TableContentsSourceSubtable TableContentsSource_Subtable |- TableContentsSourceSubquery AsSubqueryClause- deriving (Eq, Ord, Read, Show)-_TableContentsSource = Core.Name "hydra.sql.syntax.TableContentsSource"-_TableContentsSource_list = Core.Name "list"-_TableContentsSource_subtable = Core.Name "subtable"-_TableContentsSource_subquery = Core.Name "subquery"-data TableContentsSource_Subtable =- TableContentsSource_Subtable {- tableContentsSource_SubtableType :: PathResolvedUserDefinedTypeName,- tableContentsSource_SubtableSubtable :: (Maybe SubtableClause),- tableContentsSource_SubtableElements :: (Maybe TableElementList)}- deriving (Eq, Ord, Read, Show)-_TableContentsSource_Subtable = Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"-_TableContentsSource_Subtable_type = Core.Name "type"-_TableContentsSource_Subtable_subtable = Core.Name "subtable"-_TableContentsSource_Subtable_elements = Core.Name "elements"-data TableDefinition =- TableDefinition {- tableDefinitionScope :: (Maybe TableScope),- tableDefinitionName :: TableName,- tableDefinitionSource :: TableContentsSource,- tableDefinitionCommitActions :: (Maybe TableCommitAction)}- deriving (Eq, Ord, Read, Show)-_TableDefinition = Core.Name "hydra.sql.syntax.TableDefinition"-_TableDefinition_scope = Core.Name "scope"-_TableDefinition_name = Core.Name "name"-_TableDefinition_source = Core.Name "source"-_TableDefinition_commitActions = Core.Name "commitActions"-data TableElement =- TableElementColumn ColumnDefinition |- TableElementTableConstraint TableConstraintDefinition |- TableElementLike LikeClause |- TableElementSelfReferencingColumn SelfReferencingColumnSpecification |- TableElementColumOptions ColumnOptions- deriving (Eq, Ord, Read, Show)-_TableElement = Core.Name "hydra.sql.syntax.TableElement"-_TableElement_column = Core.Name "column"-_TableElement_tableConstraint = Core.Name "tableConstraint"-_TableElement_like = Core.Name "like"-_TableElement_selfReferencingColumn = Core.Name "selfReferencingColumn"-_TableElement_columOptions = Core.Name "columOptions"-data TableElementList =- TableElementList {- tableElementListFirst :: TableElement,- tableElementListRest :: [TableElement]}- deriving (Eq, Ord, Read, Show)-_TableElementList = Core.Name "hydra.sql.syntax.TableElementList"-_TableElementList_first = Core.Name "first"-_TableElementList_rest = Core.Name "rest"-newtype TableScope =- TableScope {- unTableScope :: GlobalOrLocal}- deriving (Eq, Ord, Read, Show)-_TableScope = Core.Name "hydra.sql.syntax.TableScope"-newtype TimeLiteral =- TimeLiteral {- unTimeLiteral :: TimeString}- deriving (Eq, Ord, Read, Show)-_TimeLiteral = Core.Name "hydra.sql.syntax.TimeLiteral"-data TruthValue =- TruthValueTRUE |- TruthValueFALSE |- TruthValueUNKNOWN- deriving (Eq, Ord, Read, Show)-_TruthValue = Core.Name "hydra.sql.syntax.TruthValue"-_TruthValue_TRUE = Core.Name "TRUE"-_TruthValue_FALSE = Core.Name "FALSE"-_TruthValue_UNKNOWN = Core.Name "UNKNOWN"-data UnsignedLiteral =- UnsignedLiteralNumeric UnsignedNumericLiteral |- UnsignedLiteralGeneral GeneralLiteral- deriving (Eq, Ord, Read, Show)-_UnsignedLiteral = Core.Name "hydra.sql.syntax.UnsignedLiteral"-_UnsignedLiteral_numeric = Core.Name "numeric"-_UnsignedLiteral_general = Core.Name "general"-data UnsignedNumericLiteral =- UnsignedNumericLiteralExact ExactNumericLiteral |- UnsignedNumericLiteralApproximate ApproximateNumericLiteral- deriving (Eq, Ord, Read, Show)-_UnsignedNumericLiteral = Core.Name "hydra.sql.syntax.UnsignedNumericLiteral"-_UnsignedNumericLiteral_exact = Core.Name "exact"-_UnsignedNumericLiteral_approximate = Core.Name "approximate"-data UnsignedValueSpecification =- UnsignedValueSpecificationLiteral UnsignedLiteral |- UnsignedValueSpecificationGeneral GeneralValueSpecification- deriving (Eq, Ord, Read, Show)-_UnsignedValueSpecification = Core.Name "hydra.sql.syntax.UnsignedValueSpecification"-_UnsignedValueSpecification_literal = Core.Name "literal"-_UnsignedValueSpecification_general = Core.Name "general"-newtype UserDefinedTypeValueExpression =- UserDefinedTypeValueExpression {- unUserDefinedTypeValueExpression :: ValueExpressionPrimary}- deriving (Eq, Ord, Read, Show)-_UserDefinedTypeValueExpression = Core.Name "hydra.sql.syntax.UserDefinedTypeValueExpression"-data ValueExpression =- ValueExpressionCommon CommonValueExpression |- ValueExpressionBoolean BooleanValueExpression |- ValueExpressionRow RowValueExpression- deriving (Eq, Ord, Read, Show)-_ValueExpression = Core.Name "hydra.sql.syntax.ValueExpression"-_ValueExpression_common = Core.Name "common"-_ValueExpression_boolean = Core.Name "boolean"-_ValueExpression_row = Core.Name "row"-data ValueExpressionPrimary =- ValueExpressionPrimaryParens ParenthesizedValueExpression |- ValueExpressionPrimaryNoparens NonparenthesizedValueExpressionPrimary- deriving (Eq, Ord, Read, Show)-_ValueExpressionPrimary = Core.Name "hydra.sql.syntax.ValueExpressionPrimary"-_ValueExpressionPrimary_parens = Core.Name "parens"-_ValueExpressionPrimary_noparens = Core.Name "noparens"-newtype WindowFunction =- WindowFunction {- unWindowFunction :: ()}- deriving (Eq, Ord, Read, Show)++-- | A subset of ANSI SQL:2003, capturing selected productions of the BNF grammar provided at https://ronsavage.github.io/SQL/sql-2003-2.bnf.html, which is based on the Final Committee Draft (FCD) of ISO/IEC 9075-2:2003++module Hydra.Sql.Syntax where++import qualified Hydra.Core as Core+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci++-- | An approximate (floating-point) numeric literal, such as 1.5E10+newtype ApproximateNumericLiteral =+ ApproximateNumericLiteral {+ unApproximateNumericLiteral :: String}+ deriving (Eq, Ord, Read, Show)++_ApproximateNumericLiteral = Core.Name "hydra.sql.syntax.ApproximateNumericLiteral"++-- | An approximate numeric type: FLOAT, REAL, or DOUBLE PRECISION+data ApproximateNumericType =+ ApproximateNumericTypeFloat (Maybe Precision) |+ ApproximateNumericTypeReal |+ ApproximateNumericTypeDouble+ deriving (Eq, Ord, Read, Show)++_ApproximateNumericType = Core.Name "hydra.sql.syntax.ApproximateNumericType"++_ApproximateNumericType_float = Core.Name "float"++_ApproximateNumericType_real = Core.Name "real"++_ApproximateNumericType_double = Core.Name "double"++-- | A single element of an array value+newtype ArrayElement =+ ArrayElement {+ unArrayElement :: ValueExpression}+ deriving (Eq, Ord, Read, Show)++_ArrayElement = Core.Name "hydra.sql.syntax.ArrayElement"++-- | A non-empty, comma-separated list of array elements+data ArrayElementList =+ ArrayElementList {+ arrayElementListFirst :: ArrayElement,+ arrayElementListRest :: [ArrayElement]}+ deriving (Eq, Ord, Read, Show)++_ArrayElementList = Core.Name "hydra.sql.syntax.ArrayElementList"++_ArrayElementList_first = Core.Name "first"++_ArrayElementList_rest = Core.Name "rest"++-- | A reference to an element of an array by index+newtype ArrayElementReference =+ ArrayElementReference {+ unArrayElementReference :: ()}+ deriving (Eq, Ord, Read, Show)++_ArrayElementReference = Core.Name "hydra.sql.syntax.ArrayElementReference"++-- | An ARRAY collection type+newtype ArrayType =+ ArrayType {+ unArrayType :: ()}+ deriving (Eq, Ord, Read, Show)++_ArrayType = Core.Name "hydra.sql.syntax.ArrayType"++-- | A constructor for an array value, either by enumeration or by query+data ArrayValueConstructor =+ ArrayValueConstructorEnumeration ArrayValueConstructorByEnumeration |+ ArrayValueConstructorQuery ArrayValueConstructorByQuery+ deriving (Eq, Ord, Read, Show)++_ArrayValueConstructor = Core.Name "hydra.sql.syntax.ArrayValueConstructor"++_ArrayValueConstructor_enumeration = Core.Name "enumeration"++_ArrayValueConstructor_query = Core.Name "query"++-- | An array value constructed by explicitly enumerating its elements+data ArrayValueConstructorByEnumeration =+ ArrayValueConstructorByEnumeration {+ arrayValueConstructorByEnumerationLeftBracketOrTrigraph :: LeftBracketOrTrigraph,+ arrayValueConstructorByEnumerationArrayElementList :: ArrayElementList,+ arrayValueConstructorByEnumerationRightBracketOrTrigraph :: RightBracketOrTrigraph}+ deriving (Eq, Ord, Read, Show)++_ArrayValueConstructorByEnumeration = Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"++_ArrayValueConstructorByEnumeration_LeftBracketOrTrigraph = Core.Name "LeftBracketOrTrigraph"++_ArrayValueConstructorByEnumeration_ArrayElementList = Core.Name "ArrayElementList"++_ArrayValueConstructorByEnumeration_RightBracketOrTrigraph = Core.Name "RightBracketOrTrigraph"++-- | An array value constructed from the result of a query+newtype ArrayValueConstructorByQuery =+ ArrayValueConstructorByQuery {+ unArrayValueConstructorByQuery :: ()}+ deriving (Eq, Ord, Read, Show)++_ArrayValueConstructorByQuery = Core.Name "hydra.sql.syntax.ArrayValueConstructorByQuery"++-- | An expression that evaluates to an array value+newtype ArrayValueExpression =+ ArrayValueExpression {+ unArrayValueExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_ArrayValueExpression = Core.Name "hydra.sql.syntax.ArrayValueExpression"++-- | A clause introducing a table's contents as the result of a subquery+newtype AsSubqueryClause =+ AsSubqueryClause {+ unAsSubqueryClause :: ()}+ deriving (Eq, Ord, Read, Show)++_AsSubqueryClause = Core.Name "hydra.sql.syntax.AsSubqueryClause"++-- | A reference to an attribute or method of a structured value+newtype AttributeOrMethodReference =+ AttributeOrMethodReference {+ unAttributeOrMethodReference :: ()}+ deriving (Eq, Ord, Read, Show)++_AttributeOrMethodReference = Core.Name "hydra.sql.syntax.AttributeOrMethodReference"++-- | A binary large object string type: BINARY LARGE OBJECT or BLOB+data BinaryLargeObjectStringType =+ BinaryLargeObjectStringTypeBinary (Maybe LargeObjectLength) |+ BinaryLargeObjectStringTypeBlob (Maybe LargeObjectLength)+ deriving (Eq, Ord, Read, Show)++_BinaryLargeObjectStringType = Core.Name "hydra.sql.syntax.BinaryLargeObjectStringType"++_BinaryLargeObjectStringType_binary = Core.Name "binary"++_BinaryLargeObjectStringType_blob = Core.Name "blob"++-- | A binary string literal, e.g. X'FF00'+newtype BinaryStringLiteral =+ BinaryStringLiteral {+ unBinaryStringLiteral :: ()}+ deriving (Eq, Ord, Read, Show)++_BinaryStringLiteral = Core.Name "hydra.sql.syntax.BinaryStringLiteral"++-- | A boolean test, optionally negated with NOT+data BooleanFactor =+ BooleanFactor {+ booleanFactorNOT :: (Maybe ()),+ booleanFactorBooleanTest :: BooleanTest}+ deriving (Eq, Ord, Read, Show)++_BooleanFactor = Core.Name "hydra.sql.syntax.BooleanFactor"++_BooleanFactor_NOT = Core.Name "NOT"++_BooleanFactor_BooleanTest = Core.Name "BooleanTest"++-- | A boolean literal: TRUE, FALSE, or UNKNOWN+data BooleanLiteral =+ BooleanLiteralTRUE |+ BooleanLiteralFALSE |+ BooleanLiteralUNKNOWN+ deriving (Eq, Ord, Read, Show)++_BooleanLiteral = Core.Name "hydra.sql.syntax.BooleanLiteral"++_BooleanLiteral_TRUE = Core.Name "TRUE"++_BooleanLiteral_FALSE = Core.Name "FALSE"++_BooleanLiteral_UNKNOWN = Core.Name "UNKNOWN"++-- | An operand of a boolean predicate+newtype BooleanPredicand =+ BooleanPredicand {+ unBooleanPredicand :: ()}+ deriving (Eq, Ord, Read, Show)++_BooleanPredicand = Core.Name "hydra.sql.syntax.BooleanPredicand"++-- | A boolean primary expression: either a predicate or a boolean predicand+data BooleanPrimary =+ BooleanPrimaryPredicate Predicate |+ BooleanPrimaryPredicand BooleanPredicand+ deriving (Eq, Ord, Read, Show)++_BooleanPrimary = Core.Name "hydra.sql.syntax.BooleanPrimary"++_BooleanPrimary_predicate = Core.Name "predicate"++_BooleanPrimary_predicand = Core.Name "predicand"++-- | A boolean term: a factor, or a conjunction of terms with AND+data BooleanTerm =+ BooleanTermFactor BooleanFactor |+ BooleanTermConjunction BooleanTermAnd+ deriving (Eq, Ord, Read, Show)++_BooleanTerm = Core.Name "hydra.sql.syntax.BooleanTerm"++_BooleanTerm_factor = Core.Name "factor"++_BooleanTerm_conjunction = Core.Name "conjunction"++-- | A conjunction of two boolean terms joined by AND+data BooleanTermAnd =+ BooleanTermAnd {+ booleanTermAndLhs :: BooleanTerm,+ booleanTermAndRhs :: BooleanFactor}+ deriving (Eq, Ord, Read, Show)++_BooleanTermAnd = Core.Name "hydra.sql.syntax.BooleanTermAnd"++_BooleanTermAnd_lhs = Core.Name "lhs"++_BooleanTermAnd_rhs = Core.Name "rhs"++-- | A boolean primary, optionally compared against a truth value with IS+data BooleanTest =+ BooleanTest {+ booleanTestBooleanPrimary :: BooleanPrimary,+ booleanTestSequence :: (Maybe BooleanTestSequenceOption)}+ deriving (Eq, Ord, Read, Show)++_BooleanTest = Core.Name "hydra.sql.syntax.BooleanTest"++_BooleanTest_BooleanPrimary = Core.Name "BooleanPrimary"++_BooleanTest_Sequence = Core.Name "Sequence"++-- | The IS [NOT] truth-value suffix of a boolean test+data BooleanTestSequenceOption =+ BooleanTestSequenceOption {+ booleanTestSequenceOptionNOT :: (Maybe ()),+ booleanTestSequenceOptionTruthValue :: TruthValue}+ deriving (Eq, Ord, Read, Show)++_BooleanTestSequenceOption = Core.Name "hydra.sql.syntax.BooleanTestSequenceOption"++_BooleanTestSequenceOption_NOT = Core.Name "NOT"++_BooleanTestSequenceOption_TruthValue = Core.Name "TruthValue"++-- | The BOOLEAN data type+newtype BooleanType =+ BooleanType {+ unBooleanType :: ()}+ deriving (Eq, Ord, Read, Show)++_BooleanType = Core.Name "hydra.sql.syntax.BooleanType"++-- | A boolean value expression: a term, or a disjunction of terms with OR+data BooleanValueExpression =+ BooleanValueExpressionTerm BooleanTerm |+ BooleanValueExpressionDisjunction BooleanValueExpressionOr+ deriving (Eq, Ord, Read, Show)++_BooleanValueExpression = Core.Name "hydra.sql.syntax.BooleanValueExpression"++_BooleanValueExpression_term = Core.Name "term"++_BooleanValueExpression_disjunction = Core.Name "disjunction"++-- | A disjunction of two boolean value expressions joined by OR+data BooleanValueExpressionOr =+ BooleanValueExpressionOr {+ booleanValueExpressionOrLhs :: BooleanValueExpression,+ booleanValueExpressionOrRhs :: BooleanTerm}+ deriving (Eq, Ord, Read, Show)++_BooleanValueExpressionOr = Core.Name "hydra.sql.syntax.BooleanValueExpressionOr"++_BooleanValueExpressionOr_lhs = Core.Name "lhs"++_BooleanValueExpressionOr_rhs = Core.Name "rhs"++-- | A CASE expression, selecting a result from among several alternatives+newtype CaseExpression =+ CaseExpression {+ unCaseExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_CaseExpression = Core.Name "hydra.sql.syntax.CaseExpression"++-- | A CAST expression, converting a value to a specified data type+newtype CastSpecification =+ CastSpecification {+ unCastSpecification :: ()}+ deriving (Eq, Ord, Read, Show)++_CastSpecification = Core.Name "hydra.sql.syntax.CastSpecification"++-- | The name of a character set+newtype CharacterSetSpecification =+ CharacterSetSpecification {+ unCharacterSetSpecification :: ()}+ deriving (Eq, Ord, Read, Show)++_CharacterSetSpecification = Core.Name "hydra.sql.syntax.CharacterSetSpecification"++-- | A character string literal, e.g. 'hello'+newtype CharacterStringLiteral =+ CharacterStringLiteral {+ unCharacterStringLiteral :: String}+ deriving (Eq, Ord, Read, Show)++_CharacterStringLiteral = Core.Name "hydra.sql.syntax.CharacterStringLiteral"++-- | A character string type: CHARACTER, VARCHAR, or CHARACTER LARGE OBJECT+data CharacterStringType =+ CharacterStringTypeCharacter (Maybe Length) |+ CharacterStringTypeChar (Maybe Length) |+ CharacterStringTypeCharacterVarying Length |+ CharacterStringTypeCharVarying Length |+ CharacterStringTypeVarchar Length |+ CharacterStringTypeCharacterLargeObject (Maybe LargeObjectLength) |+ CharacterStringTypeCharLargeObject (Maybe LargeObjectLength) |+ CharacterStringTypeClob (Maybe LargeObjectLength)+ deriving (Eq, Ord, Read, Show)++_CharacterStringType = Core.Name "hydra.sql.syntax.CharacterStringType"++_CharacterStringType_character = Core.Name "character"++_CharacterStringType_char = Core.Name "char"++_CharacterStringType_characterVarying = Core.Name "characterVarying"++_CharacterStringType_charVarying = Core.Name "charVarying"++_CharacterStringType_varchar = Core.Name "varchar"++_CharacterStringType_characterLargeObject = Core.Name "characterLargeObject"++_CharacterStringType_charLargeObject = Core.Name "charLargeObject"++_CharacterStringType_clob = Core.Name "clob"++-- | A COLLATE clause specifying the collation to apply to a character value+newtype CollateClause =+ CollateClause {+ unCollateClause :: ()}+ deriving (Eq, Ord, Read, Show)++_CollateClause = Core.Name "hydra.sql.syntax.CollateClause"++-- | A collection type: ARRAY or MULTISET+data CollectionType =+ CollectionTypeArray ArrayType |+ CollectionTypeMultiset MultisetType+ deriving (Eq, Ord, Read, Show)++_CollectionType = Core.Name "hydra.sql.syntax.CollectionType"++_CollectionType_array = Core.Name "array"++_CollectionType_multiset = Core.Name "multiset"++-- | A constructor for a collection value: an array or multiset constructor+data CollectionValueConstructor =+ CollectionValueConstructorArray ArrayValueConstructor |+ CollectionValueConstructorMultiset MultisetValueConstructor+ deriving (Eq, Ord, Read, Show)++_CollectionValueConstructor = Core.Name "hydra.sql.syntax.CollectionValueConstructor"++_CollectionValueConstructor_array = Core.Name "array"++_CollectionValueConstructor_multiset = Core.Name "multiset"++-- | An expression that evaluates to a collection value+data CollectionValueExpression =+ CollectionValueExpressionArray ArrayValueExpression |+ CollectionValueExpressionMultiset MultisetValueExpression+ deriving (Eq, Ord, Read, Show)++_CollectionValueExpression = Core.Name "hydra.sql.syntax.CollectionValueExpression"++_CollectionValueExpression_array = Core.Name "array"++_CollectionValueExpression_multiset = Core.Name "multiset"++-- | A constraint attached to a single column definition+newtype ColumnConstraintDefinition =+ ColumnConstraintDefinition {+ unColumnConstraintDefinition :: ()}+ deriving (Eq, Ord, Read, Show)++_ColumnConstraintDefinition = Core.Name "hydra.sql.syntax.ColumnConstraintDefinition"++-- | The definition of a single column within a table definition+data ColumnDefinition =+ ColumnDefinition {+ columnDefinitionName :: ColumnName,+ columnDefinitionTypeOrDomain :: (Maybe ColumnDefinitionTypeOrDomainOption),+ columnDefinitionRefScope :: (Maybe ReferenceScopeCheck),+ columnDefinitionDefaultOrIdentityOrGeneration :: (Maybe ColumnDefinitionDefaultOrIdentityOrGenerationOption),+ columnDefinitionConstraints :: [ColumnConstraintDefinition],+ columnDefinitionCollate :: (Maybe CollateClause)}+ deriving (Eq, Ord, Read, Show)++_ColumnDefinition = Core.Name "hydra.sql.syntax.ColumnDefinition"++_ColumnDefinition_name = Core.Name "name"++_ColumnDefinition_typeOrDomain = Core.Name "typeOrDomain"++_ColumnDefinition_refScope = Core.Name "refScope"++_ColumnDefinition_defaultOrIdentityOrGeneration = Core.Name "defaultOrIdentityOrGeneration"++_ColumnDefinition_constraints = Core.Name "constraints"++_ColumnDefinition_collate = Core.Name "collate"++-- | A column's default value, identity, or generation specification+data ColumnDefinitionDefaultOrIdentityOrGenerationOption =+ ColumnDefinitionDefaultOrIdentityOrGenerationOptionDefaultClause DefaultClause |+ ColumnDefinitionDefaultOrIdentityOrGenerationOptionIdentityColumnSpecification IdentityColumnSpecification |+ ColumnDefinitionDefaultOrIdentityOrGenerationOptionGenerationClause GenerationClause+ deriving (Eq, Ord, Read, Show)++_ColumnDefinitionDefaultOrIdentityOrGenerationOption =+ Core.Name "hydra.sql.syntax.ColumnDefinitionDefaultOrIdentityOrGenerationOption"++_ColumnDefinitionDefaultOrIdentityOrGenerationOption_DefaultClause = Core.Name "DefaultClause"++_ColumnDefinitionDefaultOrIdentityOrGenerationOption_IdentityColumnSpecification =+ Core.Name "IdentityColumnSpecification"++_ColumnDefinitionDefaultOrIdentityOrGenerationOption_GenerationClause = Core.Name "GenerationClause"++-- | A column's declared data type or domain+data ColumnDefinitionTypeOrDomainOption =+ ColumnDefinitionTypeOrDomainOptionDataType DataType |+ ColumnDefinitionTypeOrDomainOptionDomainName DomainName+ deriving (Eq, Ord, Read, Show)++_ColumnDefinitionTypeOrDomainOption = Core.Name "hydra.sql.syntax.ColumnDefinitionTypeOrDomainOption"++_ColumnDefinitionTypeOrDomainOption_DataType = Core.Name "DataType"++_ColumnDefinitionTypeOrDomainOption_DomainName = Core.Name "DomainName"++-- | The name of a table column+newtype ColumnName =+ ColumnName {+ unColumnName :: String}+ deriving (Eq, Ord, Read, Show)++_ColumnName = Core.Name "hydra.sql.syntax.ColumnName"++-- | A non-empty, comma-separated list of column names+data ColumnNameList =+ ColumnNameList {+ columnNameListFirst :: ColumnName,+ columnNameListRest :: [ColumnName]}+ deriving (Eq, Ord, Read, Show)++_ColumnNameList = Core.Name "hydra.sql.syntax.ColumnNameList"++_ColumnNameList_first = Core.Name "first"++_ColumnNameList_rest = Core.Name "rest"++-- | The WITH OPTIONS clause of a column definition inherited via LIKE+newtype ColumnOptions =+ ColumnOptions {+ unColumnOptions :: ()}+ deriving (Eq, Ord, Read, Show)++_ColumnOptions = Core.Name "hydra.sql.syntax.ColumnOptions"++-- | A reference to a column, optionally qualified by a table or correlation name+newtype ColumnReference =+ ColumnReference {+ unColumnReference :: ()}+ deriving (Eq, Ord, Read, Show)++_ColumnReference = Core.Name "hydra.sql.syntax.ColumnReference"++-- | A value expression common to numeric, string, datetime, interval, user-defined, reference, and collection types+data CommonValueExpression =+ CommonValueExpressionNumeric NumericValueExpression |+ CommonValueExpressionString StringValueExpression |+ CommonValueExpressionDatetime DatetimeValueExpression |+ CommonValueExpressionInterval IntervalValueExpression |+ CommonValueExpressionUserDefined UserDefinedTypeValueExpression |+ CommonValueExpressionReference ReferenceValueExpression |+ CommonValueExpressionCollection CollectionValueExpression+ deriving (Eq, Ord, Read, Show)++_CommonValueExpression = Core.Name "hydra.sql.syntax.CommonValueExpression"++_CommonValueExpression_numeric = Core.Name "numeric"++_CommonValueExpression_string = Core.Name "string"++_CommonValueExpression_datetime = Core.Name "datetime"++_CommonValueExpression_interval = Core.Name "interval"++_CommonValueExpression_userDefined = Core.Name "userDefined"++_CommonValueExpression_reference = Core.Name "reference"++_CommonValueExpression_collection = Core.Name "collection"++-- | A row value constructor whose element types are inferred from context+newtype ContextuallyTypedRowValueConstructor =+ ContextuallyTypedRowValueConstructor {+ unContextuallyTypedRowValueConstructor :: ()}+ deriving (Eq, Ord, Read, Show)++_ContextuallyTypedRowValueConstructor = Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueConstructor"++-- | A contextually typed row value expression: a special case or a constructor+data ContextuallyTypedRowValueExpression =+ ContextuallyTypedRowValueExpressionSpecialCase RowValueSpecialCase |+ ContextuallyTypedRowValueExpressionConstructor ContextuallyTypedRowValueConstructor+ deriving (Eq, Ord, Read, Show)++_ContextuallyTypedRowValueExpression = Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpression"++_ContextuallyTypedRowValueExpression_specialCase = Core.Name "specialCase"++_ContextuallyTypedRowValueExpression_constructor = Core.Name "constructor"++-- | A non-empty, comma-separated list of contextually typed row value expressions+data ContextuallyTypedRowValueExpressionList =+ ContextuallyTypedRowValueExpressionList {+ contextuallyTypedRowValueExpressionListFirst :: ContextuallyTypedRowValueExpression,+ contextuallyTypedRowValueExpressionListRest :: [ContextuallyTypedRowValueExpression]}+ deriving (Eq, Ord, Read, Show)++_ContextuallyTypedRowValueExpressionList = Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"++_ContextuallyTypedRowValueExpressionList_first = Core.Name "first"++_ContextuallyTypedRowValueExpressionList_rest = Core.Name "rest"++-- | A table value constructor built from a list of contextually typed row values+newtype ContextuallyTypedTableValueConstructor =+ ContextuallyTypedTableValueConstructor {+ unContextuallyTypedTableValueConstructor :: ContextuallyTypedRowValueExpressionList}+ deriving (Eq, Ord, Read, Show)++_ContextuallyTypedTableValueConstructor = Core.Name "hydra.sql.syntax.ContextuallyTypedTableValueConstructor"++-- | A data type: predefined, row, named, reference, or collection+data DataType =+ DataTypePredefined PredefinedType |+ DataTypeRow RowType |+ DataTypeNamed PathResolvedUserDefinedTypeName |+ DataTypeReference ReferenceType |+ DataTypeCollection CollectionType+ deriving (Eq, Ord, Read, Show)++_DataType = Core.Name "hydra.sql.syntax.DataType"++_DataType_predefined = Core.Name "predefined"++_DataType_row = Core.Name "row"++_DataType_named = Core.Name "named"++_DataType_reference = Core.Name "reference"++_DataType_collection = Core.Name "collection"++-- | A DATE literal+newtype DateLiteral =+ DateLiteral {+ unDateLiteral :: DateString}+ deriving (Eq, Ord, Read, Show)++_DateLiteral = Core.Name "hydra.sql.syntax.DateLiteral"++-- | The string representation of a date literal, e.g. '2003-01-01'+newtype DateString =+ DateString {+ unDateString :: ()}+ deriving (Eq, Ord, Read, Show)++_DateString = Core.Name "hydra.sql.syntax.DateString"++-- | A datetime literal: a date, time, or timestamp literal+data DatetimeLiteral =+ DatetimeLiteralDate DateLiteral |+ DatetimeLiteralTime TimeLiteral |+ DatetimeLiteralTimestamp TimestampLiteral+ deriving (Eq, Ord, Read, Show)++_DatetimeLiteral = Core.Name "hydra.sql.syntax.DatetimeLiteral"++_DatetimeLiteral_date = Core.Name "date"++_DatetimeLiteral_time = Core.Name "time"++_DatetimeLiteral_timestamp = Core.Name "timestamp"++-- | A datetime type: DATE, TIME, or TIMESTAMP+newtype DatetimeType =+ DatetimeType {+ unDatetimeType :: ()}+ deriving (Eq, Ord, Read, Show)++_DatetimeType = Core.Name "hydra.sql.syntax.DatetimeType"++-- | An expression that evaluates to a datetime value+newtype DatetimeValueExpression =+ DatetimeValueExpression {+ unDatetimeValueExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_DatetimeValueExpression = Core.Name "hydra.sql.syntax.DatetimeValueExpression"++-- | A DEFAULT clause specifying a column's default value+newtype DefaultClause =+ DefaultClause {+ unDefaultClause :: ()}+ deriving (Eq, Ord, Read, Show)++_DefaultClause = Core.Name "hydra.sql.syntax.DefaultClause"++-- | The name of a user-defined domain+newtype DomainName =+ DomainName {+ unDomainName :: String}+ deriving (Eq, Ord, Read, Show)++_DomainName = Core.Name "hydra.sql.syntax.DomainName"++-- | An exact numeric literal, such as an integer or fixed-point decimal+newtype ExactNumericLiteral =+ ExactNumericLiteral {+ unExactNumericLiteral :: String}+ deriving (Eq, Ord, Read, Show)++_ExactNumericLiteral = Core.Name "hydra.sql.syntax.ExactNumericLiteral"++-- | An exact numeric type: NUMERIC, DECIMAL, DEC, SMALLINT, INTEGER, INT, or BIGINT+data ExactNumericType =+ ExactNumericTypeNumeric (Maybe ExactNumericTypeNumericOption) |+ ExactNumericTypeDecimal (Maybe ExactNumericTypeDecimalOption) |+ ExactNumericTypeDec (Maybe ExactNumericTypeDecOption) |+ ExactNumericTypeSmallint |+ ExactNumericTypeInteger |+ ExactNumericTypeInt |+ ExactNumericTypeBigint+ deriving (Eq, Ord, Read, Show)++_ExactNumericType = Core.Name "hydra.sql.syntax.ExactNumericType"++_ExactNumericType_numeric = Core.Name "numeric"++_ExactNumericType_decimal = Core.Name "decimal"++_ExactNumericType_dec = Core.Name "dec"++_ExactNumericType_smallint = Core.Name "smallint"++_ExactNumericType_integer = Core.Name "integer"++_ExactNumericType_int = Core.Name "int"++_ExactNumericType_bigint = Core.Name "bigint"++-- | The precision and optional scale of a DEC type+data ExactNumericTypeDecOption =+ ExactNumericTypeDecOption {+ exactNumericTypeDecOptionPrecision :: Precision,+ exactNumericTypeDecOptionSequence :: (Maybe Scale)}+ deriving (Eq, Ord, Read, Show)++_ExactNumericTypeDecOption = Core.Name "hydra.sql.syntax.ExactNumericTypeDecOption"++_ExactNumericTypeDecOption_Precision = Core.Name "Precision"++_ExactNumericTypeDecOption_Sequence = Core.Name "Sequence"++-- | The precision and optional scale of a DECIMAL type+data ExactNumericTypeDecimalOption =+ ExactNumericTypeDecimalOption {+ exactNumericTypeDecimalOptionPrecision :: Precision,+ exactNumericTypeDecimalOptionSequence :: (Maybe Scale)}+ deriving (Eq, Ord, Read, Show)++_ExactNumericTypeDecimalOption = Core.Name "hydra.sql.syntax.ExactNumericTypeDecimalOption"++_ExactNumericTypeDecimalOption_Precision = Core.Name "Precision"++_ExactNumericTypeDecimalOption_Sequence = Core.Name "Sequence"++-- | The precision and optional scale of a NUMERIC type+data ExactNumericTypeNumericOption =+ ExactNumericTypeNumericOption {+ exactNumericTypeNumericOptionPrecision :: Precision,+ exactNumericTypeNumericOptionSequence :: (Maybe Scale)}+ deriving (Eq, Ord, Read, Show)++_ExactNumericTypeNumericOption = Core.Name "hydra.sql.syntax.ExactNumericTypeNumericOption"++_ExactNumericTypeNumericOption_Precision = Core.Name "Precision"++_ExactNumericTypeNumericOption_Sequence = Core.Name "Sequence"++-- | A reference to a field of a row or structured value+newtype FieldReference =+ FieldReference {+ unFieldReference :: ()}+ deriving (Eq, Ord, Read, Show)++_FieldReference = Core.Name "hydra.sql.syntax.FieldReference"++-- | An INSERT source specified by an explicit value constructor, with optional column list and override clause+data FromConstructor =+ FromConstructor {+ fromConstructorColumns :: (Maybe InsertColumnList),+ fromConstructorOverride :: (Maybe OverrideClause),+ fromConstructorValues :: ContextuallyTypedTableValueConstructor}+ deriving (Eq, Ord, Read, Show)++_FromConstructor = Core.Name "hydra.sql.syntax.FromConstructor"++_FromConstructor_columns = Core.Name "columns"++_FromConstructor_override = Core.Name "override"++_FromConstructor_values = Core.Name "values"++-- | An INSERT source specified as DEFAULT VALUES+newtype FromDefault =+ FromDefault {+ unFromDefault :: ()}+ deriving (Eq, Ord, Read, Show)++_FromDefault = Core.Name "hydra.sql.syntax.FromDefault"++-- | An INSERT source specified as the result of a subquery+newtype FromSubquery =+ FromSubquery {+ unFromSubquery :: ()}+ deriving (Eq, Ord, Read, Show)++_FromSubquery = Core.Name "hydra.sql.syntax.FromSubquery"++-- | A general literal: a string, datetime, interval, or boolean literal+data GeneralLiteral =+ GeneralLiteralString CharacterStringLiteral |+ GeneralLiteralNationalString NationalCharacterStringLiteral |+ GeneralLiteralUnicode UnicodeCharacterStringLiteral |+ GeneralLiteralBinary BinaryStringLiteral |+ GeneralLiteralDateTime DatetimeLiteral |+ GeneralLiteralInterval IntervalLiteral |+ GeneralLiteralBoolean BooleanLiteral+ deriving (Eq, Ord, Read, Show)++_GeneralLiteral = Core.Name "hydra.sql.syntax.GeneralLiteral"++_GeneralLiteral_string = Core.Name "string"++_GeneralLiteral_nationalString = Core.Name "nationalString"++_GeneralLiteral_unicode = Core.Name "unicode"++_GeneralLiteral_binary = Core.Name "binary"++_GeneralLiteral_dateTime = Core.Name "dateTime"++_GeneralLiteral_interval = Core.Name "interval"++_GeneralLiteral_boolean = Core.Name "boolean"++-- | A general value specification, such as a parameter or dynamic value+newtype GeneralValueSpecification =+ GeneralValueSpecification {+ unGeneralValueSpecification :: ()}+ deriving (Eq, Ord, Read, Show)++_GeneralValueSpecification = Core.Name "hydra.sql.syntax.GeneralValueSpecification"++-- | A GENERATED ALWAYS AS clause for a computed column+newtype GenerationClause =+ GenerationClause {+ unGenerationClause :: ()}+ deriving (Eq, Ord, Read, Show)++_GenerationClause = Core.Name "hydra.sql.syntax.GenerationClause"++-- | The GLOBAL or LOCAL qualifier of a temporary table scope+data GlobalOrLocal =+ GlobalOrLocalGlobal |+ GlobalOrLocalLocal+ deriving (Eq, Ord, Read, Show)++_GlobalOrLocal = Core.Name "hydra.sql.syntax.GlobalOrLocal"++_GlobalOrLocal_global = Core.Name "global"++_GlobalOrLocal_local = Core.Name "local"++-- | A GENERATED ... AS IDENTITY column specification+newtype IdentityColumnSpecification =+ IdentityColumnSpecification {+ unIdentityColumnSpecification :: ()}+ deriving (Eq, Ord, Read, Show)++_IdentityColumnSpecification = Core.Name "hydra.sql.syntax.IdentityColumnSpecification"++-- | The parenthesized list of target column names in an INSERT statement+newtype InsertColumnList =+ InsertColumnList {+ unInsertColumnList :: ColumnNameList}+ deriving (Eq, Ord, Read, Show)++_InsertColumnList = Core.Name "hydra.sql.syntax.InsertColumnList"++-- | The column list and value source of an INSERT statement: a subquery, constructor, or default+data InsertColumnsAndSource =+ InsertColumnsAndSourceSubquery FromSubquery |+ InsertColumnsAndSourceConstructor FromConstructor |+ InsertColumnsAndSourceDefault FromDefault+ deriving (Eq, Ord, Read, Show)++_InsertColumnsAndSource = Core.Name "hydra.sql.syntax.InsertColumnsAndSource"++_InsertColumnsAndSource_subquery = Core.Name "subquery"++_InsertColumnsAndSource_constructor = Core.Name "constructor"++_InsertColumnsAndSource_default = Core.Name "default"++-- | An ANSI SQL INSERT statement+data InsertStatement =+ InsertStatement {+ insertStatementTarget :: InsertionTarget,+ insertStatementColumnsAndSource :: InsertColumnsAndSource}+ deriving (Eq, Ord, Read, Show)++_InsertStatement = Core.Name "hydra.sql.syntax.InsertStatement"++_InsertStatement_target = Core.Name "target"++_InsertStatement_columnsAndSource = Core.Name "columnsAndSource"++-- | The table into which an INSERT statement inserts rows+newtype InsertionTarget =+ InsertionTarget {+ unInsertionTarget :: TableName}+ deriving (Eq, Ord, Read, Show)++_InsertionTarget = Core.Name "hydra.sql.syntax.InsertionTarget"++-- | An INTERVAL literal+newtype IntervalLiteral =+ IntervalLiteral {+ unIntervalLiteral :: ()}+ deriving (Eq, Ord, Read, Show)++_IntervalLiteral = Core.Name "hydra.sql.syntax.IntervalLiteral"++-- | The INTERVAL data type+newtype IntervalType =+ IntervalType {+ unIntervalType :: ()}+ deriving (Eq, Ord, Read, Show)++_IntervalType = Core.Name "hydra.sql.syntax.IntervalType"++-- | An expression that evaluates to an interval value+newtype IntervalValueExpression =+ IntervalValueExpression {+ unIntervalValueExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_IntervalValueExpression = Core.Name "hydra.sql.syntax.IntervalValueExpression"++-- | The length specification of a large object type, e.g. 1K, 1M, or 1G+newtype LargeObjectLength =+ LargeObjectLength {+ unLargeObjectLength :: ()}+ deriving (Eq, Ord, Read, Show)++_LargeObjectLength = Core.Name "hydra.sql.syntax.LargeObjectLength"++-- | A left square bracket, or its trigraph equivalent ??(+newtype LeftBracketOrTrigraph =+ LeftBracketOrTrigraph {+ unLeftBracketOrTrigraph :: String}+ deriving (Eq, Ord, Read, Show)++_LeftBracketOrTrigraph = Core.Name "hydra.sql.syntax.LeftBracketOrTrigraph"++-- | The length specification of a character or binary string type+newtype Length =+ Length {+ unLength :: UnsignedInteger}+ deriving (Eq, Ord, Read, Show)++_Length = Core.Name "hydra.sql.syntax.Length"++-- | A LIKE clause, copying column definitions from another table+newtype LikeClause =+ LikeClause {+ unLikeClause :: ()}+ deriving (Eq, Ord, Read, Show)++_LikeClause = Core.Name "hydra.sql.syntax.LikeClause"++-- | An invocation of a method on a structured value+newtype MethodInvocation =+ MethodInvocation {+ unMethodInvocation :: ()}+ deriving (Eq, Ord, Read, Show)++_MethodInvocation = Core.Name "hydra.sql.syntax.MethodInvocation"++-- | A reference to an element of a multiset by way of the ELEMENT function+newtype MultisetElementReference =+ MultisetElementReference {+ unMultisetElementReference :: ()}+ deriving (Eq, Ord, Read, Show)++_MultisetElementReference = Core.Name "hydra.sql.syntax.MultisetElementReference"++-- | A MULTISET collection type over a given element data type+newtype MultisetType =+ MultisetType {+ unMultisetType :: DataType}+ deriving (Eq, Ord, Read, Show)++_MultisetType = Core.Name "hydra.sql.syntax.MultisetType"++-- | A constructor for a multiset value+newtype MultisetValueConstructor =+ MultisetValueConstructor {+ unMultisetValueConstructor :: ()}+ deriving (Eq, Ord, Read, Show)++_MultisetValueConstructor = Core.Name "hydra.sql.syntax.MultisetValueConstructor"++-- | An expression that evaluates to a multiset value+newtype MultisetValueExpression =+ MultisetValueExpression {+ unMultisetValueExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_MultisetValueExpression = Core.Name "hydra.sql.syntax.MultisetValueExpression"++-- | A national character string literal, e.g. N'hello'+newtype NationalCharacterStringLiteral =+ NationalCharacterStringLiteral {+ unNationalCharacterStringLiteral :: ()}+ deriving (Eq, Ord, Read, Show)++_NationalCharacterStringLiteral = Core.Name "hydra.sql.syntax.NationalCharacterStringLiteral"++-- | A national character string type: NATIONAL CHARACTER or NATIONAL CHARACTER VARYING+newtype NationalCharacterStringType =+ NationalCharacterStringType {+ unNationalCharacterStringType :: ()}+ deriving (Eq, Ord, Read, Show)++_NationalCharacterStringType = Core.Name "hydra.sql.syntax.NationalCharacterStringType"++-- | A NEW invocation, constructing an instance of a structured type+newtype NewSpecification =+ NewSpecification {+ unNewSpecification :: ()}+ deriving (Eq, Ord, Read, Show)++_NewSpecification = Core.Name "hydra.sql.syntax.NewSpecification"++-- | A NEXT VALUE FOR expression, retrieving the next value of a sequence generator+newtype NextValueExpression =+ NextValueExpression {+ unNextValueExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_NextValueExpression = Core.Name "hydra.sql.syntax.NextValueExpression"++-- | A value expression primary that does not begin with a parenthesis+data NonparenthesizedValueExpressionPrimary =+ NonparenthesizedValueExpressionPrimaryUnsigned UnsignedValueSpecification |+ NonparenthesizedValueExpressionPrimaryColumn ColumnReference |+ NonparenthesizedValueExpressionPrimarySetFunction SetFunctionSpecification |+ NonparenthesizedValueExpressionPrimaryWindowFunction WindowFunction |+ NonparenthesizedValueExpressionPrimaryScalarSubquery ScalarSubquery |+ NonparenthesizedValueExpressionPrimaryCases CaseExpression |+ NonparenthesizedValueExpressionPrimaryCast CastSpecification |+ NonparenthesizedValueExpressionPrimaryField FieldReference |+ NonparenthesizedValueExpressionPrimarySubtype SubtypeTreatment |+ NonparenthesizedValueExpressionPrimaryMethod MethodInvocation |+ NonparenthesizedValueExpressionPrimaryStaticMethod StaticMethodInvocation |+ NonparenthesizedValueExpressionPrimaryNew NewSpecification |+ NonparenthesizedValueExpressionPrimaryAttributeOrMethod AttributeOrMethodReference |+ NonparenthesizedValueExpressionPrimaryReference ReferenceResolution |+ NonparenthesizedValueExpressionPrimaryCollection CollectionValueConstructor |+ NonparenthesizedValueExpressionPrimaryArrayElement ArrayElementReference |+ NonparenthesizedValueExpressionPrimaryMultisetElement MultisetElementReference |+ NonparenthesizedValueExpressionPrimaryRoutine RoutineInvocation |+ NonparenthesizedValueExpressionPrimaryNext NextValueExpression+ deriving (Eq, Ord, Read, Show)++_NonparenthesizedValueExpressionPrimary = Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"++_NonparenthesizedValueExpressionPrimary_unsigned = Core.Name "unsigned"++_NonparenthesizedValueExpressionPrimary_column = Core.Name "column"++_NonparenthesizedValueExpressionPrimary_setFunction = Core.Name "setFunction"++_NonparenthesizedValueExpressionPrimary_windowFunction = Core.Name "windowFunction"++_NonparenthesizedValueExpressionPrimary_scalarSubquery = Core.Name "scalarSubquery"++_NonparenthesizedValueExpressionPrimary_cases = Core.Name "cases"++_NonparenthesizedValueExpressionPrimary_cast = Core.Name "cast"++_NonparenthesizedValueExpressionPrimary_field = Core.Name "field"++_NonparenthesizedValueExpressionPrimary_subtype = Core.Name "subtype"++_NonparenthesizedValueExpressionPrimary_method = Core.Name "method"++_NonparenthesizedValueExpressionPrimary_staticMethod = Core.Name "staticMethod"++_NonparenthesizedValueExpressionPrimary_new = Core.Name "new"++_NonparenthesizedValueExpressionPrimary_attributeOrMethod = Core.Name "attributeOrMethod"++_NonparenthesizedValueExpressionPrimary_reference = Core.Name "reference"++_NonparenthesizedValueExpressionPrimary_collection = Core.Name "collection"++_NonparenthesizedValueExpressionPrimary_arrayElement = Core.Name "arrayElement"++_NonparenthesizedValueExpressionPrimary_multisetElement = Core.Name "multisetElement"++_NonparenthesizedValueExpressionPrimary_routine = Core.Name "routine"++_NonparenthesizedValueExpressionPrimary_next = Core.Name "next"++-- | A numeric type: exact or approximate+data NumericType =+ NumericTypeExact ExactNumericType |+ NumericTypeApproximate ApproximateNumericType+ deriving (Eq, Ord, Read, Show)++_NumericType = Core.Name "hydra.sql.syntax.NumericType"++_NumericType_exact = Core.Name "exact"++_NumericType_approximate = Core.Name "approximate"++-- | An expression that evaluates to a numeric value+newtype NumericValueExpression =+ NumericValueExpression {+ unNumericValueExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_NumericValueExpression = Core.Name "hydra.sql.syntax.NumericValueExpression"++-- | An OVERRIDING USER VALUE or OVERRIDING SYSTEM VALUE clause of an INSERT statement+data OverrideClause =+ OverrideClauseOVERRIDINGspUSERspVALUE |+ OverrideClauseOVERRIDINGspSYSTEMspVALUE+ deriving (Eq, Ord, Read, Show)++_OverrideClause = Core.Name "hydra.sql.syntax.OverrideClause"++_OverrideClause_OVERRIDINGspUSERspVALUE = Core.Name "OVERRIDINGspUSERspVALUE"++_OverrideClause_OVERRIDINGspSYSTEMspVALUE = Core.Name "OVERRIDINGspSYSTEMspVALUE"++-- | A value expression enclosed in parentheses+newtype ParenthesizedValueExpression =+ ParenthesizedValueExpression {+ unParenthesizedValueExpression :: ValueExpression}+ deriving (Eq, Ord, Read, Show)++_ParenthesizedValueExpression = Core.Name "hydra.sql.syntax.ParenthesizedValueExpression"++-- | A user-defined type name, resolved against the current schema path+newtype PathResolvedUserDefinedTypeName =+ PathResolvedUserDefinedTypeName {+ unPathResolvedUserDefinedTypeName :: String}+ deriving (Eq, Ord, Read, Show)++_PathResolvedUserDefinedTypeName = Core.Name "hydra.sql.syntax.PathResolvedUserDefinedTypeName"++-- | The precision of a numeric type, as an unsigned integer+newtype Precision =+ Precision {+ unPrecision :: UnsignedInteger}+ deriving (Eq, Ord, Read, Show)++_Precision = Core.Name "hydra.sql.syntax.Precision"++-- | A predefined data type: string, numeric, boolean, datetime, or interval+data PredefinedType =+ PredefinedTypeStringType PredefinedTypeString |+ PredefinedTypeNationalStringType PredefinedTypeNationalString |+ PredefinedTypeBlob BinaryLargeObjectStringType |+ PredefinedTypeNumeric NumericType |+ PredefinedTypeBoolean BooleanType |+ PredefinedTypeDatetime DatetimeType |+ PredefinedTypeInterval IntervalType+ deriving (Eq, Ord, Read, Show)++_PredefinedType = Core.Name "hydra.sql.syntax.PredefinedType"++_PredefinedType_stringType = Core.Name "stringType"++_PredefinedType_nationalStringType = Core.Name "nationalStringType"++_PredefinedType_blob = Core.Name "blob"++_PredefinedType_numeric = Core.Name "numeric"++_PredefinedType_boolean = Core.Name "boolean"++_PredefinedType_datetime = Core.Name "datetime"++_PredefinedType_interval = Core.Name "interval"++-- | A national character string type together with an optional COLLATE clause+data PredefinedTypeNationalString =+ PredefinedTypeNationalString {+ predefinedTypeNationalStringType :: NationalCharacterStringType,+ predefinedTypeNationalStringCollate :: (Maybe CollateClause)}+ deriving (Eq, Ord, Read, Show)++_PredefinedTypeNationalString = Core.Name "hydra.sql.syntax.PredefinedTypeNationalString"++_PredefinedTypeNationalString_type = Core.Name "type"++_PredefinedTypeNationalString_collate = Core.Name "collate"++-- | A character string type together with an optional character set and COLLATE clause+data PredefinedTypeString =+ PredefinedTypeString {+ predefinedTypeStringType :: CharacterStringType,+ predefinedTypeStringCharacters :: (Maybe CharacterSetSpecification),+ predefinedTypeStringCollate :: (Maybe CollateClause)}+ deriving (Eq, Ord, Read, Show)++_PredefinedTypeString = Core.Name "hydra.sql.syntax.PredefinedTypeString"++_PredefinedTypeString_type = Core.Name "type"++_PredefinedTypeString_characters = Core.Name "characters"++_PredefinedTypeString_collate = Core.Name "collate"++-- | A predicate, evaluating to a boolean truth value+newtype Predicate =+ Predicate {+ unPredicate :: ()}+ deriving (Eq, Ord, Read, Show)++_Predicate = Core.Name "hydra.sql.syntax.Predicate"++-- | A query expression, such as a SELECT statement possibly combined with set operators+newtype QueryExpression =+ QueryExpression {+ unQueryExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_QueryExpression = Core.Name "hydra.sql.syntax.QueryExpression"++-- | The DEREF operator, resolving a reference to the value it targets+newtype ReferenceResolution =+ ReferenceResolution {+ unReferenceResolution :: ()}+ deriving (Eq, Ord, Read, Show)++_ReferenceResolution = Core.Name "hydra.sql.syntax.ReferenceResolution"++-- | A REFERENCES ARE [NOT] CHECKED clause on a reference-typed column+newtype ReferenceScopeCheck =+ ReferenceScopeCheck {+ unReferenceScopeCheck :: ()}+ deriving (Eq, Ord, Read, Show)++_ReferenceScopeCheck = Core.Name "hydra.sql.syntax.ReferenceScopeCheck"++-- | A REF reference type over a given referenced type+newtype ReferenceType =+ ReferenceType {+ unReferenceType :: ()}+ deriving (Eq, Ord, Read, Show)++_ReferenceType = Core.Name "hydra.sql.syntax.ReferenceType"++-- | An expression that evaluates to a reference value+newtype ReferenceValueExpression =+ ReferenceValueExpression {+ unReferenceValueExpression :: ValueExpressionPrimary}+ deriving (Eq, Ord, Read, Show)++_ReferenceValueExpression = Core.Name "hydra.sql.syntax.ReferenceValueExpression"++-- | A right square bracket, or its trigraph equivalent ??)+newtype RightBracketOrTrigraph =+ RightBracketOrTrigraph {+ unRightBracketOrTrigraph :: String}+ deriving (Eq, Ord, Read, Show)++_RightBracketOrTrigraph = Core.Name "hydra.sql.syntax.RightBracketOrTrigraph"++-- | An invocation of a user-defined SQL routine+newtype RoutineInvocation =+ RoutineInvocation {+ unRoutineInvocation :: ()}+ deriving (Eq, Ord, Read, Show)++_RoutineInvocation = Core.Name "hydra.sql.syntax.RoutineInvocation"++-- | A ROW type, defined by a list of field name and data type pairs+newtype RowType =+ RowType {+ unRowType :: ()}+ deriving (Eq, Ord, Read, Show)++_RowType = Core.Name "hydra.sql.syntax.RowType"++-- | An expression that evaluates to a row value+newtype RowValueExpression =+ RowValueExpression {+ unRowValueExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_RowValueExpression = Core.Name "hydra.sql.syntax.RowValueExpression"++-- | A row value expressed as a single nonparenthesized value expression+newtype RowValueSpecialCase =+ RowValueSpecialCase {+ unRowValueSpecialCase :: NonparenthesizedValueExpressionPrimary}+ deriving (Eq, Ord, Read, Show)++_RowValueSpecialCase = Core.Name "hydra.sql.syntax.RowValueSpecialCase"++-- | A subquery that returns exactly one row and one column+newtype ScalarSubquery =+ ScalarSubquery {+ unScalarSubquery :: Subquery}+ deriving (Eq, Ord, Read, Show)++_ScalarSubquery = Core.Name "hydra.sql.syntax.ScalarSubquery"++-- | The scale of a numeric type, as an unsigned integer+newtype Scale =+ Scale {+ unScale :: UnsignedInteger}+ deriving (Eq, Ord, Read, Show)++_Scale = Core.Name "hydra.sql.syntax.Scale"++-- | A REF IS clause identifying a table's self-referencing column+newtype SelfReferencingColumnSpecification =+ SelfReferencingColumnSpecification {+ unSelfReferencingColumnSpecification :: ()}+ deriving (Eq, Ord, Read, Show)++_SelfReferencingColumnSpecification = Core.Name "hydra.sql.syntax.SelfReferencingColumnSpecification"++-- | A set (aggregate) function invocation, such as COUNT or SUM+newtype SetFunctionSpecification =+ SetFunctionSpecification {+ unSetFunctionSpecification :: ()}+ deriving (Eq, Ord, Read, Show)++_SetFunctionSpecification = Core.Name "hydra.sql.syntax.SetFunctionSpecification"++-- | An invocation of a static method on a user-defined type+newtype StaticMethodInvocation =+ StaticMethodInvocation {+ unStaticMethodInvocation :: ()}+ deriving (Eq, Ord, Read, Show)++_StaticMethodInvocation = Core.Name "hydra.sql.syntax.StaticMethodInvocation"++-- | An expression that evaluates to a character, binary, or Unicode string value+newtype StringValueExpression =+ StringValueExpression {+ unStringValueExpression :: ()}+ deriving (Eq, Ord, Read, Show)++_StringValueExpression = Core.Name "hydra.sql.syntax.StringValueExpression"++-- | A parenthesized query expression used as an operand+newtype Subquery =+ Subquery {+ unSubquery :: QueryExpression}+ deriving (Eq, Ord, Read, Show)++_Subquery = Core.Name "hydra.sql.syntax.Subquery"++-- | An UNDER clause declaring a table as a subtable of a supertable+newtype SubtableClause =+ SubtableClause {+ unSubtableClause :: ()}+ deriving (Eq, Ord, Read, Show)++_SubtableClause = Core.Name "hydra.sql.syntax.SubtableClause"++-- | A TREAT AS expression, treating a value as an instance of a subtype+newtype SubtypeTreatment =+ SubtypeTreatment {+ unSubtypeTreatment :: ()}+ deriving (Eq, Ord, Read, Show)++_SubtypeTreatment = Core.Name "hydra.sql.syntax.SubtypeTreatment"++-- | The ON COMMIT action of a temporary table: PRESERVE ROWS or DELETE ROWS+data TableCommitAction =+ TableCommitActionPreserve |+ TableCommitActionDelete+ deriving (Eq, Ord, Read, Show)++_TableCommitAction = Core.Name "hydra.sql.syntax.TableCommitAction"++_TableCommitAction_preserve = Core.Name "preserve"++_TableCommitAction_delete = Core.Name "delete"++-- | A table-level constraint definition+newtype TableConstraintDefinition =+ TableConstraintDefinition {+ unTableConstraintDefinition :: ()}+ deriving (Eq, Ord, Read, Show)++_TableConstraintDefinition = Core.Name "hydra.sql.syntax.TableConstraintDefinition"++-- | The source of a table's contents: an element list, a supertable, or a query+data TableContentsSource =+ TableContentsSourceList TableElementList |+ TableContentsSourceSubtableOf TableContentsSourceSubtable |+ TableContentsSourceSubquery AsSubqueryClause+ deriving (Eq, Ord, Read, Show)++_TableContentsSource = Core.Name "hydra.sql.syntax.TableContentsSource"++_TableContentsSource_list = Core.Name "list"++_TableContentsSource_subtableOf = Core.Name "subtableOf"++_TableContentsSource_subquery = Core.Name "subquery"++-- | A table's contents defined as a subtable of a named user-defined type+data TableContentsSourceSubtable =+ TableContentsSourceSubtable {+ tableContentsSourceSubtableType :: PathResolvedUserDefinedTypeName,+ tableContentsSourceSubtableSubtable :: (Maybe SubtableClause),+ tableContentsSourceSubtableElements :: (Maybe TableElementList)}+ deriving (Eq, Ord, Read, Show)++_TableContentsSourceSubtable = Core.Name "hydra.sql.syntax.TableContentsSourceSubtable"++_TableContentsSourceSubtable_type = Core.Name "type"++_TableContentsSourceSubtable_subtable = Core.Name "subtable"++_TableContentsSourceSubtable_elements = Core.Name "elements"++-- | An ANSI SQL CREATE TABLE statement+data TableDefinition =+ TableDefinition {+ tableDefinitionScope :: (Maybe TableScope),+ tableDefinitionName :: TableName,+ tableDefinitionSource :: TableContentsSource,+ tableDefinitionCommitActions :: (Maybe TableCommitAction)}+ deriving (Eq, Ord, Read, Show)++_TableDefinition = Core.Name "hydra.sql.syntax.TableDefinition"++_TableDefinition_scope = Core.Name "scope"++_TableDefinition_name = Core.Name "name"++_TableDefinition_source = Core.Name "source"++_TableDefinition_commitActions = Core.Name "commitActions"++-- | An element of a table definition: a column, constraint, LIKE clause, or related option+data TableElement =+ TableElementColumn ColumnDefinition |+ TableElementTableConstraint TableConstraintDefinition |+ TableElementLike LikeClause |+ TableElementSelfReferencingColumn SelfReferencingColumnSpecification |+ TableElementColumOptions ColumnOptions+ deriving (Eq, Ord, Read, Show)++_TableElement = Core.Name "hydra.sql.syntax.TableElement"++_TableElement_column = Core.Name "column"++_TableElement_tableConstraint = Core.Name "tableConstraint"++_TableElement_like = Core.Name "like"++_TableElement_selfReferencingColumn = Core.Name "selfReferencingColumn"++_TableElement_columOptions = Core.Name "columOptions"++-- | A non-empty, comma-separated list of table elements+data TableElementList =+ TableElementList {+ tableElementListFirst :: TableElement,+ tableElementListRest :: [TableElement]}+ deriving (Eq, Ord, Read, Show)++_TableElementList = Core.Name "hydra.sql.syntax.TableElementList"++_TableElementList_first = Core.Name "first"++_TableElementList_rest = Core.Name "rest"++-- | The name of a table+newtype TableName =+ TableName {+ unTableName :: String}+ deriving (Eq, Ord, Read, Show)++_TableName = Core.Name "hydra.sql.syntax.TableName"++-- | The GLOBAL or LOCAL TEMPORARY scope of a table definition+newtype TableScope =+ TableScope {+ unTableScope :: GlobalOrLocal}+ deriving (Eq, Ord, Read, Show)++_TableScope = Core.Name "hydra.sql.syntax.TableScope"++-- | A TIME literal+newtype TimeLiteral =+ TimeLiteral {+ unTimeLiteral :: TimeString}+ deriving (Eq, Ord, Read, Show)++_TimeLiteral = Core.Name "hydra.sql.syntax.TimeLiteral"++-- | The string representation of a time literal, e.g. '12:00:00'+newtype TimeString =+ TimeString {+ unTimeString :: ()}+ deriving (Eq, Ord, Read, Show)++_TimeString = Core.Name "hydra.sql.syntax.TimeString"++-- | A timestamp literal, combining a date and a time+newtype TimestampLiteral =+ TimestampLiteral {+ unTimestampLiteral :: ()}+ deriving (Eq, Ord, Read, Show)++_TimestampLiteral = Core.Name "hydra.sql.syntax.TimestampLiteral"++-- | A three-valued logic truth value: TRUE, FALSE, or UNKNOWN+data TruthValue =+ TruthValueTRUE |+ TruthValueFALSE |+ TruthValueUNKNOWN+ deriving (Eq, Ord, Read, Show)++_TruthValue = Core.Name "hydra.sql.syntax.TruthValue"++_TruthValue_TRUE = Core.Name "TRUE"++_TruthValue_FALSE = Core.Name "FALSE"++_TruthValue_UNKNOWN = Core.Name "UNKNOWN"++-- | A Unicode character string literal, e.g. U&'hello'+newtype UnicodeCharacterStringLiteral =+ UnicodeCharacterStringLiteral {+ unUnicodeCharacterStringLiteral :: ()}+ deriving (Eq, Ord, Read, Show)++_UnicodeCharacterStringLiteral = Core.Name "hydra.sql.syntax.UnicodeCharacterStringLiteral"++-- | An unsigned integer literal+newtype UnsignedInteger =+ UnsignedInteger {+ unUnsignedInteger :: String}+ deriving (Eq, Ord, Read, Show)++_UnsignedInteger = Core.Name "hydra.sql.syntax.UnsignedInteger"++-- | An unsigned literal: a numeric or general literal+data UnsignedLiteral =+ UnsignedLiteralNumeric UnsignedNumericLiteral |+ UnsignedLiteralGeneral GeneralLiteral+ deriving (Eq, Ord, Read, Show)++_UnsignedLiteral = Core.Name "hydra.sql.syntax.UnsignedLiteral"++_UnsignedLiteral_numeric = Core.Name "numeric"++_UnsignedLiteral_general = Core.Name "general"++-- | An unsigned numeric literal: exact or approximate+data UnsignedNumericLiteral =+ UnsignedNumericLiteralExact ExactNumericLiteral |+ UnsignedNumericLiteralApproximate ApproximateNumericLiteral+ deriving (Eq, Ord, Read, Show)++_UnsignedNumericLiteral = Core.Name "hydra.sql.syntax.UnsignedNumericLiteral"++_UnsignedNumericLiteral_exact = Core.Name "exact"++_UnsignedNumericLiteral_approximate = Core.Name "approximate"++-- | An unsigned value specification: a literal or a general value specification+data UnsignedValueSpecification =+ UnsignedValueSpecificationLiteral UnsignedLiteral |+ UnsignedValueSpecificationGeneral GeneralValueSpecification+ deriving (Eq, Ord, Read, Show)++_UnsignedValueSpecification = Core.Name "hydra.sql.syntax.UnsignedValueSpecification"++_UnsignedValueSpecification_literal = Core.Name "literal"++_UnsignedValueSpecification_general = Core.Name "general"++-- | An expression that evaluates to a value of a user-defined type+newtype UserDefinedTypeValueExpression =+ UserDefinedTypeValueExpression {+ unUserDefinedTypeValueExpression :: ValueExpressionPrimary}+ deriving (Eq, Ord, Read, Show)++_UserDefinedTypeValueExpression = Core.Name "hydra.sql.syntax.UserDefinedTypeValueExpression"++-- | A value expression: common, boolean, or row-valued+data ValueExpression =+ ValueExpressionCommon CommonValueExpression |+ ValueExpressionBoolean BooleanValueExpression |+ ValueExpressionRow RowValueExpression+ deriving (Eq, Ord, Read, Show)++_ValueExpression = Core.Name "hydra.sql.syntax.ValueExpression"++_ValueExpression_common = Core.Name "common"++_ValueExpression_boolean = Core.Name "boolean"++_ValueExpression_row = Core.Name "row"++-- | A value expression primary, optionally parenthesized+data ValueExpressionPrimary =+ ValueExpressionPrimaryParens ParenthesizedValueExpression |+ ValueExpressionPrimaryNoparens NonparenthesizedValueExpressionPrimary+ deriving (Eq, Ord, Read, Show)++_ValueExpressionPrimary = Core.Name "hydra.sql.syntax.ValueExpressionPrimary"++_ValueExpressionPrimary_parens = Core.Name "parens"++_ValueExpressionPrimary_noparens = Core.Name "noparens"++-- | A window function invocation, such as ROW_NUMBER() OVER (...)+newtype WindowFunction =+ WindowFunction {+ unWindowFunction :: ()}+ deriving (Eq, Ord, Read, Show)+ _WindowFunction = Core.Name "hydra.sql.syntax.WindowFunction"
src/main/haskell/Hydra/Stac/Items.hs view
@@ -1,13 +1,16 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | A model for SpatioTemporal Asset Catalog (STAC) Items. See https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md module Hydra.Stac.Items where+ import qualified Hydra.Core as Core import qualified Hydra.Geojson.Model as Model import qualified Hydra.Iana.Linkrelations as Linkrelations import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci import qualified Data.Map as M+ -- | An Asset is an object that contains a URI to data associated with the Item that can be downloaded or streamed. It is allowed to add additional fields. data Asset = Asset {@@ -22,12 +25,19 @@ -- | The semantic roles of the asset, similar to the use of rel in links. assetRoles :: [Role]} deriving (Eq, Ord, Read, Show)+ _Asset = Core.Name "hydra.stac.items.Asset"+ _Asset_href = Core.Name "href"+ _Asset_title = Core.Name "title"+ _Asset_description = Core.Name "description"+ _Asset_type = Core.Name "type"+ _Asset_roles = Core.Name "roles"+ -- | This object describes a STAC Item. The fields id, type, bbox, geometry and properties are inherited from GeoJSON. data Item = Item {@@ -43,13 +53,21 @@ -- | The id of the STAC Collection this Item references to (see collection relation type). This field is required if such a relation type is present and is not allowed otherwise. This field provides an easy way for a user to search for any Items that belong in a specified Collection. Must be a non-empty string. itemCollection :: (Maybe Model.Id)} deriving (Eq, Ord, Read, Show)+ _Item = Core.Name "hydra.stac.items.Item"+ _Item_feature = Core.Name "feature"+ _Item_stacVersion = Core.Name "stacVersion"+ _Item_stacExtensions = Core.Name "stacExtensions"+ _Item_links = Core.Name "links"+ _Item_assets = Core.Name "assets"+ _Item_collection = Core.Name "collection"+ -- | This object describes a relationship with another entity. Data providers are advised to be liberal with the links section, to describe things like the Catalog an Item is in, related Items, parent or child Items (modeled in different ways, like an 'acquisition' or derived data). It is allowed to add additional fields such as a title and type. data Link = Link {@@ -62,26 +80,40 @@ -- | A human readable title to be used in rendered displays of the link. linkTitle :: (Maybe String)} deriving (Eq, Ord, Read, Show)+ _Link = Core.Name "hydra.stac.items.Link"+ _Link_href = Core.Name "href"+ _Link_rel = Core.Name "rel"+ _Link_type = Core.Name "type"+ _Link_title = Core.Name "title"++-- | An IANA media type (MIME type) string identifying the format of an asset or linked resource newtype MediaType = MediaType { unMediaType :: String} deriving (Eq, Ord, Read, Show)+ _MediaType = Core.Name "hydra.stac.items.MediaType"+ -- | STAC Items use a variety of rel types in the link object, to describe the exact nature of the link between this Item and the entity it is linking to. It is recommended to use the official IANA Link Relation Types where possible. The following table explains places where STAC use custom rel types are used with Items. This happens where there is not a clear official option, or where STAC uses an official type but adds additional meaning for the STAC context. data RelationType = RelationTypeIana Linkrelations.LinkRelationType | RelationTypeStac StacRelationType | RelationTypeOther String deriving (Eq, Ord, Read, Show)+ _RelationType = Core.Name "hydra.stac.items.RelationType"+ _RelationType_iana = Core.Name "iana"+ _RelationType_stac = Core.Name "stac"+ _RelationType_other = Core.Name "other"+ -- | The roles field is used to describe the purpose of each asset. It is recommended to include one for every asset, to give users a sense of why they might want to make use of the asset. There are some emerging standards that enable clients to take particular action when they encounter particular roles, listed below. But implementors are encouraged to come up with their own terms to describe the role. data Role = -- | An asset that represents a thumbnail of the Item, typically a true color image (for Items with assets in the visible wavelengths), lower-resolution (typically smaller 600x600 pixels), and typically a JPEG or PNG (suitable for display in a web browser). Multiple assets may have this purpose, but it recommended that the type and roles be unique tuples. For example, Sentinel-2 L2A provides thumbnail images in both JPEG and JPEG2000 formats, and would be distinguished by their media types.@@ -94,12 +126,20 @@ RoleMetadata | RoleOther String deriving (Eq, Ord, Read, Show)+ _Role = Core.Name "hydra.stac.items.Role"+ _Role_thumbnail = Core.Name "thumbnail"+ _Role_overview = Core.Name "overview"+ _Role_data = Core.Name "data"+ _Role_metadata = Core.Name "metadata"+ _Role_other = Core.Name "other"++-- | A STAC-specific link relation type used to describe relationships between STAC entities data StacRelationType = -- | STRONGLY RECOMMENDED. Absolute URL to the Item if it is available at a public URL. This is particularly useful when in a download package that includes metadata, so that the downstream user can know where the data has come from. StacRelationTypeSelf |@@ -112,24 +152,39 @@ -- | URL to a STAC Item that was used as input data in the creation of this Item. StacRelationTypeDerivedFrom deriving (Eq, Ord, Read, Show)+ _StacRelationType = Core.Name "hydra.stac.items.StacRelationType"+ _StacRelationType_self = Core.Name "self"+ _StacRelationType_root = Core.Name "root"+ _StacRelationType_parent = Core.Name "parent"+ _StacRelationType_collection = Core.Name "collection"+ _StacRelationType_derivedFrom = Core.Name "derivedFrom"++-- | The version of the STAC specification that an Item implements newtype StacVersion = StacVersion { unStacVersion :: String} deriving (Eq, Ord, Read, Show)+ _StacVersion = Core.Name "hydra.stac.items.StacVersion"++-- | A URI string, used for asset and other resource references newtype Uri = Uri { unUri :: String} deriving (Eq, Ord, Read, Show)+ _Uri = Core.Name "hydra.stac.items.Uri"++-- | A URL string, used for links to related entities newtype Url = Url { unUrl :: String} deriving (Eq, Ord, Read, Show)+ _Url = Core.Name "hydra.stac.items.Url"
src/main/haskell/Hydra/Workflow.hs view
@@ -1,12 +1,15 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | A model for Hydra transformation workflows module Hydra.Workflow where+ import qualified Hydra.Core as Core import qualified Hydra.Graph as Graph import qualified Hydra.Packaging as Packaging import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | The specification of a Hydra schema, provided as a set of modules and a distinguished type data HydraSchemaSpec = HydraSchemaSpec {@@ -15,9 +18,13 @@ -- | The name of the top-level type; all data which passes through the workflow will be instances of this type hydraSchemaSpecTypeName :: Core.Name} deriving (Eq, Ord, Read, Show)+ _HydraSchemaSpec = Core.Name "hydra.workflow.HydraSchemaSpec"+ _HydraSchemaSpec_modules = Core.Name "modules"+ _HydraSchemaSpec_typeName = Core.Name "typeName"+ -- | The specification of a schema at the source end of a workflow data SchemaSpec = -- | A native Hydra schema@@ -27,10 +34,15 @@ -- | A schema which will be provided within the workflow SchemaSpecProvided deriving (Eq, Ord, Read, Show)+ _SchemaSpec = Core.Name "hydra.workflow.SchemaSpec"+ _SchemaSpec_hydra = Core.Name "hydra"+ _SchemaSpec_file = Core.Name "file"+ _SchemaSpec_provided = Core.Name "provided"+ -- | The specification of a workflow which takes a schema specification, reads data from a directory, and writes data to another directory data TransformWorkflow = TransformWorkflow {@@ -43,8 +55,13 @@ -- | The destination directory transformWorkflowDestDir :: String} deriving (Eq, Ord, Read, Show)+ _TransformWorkflow = Core.Name "hydra.workflow.TransformWorkflow"+ _TransformWorkflow_name = Core.Name "name"+ _TransformWorkflow_schemaSpec = Core.Name "schemaSpec"+ _TransformWorkflow_srcDir = Core.Name "srcDir"+ _TransformWorkflow_destDir = Core.Name "destDir"
src/main/haskell/Hydra/Yaml/Coder.hs view
@@ -1,16 +1,22 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | YAML encoding and decoding for Hydra terms module Hydra.Yaml.Coder where+ import qualified Hydra.Adapt as Adapt import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Core as ExtractCore+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as JsonModel import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers@@ -26,12 +32,15 @@ import qualified Hydra.Packaging as Packaging import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths+import qualified Hydra.Print.Core as PrintCore import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational-import qualified Hydra.Show.Core as ShowCore import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -42,6 +51,7 @@ import qualified Hydra.Yaml.Model as YamlModel import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Decode a YAML value to a record term decodeRecord :: Core.Name -> [(Core.FieldType, (Coders.Coder Core.Term YamlModel.Node Errors.Error))] -> YamlModel.Node -> Either Errors.Error Core.Term decodeRecord tname coders n =@@ -54,7 +64,7 @@ coder_ = Pairs.second coder fname = Core.fieldTypeName ft defaultValue = YamlModel.NodeScalar YamlModel.ScalarNull- yamlValue = Optionals.fromOptional defaultValue (Maps.lookup (YamlModel.NodeScalar (YamlModel.ScalarStr (Core.unName fname))) m)+ yamlValue = Optionals.withDefault defaultValue (Maps.lookup (YamlModel.NodeScalar (YamlModel.ScalarStr (Core.unName fname))) m) in (Eithers.bind (Coders.coderDecode coder_ yamlValue) (\v -> Right (Core.Field { Core.fieldName = fname, Core.fieldTerm = v})))@@ -64,6 +74,7 @@ in case n of YamlModel.NodeMapping v0 -> decodeObjectBody v0 _ -> Left (Errors.ErrorOther (Errors.OtherError "expected mapping"))+ -- | Encode a record term to YAML encodeRecord :: [(Core.FieldType, (Coders.Coder Core.Term YamlModel.Node Errors.Error))] -> Graph.Graph -> Core.Term -> Either Errors.Error YamlModel.Node encodeRecord coders graph term =@@ -86,7 +97,8 @@ in (Logic.ifElse (isMaybeNothing ft fvalue) (Right Nothing) (Eithers.bind (Coders.coderEncode coder_ fvalue) (\encoded -> Right (Just (YamlModel.NodeScalar (YamlModel.ScalarStr (Core.unName fname)), encoded))))) in (Eithers.bind (ExtractCore.termRecord graph stripped) (\record -> let fields = Core.recordFields record- in (Eithers.bind (Eithers.mapList encodeField (Lists.zip coders fields)) (\maybeFields -> Right (YamlModel.NodeMapping (Maps.fromList (Optionals.cat maybeFields)))))))+ in (Eithers.bind (Eithers.mapList encodeField (Lists.zip coders fields)) (\maybeFields -> Right (YamlModel.NodeMapping (Maps.fromList (Optionals.givens maybeFields)))))))+ -- | Create a YAML coder for literal types literalYamlCoder :: Core.LiteralType -> Either t0 (Coders.Coder Core.Literal YamlModel.Scalar Errors.Error) literalYamlCoder lt =@@ -94,30 +106,30 @@ let decodeBool = \s -> case s of YamlModel.ScalarBool v0 -> Right (Core.LiteralBoolean v0)- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected boolean, found scalar"]))) decodeDecimal = \s -> case s of YamlModel.ScalarDecimal v0 -> Right (Core.LiteralDecimal v0) YamlModel.ScalarFloat v0 -> Right (Core.LiteralDecimal (LibLiterals.float64ToDecimal v0)) YamlModel.ScalarInt v0 -> Right (Core.LiteralDecimal (LibLiterals.bigintToDecimal v0))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected decimal, found scalar"]))) decodeFloat = \s -> case s of YamlModel.ScalarDecimal v0 -> Right (Core.LiteralFloat (Core.FloatValueFloat64 (LibLiterals.decimalToFloat64 v0))) YamlModel.ScalarFloat v0 -> Right (Core.LiteralFloat (Core.FloatValueFloat64 v0))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected float, found scalar"]))) decodeInteger = \s -> case s of YamlModel.ScalarInt v0 -> Right (Core.LiteralInteger (Core.IntegerValueBigint v0))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected integer, found scalar"]))) decodeString = \s -> case s of YamlModel.ScalarStr v0 -> Right (Core.LiteralString v0)- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected string, found scalar"]))) encoded = case lt of@@ -134,7 +146,7 @@ Core.FloatValueFloat32 v1 -> LibLiterals.float32ToFloat64 v1 Core.FloatValueFloat64 v1 -> v1 shown = LibLiterals.showFloat64 bf- in (Logic.ifElse (requiresYamlStringSentinel shown) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ in (Logic.ifElse (requiresYamlStringSentinel shown) (Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "YAML cannot represent float value: ", shown])))) (Right (YamlModel.ScalarFloat bf))))), Coders.coderDecode = decodeFloat}@@ -145,6 +157,7 @@ Coders.coderEncode = (\lit -> Eithers.bind (ExtractCore.stringLiteral lit) (\s -> Right (YamlModel.ScalarStr s))), Coders.coderDecode = decodeString} in (Right encoded)+ -- | Create a YAML coder for record types recordCoder :: Core.Name -> [Core.FieldType] -> t0 -> Graph.Graph -> Either Errors.Error (Coders.Coder Core.Term YamlModel.Node Errors.Error) recordCoder tname rt cx g =@@ -153,10 +166,12 @@ in (Eithers.bind (Eithers.mapList getCoder rt) (\coders -> Right (Coders.Coder { Coders.coderEncode = (\term -> encodeRecord coders g term), Coders.coderDecode = (\val -> decodeRecord tname coders val)})))+ -- | True for IEEE sentinel strings that Hydra YAML cannot represent as a float scalar. requiresYamlStringSentinel :: String -> Bool requiresYamlStringSentinel s = Logic.or (Equality.equal s "NaN") (Logic.or (Equality.equal s "Infinity") (Logic.or (Equality.equal s "-Infinity") (Equality.equal s "-0.0")))+ -- | Create a YAML coder for term types termCoder :: Core.Type -> t0 -> Graph.Graph -> Either Errors.Error (Coders.Coder Core.Term YamlModel.Node Errors.Error) termCoder typ cx g =@@ -165,27 +180,27 @@ encodeLiteral = \ac -> \term -> case term of Core.TermLiteral v0 -> Eithers.bind (Coders.coderEncode ac v0) (\scalar -> Right (YamlModel.NodeScalar scalar))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected literal term, found: ",- (ShowCore.term term)])))+ (PrintCore.term term)]))) encodeList = \lc -> \term -> case term of Core.TermList v0 -> Eithers.bind (Eithers.mapList (\el -> Coders.coderEncode lc el) v0) (\encodedEls -> Right (YamlModel.NodeSequence encodedEls))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected list term, found: ",- (ShowCore.term term)])))+ (PrintCore.term term)]))) decodeList = \lc -> \n -> case n of YamlModel.NodeSequence v0 -> Eithers.bind (Eithers.mapList (\node -> Coders.coderDecode lc node) v0) (\decodedNodes -> Right (Core.TermList decodedNodes)) _ -> Left (Errors.ErrorOther (Errors.OtherError "expected sequence")) encodeMaybe =- \maybeElementCoder -> \optionalTerm ->- let strippedMaybeTerm = Strip.deannotateTerm optionalTerm+ \maybeElementCoder -> \maybeTerm ->+ let strippedMaybeTerm = Strip.deannotateTerm maybeTerm in case strippedMaybeTerm of Core.TermOptional v0 -> Optionals.cases v0 (Right (YamlModel.NodeScalar YamlModel.ScalarNull)) (\innerTerm -> Eithers.bind (Coders.coderEncode maybeElementCoder innerTerm) (\encodedInner -> Right encodedInner))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected optional term, found: ",- (ShowCore.term optionalTerm)])))+ (PrintCore.term maybeTerm)]))) decodeMaybe = \maybeElementCoder -> \yamlVal -> case yamlVal of YamlModel.NodeScalar v0 -> case v0 of@@ -219,9 +234,9 @@ in (Right (Coders.Coder { Coders.coderEncode = (\term -> case term of Core.TermMap v1 -> Eithers.bind (Eithers.mapList (\entry -> encodeEntry entry) (Maps.toList v1)) (\entries -> Right (YamlModel.NodeMapping (Maps.fromList entries)))- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected map term, found: ",- (ShowCore.term term)])))),+ (PrintCore.term term)])))), Coders.coderDecode = (\n -> case n of YamlModel.NodeMapping v1 -> Eithers.bind (Eithers.mapList (\entry -> decodeEntry entry) (Maps.toList v1)) (\entries -> Right (Core.TermMap (Maps.fromList entries))) _ -> Left (Errors.ErrorOther (Errors.OtherError "expected mapping")))})))))@@ -230,10 +245,11 @@ Coders.coderDecode = (decodeMaybe maybeElementCoder)})) Core.TypeRecord v0 -> recordCoder (Core.Name "yaml") v0 cx g Core.TypeUnit -> Right unitCoder- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "unsupported type in YAML: ",- (ShowCore.type_ typ)])))+ (PrintCore.type_ typ)]))) in result+ -- | YAML coder for unit values unitCoder :: Coders.Coder Core.Term YamlModel.Node Errors.Error unitCoder =@@ -244,15 +260,16 @@ encodeUnit = \term -> case (Strip.deannotateTerm term) of Core.TermUnit -> Right (YamlModel.NodeScalar YamlModel.ScalarNull)- _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [+ _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.concat [ "expected unit, found: ",- (ShowCore.term term)])))+ (PrintCore.term term)]))) decodeUnit = \n -> case n of YamlModel.NodeScalar v0 -> case v0 of YamlModel.ScalarNull -> Right Core.TermUnit _ -> Left (Errors.ErrorOther (Errors.OtherError "expected null scalar")) _ -> Left (Errors.ErrorOther (Errors.OtherError "expected null"))+ -- | Create a YAML coder for a given type yamlCoder :: Core.Type -> t0 -> Graph.Graph -> Either Errors.Error (Coders.Coder Core.Term YamlModel.Node Errors.Error) yamlCoder typ cx g =
src/main/haskell/Hydra/Yaml/Language.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Language constraints for YAML module Hydra.Yaml.Language where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets@@ -16,10 +22,13 @@ import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational import qualified Hydra.Strip as Strip+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -28,6 +37,7 @@ import qualified Hydra.Variants as Variants import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Language constraints for YAML yamlLanguage :: Coders.Language yamlLanguage =@@ -39,7 +49,23 @@ Coders.languageConstraintsIntegerTypes = integerTypes, Coders.languageConstraintsTermVariants = termVariants, Coders.languageConstraintsTypeVariants = typeVariants,- Coders.languageConstraintsTypes = typePredicate}}+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeaturePartialApplication,+ Coders.LanguageFeatureNestedCaseStatements,+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "yaml")} where literalVariants = Sets.fromList [
src/main/haskell/Hydra/Yaml/Serde.hs view
@@ -1,14 +1,20 @@ -- Note: this is an automatically generated file. Do not edit.+ -- | Native YAML serialization: YAML Node to String module Hydra.Yaml.Serde where+ import qualified Hydra.Ast as Ast import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs import qualified Hydra.Error.Checking as Checking import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem import qualified Hydra.Errors as Errors+import qualified Hydra.File as File import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as JsonModel import qualified Hydra.Overlay.Haskell.Lib.Chars as Chars@@ -18,15 +24,19 @@ import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals+import qualified Hydra.Overlay.Haskell.Lib.Ordering as Ordering import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings import qualified Hydra.Packaging as Packaging import qualified Hydra.Parsing as Parsing import qualified Hydra.Paths as Paths import qualified Hydra.Query as Query+import qualified Hydra.Regex as Regex import qualified Hydra.Relational as Relational+import qualified Hydra.System as System import qualified Hydra.Tabular as Tabular import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time import qualified Hydra.Topology as Topology import qualified Hydra.Typed as Typed import qualified Hydra.Typing as Typing@@ -36,6 +46,7 @@ import qualified Hydra.Yaml.Model as YamlModel import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.Scientific as Sci+ -- | Escape single quotes by doubling them escapeSingleQuotes :: String -> String escapeSingleQuotes s =@@ -45,22 +56,26 @@ squote, squote] [ c])))+ -- | Check if a string has leading or trailing whitespace hasLeadingTrailingSpace :: String -> Bool hasLeadingTrailingSpace s = let chars = Strings.toList s- in (Logic.or (Optionals.fromOptional False (Optionals.map (\c -> Chars.isSpace c) (Lists.maybeHead chars))) (Optionals.fromOptional False (Optionals.map (\c -> Chars.isSpace c) (Lists.maybeLast chars))))+ in (Logic.or (Optionals.withDefault False (Optionals.map (\c -> Chars.isSpace c) (Lists.head chars))) (Optionals.withDefault False (Optionals.map (\c -> Chars.isSpace c) (Lists.last chars))))+ -- | Serialize a YAML node to a string hydraYamlToString :: YamlModel.Node -> String hydraYamlToString node = writeNode node+ -- | Indent all lines of a string by 2 spaces indentString :: String -> String indentString s =- Strings.cat (Lists.map (\line -> Logic.ifElse (Strings.null line) "" (Strings.cat [+ Strings.concat (Lists.map (\line -> Logic.ifElse (Strings.null line) "" (Strings.concat [ " ", line, "\n"])) (Strings.lines s))+ -- | Check if character codes represent a decimal number isDecimalString :: [Int] -> Bool isDecimalString chars =@@ -72,28 +87,31 @@ in (Logic.ifElse (Lists.null before) False (Logic.ifElse (Lists.null afterWithDot) False ( let after = Lists.drop 1 afterWithDot in (Logic.ifElse (Lists.null after) False (- let isDigitFn = \c -> Logic.and (Equality.gte c 48) (Equality.lte c 57)+ let isDigitFn = \c -> Logic.and (Ordering.gte c 48) (Ordering.lte c 57) in (Logic.and (Lists.null (Lists.filter (\c -> Logic.not (isDigitFn c)) before)) (Lists.null (Lists.filter (\c -> Logic.not (isDigitFn c)) after))))))))+ -- | Check if a string looks like a number looksLikeNumber :: String -> Bool looksLikeNumber s = let chars = Strings.toList s- in (Optionals.fromOptional False (Optionals.map (\p ->+ in (Optionals.withDefault False (Optionals.map (\p -> let firstCh = Pairs.first p tailCh = Pairs.second p rest = Logic.ifElse (Equality.equal firstCh 45) tailCh chars- isDigitFn = \c -> Logic.and (Equality.gte c 48) (Equality.lte c 57)+ isDigitFn = \c -> Logic.and (Ordering.gte c 48) (Ordering.lte c 57) allDigits = Logic.and (Logic.not (Lists.null rest)) (Lists.null (Lists.filter (\c -> Logic.not (isDigitFn c)) rest)) in (Logic.ifElse allDigits True (isDecimalString rest))) (Lists.uncons chars)))+ -- | Check if a string needs quoting in YAML needsQuoting :: String -> Bool needsQuoting s =- Logic.ifElse (Strings.null s) True (Logic.ifElse (Lists.elem s yamlReservedWords) True (Logic.ifElse (looksLikeNumber s) True (+ Logic.ifElse (Strings.null s) True (Logic.ifElse (Lists.member s yamlReservedWords) True (Logic.ifElse (looksLikeNumber s) True ( let chars = Strings.toList s specials = Strings.toList yamlSpecialChars- hasSpecial = Logic.not (Lists.null (Lists.filter (\c -> Lists.elem c specials) chars))+ hasSpecial = Logic.not (Lists.null (Lists.filter (\c -> Lists.member c specials) chars)) in (Logic.ifElse hasSpecial True (hasLeadingTrailingSpace s)))))+ -- | Write a mapping entry in block style writeMappingEntry :: (YamlModel.Node, YamlModel.Node) -> String writeMappingEntry entry =@@ -101,23 +119,24 @@ let key = Pairs.first entry value = Pairs.second entry in case value of- YamlModel.NodeScalar v0 -> Strings.cat [+ YamlModel.NodeScalar v0 -> Strings.concat [ writeNodeInline key, ": ", (writeScalar v0), "\n"]- YamlModel.NodeSequence v0 -> Logic.ifElse (Lists.null v0) (Strings.cat [+ YamlModel.NodeSequence v0 -> Logic.ifElse (Lists.null v0) (Strings.concat [ writeNodeInline key,- ": []\n"]) (Strings.cat [+ ": []\n"]) (Strings.concat [ writeNodeInline key, ":\n", (indentString (writeNode value))])- YamlModel.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) (Strings.cat [+ YamlModel.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) (Strings.concat [ writeNodeInline key,- ": {}\n"]) (Strings.cat [+ ": {}\n"]) (Strings.concat [ writeNodeInline key, ":\n", (indentString (writeNode value))])+ -- | Write a mapping entry for the first item of a sequence element writeMappingEntryInline :: (YamlModel.Node, YamlModel.Node) -> String writeMappingEntryInline entry =@@ -125,49 +144,52 @@ let key = Pairs.first entry value = Pairs.second entry in case value of- YamlModel.NodeScalar v0 -> Strings.cat [+ YamlModel.NodeScalar v0 -> Strings.concat [ writeNodeInline key, ": ", (writeScalar v0), "\n"]- YamlModel.NodeSequence v0 -> Logic.ifElse (Lists.null v0) (Strings.cat [+ YamlModel.NodeSequence v0 -> Logic.ifElse (Lists.null v0) (Strings.concat [ writeNodeInline key,- ": []\n"]) (Strings.cat [+ ": []\n"]) (Strings.concat [ writeNodeInline key, ":\n", (indentString (writeNode value))])- YamlModel.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) (Strings.cat [+ YamlModel.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) (Strings.concat [ writeNodeInline key,- ": {}\n"]) (Strings.cat [+ ": {}\n"]) (Strings.concat [ writeNodeInline key, ":\n", (indentString (writeNode value))])+ -- | Write a YAML node as a top-level value in block style writeNode :: YamlModel.Node -> String writeNode node = case node of- YamlModel.NodeScalar v0 -> Strings.cat2 (writeScalar v0) "\n"- YamlModel.NodeSequence v0 -> Logic.ifElse (Lists.null v0) "[]\n" (Strings.cat (Lists.map (\item -> writeSequenceItem item) v0))- YamlModel.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) "{}\n" (Strings.cat (Lists.map (\e -> writeMappingEntry e) (Maps.toList v0)))+ YamlModel.NodeScalar v0 -> Strings.concat2 (writeScalar v0) "\n"+ YamlModel.NodeSequence v0 -> Logic.ifElse (Lists.null v0) "[]\n" (Strings.concat (Lists.map (\item -> writeSequenceItem item) v0))+ YamlModel.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) "{}\n" (Strings.concat (Lists.map (\e -> writeMappingEntry e) (Maps.toList v0)))+ -- | Write a node inline (for use as a mapping key) writeNodeInline :: YamlModel.Node -> String writeNodeInline node = case node of YamlModel.NodeScalar v0 -> writeScalar v0- YamlModel.NodeSequence v0 -> Strings.cat [+ YamlModel.NodeSequence v0 -> Strings.concat [ "[",- (Strings.intercalate ", " (Lists.map (\item -> writeNodeInline item) v0)),+ (Strings.join ", " (Lists.map (\item -> writeNodeInline item) v0)), "]"] YamlModel.NodeMapping v0 -> let writeFlowEntry =- \e -> Strings.cat [+ \e -> Strings.concat [ writeNodeInline (Pairs.first e), ": ", (writeNodeInline (Pairs.second e))]- in (Strings.cat [+ in (Strings.concat [ "{",- (Strings.intercalate ", " (Lists.map writeFlowEntry (Maps.toList v0))),+ (Strings.join ", " (Lists.map writeFlowEntry (Maps.toList v0))), "}"])+ -- | Write a scalar value writeScalar :: YamlModel.Scalar -> String writeScalar s =@@ -178,33 +200,36 @@ YamlModel.ScalarInt v0 -> Literals.showBigint v0 YamlModel.ScalarNull -> "null" YamlModel.ScalarStr v0 -> writeString v0+ -- | Write a sequence item in block style writeSequenceItem :: YamlModel.Node -> String writeSequenceItem node = case node of- YamlModel.NodeScalar v0 -> Strings.cat [+ YamlModel.NodeScalar v0 -> Strings.concat [ "- ", (writeScalar v0), "\n"]- YamlModel.NodeSequence v0 -> Logic.ifElse (Lists.null v0) "- []\n" (Strings.cat2 "-\n" (indentString (writeNode node)))+ YamlModel.NodeSequence v0 -> Logic.ifElse (Lists.null v0) "- []\n" (Strings.concat2 "-\n" (indentString (writeNode node))) YamlModel.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) "- {}\n" ( let entries = Maps.toList v0- in (Optionals.fromOptional "" (Optionals.map (\p ->+ in (Optionals.withDefault "" (Optionals.map (\p -> let firstEntry = Pairs.first p restEntries = Pairs.second p firstStr = writeMappingEntryInline firstEntry- restStr = Strings.cat (Lists.map (\e -> writeMappingEntry e) restEntries)- in (Strings.cat [+ restStr = Strings.concat (Lists.map (\e -> writeMappingEntry e) restEntries)+ in (Strings.concat [ "- ", firstStr, (indentString restStr)])) (Lists.uncons entries))))+ -- | Write a string value, quoting if necessary writeString :: String -> String writeString s =- Logic.ifElse (needsQuoting s) (Strings.cat [+ Logic.ifElse (needsQuoting s) (Strings.concat [ "'", (escapeSingleQuotes s), "'"]) s+ -- | YAML reserved words that need quoting yamlReservedWords :: [String] yamlReservedWords =@@ -231,6 +256,7 @@ "NO", "ON", "OFF"]+ -- | YAML special characters that trigger quoting yamlSpecialChars :: String yamlSpecialChars = ": {}[]#,&*!|>'\"%@`"