gleamunison/schema_printer
Type -> compact prompt schema printer (gap analysis concept D).
BAML-style compact notation over the core Type language — data only:
ability requirements are elided (a schema describes the shape of a value,
not the effects that produced it). Named constructors resolve through a
caller-supplied resolver; unresolved refs print as type@
Types
pub type NameResolver =
fn(identity.DefinitionRef) -> option.Option(String)
Values
pub fn to_schema(t: ast.Type) -> String
Print with no name resolution (hash fallbacks for applied constructors).
pub fn to_schema_with(
t: ast.Type,
resolver: fn(identity.DefinitionRef) -> option.Option(String),
) -> String