unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Nala Ginrut <nalaginrut@gmail.com>
To: Guile User <guile-user@gnu.org>
Subject: The proper init script
Date: Wed, 14 Aug 2019 21:26:25 +0800	[thread overview]
Message-ID: <CAPjoZocOn3Xvxeo1RnBnoC+yoY2OV97SV1b5=aOqJ84LMy3QCQ@mail.gmail.com> (raw)

Hi folks!
I'm implementing Lua front-end seriously. However, I'd like to make sure
the module is pure without any predefined Scheme procedures. Because the
predefined 'string' object conflicts with 'string' procedure of Scheme.

For Lua script running or compilation, I can set a generator with
#:make-default-environment in language spec.scm. And it works fine.

However, I want to run this code in the REPL when I switch to Lua language.
--------------------------------code-----------------------------------
(set-current-module (define-module* '(lua) #:pure #t))
---------------------------------end------------------------------------
Of course, I can run it first, then switch to Lua, and it works.
Now my question is, how can it run automatically when I switch the language?

I've tried '.guile`, and it seems useless.
How can I do it properly?

Best regards.


                 reply	other threads:[~2019-08-14 13:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAPjoZocOn3Xvxeo1RnBnoC+yoY2OV97SV1b5=aOqJ84LMy3QCQ@mail.gmail.com' \
    --to=nalaginrut@gmail.com \
    --cc=guile-user@gnu.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).