Load.program takes forms: it reads the import forms, resolves them with the one resolver it always had, and parses the file with the packages' macros in front of it. The refusal said this needed a second import resolver at the Form level. It did not notice that the file being compiled is parsed before Load runs too, so no shape of the feature could have left import resolution where it was. Names arrive qualified, as a defn's do. (mac/twice 4) is a call and (twice 4) is an unknown name. Stopped mid-task: dune test was never run and the acceptance wiring is unfinished. HANDOFF-macros.md has what is left.
11 lines
387 B
Plaintext
11 lines
387 B
Plaintext
;;;; A ring of macros, in a package. Neither body can be compiled first, so
|
|
;;;; there is no order to compile them in -- and an import's macros go through
|
|
;;;; the same rounds as the file's own, so the refusal has to fire here too.
|
|
;;;; Nothing in this package calls them, so the ring is found by the importer.
|
|
|
|
(defmacro ping [args]
|
|
(pong args))
|
|
|
|
(defmacro pong [args]
|
|
(ping args))
|