iter 22b.2.1: add Constraint struct, Type::Forall.constraints
This commit is contained in:
@@ -83,6 +83,7 @@ pub(crate) fn builtin_ail_type(name: &str) -> Option<Type> {
|
||||
// constant i1 1) on those resolved types.
|
||||
"==" => Type::Forall {
|
||||
vars: vec!["a".into()],
|
||||
constraints: vec![],
|
||||
body: Box::new(Type::Fn {
|
||||
params: vec![
|
||||
Type::Var { name: "a".into() },
|
||||
@@ -105,6 +106,7 @@ pub(crate) fn builtin_ail_type(name: &str) -> Option<Type> {
|
||||
// (`forall a. a`). Mirrors the typechecker's `builtins::install`.
|
||||
"__unreachable__" => Type::Forall {
|
||||
vars: vec!["a".into()],
|
||||
constraints: vec![],
|
||||
body: Box::new(Type::Var { name: "a".into() }),
|
||||
},
|
||||
_ => return None,
|
||||
|
||||
Reference in New Issue
Block a user