Skip to content

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

@benknoble

Description

@benknoble

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions