implement mono / lowering for tuples

This commit is contained in:
Joshua Warner 2023-01-24 20:23:17 -08:00
parent 65f8bb3d0d
commit 5a6be05ead
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
42 changed files with 1773 additions and 290 deletions

View file

@ -1497,6 +1497,20 @@ mod solve_expr {
infer_eq(".200", "( ... 200 omitted, a )* -> a");
}
#[test]
fn tuple_accessor_generalization() {
infer_eq(
indoc!(
r#"
get0 = .0
{ a: get0 (1, 2), b: get0 ("a", "b", "c") }
"#
),
"{ a : Num *, b : Str }",
);
}
#[test]
fn record_arg() {
infer_eq("\\rec -> rec.x", "{ x : a }* -> a");