www

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

commit a103d48aaf2a88c085fd5effa68c4f221c2aadd9
parent 75703ac93337ce91f7cf335f1349741fb5a66e38
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Thu, 10 Nov 2016 17:45:15 +0100

Used backport-template-pr1514

Diffstat:
Minfo.rkt | 3++-
Msubtemplate.rkt | 13++++++++-----
Mtraversal.hl.rkt | 11++++++-----
3 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/info.rkt b/info.rkt @@ -9,7 +9,8 @@ "scribble-enhanced" "typed-racket-lib" "srfi-lite-lib" - "delay-pure")) + "delay-pure" + "backport-template-pr1514")) (define build-deps '("scribble-lib" "racket-doc" "remember" diff --git a/subtemplate.rkt b/subtemplate.rkt @@ -3,8 +3,9 @@ phc-toolkit/untyped racket/stxparam syntax/parse - syntax/parse/experimental/template - syntax/parse/experimental/private/substitute + backport-template-pr1514/experimental/template + ;syntax/parse/experimental/template + ;syntax/parse/experimental/private/substitute syntax/id-table racket/syntax (for-syntax "patch-arrows.rkt" @@ -23,7 +24,7 @@ (provide (rename-out [new-syntax-parse syntax-parse] [new-syntax-parser syntax-parser] [new-syntax-case syntax-case]) - define-unhygienic-template-metafunction + ;define-unhygienic-template-metafunction subtemplate quasisubtemplate) @@ -319,6 +320,7 @@ (derived))))) +#| (require syntax/parse/experimental/private/substitute) ;; Not very clean, but syntax/parse/experimental/template should export it :-( (define (stolen-current-template-metafunction-introducer) @@ -348,4 +350,5 @@ [mark (make-syntax-delta-introducer (+normal #'self 'flip) zero)] [,#'stx (syntax-local-introduce (mark ,#'tmp-stx 'flip))]) - (mark (syntax-local-introduce (let () . ,#'code))))])))])) -\ No newline at end of file + (mark (syntax-local-introduce (let () . ,#'code))))])))])) +|# +\ No newline at end of file diff --git a/traversal.hl.rkt b/traversal.hl.rkt @@ -151,10 +151,10 @@ not expressed syntactically using the @racket[Foo] identifier. @CHUNK[<define-fold> (begin-for-syntax - (define-unhygienic-template-metafunction (replace-in-type stx) + (define-template-metafunction (replace-in-type stx) (syntax-case stx () [(_ _whole-type [_type-to-replaceᵢ _Tᵢ] …) - #`(#,(syntax-local-introduce + #`(#,(syntax-local-template-metafunction-introduce (fold-type #'(_whole-type _type-to-replaceᵢ …))) _Tᵢ …)])))] @CHUNK[<define-fold> @@ -191,10 +191,10 @@ not expressed syntactically using the @racket[Foo] identifier. @CHUNK[<define-fold> (begin-for-syntax - (define-unhygienic-template-metafunction (replace-in-instance stx) + (define-template-metafunction (replace-in-instance stx) (syntax-case stx () [(_ _whole-type [_type-to-replaceᵢ _predicateᵢ _updateᵢ] …) - #`(#,(syntax-local-introduce + #`(#,(syntax-local-template-metafunction-introduce (fold-f #'(_whole-type _type-to-replaceᵢ …))) {?@ _predicateᵢ _updateᵢ} …)])))] @@ -378,7 +378,8 @@ where @racket[foldl-map] is defined as: (subtract-in (combine-in racket/base syntax/parse) "subtemplate-override.rkt") - syntax/parse/experimental/template + ;syntax/parse/experimental/template + backport-template-pr1514/experimental/template phc-toolkit/untyped racket/syntax type-expander/expander