Skip to content

Commit

Permalink
Merge pull request #131 from countvajhula/fix-phase-issue
Browse files Browse the repository at this point in the history
Fix phase issue
  • Loading branch information
countvajhula authored Dec 11, 2023
2 parents 2467932 + 3daa77e commit 98c82c1
Show file tree
Hide file tree
Showing 6 changed files with 426 additions and 341 deletions.
10 changes: 6 additions & 4 deletions qi-lib/flow/core/compiler.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"../aux-syntax.rkt"
"util.rkt"
"debug.rkt"
"normalize.rkt"
"deforest.rkt")
"normalize.rkt")
"deforest.rkt"
"impl.rkt"
(only-in racket/list make-list)
racket/function
Expand All @@ -25,7 +25,9 @@
;; note: this does not return compiled code but instead,
;; syntax whose expansion compiles the code
(define (compile-flow stx)
(process-bindings (optimize-flow stx)))
(process-bindings
#`(qi0->racket
#,(optimize-flow stx))))

(define (deforest-pass stx)
(find-and-map/qi (fix deforest-rewrite)
Expand Down Expand Up @@ -107,7 +109,7 @@
;; TODO: use syntax-parse and match ~> specifically.
;; Since macros are expanded "outside in," presumably
;; it will naturally wrap the outermost ~>
(wrap-with-scopes #`(qi0->racket #,(rewrite-all-bindings stx))
(wrap-with-scopes (rewrite-all-bindings stx)
(bound-identifiers stx))))

(define-syntax (qi0->racket stx)
Expand Down
Loading

0 comments on commit 98c82c1

Please sign in to comment.