From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs 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 Message-ID: <87inwv8210.fsf@pobox.com> References: <20151117212713.48944f57195a04fd0a6c5d86@retro-freedom.nz> <871t3jbqxj.fsf@pobox.com> <874m8f9i02.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467016466 21291 80.91.229.3 (27 Jun 2016 08:34:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 08:34:26 +0000 (UTC) Cc: ludo@gnu.org, 21944@debbugs.gnu.org To: Koz Ross Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 27 10:34:16 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bHRzk-0000vx-0x for guile-bugs@m.gmane.org; Mon, 27 Jun 2016 10:34:16 +0200 Original-Received: from localhost ([::1]:57163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHRzi-0003kl-6c for guile-bugs@m.gmane.org; Mon, 27 Jun 2016 04:34:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHRza-0003jD-GX for bug-guile@gnu.org; Mon, 27 Jun 2016 04:34:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHRzW-00084N-Aa for bug-guile@gnu.org; Mon, 27 Jun 2016 04:34:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHRzW-00084I-7G for bug-guile@gnu.org; Mon, 27 Jun 2016 04:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bHRzV-0000kS-UH for bug-guile@gnu.org; Mon, 27 Jun 2016 04:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 27 Jun 2016 08:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21944 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 21944-submit@debbugs.gnu.org id=B21944.14670163902813 (code B ref 21944); Mon, 27 Jun 2016 08:34:01 +0000 Original-Received: (at 21944) by debbugs.gnu.org; 27 Jun 2016 08:33:10 +0000 Original-Received: from localhost ([127.0.0.1]:57452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHRyg-0000jI-1Z for submit@debbugs.gnu.org; Mon, 27 Jun 2016 04:33:10 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:52399 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHRye-0000jB-Rv for 21944@debbugs.gnu.org; Mon, 27 Jun 2016 04:33:09 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 99D882095B; Mon, 27 Jun 2016 04:33:07 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=UPckrCc6W9B7v1DtJHQKkqt98Vo=; b=DqQmX4 dFD5yaE5ZB5iYqAKnk/XxEt9vfbW4XebXnyfl/52Z77RgELuiEVh/hzlv4r6/k8a fOHhVh/FoEYkGA92qHy12pCKGp/C61nEnskj941FlAsyJogtisEGnTSLWG1IXsra iIHhsGnwPzsfAvvFDlTw9qH836Pow+mYAvk+w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=SFZnhEGOKs4EnZn1oMB8n64wHk5wMdcG NxMvDz9XRGR/6Ll4xqoNzWFea1ocuglNPe3BAGtUKVjm5l9cLRYyi3tqSjwirlwf xOktEDdEjl0nQ3TBu+p2f9+29MvESIqR15gx6LoFZZ3Tx1+DzaubACmE/K84vM+i tJDqGWhABf8= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 91EF72095A; Mon, 27 Jun 2016 04:33:07 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id DBB8720959; Mon, 27 Jun 2016 04:33:06 -0400 (EDT) In-Reply-To: <874m8f9i02.fsf@pobox.com> (Andy Wingo's message of "Mon, 27 Jun 2016 10:02:37 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: C5C90452-3C41-11E6-A10E-C1836462E9F6-02397024!pb-sasl1.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8265 Archived-At: On Mon 27 Jun 2016 10:02, Andy Wingo 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