Fix ctr stringifier

This commit is contained in:
Victor Maia 2022-07-15 01:17:49 -03:00
parent 792108dd33
commit a1961a6548
2 changed files with 2 additions and 1 deletions

View File

@ -403,7 +403,7 @@ pub fn show_term(term: &Term) -> String {
format!("({}: {}) {}", name, show_term(tipo), body) format!("({}: {}) {}", name, show_term(tipo), body)
} }
Term::Ctr { name, args } => { Term::Ctr { name, args } => {
format!("{{{}{}}}", name, args.iter().map(|x| format!(" {}",show_term(x))).collect::<String>()) format!("({}{})", name, args.iter().map(|x| format!(" {}",show_term(x))).collect::<String>())
} }
Term::Fun { name, args } => { Term::Fun { name, args } => {
format!("({}{})", name, args.iter().map(|x| format!(" {}",show_term(x))).collect::<String>()) format!("({}{})", name, args.iter().map(|x| format!(" {}",show_term(x))).collect::<String>())

View File

@ -17,6 +17,7 @@ fn main() {
eprintln!("{}", err); eprintln!("{}", err);
} }
}; };
}
// ------------------------------------------------------------ // ------------------------------------------------------------
// ------------------------------------------------------------ // ------------------------------------------------------------