pub struct Program<'s> {
pub type_decls: Vec<UserTypeDecl>,
pub synonym_decls: Vec<UserSynonymDecl>,
pub body: Ast<'s>,
pub store: &'s SymbolStore,
}Expand description
The result of elaborating a whole file: every type declaration it
surfaced (in source order — a later declaration may reference an earlier
one, or itself, since variant types are nominal; see
typecheck::build_variant_decl), every type synonym it surfaced (see
typecheck::build_synonym_decl), plus the elaborated document body.
Fields§
§type_decls: Vec<UserTypeDecl>§synonym_decls: Vec<UserSynonymDecl>§body: Ast<'s>§store: &'s SymbolStoreThe interner every identifier in body was minted from. Carried on
the program itself (rather than passed alongside it) so that the
downstream passes — typecheck, v1::module_check, and the compile
membrane — keep their existing one-argument signatures and cannot be
handed a program and a store that don’t belong together.
Trait Implementations§
Auto Trait Implementations§
impl<'s> !RefUnwindSafe for Program<'s>
impl<'s> !Send for Program<'s>
impl<'s> !Sync for Program<'s>
impl<'s> !UnwindSafe for Program<'s>
impl<'s> Freeze for Program<'s>
impl<'s> Unpin for Program<'s>
impl<'s> UnsafeUnpin for Program<'s>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more