Stefan Israelsson Tampe writes:
> syntax-parse is kind of heavy right now. The parser function produced
> are huge and the main reason
> is that the stored syntax objects are enormous.
Yes, this is very unfortunate. These syntax-objects add a huge amount
of bloat to our entire system. The vast majority of each syntax-object
is used only if the syntax-object is passed as the first argument to
'datum->syntax'. Of course, most syntax-objects are never passed to
'datum->syntax', but unless the compiler can prove that this will never
happen, the bloat must be kept around.
> I know that Mark Weaver had done something to make these creatures
> less fatty.
I wrote a hack to minimize the size of syntax objects in psyntax-pp.scm.
However, the hack cannot safely be used in the general case. It is only
safe because I convinced myself and others that the syntax-objects
embedded within psyntax-pp.scm will never be passed to 'datum->syntax'.
> The question is if there is anything a guile user can do?
My hack cannot be used by users because it makes assumptions about the
internals of psyntax and of our compiler: assumptions that will
certainly to be violated in future versions of Guile.
I wish I had a better answer for you, but unfortunately these enormous
syntax-objects are a core part of the 'syntax-case' system. I see no
way to eliminate this bloat without moving to a different macro system.