www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 7e3a21ba6fef06da9aed8f4bf299335bbe1946fd
parent 84b5a8759f415ccd64ac54c4dd75741adfc648c3
Author: Stephen Chang <stchang@ccs.neu.edu>
Date:   Thu, 30 Mar 2017 19:01:56 -0400

extends form supports non-strs and allows explicit prefix

Diffstat:
Mmacrotypes/typecheck.rkt | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/macrotypes/typecheck.rkt b/macrotypes/typecheck.rkt @@ -104,15 +104,19 @@ (define-syntax extends (syntax-parser [(_ base-lang + (~optional (~seq #:prefix pre)) (~optional (~seq #:except (~and x:id (~not _:keyword)) ...) #:defaults ([(x 1) null])) (~optional (~seq #:rename [old new] ...) #:defaults ([(old 1) null][(new 1) null]))) #:with pre: + (or + (attribute pre) (let ([pre (or (let ([dat (syntax-e #'base-lang)]) - (and (string? dat) (extract-filename dat))) + (and (or (string? dat) (symbol? dat)) + (extract-filename dat))) #'base-lang)]) - (format-id #'base-lang "~a:" pre)) + (format-id #'base-lang "~a:" pre))) #:with internal-pre (generate-temporary) #:with non-excluded-imports #'(except-in base-lang x ... old ...) #:with conflicted? #'(λ (n) (member (string->symbol n) '(#%app λ #%datum begin let let* letrec if define)))