pub enum TyRepr {
Con {
name: Arc<str>,
kind: TyKind,
args: Vec<TyRepr>,
},
Param {
name: Arc<str>,
index: usize,
},
Fun {
params: Vec<TyRepr>,
result: Box<TyRepr>,
},
Unknown,
}Expand description
The type of an expression, as a macro body sees it.
A projection of the checker’s Ty rather than the thing itself: this crate must not depend on
the type checker, which depends on it. What is dropped is what a macro has no use for — a
function’s effect row, and the identity of a unification variable.
Variants§
Con
A named type applied to arguments: Int, list[Str], Todo.
Param
A declaration’s own type parameter, seen while looking into that declaration — the T of
model Box[T]. Substituted away by TypeEnv::fields when the type being looked into
carries arguments, so a body meets one only where the type it asked about was generic.
Fun
Unknown
Inference had no answer here — an argument whose type is still open, or one whose own checking failed.
Implementations§
Trait Implementations§
impl StructuralPartialEq for TyRepr
Auto Trait Implementations§
impl Freeze for TyRepr
impl RefUnwindSafe for TyRepr
impl Send for TyRepr
impl Sync for TyRepr
impl Unpin for TyRepr
impl UnwindSafe for TyRepr
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