unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Massimiliano Gubinelli <m.gubinelli@gmail.com>
To: Matt Wette <matt.wette@gmail.com>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: confused about make-module and eval
Date: Tue, 24 Mar 2020 01:35:51 +0100	[thread overview]
Message-ID: <E060048E-0CAF-41FA-B683-EAC51E540D21@gmail.com> (raw)
In-Reply-To: <a0f1eaf3-ff80-bedb-84e1-266bce6d646b@gmail.com>

I think a fresh module do not have any binding. So 'lambda is not defined. You would have to create bindings inside the module, maybe you could just import the-scm-module .

In particular this can be a way to allow only certain functionality to be available to the program you eval.

Best
max


> On 24. Mar 2020, at 01:32, Matt Wette <matt.wette@gmail.com> wrote:
> 
> I expect this to work, but it does not.  Any anyone elaborate?
> What is the minimum module that can make this work?  (make-fresh-use-module)?
> 
> scheme@(guile-user)> (eval '(lambda (a b c) 1) (make-module))
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> Unbound variable: lambda
> 
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> scheme@(#{ g188}#) [1]>
> 
> 




  reply	other threads:[~2020-03-24  0:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24  0:32 confused about make-module and eval Matt Wette
2020-03-24  0:35 ` Massimiliano Gubinelli [this message]
2020-03-24  9:16   ` tomas
2020-03-24  9:27     ` Massimiliano Gubinelli
2020-03-24  9:35       ` tomas

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=E060048E-0CAF-41FA-B683-EAC51E540D21@gmail.com \
    --to=m.gubinelli@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=matt.wette@gmail.com \
    /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).