Okay, thanks. I didn't knew that.<br><br>Speaking about BlackHole, I was wondering: how could one define his own module resolver?<br>For instance I saw that termite has a BH version. But I don't know how I could import it if I install it system-wide.<br>
<br><br><div class="gmail_quote">2010/8/6 Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca">feeley@iro.umontreal.ca</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
This is not a problem with blackhole.  Your program contains an error because it is trying to mutate a constant.  In Scheme, quoted objects are not mutable and it is an error to mutate them.  The interpreter does not enforce this error because it implements constants using mutable objects.  The compiler implements constants using "permanent objects" which cannot be mutated (they are not scanned by the garbage collector).<br>

<br>
You could fix your program by doing<br>
<br>
(define a (list 3 2 4 2))<br>
<br>
instead of<br>
<div class="im"><br>
(define a '(3 2 4 2))<br>
<br>
</div>Marc<br>
<div><div></div><div class="h5"><br>
On 2010-08-06, at 9:26 AM, Yves Parès wrote:<br>
<br>
> Hello,<br>
><br>
> I have a file "test.scm" containing the following lines:<br>
><br>
> (import (std srfi/1))<br>
><br>
> (define a '(3 2 4 2))<br>
> (append! a '(8 8 8))<br>
><br>
> (display a)<br>
> (newline)<br>
><br>
><br>
> When I lauch: gsc -e '(load "~~/lib/modules/build")' -<br>
> and then (import test) it displays '(3 2 4 2 8 8 8)', which is fine.<br>
> But if 'test' has been compiled first with (module-compile! 'test), then when importing I got the error:<br>
><br>
> *** ERROR IN ##main -- (Argument 1) MUTABLE object expected<br>
> (set-cdr! '(2) '(8 8 8))<br>
><br>
><br>
> (I use the last git version of BH)<br>
</div></div>> _______________________________________________<br>
> Gambit-list mailing list<br>
> <a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
> <a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br>
</blockquote></div><br>