Add a way to view solved types of arbitrary expressions/patterns in a program

This commit is contained in:
Ayaz Hafiz 2022-04-20 14:20:23 -04:00
parent 115cd2ba75
commit 7b2b41869f
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
8 changed files with 421 additions and 49 deletions

View file

@ -699,7 +699,8 @@ pub fn constrain_expr(
// branch_cons.extend(pattern_cons);
// branch_constraints.push(constraints.and_constraint(pattern_cons));
let mut total_cons = Vec::with_capacity(1 + 2 * branches.len() + 1);
total_cons.push(expr_con);
// total_cons.push(expr_con);
pattern_cons.push(expr_con);
// Solve all the pattern constraints together, introducing variables in the pattern as
// need be before solving the bodies.