Closed appleby closed 5 years ago
Just confirmed that pushing the tycon
registration down into the body of the macro wrapped in an eval-when
is not sufficient. Registering the constructors apparently also needs to happen at macro-expansion time, which I suppose makes sense because a single coalton-toplevel
form might contain many definitions, and types defined earlier need to be visible to later definitions.
PROOF-OF-CONCEPT GAWDAWFUL HACKS DO NOT MERGE
Fixes #11
This is a quick-and-dirty proof-of-concept fix for the issue I described in #11. This contains some fugly hacks, like the smattering 'round of
make-load-form
s rather than just doing the macro expansion properly, and also the fact that it's essentially duplicating code. Possibly everything could just be pushed down into the macro expansion and wrapped in(eval-when (:compile-toplevel :load-toplevel)...)
or some such, but I wasn't sure if the registering oftycons
also needed to happen at macro-expansion time (as distinct from compile-time).