chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Syntax Egg Question


From: felix winkelmann
Subject: Re: [Chicken-users] Syntax Egg Question
Date: Tue, 8 May 2007 09:55:01 +0200

On 4/29/07, Joshua Griffith <address@hidden> wrote:

I'm attempting to package one low-level macro as a syntax egg.  This macro
uses other helper functions and low-level macros to perform its task.  Is it
possible to hide these other macros and functions, so that only the main
macro is exposed to the top-level?


Any functions and macros that a macro definitiion expands into must be
externally visible, so I suggest prefixing these internal macros/functions
with something to distinguish them. An alternative is to use syntax-case
modules (but you said this is a low-level macro, so this probably doesn't
apply).

If the macro uses code directly (i.e. not in the expansion, but while computing
the expansion), you can also compile the support code into a shared library
and load it at expansion time (and thus for example having a macro in a source
file that uses support functions in a compiled .so of which the entry-points
must be visible, but which may use non-visible/hidden internal functions).

Now this latter paragraph has confused me probably just as much as you,
so I again recommend using a prefix...


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]