libero/glance_type_resolver
Convert parsed glance.Type values into Libero’s shared FieldType.
Seed discovery and codegen both need the same type-resolution rules for imports, aliases, builtins, tuples, and unsupported syntax. This module owns that conversion so codegen sees one structured representation regardless of where a type reference appears in discovered source.
Types
pub opaque type TypeResolver
pub type UnsupportedTypePolicy {
RejectUnsupported(path: String)
PreserveUnsupported
}
Constructors
-
RejectUnsupported(path: String) -
PreserveUnsupported
Values
pub fn resolver_from_imports(
imports: List(glance.Definition(glance.Import)),
) -> Result(TypeResolver, String)
pub fn type_to_field_type(
type_ t: glance.Type,
resolver resolver: TypeResolver,
current_module current_module: String,
policy policy: UnsupportedTypePolicy,
) -> Result(field_type.FieldType, String)