From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.user Subject: Re: guile and XML (mixp) Date: Mon, 27 Nov 2006 22:05:38 +0000 Message-ID: <87lklwmtot.fsf@ossau.uklinux.net> References: <1164216402.3464.33.camel@localhost.localdomain> <87wt5nwbzo.fsf@ossau.uklinux.net> <456AE847.5030101@fastmail.fm> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1164676354 16431 80.91.229.2 (28 Nov 2006 01:12:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 28 Nov 2006 01:12:34 +0000 (UTC) Cc: Guile Users Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Nov 28 02:12:32 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GorWE-0004JG-Fo for guile-user@m.gmane.org; Tue, 28 Nov 2006 02:12:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GorWE-0000yM-0H for guile-user@m.gmane.org; Mon, 27 Nov 2006 20:12:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GorTO-0007GP-9g for guile-user@gnu.org; Mon, 27 Nov 2006 20:09:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GorTK-0007BV-AO for guile-user@gnu.org; Mon, 27 Nov 2006 20:09:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GorTK-0007BI-6E for guile-user@gnu.org; Mon, 27 Nov 2006 20:09:18 -0500 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GorTJ-0003xW-BH for guile-user@gnu.org; Mon, 27 Nov 2006 20:09:17 -0500 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by mx20.gnu.org with esmtp (Exim 4.52) id 1Gooll-0004vG-4l for guile-user@gnu.org; Mon, 27 Nov 2006 17:16:09 -0500 Original-Received: from laruns (host86-145-51-69.range86-145.btcentralplus.com [86.145.51.69]) by mail3.uklinux.net (Postfix) with ESMTP id 7022B40AB85; Mon, 27 Nov 2006 22:06:32 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id 2F1996FEA7; Mon, 27 Nov 2006 22:05:38 +0000 (GMT) Original-To: Jon Wilson In-Reply-To: <456AE847.5030101@fastmail.fm> (Jon Wilson's message of "Mon, 27 Nov 2006 07:29:43 -0600") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5672 Archived-At: Jon Wilson writes: > Hi Neil, >> Whoever is doing (use-modules (ice-9 syncase)) needs to do (use-syntax >> (ice-9 syncase)) instead. >> > I see this fairly often. Perhaps there should be some little widget > in (ice-9 syncase) which says "If you try to use=modules me, you will > actually get use-syntax instead.). Or could an argument be made for > combining use-modules and use-syntax? Are there any cases where one > would write a module, and then at some times want to use-modules it, > and at other times want to use-syntax it, so that the user would need > to specify which one was wanted? It's conceivable, but probably quite unlikely. I'm not sure I like the idea of a module automagically switching its user's intent from use-module to use-syntax. That feels too non-explicit to me. What seems very reasonable, however, would be a way for a module to discover whether it is being loaded for use-syntax or use-module, so that it can emit a warning, or even signal an error, if the use is inappropriate. Perhaps something like this... (define-module (ice-9 syncase) ... #:use-hook my-use-hook) (define (my-use-hook usage) (or (eq? usage #:use-syntax) (error "The (ice-9 syncase) module should always be used by calling (use-syntax ...), not (use-modules ...)"))) ... Does that sound reasonable? Regards, Neil _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user