Discussion:
[Larceny-users] Compiling a minimal library (R7RS)
Sven Hartrumpf
2016-01-19 09:52:22 UTC
Permalink
Hi.

I want to compile a minimal R7RS library with larceny.
cat minlibrary.sld
(define-library (minlibrary)
(export dup)
(include "minlibrary.scm"))
cat minlibrary.scm
(define (dup l)
(append l l))
larceny -r7rs
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-library "minlibrary.sld")
Compiling minlibrary.sld
Reading minlibrary.scm

Syntax violation: invalid reference

No binding available for define in library (minlibrary)

Form: define

Trace:

(define (dup l) (append l l))



Error: unhandled condition:
Compound condition has these components:
#<record &who>
who : "invalid reference"
#<record &message>
message : "No binding available for define in library (minlibrary)"
#<record &syntax>
form : define
subform : #f

Entering debugger; type "?" for help.
debug> #<EOF>
Greetings
Sven
Sven Hartrumpf
2016-01-19 10:03:16 UTC
Permalink
Sorry for the noise.
R7RS seems to require an
(import (scheme base))
in my define-library.

Now compilation works as expected.
Sven

Loading...