Skip to content

Commit

Permalink
Use builtin reference names in foreign decompiling
Browse files Browse the repository at this point in the history
E.G. print <Promise> instead of <Foreign>
  • Loading branch information
dolio committed Jul 12, 2024
1 parent be7e6cb commit a010a8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion parser-typechecker/src/Unison/Runtime/Decompile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<Foreign>"
err (BadForeign r) $ bug text
where
text
| Builtin name <- r = "<" <> name <> ">"
| otherwise = "<Foreign>"

decompileBytes :: (Var v) => By.Bytes -> Term v ()
decompileBytes =
Expand Down

0 comments on commit a010a8a

Please sign in to comment.