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: dynamic module creation Date: Wed, 04 Feb 2009 00:30:47 +0000 Message-ID: <87eiyfhwlk.fsf@arudy.ossau.uklinux.net> References: <2bc5f8210901312358v1f341027qb973b92a5c9d496b@mail.gmail.com> <2bc5f8210902011259w54b5e427x1de20fb88143d441@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233707461 19059 80.91.229.12 (4 Feb 2009 00:31:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Feb 2009 00:31:01 +0000 (UTC) Cc: Andy Wingo , guile-user To: Julian Graham Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Feb 04 01:32:15 2009 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LUVgc-0001Rp-OP for guile-user@m.gmane.org; Wed, 04 Feb 2009 01:32:14 +0100 Original-Received: from localhost ([127.0.0.1]:40559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUVfJ-0008R9-K5 for guile-user@m.gmane.org; Tue, 03 Feb 2009 19:30:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUVfG-0008R4-Bn for guile-user@gnu.org; Tue, 03 Feb 2009 19:30:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUVfE-0008Qs-Rd for guile-user@gnu.org; Tue, 03 Feb 2009 19:30:48 -0500 Original-Received: from [199.232.76.173] (port=59688 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUVfE-0008Qp-Ma for guile-user@gnu.org; Tue, 03 Feb 2009 19:30:48 -0500 Original-Received: from mail3.uklinux.net ([80.84.72.33]:55036) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LUVfE-0005pT-An for guile-user@gnu.org; Tue, 03 Feb 2009 19:30:48 -0500 Original-Received: from arudy (host86-157-180-39.range86-157.btcentralplus.com [86.157.180.39]) by mail3.uklinux.net (Postfix) with ESMTP id D90A21F6DEF; Wed, 4 Feb 2009 00:30:47 +0000 (GMT) Original-Received: from arudy.ossau.uklinux.net (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 45BB438012; Wed, 4 Feb 2009 00:30:47 +0000 (GMT) In-Reply-To: <2bc5f8210902011259w54b5e427x1de20fb88143d441@mail.gmail.com> (Julian Graham's message of "Sun\, 1 Feb 2009 15\:59\:18 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:7144 Archived-At: Julian Graham writes: > Incidentally, my naive attempt to refine the behavior of > `beautify-user-module!' straight-up failed: > > guile> (define m (resolve-module '(foo))) > guile> (let ((interface (make-module 31))) > ... (set-module-name! interface (module-name m)) > ... (set-module-kind! interface 'interface) > ... (set-module-public-interface! m interface)) > #f > guile> (set-module-uses! m '((guile) :select (if))) > ((guile) :select (if)) > guile> (set-current-module m) > # > guile> if > Segmentation fault I haven't managed to test this yet, but I think your `(set-module-uses! m '((guile) :select (if)))' should be `(set-module-uses! m (list (resolve-interface '(guile) #:select '(if))))'. (And we should also add type-checking to set-module-uses!) Regards, Neil