Discussion:
[Larceny-users] understanding compiler messages
Sven Hartrumpf
2016-01-22 14:51:49 UTC
Permalink
Hi.

I am porting a large R5RS program to R7RS, module by module.
rlwrap larceny -r7rsc
Larceny v0.98+ "General Ripper" (Jan 12 2016 13:24:38, precise:Linux:unified)
larceny.heap, built on Di 12. Jan 13:27:54 CET 2016
(import (larceny compiler))
(compile-file "general.sld")
Compiling general.sld
Reading larceny.scm
Reading general.scm


Error: unhandled condition:
Compound condition has these components:
#<record &assertion>
#<record &who>
who : "car"
#<record &message>
message : "car: not a pair: #f \n"

Entering debugger; type "?" for help.
debug> ?

a Abort (exit from Larceny).
b Print backtrace of continuation.
c Print source code (if available).
d Down to previous activation record.
e n expr Expr is evaluated in the current interaction environment
and must evaluate to a procedure. It is passed the contents
of slot n from the current activation record, and the result,
if not unspecified, is printed.
e (n1 ... nk) expr
Expr is evaluated in the current interaction environment and
must evaluate to a procedure. It is passed the contents of
slots n1 through nk from the current activation record, and
the result, if not unspecified, is printed.
i n Inspect the procedure in slot n of the current activation record.
i @ Inspect the active procedure.
n Enter a nested REPL.
q Quit the debugger and abort the computation.
r Return from the debugger and continue the computation.
s Summarize the contents of the current activation record.
u Up to the next activation record.
x Examine the contents of the current activation record.

The b, d, and u commands can be prefixed with a count, for example,
`5 u' moves up five activation records, and `10 b' displays the next
10 activation records. The default for b is to display all the
activations; the default count for d and u is 1.

debug> b
=> compiled procedure debug/enter-debugger
compiled procedure #f
compiled procedure call-with-values
compiled procedure call-with-values
system continuation
compiled procedure compress (r6rs-expander.sch : 213 : 1)
compiled procedure compress (r6rs-expander.sch : 213 : 1)
compiled procedure compress (r6rs-expander.sch : 213 : 1)
compiled procedure #f (r6rs-expander.sch : 1958 : 37)
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure #f (r6rs-expander.sch : 1156 : 17)
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure #f (r6rs-expander.sch : 2774 : 8)
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure #f (r6rsmode.sch : 593 : 13)
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure call-with-values
compiled procedure repl
compiled procedure r5rs-entry-point
compiled procedure call-with-values
compiled procedure #f
compiled procedure interactive-entry-point
system continuation
debug> #<EOF>

How can I track this problem?

Ciao
Sven
William D Clinger
2016-01-23 19:48:33 UTC
Permalink
Post by Sven Hartrumpf
I am porting a large R5RS program to R7RS, module by module.
rlwrap larceny -r7rsc
Larceny v0.98+ "General Ripper" (Jan 12 2016 13:24:38, precise:Linux:unified)
larceny.heap, built on Di 12. Jan 13:27:54 CET 2016
(import (larceny compiler))
(compile-file "general.sld")
Compiling general.sld
Reading larceny.scm
Reading general.scm
#<record &assertion>
#<record &who>
who : "car"
#<record &message>
message : "car: not a pair: #f \n"
Entering debugger; type "?" for help.
This is clearly a bug in Larceny's module/macro expander. From
the backtrace, it looks like it's a bug in the compress procedure,
so it's probably related to Larceny bug tickets #733 and #740.

I'm going to have to take some time and figure out what's wrong
with that compress procedure. I don't know whether there was a
latent bug in that procedure that only started to show up or be
reported in v0.98, or whether the changes I made for R7RS are
causing it to be passed some incorrect inputs.

I appreciate the improvement you suggested for HOWTO-BUILD, and
have made that change.

Will
William D Clinger
2016-01-24 13:51:10 UTC
Permalink
Sven, I pushed a fix for bug #740 that will probably fix the
module/macro expander problem you encountered. Please try it
and let me know.

Will
Sven Hartrumpf
2016-01-24 14:13:25 UTC
Permalink
Post by William D Clinger
Sven, I pushed a fix for bug #740 that will probably fix the
module/macro expander problem you encountered. Please try it
and let me know.
Yes, that fixes my problem.

Thanks!
Sven

Loading...