racket/pkgs/racket-doc/syntax/scribblings/intdef.scrbl
Matthew Flatt 0e16ce4bea add internal-definition-context-{binding-identifier,track}
When an internal-definition context is used with `local-expand`, the
any binding added to the context affect expansion, but the binding do
not appear in the expansion. As a result, Check Syntax was unable to
draw an arrow from the `s` use to its binding in

 (class object%
   (define-struct s ())
   s)

The general solution is to add the internal-definition context's
bindings to the expansion as a 'disappeared-bindings property. The new
`internal-definitionc-context-track` function does that using a new
`internal-definition-context-binding-identifier` primitive.
2015-11-15 06:17:22 -07:00

23 lines
659 B
Racket

#lang scribble/doc
@(require "common.rkt" (for-label syntax/intdef))
@title[#:tag "intdef"]{Internal-Definition Context Helpers}
@defmodule[syntax/intdef]
@history[#:added "6.3.0.4"]
@defproc[(internal-definition-context-track
[intdef-ctx internal-definition-context?]
[stx syntax?])
syntax?]{
Adjusts the @tech[#:doc refman]{syntax properties} of @racket[stx] to
record that parts of @racket[stx] were expanded via
@racket[intdef-ctx].
Specifically, the identifiers produced by
@racket[(internal-definition-context-binding-identifiers intdef-ctx)]
are added to the @racket['disappeared-bindings] property of
@racket[stx].}