From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: bug-guile@gnu.org
Subject: Re: [bug #30169] Auto-compilation failure of a module doesn't lead to a failure [1.9.11]
Date: Fri, 18 Jun 2010 19:03:19 +0200 [thread overview]
Message-ID: <m3ljace0iw.fsf@pobox.com> (raw)
In-Reply-To: <87fx0k75r1.fsf@gnu.org> ("Ludovic Courtès"'s message of "Fri, 18 Jun 2010 16:52:18 +0200")
On Fri 18 Jun 2010 16:52, ludo@gnu.org (Ludovic Courtès) writes:
> Andy Wingo <wingo@pobox.com> writes:
>
>> On Thu 17 Jun 2010 15:06, Ludovic Courtès <INVALID.NOREPLY@gnu.org> writes:
>>
>>> Guile should instead abort as soon as auto-compilation fails.
>>
>> Guile can fail autocompilation due to eval-when issues for syntax
>> helpers. Do you want to make Guile fail in this case?
>
> Sorry, I don’t understand. I want Guile to fail in the example I gave.
Some files may be interpreted, but fail to compile. They will cause
autocompilation to fail. To be specific, from NEWS:
** Functions needed by macros at expand-time need to be present at
expand-time.
For example, this code will work at the REPL:
(define (double-helper x) (* x x))
(define-macro (double-literal x) (double-helper x))
(double-literal 2) => 4
But it will not work when a file is compiled, because the definition of
`double-helper' is not present at expand-time. The solution is to wrap
the definition of `double-helper' in `eval-when':
(eval-when (load compile eval)
(define (double-helper x) (* x x)))
(define-macro (double-literal x) (double-helper x))
(double-literal 2) => 4
See the documentation for eval-when for more information.
So, you want Guile to fail faster for this error; how do you distinguish
it from eval-when errors as above? Or would you prefer that eval-when
errors lead to failures as well?
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2010-06-18 17:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 13:06 [bug #30169] Auto-compilation failure of a module doesn't lead to a failure [1.9.11] Ludovic Courtès
2010-06-18 8:32 ` Andy Wingo
2010-06-18 14:52 ` Ludovic Courtès
2010-06-18 17:03 ` Andy Wingo [this message]
2010-06-20 14:23 ` Ludovic Courtès
2010-06-20 20:19 ` Andy Wingo
2010-06-25 15:29 ` Andy Wingo
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=m3ljace0iw.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=bug-guile@gnu.org \
--cc=ludo@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).