Closed greghendershott closed 3 years ago
Looks like the #%app
in that program is defined in racket code but the #%datum isn't. You also won't see a jump-to-definition for car
in this program
#lang racket
car
Here's a little script that shows basically the information that's being used in this program if you want to play around more with other examples:
#lang racket/base
(define ns (make-base-namespace))
(define stx
(parameterize ([current-namespace ns])
(expand (read-syntax "x.rkt"
(open-input-string "(module m racket/base (+ 42))")))))
(let loop ([stx stx])
(when (and (identifier? stx)
(or (equal? (syntax-e stx) '#%datum)
(equal? (syntax-e stx) '#%app))
(equal? (syntax-source stx) "x.rkt"))
(printf ">> ~s\n ~s\n" stx (identifier-binding stx)))
(cond
[(syntax? stx)
(loop (syntax-e stx))
(loop (syntax-property stx 'origin))]
[(pair? stx)
(loop (car stx))
(loop (cdr stx))]))
Sounds like this is intentional and working correctly, so closing this. Feel free to reopen with more questions.
Like #445 this is about the new annotations arising from commit 45fb5f5.
But that's already a long thread. And, this seems like a very specific question (that has nothing to do with points or intervals or API design -- whew! :smile:)
In a program like:
For the
(foobar)
expanding to#%app
, I see bothsyncheck:add-docs-menu
andsyncheck:add-jump-to-definition
.For the
42
expanding to#%datum
, I see onlysyncheck:add-docs-menu
--- notsyncheck:add-jump-to-definition
.(As presented by DrRacket, the difference is that "Open Defining File" is offered for
#%app
but not#%datum
.)Is this difference intentional and if so why?