Skip to content

Commit

Permalink
fix library-reference import syntax (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
owaddell-beckman authored and jltaylor-us committed Oct 4, 2023
1 parent 05fa9ed commit 1e734f6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
2 changes: 2 additions & 0 deletions LOG
Original file line number Diff line number Diff line change
Expand Up @@ -2439,3 +2439,5 @@
csug/csug.stex bintar/Makefile rpm/Makefile pkg/Makefile
wininstall/Makefile wininstall/a6nt.wxs wininstall/i3nt.wxs
wininstall/ta6nt.wxs wininstall/ti3nt.wxs
- fix (library <library reference>) import syntax
mats/8.ms release_notes/release_notes.stex s/syntax.ss
24 changes: 24 additions & 0 deletions mats/8.ms
Original file line number Diff line number Diff line change
Expand Up @@ -3417,6 +3417,30 @@
(import-only A B)
x))
'b)
(begin
(library (for mat) (export x) (import (scheme)) (define x 123))
(library (a b c) (export d) (import (scheme)) (define d 27))
(library (xd)
(export ls)
(import (scheme) (library (for mat)) (library (a b c)))
(define ls (list x d)))
#t)
(equal? 123
(let ([x 'port])
(import (library (for mat)))
x))
(equal? 27
(let ([d 'nile])
(import (library (a b c)))
d))
(equal? 27
(let ([d 'nile])
(import (a b c))
d))
(equal? '(123 27)
(let ([x 'treme] [d 'nile])
(import (xd))
ls))
)

(mat export ; test stand-alone export form
Expand Down
5 changes: 5 additions & 0 deletions release_notes/release_notes.stex
Original file line number Diff line number Diff line change
Expand Up @@ -1966,6 +1966,11 @@ in fasl files does not generally make sense.
%-----------------------------------------------------------------------------
\section{Bug Fixes}\label{section:bugfixes}

\subsection{Library-reference import syntax}

A bug where \scheme{import} did not recognize a \var{library-spec}
of the form \scheme{(library \var{library-reference})} has been fixed.

\subsection{Garbage collector incorrectly handles emphemerons (9.6.0)}

A bug where the garbage collector sometimes incorrectly handles epehemeron pairs has
Expand Down
2 changes: 1 addition & 1 deletion s/syntax.ss
Original file line number Diff line number Diff line change
Expand Up @@ -4250,7 +4250,7 @@
(and (not std?) (id? #'mid))
(determine-module-imports "module" #'mid #'mid #'mid)]
[(?library-reference lr)
(sym-kwd? ?library-reference library-reference)
(sym-kwd? ?library-reference library)
(let-values ([(mid tid) (lookup-library #'lr)])
(determine-module-imports "library" #'lr mid tid))]
[lr (let-values ([(mid tid) (lookup-library #'lr)])
Expand Down

0 comments on commit 1e734f6

Please sign in to comment.