This adds a call to syntax-track-origin to a place where it was missing in type-language.rkt.
In the case where a type macro expands to an identifier, the disappeared-use and origin etc. properties on that result identifier were being lost. This copies those properties onto the residual syntax object.
A simple program that this PR fixes is this:
#lang hackett
(require (only-in racket/base module quote))
(module m racket
(provide m)
(require syntax/parse/define)
(define-syntax-parser m
[(m x y)
(syntax-property #'x
'disappeared-use
(syntax-local-introduce #'y))]))
(require (for-type 'm))
(def f : (∀ [x y] (m x y)) ; before: this `y` doesn't get an arrow
(todo!)) ; after: this `y` is properly shown as bound to the `y` in the forall
This adds a call to
syntax-track-origin
to a place where it was missing in type-language.rkt.In the case where a type macro expands to an identifier, the
disappeared-use
andorigin
etc. properties on that result identifier were being lost. This copies those properties onto theresidual
syntax object.A simple program that this PR fixes is this: