[−][src]Struct lark_type_check::TypeCheckResults
Fields
max_types: BTreeMap<MetaIndex, Ty<F>>
The "maximum type" computed for expressions, identified-expressions, and other things that have a type. The maximum type is the full set of permissions available from that expression.
access_types: BTreeMap<Expression, Ty<F>>
The "access type" for a given expression -- this is the set of permissions required by that particular expression. These cannot exceed the "max types" and are determined by how the result of the expression is used.
access_permissions: BTreeMap<Expression, F::Perm>
The "permission variable" recorded for a given expression instance.
generics: BTreeMap<MetaIndex, Generics<F>>
For references to entities, the generics applied.
entities: BTreeMap<MetaIndex, Entity>
For "type-relative" identifiers, stores the entity that we resolved to. Examples:
foo.bar
-- attached to the identifierbar
, entity of the fieldfoo.bar(..)
-- attached to the identifierbar
, entity of the methodFoo { a: b }
-- attached to the identifiera
, entity of the fieldfoo
-- when an identifier refers to an entity
Methods
impl<F: TypeFamily> TypeCheckResults<F>
[src]
pub fn ty(
&self,
index: impl Into<MetaIndex>
) -> Ty<F>
[src]
&self,
index: impl Into<MetaIndex>
) -> Ty<F>
Access the type stored for the given index
, usually the
index of an expression. Indicates the "maximum type".
pub fn access_ty(&self, expression: Expression) -> Ty<F>
[src]
Returns the "access type" of this expression, which indicates how many permissions were needed.
pub fn opt_ty(
&self,
index: impl Into<MetaIndex>
) -> Option<Ty<F>>
[src]
&self,
index: impl Into<MetaIndex>
) -> Option<Ty<F>>
Load the type for index
, if any is stored, else return None
.
pub fn has_recorded_ty(
&self,
index: impl Into<MetaIndex>
) -> bool
[src]
&self,
index: impl Into<MetaIndex>
) -> bool
Check whether there is a type recorded for index
.
Trait Implementations
impl<F: Eq + TypeFamily> Eq for TypeCheckResults<F> where
F::Perm: Eq,
[src]
F::Perm: Eq,
impl<F: Clone + TypeFamily> Clone for TypeCheckResults<F> where
F::Perm: Clone,
[src]
F::Perm: Clone,
fn clone(&self) -> TypeCheckResults<F>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<F: PartialEq + TypeFamily> PartialEq<TypeCheckResults<F>> for TypeCheckResults<F> where
F::Perm: PartialEq,
[src]
F::Perm: PartialEq,
fn eq(&self, other: &TypeCheckResults<F>) -> bool
[src]
fn ne(&self, other: &TypeCheckResults<F>) -> bool
[src]
impl<F: TypeFamily> Default for TypeCheckResults<F>
[src]
impl<F: Hash + TypeFamily> Hash for TypeCheckResults<F> where
F::Perm: Hash,
[src]
F::Perm: Hash,
fn hash<__HF: Hasher>(&self, state: &mut __HF)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<F: Debug + TypeFamily> Debug for TypeCheckResults<F> where
F::Perm: Debug,
[src]
F::Perm: Debug,
impl<S, T> Map<S, T> for TypeCheckResults<S> where
S: TypeFamily,
T: TypeFamily,
[src]
S: TypeFamily,
T: TypeFamily,
type Output = TypeCheckResults<T>
fn map(
&self,
mapper: &mut impl FamilyMapper<S, T>
) -> Self::Output
[src]
&self,
mapper: &mut impl FamilyMapper<S, T>
) -> Self::Output
Auto Trait Implementations
impl<F> Send for TypeCheckResults<F> where
<F as TypeFamily>::Base: Send + Sync,
<F as TypeFamily>::Perm: Send + Sync,
<F as TypeFamily>::Repr: Send + Sync,
<F as TypeFamily>::Base: Send + Sync,
<F as TypeFamily>::Perm: Send + Sync,
<F as TypeFamily>::Repr: Send + Sync,
impl<F> Sync for TypeCheckResults<F> where
<F as TypeFamily>::Base: Send + Sync,
<F as TypeFamily>::Perm: Send + Sync,
<F as TypeFamily>::Repr: Send + Sync,
<F as TypeFamily>::Base: Send + Sync,
<F as TypeFamily>::Perm: Send + Sync,
<F as TypeFamily>::Repr: Send + Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<Cx, T> FmtWithSpecialized for T where
Cx: ?Sized,
T: Debug + ?Sized,
[src]
Cx: ?Sized,
T: Debug + ?Sized,