continuable define and mutation of export

Asked by Derick Eddington

I made the below to mention how continuable define is being allowed, and then I realized the example might also be revealing another issue.

Just to mention this in case this isn't intended, Ikarus is not detecting and raising &assertion as the R6RS 11.2.1 says it "should" when the continuation of a define expression is reinvoked.

Also, the R6RS 7.1 (near the end on page 25) says it is a syntax violation for an exported variable to be mutated by the exporting library.

(library (lib-cont)
  (export lk x)
  (import (rnrs))
  (define lk #f)
  ;;; should this set! of lk be prohibited per R6RS page 25?
  (define x (call/cc (lambda (k) (set! lk k) 'initial)))
  (display "In lib-cont\n")

(library (use-lib-cont)
  (export x lk y)
  (import (rnrs) (lib-cont))
  (define y (+ 1 2 3))
  (display "lib-cont's x => ")
  (write x)

(import (use-lib-cont))
(write y) (newline)
(lk 'new)

Question information

English Edit question
Ikarus Scheme Edit question
No assignee Edit question
Solved by:
Abdulaziz Ghuloum
Last query:
Last reply:
Revision history for this message
Best Abdulaziz Ghuloum (aghuloum) said :

I have opened two bug reports for this issue (bug 164730 and bug 164731).

Revision history for this message
Derick Eddington (derick-eddington) said :

Thanks Abdulaziz Ghuloum, that solved my question.