guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dynamic module creation


From: Neil Jerram
Subject: Re: dynamic module creation
Date: Wed, 04 Feb 2009 00:30:47 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Julian Graham <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]