refactor: inst (instance) -> imp (impl)

This commit is contained in:
Shunsuke Shibayama 2023-03-19 23:24:00 +09:00
parent b40666d618
commit a5ce33f2c4
8 changed files with 38 additions and 18 deletions

View file

@ -27,6 +27,11 @@ pub fn named_free_var(name: Str, level: usize, constraint: Constraint) -> Type {
Type::FreeVar(Free::new_named_unbound(name, level, constraint))
}
#[inline]
pub fn named_uninit_var(name: Str) -> Type {
Type::FreeVar(Free::new_named_unbound(name, 1, Constraint::Uninited))
}
pub fn array_t(elem_t: Type, len: TyParam) -> Type {
poly("Array", vec![TyParam::t(elem_t), len])
}