unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: Higher order modules: a first stab
Date: Wed, 21 Mar 2012 20:16:38 +0100	[thread overview]
Message-ID: <87vclx933d.fsf@gnu.org> (raw)
In-Reply-To: 87obs5991k.fsf@Kagami.home

Hello,

Sorry for the delay.

This looks nice.

Ian Price <ianprice90@googlemail.com> 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’.




      reply	other threads:[~2012-03-21 19:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 13:51 Higher order modules: a first stab Ian Price
2012-03-21 19:16 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vclx933d.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).