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

Should probe's implementation use parameterize? Where? What are the semantics of possibly-nested probe/readout? #171

Open
benknoble opened this issue Apr 19, 2024 · 0 comments

Comments

@benknoble
Copy link
Collaborator

qi/qi-probe/probe.rkt

Lines 67 to 80 in 601d1b6

(define-syntax-parse-rule (probe flo)
(call/cc
(λ (return)
(source return) ; save the continuation to the `source` parameter
flo)))
(define-qi-syntax-parser readout
[_:id #'(esc
(λ args
(let ([src (source)])
;; reset source to avoid the possibility of stale
;; continuations used later outside of a `probe`
(source default-source)
(apply src args))))])

It might obviate the need for (source default-source), but does the parameterize belong around call/cc or within it? What happens in the presence of a threading (as in thread) backend? Etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant