unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: Julian Graham <joolean@gmail.com>
Cc: Andy Wingo <wingo@pobox.com>, guile-user <guile-user@gnu.org>
Subject: Re: dynamic module creation
Date: Wed, 04 Feb 2009 00:30:47 +0000	[thread overview]
Message-ID: <87eiyfhwlk.fsf@arudy.ossau.uklinux.net> (raw)
In-Reply-To: <2bc5f8210902011259w54b5e427x1de20fb88143d441@mail.gmail.com> (Julian Graham's message of "Sun\, 1 Feb 2009 15\:59\:18 -0500")

Julian Graham <joolean@gmail.com> 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)
> #<directory (guile-user) b7d61630>
> 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




      parent reply	other threads:[~2009-02-04  0:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-01  7:58 dynamic module creation Julian Graham
2009-02-01 12:04 ` Andy Wingo
2009-02-01 19:29   ` Neil Jerram
2009-02-02  9:49   ` Ludovic Courtès
     [not found]   ` <2bc5f8210902011259w54b5e427x1de20fb88143d441@mail.gmail.com>
2009-02-04  0:30     ` Neil Jerram [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=87eiyfhwlk.fsf@arudy.ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-user@gnu.org \
    --cc=joolean@gmail.com \
    --cc=wingo@pobox.com \
    /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).