internal/codegen/types
Types
pub type Field {
Field(name: String, field_type: GleamType)
}
Constructors
-
Field(name: String, field_type: GleamType)
pub type GleamType {
AnonymousType(String)
NilType
IntType
TupleType(elements: List(GleamType))
ListType(list_type: GleamType)
VariantType(name: String, variants: List(Variant))
VariantDepType(
name: String,
dep_types: List(GleamType),
variants: List(Variant),
)
FunctionType(
argument_types: List(GleamType),
result_type: GleamType,
)
}
Constructors
-
AnonymousType(String)
-
NilType
-
IntType
-
TupleType(elements: List(GleamType))
-
ListType(list_type: GleamType)
-
VariantType(name: String, variants: List(Variant))
-
VariantDepType( name: String, dep_types: List(GleamType), variants: List(Variant), )
-
FunctionType( argument_types: List(GleamType), result_type: GleamType, )
Functions
pub fn function(
argument_types: List(GleamType),
result_type: GleamType,
) -> GleamType
pub fn generate_type(arg_type: GleamType) -> String
pub fn generate_type_def(gleam_type: GleamType) -> String
pub fn variant_type(
name: String,
variants: List(Variant),
) -> GleamType