From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: Higher order modules: a first stab Date: Wed, 21 Mar 2012 20:16:38 +0100 Message-ID: <87vclx933d.fsf@gnu.org> References: <87obs5991k.fsf@Kagami.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1332368468 27837 80.91.229.3 (21 Mar 2012 22:21:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 21 Mar 2012 22:21:08 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Mar 21 23:21:07 2012 Return-path: Envelope-to: guile-user@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 1SATty-0004S0-6q for guile-user@m.gmane.org; Wed, 21 Mar 2012 23:21:06 +0100 Original-Received: from localhost ([::1]:57362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SATtx-0004Ob-EV for guile-user@m.gmane.org; Wed, 21 Mar 2012 18:21:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAR1u-0005Gn-E1 for guile-user@gnu.org; Wed, 21 Mar 2012 15:17:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAR1p-00066T-D8 for guile-user@gnu.org; Wed, 21 Mar 2012 15:17:05 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAR1p-00065s-66 for guile-user@gnu.org; Wed, 21 Mar 2012 15:17:01 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SAR1i-0002g5-Ag for guile-user@gnu.org; Wed, 21 Mar 2012 20:16:54 +0100 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Mar 2012 20:16:54 +0100 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Mar 2012 20:16:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Germinal an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:jAJLEMtD0o3Y3Pj11aQx2c99yXQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-Mailman-Approved-At: Wed, 21 Mar 2012 18:21:00 -0400 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9348 Archived-At: Hello, Sorry for the delay. This looks nice. Ian Price skribis: > Currently, parameterized modules are functions that return a > module, and functions are retrieved by module-ref. This is fine for a > proof of concept, but hopefully I'll have something better integrated > soon. Would be cool to see how higher-order module support could be added to our module system. Something like: (define-module (seq-utils) #:require (kar kdr) #:export (take drop)) ... and: (define-module (srfi srfi-1) #:use-module ((seq-utils) #:with (car cdr))) ... (define-module (ice-9 vlist) #:use-module ((seq-utils) #:with (vlist-head vlist-tail))) ... (resolve-module '(seq-utils) #:with (list car cdr)) => fresh module (resolve-module '(seq-utils)) =| error WDYT? Thanks, Ludo’.