libero/glance_type_resolver

Convert parsed glance.Type values into Libero’s shared FieldType.

Scanner and walker 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 whether a type came from a handler signature or a discovered custom type.

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)
Search Document