www

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

commit a992664ffbef704f88a77cbcb99ea27c32d8fe63
parent 59754c3569973705587a3738edd90aa4608bb4e0
Author: AlexKnauth <alexander@knauth.org>
Date:   Thu, 24 May 2018 16:11:34 -0400

add scopes within boxes, vectors, hashes, and prefab structs

Diffstat:
Msuperscripts.rkt | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/superscripts.rkt b/superscripts.rkt @@ -1,6 +1,7 @@ #lang racket (require racket/syntax + racket/struct racket/string racket/format debug-scopes/named-scopes-sli-parameter) @@ -114,6 +115,16 @@ [(syntax? e) (datum->syntax e (add-scopes (syntax-e e)) e e)] [(pair? e) (cons (add-scopes (car e)) (add-scopes (cdr e)))] + [(box? e) + (box-immutable (add-scopes (unbox e)))] + [(vector? e) + (apply vector-immutable (map add-scopes (vector->list e)))] + [(hash? e) + (for/fold ([e e]) ([k (in-hash-keys e)]) + (hash-update e k add-scopes))] + [(prefab-struct-key e) + (define key (prefab-struct-key e)) + (apply make-prefab-struct key (map add-scopes (struct->list e)))] [else e])) (define (sli/use whole-stx)