ref: 6a67714e02cd9cd49377591c39f03bb1f06814f7
parent: 26e42b9bcb030c3f2a2fdea69304b79b5e573bf6
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Thu Oct 10 16:48:17 EDT 2024
Add comment
--- a/src/MicroHs/SymTab.hs
+++ b/src/MicroHs/SymTab.hs
@@ -91,7 +91,9 @@
Nothing -> Left $ "undefined " ++ msg ++ ": " ++ showIdent i
-- ++ "\n" ++ show lenv ++ "\n" ++ show genv
--- XXX why?
+-- When a module uses 'import Prelude()' the Mhs.Builtin (aka B@) will
+-- also not be imported. So as a last recourse, look for the identifier
+-- unqualified.
hackBuiltin :: Ident -> Ident
hackBuiltin i | Just ('.':s) <- stripPrefix builtinMdl (unIdent i) = mkIdentSLoc (slocIdent i) s
hackBuiltin i = i