Merge pull request #5216 from unisonweb/topic/decomp-foreign

Use builtin reference names in foreign decompiling
This commit is contained in:
mergify[bot] 2024-07-12 17:49:05 +00:00 committed by GitHub
commit 212a232736
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 =