delete some temporary examples
This commit is contained in:
parent
c78c085e60
commit
da21e04a60
|
@ -1,51 +0,0 @@
|
|||
#lang racket
|
||||
(require (for-syntax syntax/parse))
|
||||
#;(define-syntax (test stx)
|
||||
(syntax-parse stx
|
||||
[(_ x)
|
||||
#:with (_ (x2) x3) (local-expand #'(λ (x) (test2 x)) 'expression null)
|
||||
#:with (_ (x4) x5) (local-expand #'(λ (x) x) 'expression null)
|
||||
#:when (printf "test1: ~a\n" (free-identifier=? #'x2 #'x3))
|
||||
#'(void)]))
|
||||
#;(define-syntax (test2 stx)
|
||||
(syntax-parse stx
|
||||
[(_ x)
|
||||
#:with xx (local-expand #'x 'expression null)
|
||||
#:when (printf "test2: ~a\n" (bound-identifier=? #'x #'xx))
|
||||
#:with (lam (xxx) xxxx) (local-expand #'(λ (x) xx) 'expression null)
|
||||
#:when (printf "test2 post: ~a\n" (bound-identifier=? #'xxx #'xxxx))
|
||||
(local-expand #'x 'expression null)]))
|
||||
#;(test x)
|
||||
|
||||
(define x 1)
|
||||
(define-for-syntax (f y)
|
||||
(printf "f: ~a\n" (bound-identifier=? y #'x)))
|
||||
(define-syntax (test stx)
|
||||
(syntax-parse stx
|
||||
[(_ y)
|
||||
#:when (printf "test: ~a\n" (bound-identifier=? #'x #'y))
|
||||
#:when (printf "test: ~a\n" (bound-identifier=? (syntax-local-introduce #'x) #'y))
|
||||
#:when (printf "test: ~a\n" (bound-identifier=? ((make-syntax-delta-introducer #'y #'x) #'x) #'y))
|
||||
#:when (printf "test: ~a\n" (bound-identifier=? ((make-syntax-delta-introducer #'x #'y) #'x) #'y))
|
||||
#:when (printf "test: ~a\n" (bound-identifier=? (syntax-local-introduce #'y) #'x)) ; negates mark?
|
||||
#:when (printf "test: ~a\n" (bound-identifier=? ((make-syntax-delta-introducer #'y #'x) #'y) #'x))
|
||||
#:when (printf "test: ~a\n" (bound-identifier=? ((make-syntax-delta-introducer #'x #'y) #'y) #'x))
|
||||
#:when (printf "test: ~a\n" (bound-identifier=? (syntax-local-introduce (syntax-local-introduce #'y)) #'x)) ; double negation means no again
|
||||
#:when (f #'x)
|
||||
#:when (local-expand #'(test3 y) 'expression null)
|
||||
#'(test2 y)]))
|
||||
(define-syntax (test2 stx)
|
||||
(syntax-parse stx
|
||||
[(_ z)
|
||||
#:when (printf "test2: ~a\n" (bound-identifier=? #'x #'z))
|
||||
#:when (printf "test2: ~a\n" (bound-identifier=? #'x (syntax-local-introduce #'z)))
|
||||
#:when (printf "test2: ~a\n" (bound-identifier=? #'z (syntax-local-introduce #'x)))
|
||||
#'(void)]))
|
||||
(define-syntax (test3 stx)
|
||||
(syntax-parse stx
|
||||
[(_ z)
|
||||
#:when (printf "test3: ~a\n" (bound-identifier=? #'x #'z))
|
||||
#:when (printf "test3: ~a\n" (bound-identifier=? #'x (syntax-local-introduce #'z)))
|
||||
#:when (printf "test3: ~a\n" (bound-identifier=? #'z (syntax-local-introduce #'x)))
|
||||
#'(void)]))
|
||||
(test x)
|
|
@ -1,22 +0,0 @@
|
|||
#lang racket
|
||||
(require (for-syntax syntax/parse))
|
||||
(require (for-meta 2 racket/base))
|
||||
(provide #%module-begin #%top-interaction #%app #%datum)
|
||||
(provide (rename-out [lam/tc λ]))
|
||||
|
||||
(define-syntax (lam/tc stx)
|
||||
(syntax-parse stx
|
||||
[(_ (x y) e)
|
||||
#:with
|
||||
(lam xs (lr vs1 (lr2 vs2 e+)))
|
||||
(local-expand
|
||||
#'(λ (x y)
|
||||
(let-syntax
|
||||
; ([x (λ (sx) (syntax-parse sx [z:id (syntax-property #'y ': 100)]))])
|
||||
([x (make-rename-transformer (syntax-property #'x ': 100))])
|
||||
e))
|
||||
'expression
|
||||
null)
|
||||
#:when (printf "~a\n" #'e+)
|
||||
#:when (printf "~a\n" (syntax-property #'e+ ':))
|
||||
#'(λ xs e+)]))
|
|
@ -1,3 +0,0 @@
|
|||
#lang s-exp "../lam-testing.rkt"
|
||||
|
||||
((λ (x y) x) 1 2)
|
Loading…
Reference in New Issue
Block a user