From 87ecc6f0cb88aef633bb670e2a0c2284fada2663 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 5 Aug 2019 01:07:48 -0700 Subject: [PATCH] Don't print out bare constructor Instead convert to PrimObject --- schala-lang/language/src/eval.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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),