Skip to content

Commit

Permalink
Outlawed assignments to imported primitives (ticket #697).
Browse files Browse the repository at this point in the history
  • Loading branch information
WillClinger committed Jul 3, 2017
1 parent d973116 commit 9616118
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/R6RS/r6rs-expander.sch
Original file line number Diff line number Diff line change
Expand Up @@ -2289,6 +2289,7 @@
(lambda (library-ref levels more-imports)
(loop (cdr specs)
;; library-ref = #f if primitives spec
;; FIXME: that's not true; see below
(if library-ref
(cons (cons library-ref levels)
imported-libraries)
Expand All @@ -2299,7 +2300,7 @@
;; (<level> ...)
;; ((<local name> . <binding>) ...)
;; where <level> ::= <integer>
;; #f is returned for library name in case of primitives.
;; FIXME: For primitives, (larceny PRIMITIVES) is the library name.

(define (scan-import-spec spec)

Expand All @@ -2325,7 +2326,12 @@
(values #f
levels
(map (lambda (mapping)
(cons (car mapping) (make-binding 'variable (cdr mapping) levels #f '())))
(cons (car mapping)
(make-binding 'variable
(cdr mapping)
levels
#f
'(larceny PRIMITIVES))))
(adjuster (map (lambda (name) (cons name name))
(syntax->datum xs))))))
(((syntax only) set (? identifier? xs) ___)
Expand Down

0 comments on commit 9616118

Please sign in to comment.