bytecode loses paren-shape property?

16 views
Skip to first unread message

Stephen Chang

unread,
Aug 11, 2015, 2:47:33 PM8/11/15
to dev
file A.rkt:

#lang racket
(require (for-syntax syntax/parse))
(provide test)
(define-syntax (test stx)
(syntax-parse stx
[_
#:when (displayln (syntax-property #'[1] 'paren-shape))
#'(void)]))
(test)

file B.rkt:

#lang racket
(require "A.rkt")
(test)

Running B.rkt in drracket (version 6.2.900.6) produces:
[
#f

Is this expected behavior or a bug?

Ryan Culpepper

unread,
Aug 11, 2015, 3:12:37 PM8/11/15
to Stephen Chang, dev
Expected behavior. Syntax properties and source locations are stripped
from syntax objects when bytecode is marshaled (eg, to a .zo file). See
the first paragraph of http://docs.racket-lang.org/reference/stxprops.html.

Ryan
Reply all
Reply to author
Forward
0 new messages