From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: Fixing the slib mess Date: Tue, 23 Oct 2012 10:23:01 +0200 Message-ID: References: <87mwze18gu.fsf@tines.lan> Reply-To: mikael@djurfeldt.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1350980595 17942 80.91.229.3 (23 Oct 2012 08:23:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2012 08:23:15 +0000 (UTC) Cc: guile-devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Oct 23 10:23:23 2012 Return-path: Envelope-to: guile-devel@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 1TQZlh-0002hJ-6u for guile-devel@m.gmane.org; Tue, 23 Oct 2012 10:23:21 +0200 Original-Received: from localhost ([::1]:46928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQZlZ-0004vV-FO for guile-devel@m.gmane.org; Tue, 23 Oct 2012 04:23:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQZlR-0004uE-Bz for guile-devel@gnu.org; Tue, 23 Oct 2012 04:23:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQZlP-0001KD-Ik for guile-devel@gnu.org; Tue, 23 Oct 2012 04:23:05 -0400 Original-Received: from mail-wi0-f171.google.com ([209.85.212.171]:48214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQZlP-0001Jt-CR for guile-devel@gnu.org; Tue, 23 Oct 2012 04:23:03 -0400 Original-Received: by mail-wi0-f171.google.com with SMTP id hj13so2539483wib.12 for ; Tue, 23 Oct 2012 01:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=AgLLclKSf5CguM5299oNP0ti4uPANf0TN2WCP0HTqhg=; b=mx+N4XKxXBirYpofN9soBL2gC+tUIO/jSB5obeUYV8AAcI0nrbDb8ijX0J8KJeeTk5 Lm5cL3Rbb4wcdT2Ry+b837pZzUywahA/y4UV0qeAOHAvAtAUS8FEqSVtlJafm+va63zc T65WAcIceA7V+Es8J50S/2FX3AjsRXnF/SllInnTWDn1+iDT/XeHVd5tSVCevF8SxiWL cHixeR+p4cV7ahL9MJTrugpTb0Dl/0f1RGlfdYTej/vzmALsKvzs5su6EOX1d9iXJ77S xEmJlFHqh8Wl2fThGG8KgCxjf/+5ITMpbZIUOWGgaZxTqOXMea77X85kEtyloUhjNVOn Zjrw== Original-Received: by 10.216.213.29 with SMTP id z29mr7328826weo.8.1350980582010; Tue, 23 Oct 2012 01:23:02 -0700 (PDT) Original-Received: by 10.223.134.70 with HTTP; Tue, 23 Oct 2012 01:23:01 -0700 (PDT) In-Reply-To: <87mwze18gu.fsf@tines.lan> X-Google-Sender-Auth: GGJsaysZ0uoY5IYPyfFDxVINDug X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.171 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15023 Archived-At: On Mon, Oct 22, 2012 at 11:51 PM, Mark H Weaver wrote: > It looks to me like your current implementation of 'syntax-toplevel?' > is actually testing for a top-level _syntactic_ environment, but what > you ought to be testing for here is slightly different. You are absolutely right. Thank you for spotting this. Unfortunately my scheming knowledge is a bit rusty. > I'm not sure whether the wrap contains enough information to determine that. I don't think it does either. > It might be easier to handle this with 'define-syntax-parameter' and > 'syntax-parameterize'. The idea would be that within slib, 'define' > would be a syntax parameter. Its default expansion would turn it into > 'define-public', and also parameterize 'define' to mean 'base:define' > within the body. If needed, you could also define 'let' and maybe some > other things to parameterize 'define' within the body. > > Another option would be to make 'export' a syntax parameter, and > parameterize it to a no-op within lexical contours such as 'define' and > 'let'. > > What do you think? Correct me if I'm wrong, but doesn't this involve re-defining the syntax for all forms with bodies (in order to introduce the syntax-parameterize form)? > I happen to be working on the reader lately. Would it help to implement > SRFI-58 in our reader? While I think SRFI-58 support is great, I don't think slib needs it because it doesn't, to my knowledge, use read syntax.