public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Damien MATTEI <damien.mattei@oca.eu>
To: kawa@sourceware.org
Subject: Re: Using eval with environments and R7RS modules
Date: Mon, 30 Nov 2020 11:13:17 +0100	[thread overview]
Message-ID: <3c4fc600-110f-e1fe-4421-aeb91c8fab22@oca.eu> (raw)
In-Reply-To: <CABgWrqqgW6C6fBCEaUyyA558Qc5AQn2rrBt=s01VzCYN0XwJmQ@mail.gmail.com>

hello,

i rarely use EVAL but i recently wrote a function using eval inside and 
i was surprised to see that the arguments of the function

where not known from EVAL:

(define (foo L)

    (eval L (interaction-environment))

and i got an error like UNBOUND VARIABLE L

but this not only in Kawa,it is in Scheme, i was in a R5RS , if there is 
a way to know the current bindings from EVAL i will be happy

to know it, because without this , i do not see any use for EVAL , 
having only the toplevel bindings is not enought for development.

Damien

Le 30/11/2020 à 07:21, Duncan Mak via Kawa a écrit :
> Hello all,
>
> I'm trying to use EVAL in a R7RS module. I'm having trouble specifying the
> environment that contains the current bindings.
>
> I could either use (environment '(scheme base)), but I don't see my own
> functions, or (environment '(my library)) then I don't see something basic
> like QUASIQUOTE.
>
> Is there a way for me to load multiple modules into the environment?
>
> Thanks!
>

  parent reply	other threads:[~2020-11-30 10:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30  6:21 Duncan Mak
2020-11-30  6:35 ` Per Bothner
2020-11-30  8:12   ` Duncan Mak
2020-11-30 12:30     ` Per Bothner
2020-11-30 22:15       ` Duncan Mak
2020-11-30 10:13 ` Damien MATTEI [this message]
2020-11-30 12:21   ` Per Bothner
2020-11-30 18:09     ` Damien MATTEI
2020-12-02 14:58       ` Jamison Hope
2020-12-04  8:05         ` Damien MATTEI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c4fc600-110f-e1fe-4421-aeb91c8fab22@oca.eu \
    --to=damien.mattei@oca.eu \
    --cc=Damien.Mattei@unice.fr \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).