eliminate ambiguity check on structs with non-zero arity
#[derive(Clone)]
pub enum DirectedOp {
Left(ClauseName),
- Right(ClauseName)
+ Right(ClauseName),
}
#[derive(Clone)]
@@ -516,11 +516,15 @@ fn handle_heap_term(&mut self, iter: &mut HCPreOrderIterator, op: Option<Directe
self.state_stack.push(TokenOrRedirect::Open);
}
},
- HeapCellValue::NamedStr(arity, name, fixity) =>
+ HeapCellValue::NamedStr(0, name, fixity) =>
push_space_if_amb!(self, name.as_str(), &op, {
+ let ct = ClauseType::from(name, 0, fixity);
+ self.format_clause(iter, 0, ct);
+ }),
+ HeapCellValue::NamedStr(arity, name, fixity) => {
let ct = ClauseType::from(name, arity, fixity);
self.format_clause(iter, arity, ct);
- }),
+ },
HeapCellValue::Addr(Addr::Con(Constant::EmptyList)) =>
if !self.at_cdr("") {
self.outputter.append("[]");
