[Scheme-reports] EVAL Andre van Tonder (23 Apr 2011 23:47 UTC)
[Scheme-reports] What happened to (UNQUOTE <expression> ...) Andre van Tonder (24 Apr 2011 00:04 UTC)
[Scheme-reports] Are generated toplevel definitions secret? Andre van Tonder (24 Apr 2011 00:15 UTC)
[Scheme-reports] COND, CASE, AND, ... macros are buggy Andre van Tonder (24 Apr 2011 00:24 UTC)
[Scheme-reports] Buggy definition of BEGIN Andre van Tonder (24 Apr 2011 00:33 UTC)
Re: [Scheme-reports] Buggy definition of BEGIN Jussi Piitulainen (24 Apr 2011 06:55 UTC)
[Scheme-reports] Restrictions on internal BEGIN? Andre van Tonder (24 Apr 2011 01:45 UTC)
Re: [Scheme-reports] Restrictions on internal BEGIN? Jussi Piitulainen (24 Apr 2011 07:20 UTC)
[Scheme-reports] Toplevel import scoping Andre van Tonder (24 Apr 2011 02:02 UTC)
Re: [Scheme-reports] Toplevel import scoping Alex Shinn (24 Apr 2011 02:44 UTC)
Re: [Scheme-reports] Toplevel import scoping Aaron W. Hsu (29 Apr 2011 17:11 UTC)
Re: [Scheme-reports] Toplevel import scoping Aaron W. Hsu (29 Apr 2011 17:10 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Andy Wingo (24 Apr 2011 14:41 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Andre van Tonder (24 Apr 2011 15:53 UTC)
(missing)
(missing)
(missing)
Re: Are generated toplevel definitions secret? Aaron W. Hsu (24 May 2011 18:51 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Sztefan Edwards (25 May 2011 14:32 UTC)
Re: Are generated toplevel definitions secret? Aaron W. Hsu (25 May 2011 20:03 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Perry E. Metzger (07 Nov 2011 18:40 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Perry E. Metzger (07 Nov 2011 18:45 UTC)
Re: [Scheme-reports] What happened to (UNQUOTE <expression> ...) Andre van Tonder (24 Apr 2011 03:10 UTC)
Re: [Scheme-reports] EVAL Alex Shinn (24 Apr 2011 02:10 UTC)
Re: [Scheme-reports] EVAL John Cowan (24 Apr 2011 06:56 UTC)

Re: [Scheme-reports] Are generated toplevel definitions secret? Andy Wingo 24 Apr 2011 14:40 UTC

Hi Peter,

On Sun 24 Apr 2011 15:55, Peter Bex <Peter.Bex@xs4all.nl> writes:

> On Sun, Apr 24, 2011 at 03:39:37PM +0200, Andy Wingo wrote:
>> How does this relate to modules and separate compilation?  I haven't
>> figured out a good way to implement this yet.
>>
> [snip]
>>
>> Guile does not currently introduce hygienic bindings for introduced
>> toplevel identifiers, for this reason.  I think it's the same in
>> Chicken's case, but they can tell you more about that.
>
> Chicken uses an import library for that.  This library contains
> information about a module's exported symbols and macros.
> It also contains a mapping of bare identifiers to "internal" names.
> These internal names are stable and comprise the actual "API" of
> the imported library.  In Chicken's case, this mapping looks like
> '((x . a#x) (y . a#y)) if the module name is a and it exports x and y.
>
> When a module is imported somewhere, these mappings are added to the
> syntactic environment so that it knows what to map them to.
>
> I hope this sheds some light on how it works in Chicken.

Thanks for the note.  In my example:

      (begin
        (define-syntax define-constant
          (syntax-rules ()
            ((_ var init)
             (begin
               (define val init)
               (define-syntax var (identifier-syntax val))))))

        (define-constant x 10)
        (define-constant y 20))

If I put that in a chicken module, import the module, then access "x"
and "y", does that evaluate to 10 and 20, respectively?

Thanks,

Andy
--
http://wingolog.org/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports