diff --git a/schala-lang/src/lib.rs b/schala-lang/src/lib.rs index 9ec7195..480b8ee 100644 --- a/schala-lang/src/lib.rs +++ b/schala-lang/src/lib.rs @@ -70,8 +70,8 @@ fn parsing(_handle: &mut Schala, input: Vec, comp: Option<&mu fn symbol_table(handle: &mut Schala, input: parsing::AST, comp: Option<&mut UnfinishedComputation>) -> Result { match handle.type_context.add_top_level_types(&input) { Ok(()) => { - let text = handle.type_context.debug_symbol_table(); - comp.map(|comp| comp.add_artifact(TraceArtifact::new("symbol_table", text))); + let artifact = TraceArtifact::new("symbol_table", handle.type_context.debug_symbol_table()); + comp.map(|comp| comp.add_artifact(artifact)); Ok(input) }, Err(msg) => Err(msg) @@ -85,7 +85,7 @@ fn typechecking(handle: &mut Schala, input: parsing::AST, comp: Option<&mut Unfi Ok(input) }, Err(msg) => { - comp.map(|comp| comp.add_artifact(TraceArtifact::new("type_check", format!("{:?}", msg)))); + comp.map(|comp| comp.add_artifact(TraceArtifact::new("type_check", format!("Type error: {:?}", msg)))); Ok(input) } }