You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
beautiful-racket/beautiful-racket-lib/br/syntax-scopes-test-2.rkt

21 lines
457 B
Racket

9 years ago
#lang br
(require (for-syntax br/syntax))
(begin-for-syntax
(define-scope blue))
(define #'(define-blue _id _expr)
(with-syntax ([_id (blue-binding-form #'_id)])
#'(define _id _expr)))
(define #'(blue _id)
(with-syntax ([_id (blue #'_id)])
#'_id))
(define-syntax x:blue (make-rename-transformer (with-syntax ([x (blue #'x)])
#'x)))
(define-blue x (+ 42 42))
(define y 50)
9 years ago
#;(+ (blue x) y)