Closed svenha closed 8 years ago
The first error shows the limits of a dynamically typed language: somewhere in your code there is the following form which calls substring
with the wrong number of arguments:
(substring ?var1 (string-length ?var2))
where ?var1
and ?var2
are some variables of which the compiler does not know the original name or some variables introduced by the compiler's source code optimiser. Vicare's compiler does not keep enough source informations sorry. (In future the expander will detect these errors.) The gXXX
where XXX
are numbers are string names of gensyms generated by the expander and compiler; I would suggest you to use the options --option expander-descriptive-gensyms
and --option compiler-descriptive-labels
or just enable debugging mode with -g
, but with your compile times any debugging strategy is deathly.
The second error is probably a genuine compiler error. top-level-value
is a core primitive used to retrieve the current value of a global variable from the location gensym that contains it, but such gensym (whose string name is g41070
) appears to be unbound. You can easily get such error by evaluating:
(top-level-value (gensym))
you need knowledge of Vicare's internals to debug this.
I suggest you to: split your source code into proper libraries and a top level program so that you can compile them incrementally (your compile times are unbearable!!!); try also other Scheme implementations, for example the free Petite Chez Scheme which has a very fast compiler.
I managed to port a large Scheme program to vicare, so that it loads without visible errors. The compiler runs for 30 minutes (which is fine for 140 KLOC and let me hope for good results :-) ). But then I receive error messages from the compiler. They differ depending on the calling options. Here are two tries:
/usr/local/bin64/vicare -O1 --raw-repl Vicare Scheme version 0.4d0, 64-bit Build 2015-11-26
Copyright (c) 2006-2010 Abdulaziz Ghuloum and contributors Copyright (c) 2011-2015 Marco Maggi and contributors
vicare> (load "vic.scm") Unhandled exception Condition components:
/usr/local/bin64/vicare -d --optimizer-passes-count 1 -O1 --raw-repl
Vicare Scheme version 0.4d0, 64-bit Build 2015-11-26
Copyright (c) 2006-2010 Abdulaziz Ghuloum and contributors Copyright (c) 2011-2015 Marco Maggi and contributors
vicare> (load "vic.scm") Exception trapped by debugger. Condition components: