guile-user
[Top][All Lists]
Advanced

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

Fwd: How to "do what guild does" from within code?


From: Ian Hulin
Subject: Fwd: How to "do what guild does" from within code?
Date: Thu, 12 Jul 2012 18:33:36 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi all,
First of all, apologies if this is noddy/noob question, but I have
*have* looked in the docs for this.

I'm trying to do an on-the-fly compilation of the LilyPond module
initialization scheme code during lily initialization.  Autocompilation
is switched off and I've got all the load path compiled load path
variables set as we need them.

I then fire off the code equivalent of
(compile-file :#output-file=<go-out-dir>/lily-guile2.go
<scm-src-dir>lily-gule-2.scm) in code with all the parameters set as I
want then.

Unfortunately my source file loads another module declared in
<scm-src-dir>display-lily.scm which has yet to be declared.

The guile code very helpfully locates the source file for the
display-lily module, notes there isn't a .go file and has a shot at
compiling it.  During this there is a throw to 'unbound-variable for a
variable which will have been declared when lily-guile2.go is loaded in
anger.

How do I get my code to handle the 'unbound-variable the way guild does?
 I.e. just note it's happened, say it's possibly a problem in an
informational message, and then carry on from the point where it threw
the error.

I've fiddled around with catch/scm_c_catch/scm_internal_catch without
success.

Is there a way I can use scm_c_with_throw_handler to do this?  If so
how do I get the handler to get the catch code to recognize "yeah,
we've handled this one, it's OK to carry on".

Cheers,

Ian Hulin


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJP/wplAAoJEJXSNSqmRFYkaQYH/iWS+XNAo+KJgNNujVMIxvjt
VTNcG/fsy9s/X8a38t3CK5K+ggQe2D/l3BdGWjv1oxSYPWyZ/NcP27Snpcix0yoc
A2Y5a2BveOIrlF00FxrzYk6BGJqONYsBwnOm7aO5DrQ8vpmdWGf639jXkmveBOiB
8vV/2rSW/HoZNuxqinrIBwPrOtZ1Z1ZSBaZNDRjWeHPmpS5ZOZB3GuOVEFFsdi2e
BNztY50/wAg7klKezZsGwyUzM+tmXD2aafpeCrLNSiVGNiovvSs5/pV+aEnpClJC
vOQwHBre0x0QYV8ivXdRdLjduDZ++ptld31Ay0h5ihZO58Q7uGTRpfLUkkR/jCM=
=yWLQ
-----END PGP SIGNATURE-----



reply via email to

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