continuable define and mutation of export

Asked by Derick Eddington on 2007-11-23

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)
  (newline)
)

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

Question information

Language:
English Edit question
Status:
Solved
For:
Ikarus Scheme Edit question
Assignee:
No assignee Edit question
Solved by:
Abdulaziz Ghuloum
Solved:
2007-11-23
Last query:
2007-11-23
Last reply:
2007-11-23
Best Abdulaziz Ghuloum (aghuloum) said : #1

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

Thanks Abdulaziz Ghuloum, that solved my question.