diff --git a/schala-lang/language/src/eval.rs b/schala-lang/language/src/eval.rs index a27d693..f70a7c0 100644 --- a/schala-lang/language/src/eval.rs +++ b/schala-lang/language/src/eval.rs @@ -123,12 +123,8 @@ impl Expr { UserDefined { name: None, .. } => format!(""), UserDefined { name: Some(name), .. } => format!("", name), }, - Expr::Constructor { - type_name: _, name, arity, .. - } => if *arity == 0 { - format!("{}", name) - } else { - format!("", name) + Expr::Constructor { type_name, arity, .. } => { + format!("", type_name, arity) }, Expr::Tuple(exprs) => paren_wrapped_vec(exprs.iter().map(|x| x.to_repl())), _ => format!("{:?}", self),