Fix this thing
This commit is contained in:
parent
a80db9e4c2
commit
887ba46b0b
@ -91,13 +91,17 @@ fn symbol_table(handle: &mut Schala, input: parsing::AST, comp: Option<&mut Unfi
|
||||
fn typechecking(handle: &mut Schala, input: parsing::AST, comp: Option<&mut UnfinishedComputation>) -> Result<parsing::AST, String> {
|
||||
match handle.type_context.type_check_ast(&input) {
|
||||
Ok(ty) => {
|
||||
comp.map(|c| c.add_artifact(TraceArtifact::new("type_table", format!("{}", handle.type_context.debug_types()))));
|
||||
comp.map(|c| c.add_artifact(TraceArtifact::new("type_check", format!("{:?}", ty))));
|
||||
comp.map(|c| {
|
||||
c.add_artifact(TraceArtifact::new("type_table", format!("{}", handle.type_context.debug_types())));
|
||||
c.add_artifact(TraceArtifact::new("type_check", format!("{:?}", ty)));
|
||||
});
|
||||
Ok(input)
|
||||
},
|
||||
Err(msg) => {
|
||||
comp.map(|comp| comp.add_artifact(TraceArtifact::new("type_table", format!("{}", handle.type_context.debug_types()))));
|
||||
comp.map(|comp| comp.add_artifact(TraceArtifact::new("type_check", format!("Type error: {:?}", msg))));
|
||||
comp.map(|comp| {
|
||||
comp.add_artifact(TraceArtifact::new("type_table", format!("{}", handle.type_context.debug_types())));
|
||||
comp.add_artifact(TraceArtifact::new("type_check", format!("Type error: {:?}", msg)));
|
||||
});
|
||||
Ok(input)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user