Skip to content

Commit

Permalink
Merge pull request #182 from michaelballantyne/main
Browse files Browse the repository at this point in the history
Upgrade to syntax-spec-v2
  • Loading branch information
countvajhula authored Sep 13, 2024
2 parents 20516b2 + 99acef3 commit 29bb906
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion qi-doc/scribblings/principles.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ All of this happens at @seclink["phases" #:doc '(lib "scribblings/guide/guide.sc

Thus, Qi is a special kind of @seclink["Hosted_Languages"]{hosted language}, one that happens to have the same architecture as the host language, Racket, in terms of having distinct expansion and compilation steps. This gives it a lot of flexibility in its implementation, including allowing much of its surface syntax to be implemented as @seclink["Qi_Macros"]{Qi macros} (for instance, Qi's @racket[switch] expands to a use of Qi's @racket[if] just as Racket's @racket[cond] expands to a use of Racket's @racket[if]), allowing it to be naturally macro-extensible by users, and lending it the ability to @seclink["Don_t_Stop_Me_Now"]{perform optimizations on the core language} that allow idiomatic code to be performant.

This architecture is achieved through the use of @seclink["top" #:indirect? #t #:doc '(lib "syntax-spec-v1/scribblings/main.scrbl")]{Syntax Spec}, following the general approach described in @hyperlink["https://dl.acm.org/doi/abs/10.1145/3428297"]{Macros for Domain-Specific Languages (Ballantyne et. al.)}.
This architecture is achieved through the use of @seclink["top" #:indirect? #t #:doc '(lib "syntax-spec-v2/scribblings/main.scrbl")]{Syntax Spec}, following the general approach described in @hyperlink["https://dl.acm.org/doi/abs/10.1145/3674627"]{Compiled, Extensible, Multi-language DSLs (Ballantyne et. al.)} and @hyperlink["https://dl.acm.org/doi/abs/10.1145/3428297"]{Macros for Domain-Specific Languages (Ballantyne et. al.)}.
2 changes: 1 addition & 1 deletion qi-lib/flow.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(all-from-out "flow/extended/expander.rkt")
(all-from-out "flow/extended/forms.rkt"))

(require syntax-spec-v1
(require syntax-spec-v2
(for-syntax racket/base
syntax/parse
(only-in "private/util.rkt"
Expand Down
4 changes: 2 additions & 2 deletions qi-lib/flow/extended/expander.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[sep △]
[collect ▽])))

(require syntax-spec-v1
(require syntax-spec-v2
"../space.rkt"
(for-syntax "../aux-syntax.rkt"
"syntax.rkt"
Expand Down Expand Up @@ -63,7 +63,7 @@ core language's use of #%app, etc.).
#:binding-space qi

(as v:racket-var ...+)
#:binding {(bind v) nested}
#:binding (scope (bind v) nested)

(thread f:floe ...)
#:binding (nest f nested)
Expand Down
2 changes: 1 addition & 1 deletion qi-lib/info.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(define collection "qi")
(define deps '("base"
("fancy-app" #:version "1.1")
"syntax-spec-v1"
"syntax-spec-v2"
"macro-debugger"))
(define build-deps '())
(define clean '("compiled" "private/compiled"))
Expand Down

0 comments on commit 29bb906

Please sign in to comment.