larcenists / larceny

Larceny Scheme implementation
Other
202 stars 32 forks source link

bytevector-ref and bytevector-set! unavailable with --r7r6 command-line option #759

Closed WillClinger closed 8 years ago

WillClinger commented 8 years ago

As reported by Ken Dickey:

$ ./larceny -r7r6
Larceny v0.99a1 (alpha test) (May 19 2016 17:57:18, precise:Linux:split)
larceny.heap, built on Thu May 19 18:03:15 PDT 2016

> bytevector-set!

Error: unhandled condition:
Compound condition has these components: 
#<record &assertion>
#<record &message>
    message : "?: undefined global variable: bytevector-set! \n"

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

> (import (rnrs bytevectors (6)))

> bytevector-set!

Error: unhandled condition:
Compound condition has these components: 
#<record &assertion>
#<record &message>
    message : "?: undefined global variable: bytevector-set! \n"

bytevector-ref is missing as well.

For whatever reason, those procedures were not exported from lib/R6RS/larceny/r7r6.sld.

WillClinger commented 8 years ago

Well, the reason those procedures aren't exported by r7r6.sld is that they aren't exported by any of the R7RS or R6RS libraries. In R7RS and R6RS, their correct names are bytevector-u8-ref and bytevector-u8-set!.