Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to syntax-spec-v2 #182

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.)}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

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
Loading