get most cli tests to pass

This commit is contained in:
Folkert 2021-06-09 19:05:37 +02:00
parent 4151dac452
commit 3c8d675378
4 changed files with 57 additions and 32 deletions

View file

@ -39,9 +39,24 @@ where
let mut hasher = DefaultHasher::new();
for layout in argument_layouts {
layout.hash(&mut hasher);
match layout {
Layout::Closure(_, lambda_set, _) => {
lambda_set.runtime_representation().hash(&mut hasher);
}
_ => {
layout.hash(&mut hasher);
}
}
}
match return_layout {
Layout::Closure(_, lambda_set, _) => {
lambda_set.runtime_representation().hash(&mut hasher);
}
_ => {
return_layout.hash(&mut hasher);
}
}
return_layout.hash(&mut hasher);
hasher.finish()
};
@ -84,12 +99,6 @@ where
for proc in procs {
let spec = proc_spec(proc)?;
dbg!(proc.name);
for b in &func_name_bytes(proc) {
eprint!("{:x}", b);
}
eprintln!("");
m.add_func(FuncName(&func_name_bytes(proc)), spec)?;
if format!("{:?}", proc.name).contains("mainForHost") {
@ -133,7 +142,7 @@ where
p.build()?
};
eprintln!("{}", program.to_source_string());
// eprintln!("{}", program.to_source_string());
morphic_lib::solve(program)
}