[Larceny-users] weird error message compiling library
Felix Klock
felixluser at pnkfx.org
Mon Jun 29 16:58:01 EDT 2009
Marco-
On Jun 29, 2009, at 4:41 PM, Marco Maggi wrote:
> http://github.com/marcomaggi/nausicaa/blob/25e23467cf948eb464704595e5a247d11bbd0158/scheme/src/libraries/random.sls
This snippet of code starting from line 343 of the above link seems
pretty suspect to me; you have a unary definition of make-integer
followed by an invocation with zero arguments.
(define (make-integer n)
(if (and (integer? n) (exact? n) (positive? n))
(mod (next-integer) n)
(assertion-violation 'integers-maker
"range upper limit must be an exact positive integer" n)))
(define (make-real)
(* (inexact (make-integer)) const:1/2^32^2))
I used the error message emitted by Larceny as the hint to look here.
What do you think?
-Felix
p.s. Hypothesis: it could be that the other systems do not detect any
problem here because the make-real procedure is never invoked in your
code base. I believe they are more conforming to the R6RS than
Larceny is on this particular point; I also believe there is a way to
coax Larceny into a mode where it will still compile the code and
ignore the latent error hidden within. If you want me to look up more
information about this, let me know.
More information about the Larceny-users
mailing list