mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Add a collector of unification + solve events
This commit is contained in:
parent
40223a697d
commit
1df2e942a2
4 changed files with 197 additions and 2 deletions
|
@ -8,11 +8,11 @@ use roc_types::{
|
|||
};
|
||||
|
||||
use crate::schema::{
|
||||
AliasKind, AliasTypeVariables, ClosureType, Content, NumericRange, NumericRangeKind,
|
||||
AliasKind, AliasTypeVariables, ClosureType, Content, NumericRange, NumericRangeKind, Rank,
|
||||
RecordField, RecordFieldKind, Symbol, TagUnionExtension, UnspecializedClosureType, Variable,
|
||||
};
|
||||
|
||||
trait AsSchema<T> {
|
||||
pub trait AsSchema<T> {
|
||||
fn as_schema(&self, subs: &Subs) -> T;
|
||||
}
|
||||
|
||||
|
@ -299,3 +299,9 @@ impl AsSchema<String> for ident::TagName {
|
|||
self.0.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
impl AsSchema<Rank> for subs::Rank {
|
||||
fn as_schema(&self, _subs: &Subs) -> Rank {
|
||||
Rank(self.into_usize() as _)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue