Arc Forumnew | comments | leaders | submitlogin
1 point by raymyers 6144 days ago | link | parent

Macros in packages are a hard problem, no doubt. I still wonder if some degree of macrolet hackery might do the trick.

On a brighter note, I decided to make the lazy semantics of "lib/treeparse.arc" a special case, not the default. That way, there only needs to be one macro, delay-parser. Apart from making the code cleaner, this also makes a module more feasible.



1 point by almkglor 6144 days ago | link

The problem is an expectation like the following:

  (module
    (module-vars foo)
    (interface settings
      foo-option)
    (def foo-option arg
      (if arg
        (= foo (car arg))
        foo))
   (mac macro-using-foo body
     `(do ,foo ,@body)))
Hmm. Maybe export the macros as functions. Hmm. This also means that everything within the module has to be macro-expanded, in case macroexpansion creates a reference to a module-based macro. Aargh.

-----