unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Koz Ross <koz.ross@retro-freedom.nz>
Cc: ludo@gnu.org, 21944@debbugs.gnu.org
Subject: bug#21944: Error on ordering of define-record-type and define-public in a module is unhelpful - possible improvement?
Date: Mon, 27 Jun 2016 10:32:59 +0200	[thread overview]
Message-ID: <87inwv8210.fsf@pobox.com> (raw)
In-Reply-To: <874m8f9i02.fsf@pobox.com> (Andy Wingo's message of "Mon, 27 Jun 2016 10:02:37 +0200")

On Mon 27 Jun 2016 10:02, Andy Wingo <wingo@pobox.com> writes:

> Apparently the reason this doesn't work in Guile right now is that the
> compiler currently reads and compiles one Scheme expression at a time,
> then stitches them together on the Tree-IL level.  Incidentally,
> `primitive-load' works in the same way for the interpreter: it reads and
> eval's single expressions in a loop.  We could change this to have Guile
> read the whole file and pass it all to the expander at once, within a
> `begin'.  This has some user-visible changes though:
>
>   * if evaluating an expression throws an error, primitive-load doesn't
>     read the following expressions and so doesn't detect syntax errors;
>     try a file like this:
>
>     (error "what")
>     )
>
>     With the interpreter (primitive-load) you will get the "what" error,
>     not a syntax error.  (Yes the unclosed paren hurts my eyeballs but I
>     wanted to demonstrate a syntax error.  Here's a matching paren:
>     ")".)
>
>   * Procedural macros won't be able to use bindings defined previously
>     in the file unless they are eval-whenned.  Of course this already
>     breaks in the compiler, but it succeeds in the interpreter.

Another user-visible change: changes to read-options would not take
effect in the same places.

Andy





  reply	other threads:[~2016-06-27  8:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17  8:27 bug#21944: Error on ordering of define-record-type and define-public in a module is unhelpful - possible improvement? Koz Ross
2016-06-26 21:06 ` Andy Wingo
2016-06-27  8:02   ` Andy Wingo
2016-06-27  8:32     ` Andy Wingo [this message]
2016-06-27 16:10     ` Mark H Weaver
2016-06-27 21:22       ` 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=87inwv8210.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=21944@debbugs.gnu.org \
    --cc=koz.ross@retro-freedom.nz \
    --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).