test-arrows.rkt (537B)
1 #lang racket 2 (require generic-syntax-expanders rackunit) 3 (define-expander-type foo) 4 (define-foo-expander foo1 (λ _ #''ok)) 5 (define-syntax (bar stx) 6 (syntax-case stx () 7 [(_ body) 8 (expand-all-foo-expanders #'body)])) 9 ;; When hovering "foo1" in the code below with the mouse, an arrow should 10 ;; be shown in DrRacket from the foo1 in (define-foo-expander foo1 …) above. 11 ;; This is not automatically checked, as it would be difficult/brittle to check 12 ;; for the syntax property. Patches welcome. 13 (check-equal? (bar (foo1)) 'ok)