Rename for more concision
This commit is contained in:
parent
2d36ad44d6
commit
b4c4531e4d
@ -8,7 +8,6 @@ pub type TypeName = Rc<String>;
|
|||||||
pub struct TypeContext<'a> {
|
pub struct TypeContext<'a> {
|
||||||
variable_map: ScopeStack<'a, Rc<String>, Type<()>>,
|
variable_map: ScopeStack<'a, Rc<String>, Type<()>>,
|
||||||
evar_count: u32
|
evar_count: u32
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type InferResult<T> = Result<T, TypeError>;
|
type InferResult<T> = Result<T, TypeError>;
|
||||||
@ -30,8 +29,8 @@ enum Type<A> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum TVar {
|
enum TVar {
|
||||||
Universal(UniversalVar),
|
Univ(UniversalVar),
|
||||||
Existential(ExistentialVar)
|
Exist(ExistentialVar)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct UniversalVar(Rc<String>);
|
struct UniversalVar(Rc<String>);
|
||||||
@ -193,7 +192,7 @@ impl<'a> TypeContext<'a> {
|
|||||||
fn allocate_existential(&mut self) -> Type<TVar> {
|
fn allocate_existential(&mut self) -> Type<TVar> {
|
||||||
let n = self.evar_count;
|
let n = self.evar_count;
|
||||||
self.evar_count += 1;
|
self.evar_count += 1;
|
||||||
Type::Var(TVar::Existential(ExistentialVar(n)))
|
Type::Var(TVar::Exist(ExistentialVar(n)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user