From: var-vniiaes--- via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <bug-guile@gnu.org>
To: 63269@debbugs.gnu.org
Subject: bug#63269: Guile compiler supresses initalization of autoloaded modules
Date: Thu, 04 May 2023 18:04:38 +0300 [thread overview]
Message-ID: <1683212678.167498927@f703.i.mail.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 891 bytes --]
Guile compiler drives out part of initialization for autoloaded
modules (typically, statements in `side-effects only' form).
Please find below an example. Interpreter produces expected
result; compiler works fine when `define-public’ form is used
in autoloaded module for `f’ definition.
amaya@t460s:~/tmp/guile-test$ cat main.scm f.scm
(define-module (guile-test main) #:autoload (guile-test f) (f))
(define (main) (f))
(main)
(define-module (guile-test f) #:export (f))
(format (current-error-port) "*** module f initialized\n")
(define (f) (format #t "hello from f\n"))
amaya@t460s:~/tmp/guile-test$ guile -L .. main.scm
hello from f
amaya@t460s:~/tmp/guile-test$ cat main.scm | guile -L ..
GNU Guile 3.0.8
Copyright (C) 1995-2021 Free Software Foundation, Inc. [...]
*** module f initialized
$1 = #<directory (guile-test main) 7f83118763c0>
hello from f
$2 = #t
[-- Attachment #2: Type: text/html, Size: 1238 bytes --]
reply other threads:[~2023-05-04 15:04 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=1683212678.167498927@f703.i.mail.ru \
--to=bug-guile@gnu.org \
--cc=63269@debbugs.gnu.org \
--cc=var-vniiaes@mail.ru \
/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).