continuable define and mutation of export
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
- Assignee:
- No assignee Edit question
- Solved by:
- Abdulaziz Ghuloum
- Solved:
- Last query:
- Last reply: