diff --git a/crates/uplc/src/pretty.rs b/crates/uplc/src/pretty.rs index 3493d4e1..4991c0ca 100644 --- a/crates/uplc/src/pretty.rs +++ b/crates/uplc/src/pretty.rs @@ -313,9 +313,19 @@ impl Constant { // This feels a little awkward here; not sure if it should be upstreamed to pallas fn to_doc_list_plutus_data(data: &PlutusData) -> RcDoc<()> { match data { - PlutusData::Constr(Constr { tag, fields, .. }) => RcDoc::text("Constr") + PlutusData::Constr(Constr { + tag, + any_constructor, + fields, + .. + }) => RcDoc::text("Constr") .append(RcDoc::space()) - .append(RcDoc::as_string(tag)) + .append(RcDoc::as_string(match tag { + 121..=127 => tag - 121, + 1280..=1400 => tag - 1280 + 7, + 102 => any_constructor.unwrap(), + _ => panic!("unknown tag {}", tag), + })) .append(RcDoc::space()) .append(RcDoc::text("[")) .append(RcDoc::intersperse(