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.
21 lines
456 B
Racket
21 lines
456 B
Racket
#lang br
|
|
(require (for-syntax br/scope))
|
|
|
|
(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)
|
|
|
|
#;(+ (blue x) y) |