pub struct ProgramTypes {
pub fn_signatures: IndexMap<String, Scheme>,
pub type_env: TypeEnv,
pub parse_required_fields: HashMap<usize, Vec<String>>,
pub parse_type_schemas: HashMap<usize, Vec<(String, String)>>,
}Expand description
Result of checking a whole program.
Fields§
§fn_signatures: IndexMap<String, Scheme>§type_env: TypeEnv§parse_required_fields: HashMap<usize, Vec<String>>For #168: per-call required-fields map for module.parse(s)
calls whose inferred result type is Result[Record{...}, _].
Keyed by &CExpr as *const _ as usize so callers can do an
O(1) pointer-equality lookup during a separate AST rewrite
pass. 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.
parse_type_schemas: HashMap<usize, 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