[gambit-list] What's in your gambc.scm file?
Per Eckerdal
per.eckerdal at gmail.com
Tue Oct 6 05:38:46 EDT 2009
> I found a nice way of implementing loading blackhole via the
> extensions
> init file, and still having a seperate bsc/gsc command pair, by
> symbolically linking bsc -> gsc, and putting:
>
> (if (equal? (car (command-line)) "bsc")
> (and (load "~~/lib/modules/build")
> (display "loaded blackhole extensions...")
> (newline))
> #!void)
>
> In my /usr/local/Gambit-C/lib/gambcext file.
That's really neat! I would write it like this:
(and (equal? (car (command-line)) "bsc")
(load "~~lib/modules/build")
(let ()
(##namespace ("module#"))
(##include "~~lib/gambit#.scm")
(println "Loaded Black Hole...")))
This leaves room for users to add custom load-time configuration, for
instance
(and (equal? (car (command-line)) "bsc")
(load "~~lib/modules/build")
(let ()
(##namespace ("module#"))
(##include "~~lib/gambit#.scm")
(module-resolver-add!
'user
(package-module-resolver "~/.blackhole"))
(println "Loaded Black Hole...")))
What do you think?
/Per
More information about the Gambit-list
mailing list