Arc Forumnew | comments | leaders | submitlogin
2 points by stefano 5677 days ago | link | parent

I've got a problem with the symbol system: I want to use files.arc, but it uses the macro '$ to call mzscheme. The problem is that symbols passed to mzscheme are modified by the package system, so that ($ (mz-fun)) becomes ($ (<current-package>mz-fun)). This means that it's not possible to call mzscheme's 'mz-fun. Is there a way to make a symbol outside of the package system, i.e. '<>my-sym -> 'my-sym and not '<current-package>my-sym?


3 points by almkglor 5677 days ago | link

$ probably needs to demangle names by applying 'unpkg on them.

  <User>tl: 'x
  <User>x
  <User>tl: (using <arc>v3-packages)
  t
  <User>tl: (unpkg 'x)
  x
For that matter, while reviewing arc.arc, I noticed that there are quite a few file-related functions already exported from mzscheme into arc-space. I suspect bits of files.arc can be rewritten to use those functions instead.

Personally I think it's better to do something like this:

  ($.mzscheme-function param1 param2)
Then we can simply define $ as:

  (mac $ (x)
    `(seval ',(<arc>unpkg x)))
edit: pushed a version of files.arc on arc-f. To use, just (using <files>v1)

-----

1 point by stefano 5677 days ago | link

Thanks. I've made my own working version of files.arc when I discovered 'unpkg, but I couldn't push it because I didn't have access to internet :(

Basically I implemented a version of '$ that automatically unpackages symbols except those given in a list.

-----