This commit is contained in:
Richard Feldman 2019-08-25 21:59:19 -04:00
parent 04d3f68192
commit 3fc3059915
7 changed files with 42 additions and 14 deletions

View file

@ -16,14 +16,6 @@
use subs::{Subs, Variable};
use types::Constraint::{self, *};
use types::Type::{self, *};
use unify::unify;
pub fn type_to_variable(subs: &mut Subs, typ: Type) -> Variable {
match typ {
Variable(var) => var,
}
}
pub fn solve(subs: &mut Subs, constraint: Constraint) {
match constraint {
@ -96,3 +88,11 @@ pub fn solve(subs: &mut Subs, constraint: Constraint) {
},
}
}
fn type_to_variable(subs: &mut Subs, typ: Type) -> Variable {
match typ {
Variable(var) => var,
_ => panic!("TODO type_to_var")
}
}