pub struct ProgramTypes {
pub fn_signatures: IndexMap<String, Scheme>,
pub type_env: TypeEnv,
pub parse_required_fields: HashMap<ParseSite, Vec<String>>,
pub parse_type_schemas: HashMap<ParseSite, Vec<(String, String)>>,
}Expand description
Result of checking a whole program.
Fields§
§fn_signatures: IndexMap<String, Scheme>§type_env: TypeEnv§parse_required_fields: HashMap<ParseSite, Vec<String>>For #168: per-call required-fields map for module.parse(s)
calls whose inferred result type is Result[Record{...}, _].
Keyed by the call’s ParseSite (stage index + NodeId), so
the table stays valid for any structurally identical copy of
the checked stages (#777). Empty unless any matching call
sites were found.
See check_and_rewrite_program for the function that
populates this and applies the rewrite in one step, and
rewrite_parse_calls to apply it to a separate copy.
parse_type_schemas: HashMap<ParseSite, Vec<(String, String)>>For #322: per-call type schema alongside the field names.
Each entry is a Vec<(field_name, type_tag)> parallel to
parse_required_fields. Used by the rewrite pass to inject
the third argument to parse_strict.
Auto Trait Implementations§
impl Freeze for ProgramTypes
impl RefUnwindSafe for ProgramTypes
impl Send for ProgramTypes
impl Sync for ProgramTypes
impl Unpin for ProgramTypes
impl UnsafeUnpin for ProgramTypes
impl UnwindSafe for ProgramTypes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more