Open aneilbaboo opened 4 years ago
Hi Aneil,
There's a fix for import in the latest commit. It's a bit hackish. Let me know if it works for you.
I'll take a look at export.
Cool, thanks, Ben - Just FYI. I'm working on a PR for Parenscript to allow turning off the automatic isolation of top-level forms. I'll post a link here when I'm ready.
Sounds interesting. Please do post a link.
Export looks like it should be working as is. Let me know if you see any further problems.
Hi Ben - I made a bit of progress, but decided I'd be better off switching to Clojurescript.
Here's what I discovered: there's a unexported dynamic variable in-function-scope?
that is used to prevent lambda-wrapping inside lambda
and defun
. However, it's not possible to set this within the ps macro body as it is evaluated before in-function-scope?
is consulted. It also isn't possible to use the in-function-scope?
behavior on all macros because this would change the behavior of parenscript for a lot of other system macros, which would almost certainly create problems. So, (I think) the only way to get this working properly inside parenscript is to add a mechanism to mark some macros as unwrappable.
I think I'll cross post this issue to the Parenscript repo. It's such a basic problem. Maybe they have an alternate solution to it.
I created an issue over in the Parenscript repo: https://gitlab.common-lisp.net/parenscript/parenscript/-/issues/9
Parenscript wraps top-level expressions in an evaluated anonymous function, so imported symbols can't be accessed. E.g.,
becomes