From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: (define-module (foo) #:import (...)), a la r6rs Date: Thu, 28 Jul 2011 12:37:42 +0200 Message-ID: <87fwlqvgg9.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1311863747 14629 80.91.229.12 (28 Jul 2011 14:35:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2011 14:35:47 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jul 28 16:35:43 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QmRgc-0000g6-R9 for guile-devel@m.gmane.org; Thu, 28 Jul 2011 16:35:42 +0200 Original-Received: from localhost ([::1]:53078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmRgc-0005lB-Bl for guile-devel@m.gmane.org; Thu, 28 Jul 2011 10:35:42 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmRgZ-0005l5-TO for guile-devel@gnu.org; Thu, 28 Jul 2011 10:35:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmRgY-0004ix-69 for guile-devel@gnu.org; Thu, 28 Jul 2011 10:35:39 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:40597 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmRgY-0004eY-2m for guile-devel@gnu.org; Thu, 28 Jul 2011 10:35:38 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 6238863FA for ; Thu, 28 Jul 2011 10:35:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:date:message-id:mime-version:content-type; s=sasl; bh=d +u0ReSQPmui9XQUZfcPDXZg6SM=; b=l+ilJKEkFzT1iv5rWo+6yQoYcMJRR8ZCU sZ7tu3o67uyvVC9Btk8ixv+L58ik7ZxNswX7O8Ul6d37uMre0T/CEFnLM3pGmIKf GloR/dA3IyTaA/zMNOEa3YqpUE+6y1UVWJMKGjjTvmOuWE3Molu/XYtkdnsxo3Ma oyj1dlLUss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :date:message-id:mime-version:content-type; q=dns; s=sasl; b=kgu T6kJFWFiPyfb9/m3Nl7uTIxi28pDR+DOYHCuWcPw0lZOeMy6UPCye2aJvm7jhofJ Z37BhftzsqsXdMwlPmTird8YeqUIK+9+DeuHB/0tN6YOa3+nZUOJyKC41+nGaVyk EmHtBbCXLb8wu/d3ZrA2YN2vOC4BpySEGhmqivhc= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 5A71B63F9 for ; Thu, 28 Jul 2011 10:35:23 -0400 (EDT) Original-Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id CAD7F63F8 for ; Thu, 28 Jul 2011 10:35:22 -0400 (EDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: D38555BC-B926-11E0-98CB-B797DE995924-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.62 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:12686 Archived-At: Hi, I was hacking on Dorodango today, in a script that happened to have a Guile-style (define-module ...) block, and I was importing pieces of an rnrs library. Then I needed to update the import set to provide what was needed. In the middle of making a keyboard macro to add #:use-module before the library names, I realized that `library' is actually a lot better in this regard, in that you just have one `import' block, and all the libraries are listed there without having a prefix on each one. So what do you all think about: (define-module (foo) #:import ((bar) (only (baz) qux foo) ...)) Or even: (define-module (foo) (import (bar) (only (baz) qux foo) ...)) We would continue to support the #:use-module syntax indefinitely, of course. It looks like the upcoming R7RS standard will support these import specs in the same way as the r6rs, though without version specifiers (thankfully). Andy -- http://wingolog.org/