|
187 | 187 | (#%require (only racket/match match)
|
188 | 188 | (all-except racket/match match)
|
189 | 189 | (rename racket/match match2 match)
|
| 190 | + (prefix match2: racket/match) |
190 | 191 | (prefix-all-except match: racket/match match)
|
191 | 192 | ; TODO (planet "match" ("match" "match")) ; Not a real package
|
192 | 193 | ))))
|
193 | 194 | `(module bar racket/base
|
194 | 195 | ((#%require (only racket/match ,match)
|
195 | 196 | (all-except racket/match ,match)
|
196 | 197 | (rename racket/match ,match2 ,match)
|
| 198 | + (prefix-all-except match2: racket/match) |
197 | 199 | (prefix-all-except match: racket/match ,match)
|
198 | 200 | ; TODO (planet "match" ("match" "match"))
|
199 | 201 | ))))
|
|
217 | 219 | `(#%plain-app (primitive eval) (quote-syntax ,#'(+ 1 2))))
|
218 | 220 | (check-compiler-equal?
|
219 | 221 | (current-compile #`(eval (quote-syntax (+ 1 2) #:local)))
|
220 |
| - `(#%plain-app (primitive eval) (quote-syntax-local ,#'(+ 1 2))))))) |
| 222 | + `(#%plain-app (primitive eval) (quote-syntax-local ,#'(+ 1 2)))) |
| 223 | + (check-compiler-equal? |
| 224 | + (current-compile #'(begin |
| 225 | + (define x 5) |
| 226 | + (#%variable-reference (#%top . x)))) |
| 227 | + `(begin* |
| 228 | + (define-values (,x) '5) |
| 229 | + (#%variable-reference-top ,x))) |
| 230 | + (check-compiler-equal? |
| 231 | + (current-compile #'(module foo racket/base |
| 232 | + (#%plain-module-begin |
| 233 | + (#%require (for-label racket/match)) |
| 234 | + (#%provide (for-label match)) |
| 235 | + (define x 5) |
| 236 | + (#%provide (protect x))))) |
| 237 | + `(module foo racket/base |
| 238 | + ((#%require (for-meta #f racket/match)) |
| 239 | + (#%provide (for-meta* #f ,match)) |
| 240 | + (define-values (,x) '5) |
| 241 | + (#%provide (protect ,x))))) |
| 242 | + (check-compiler-equal? |
| 243 | + (current-compile #'(module foo racket/base |
| 244 | + (#%plain-module-begin |
| 245 | + (module bar racket/base |
| 246 | + (#%plain-module-begin |
| 247 | + 42)) |
| 248 | + (#%require (submod "." bar))))) |
| 249 | + `(module foo racket/base |
| 250 | + ((submodule bar racket/base |
| 251 | + ('42)) |
| 252 | + (#%require (submod "." bar)))))))) |
221 | 253 |
|
222 | 254 | ;; ===================================================================================================
|
223 | 255 |
|
|
0 commit comments