Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 5046 days ago | link | parent

I started out pruning ac.scm from the bottom up, stripping out everything but the core compiler - and the culprit ended up exactly at the top.

  (require (lib "foreign.ss"))
I assume the FFI does weird things with underscored variables that need to be sandboxed into a module before arc can take over such variables.

Update: I've uploaded a minimal arc implementation at http://gist.github.com/488376. May be easier to read than the canonical version. And I think it's portable R5RS now that it's not asking for the legacy mzscheme language.



2 points by akkartik 5044 days ago | link

A simpler change to vanilla arc is to change the prefix for arc variables to two underscores rather than one.

  (define (ac-global-name s)
    (string->symbol (string-append "__" (symbol->string s))))
Surprisingly enough, the only other change required is to replace else in case expressions to (else). Now you can convert ac.scm into a simple file that can be load'ed.

-----