flan/test/programs/pkgs/macspin/macspin.flan
Joseph Ferano 1898a3157d Macros come from a package now, and the refusal's reason was wrong
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.
2026-09-13 15:40:08 +07:00

9 lines
378 B
Plaintext

;;;; A package macro that expands into a call to itself and does not get
;;;; smaller. Not a ring -- the call is inside a quasiquote, so it is output --
;;;; and so it is bounded rather than refused, with the macro named at the call
;;;; site. The name in that message is the qualified one, because that is what
;;;; the importer wrote.
(defmacro spin [args]
`(spin ~@args))