Skip to content

Commit

Permalink
Merge pull request #5216 from unisonweb/topic/decomp-foreign
Browse files Browse the repository at this point in the history
Use builtin reference names in foreign decompiling
  • Loading branch information
mergify[bot] authored Jul 12, 2024
2 parents be7e6cb + a010a8a commit 212a232
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 212a232

Please sign in to comment.