From a010a8a2d7f2ada9100b828c1227a219ad3f3af9 Mon Sep 17 00:00:00 2001 From: Dan Doel Date: Fri, 12 Jul 2024 13:23:52 -0400 Subject: [PATCH] Use builtin reference names in foreign decompiling E.G. print instead of --- parser-typechecker/src/Unison/Runtime/Decompile.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parser-typechecker/src/Unison/Runtime/Decompile.hs b/parser-typechecker/src/Unison/Runtime/Decompile.hs index a1b1646ce8..00e8c4445a 100644 --- a/parser-typechecker/src/Unison/Runtime/Decompile.hs +++ b/parser-typechecker/src/Unison/Runtime/Decompile.hs @@ -230,7 +230,11 @@ decompileForeign backref topTerms f | Just s <- unwrapSeq f = list' () <$> traverse (decompile backref topTerms) s decompileForeign _ _ (Wrap r _) = - err (BadForeign r) $ bug "" + err (BadForeign r) $ bug text + where + text + | Builtin name <- r = "<" <> name <> ">" + | otherwise = "" decompileBytes :: (Var v) => By.Bytes -> Term v () decompileBytes =