diff --git a/schala-lang/language/src/lib.rs b/schala-lang/language/src/lib.rs index 1802bb6..2c46bb2 100644 --- a/schala-lang/language/src/lib.rs +++ b/schala-lang/language/src/lib.rs @@ -129,15 +129,14 @@ fn symbol_table(handle: &mut Schala, input: ast::AST, comp: Option<&mut Unfinish } fn typechecking(handle: &mut Schala, input: ast::AST, comp: Option<&mut UnfinishedComputation>) -> Result { + let result = handle.type_context.typecheck(&input); - handle.type_context.typecheck(&input).map(|ty| { - comp.map(|comp| { - let artifact = TraceArtifact::new("type", ty); - comp.add_artifact(artifact); - }); + comp.map(|comp| { + let artifact = TraceArtifact::new("type", format!("{:?}", result)); + comp.add_artifact(artifact); + }); - input - }) + Ok(input) } fn ast_reducing(handle: &mut Schala, input: ast::AST, comp: Option<&mut UnfinishedComputation>) -> Result {