Discussion:
[Larceny-users] Error running an external program
Athanasius
2015-09-28 08:57:36 UTC
Permalink
Hello Larceny users,

I'm new to Larceny, to Scheme, and to functional programming in general.

I've installed Larceny (larceny-0.98-bin-native-ia32-win32) under
Windows 8.1 (64-bit). DEP was already set to:

"Turn on DEP for essential Windows programs and services only"

I have a test script named "hello.scm":

;The first program

(begin
(display "Hello, World!")
(newline))

When I run this in the REPL, it works correctly:

C:\Users\User\Documents\Programmes\Scheme\Larceny>larceny

Larceny v0.98 "General Ripper" (Mar 7 2015 07:45:45,
precise:Win32:unified)
larceny.heap, built on Sat 03/07/2015
(load "hello.scm")
Hello, World!
But when I try to run it as a stand-alone script, following the
directions in the Larceny User Manual (3.2. R6RS mode), it fails:

C:\Users\User\Documents\Programmes\Scheme\Larceny>larceny -r6rs
-program hello

Error: no handler for exception #<record &compound-condition>
Compound condition has these components:
#<record &error>
#<record &who>
who : "Could not locate library: "
#<record &assertion>
#<record &who>
who : make-message-condition
#<record &irritants>
irritants : (r6rsmode)
#<record &irritants>
irritants : ()

Terminating program execution.

C:\Users\User\Documents\Programmes\Scheme\Larceny>

Where have I gone wrong?

Thanks,
Athanasius
William D Clinger
2015-09-28 18:51:40 UTC
Permalink
Post by Athanasius
But when I try to run it as a stand-alone script, following the
C:\Users\User\Documents\Programmes\Scheme\Larceny>larceny -r6rs
-program hello
Error: no handler for exception #<record &compound-condition>
#<record &error>
#<record &who>
who : "Could not locate library: "
#<record &assertion>
#<record &who>
who : make-message-condition
#<record &irritants>
irritants : (r6rsmode)
#<record &irritants>
irritants : ()
Terminating program execution.
C:\Users\User\Documents\Programmes\Scheme\Larceny>
Where have I gone wrong?
Does it work when you specify the program as hello.scm instead of
just hello?

I suspect that's what went wrong. The error message wasn't as
helpful as it should have been because it failed to list the name
of the library/program it couldn't find; we should fix that.

Will

Loading...