mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
wip2
This commit is contained in:
parent
04d3f68192
commit
3fc3059915
7 changed files with 42 additions and 14 deletions
16
src/solve.rs
16
src/solve.rs
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue