aboutsummaryrefslogtreecommitdiffstats
path: root/test/run.scm
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2025-06-28 13:45:46 -0400
committerGravatar Peter McGoron 2025-06-28 13:45:46 -0400
commit8e228a0d7d02802b375e102f03eccf539b839606 (patch)
tree49b04d20347e67ade9f19be086f81f6b7434d6be /test/run.scm
parentfix self-syntax and shadowing of syntax keywords (diff)
Change environments in untyped LC to use location comparators instead of
bound identifier comparators NOTE: location comparators are a non-standard thing equivalent to a free identifier comparator. Should replace later. The previous code would fail when attempting to process identifiers that came from the output of a macro transformer, because those are marked.
Diffstat (limited to 'test/run.scm')
-rw-r--r--test/run.scm32
1 files changed, 25 insertions, 7 deletions
diff --git a/test/run.scm b/test/run.scm
index bb2fca0..201c849 100644
--- a/test/run.scm
+++ b/test/run.scm
@@ -31,18 +31,36 @@
(import (multisyntax examples untyped-lambda-calculus)
(multisyntax syntax-object))
-#;(let-values (((global-map expanded-list)
- (expand initial-environment (list (empty-wrap '(lambda x x)))))))
+(let-values (((global-map expanded-list)
+ (expand initial-environment (list (empty-wrap '(lambda x x))))))
+ (display (alpha expanded-list)) (newline))
-#;(define-values (global-map expanded-list)
- (expand initial-environment
- (list (empty-wrap '(let-syntax ((λ lambda))
- (λ x x))))))
+(let-values (((global-map expanded-list)
+ (expand initial-environment
+ (list (empty-wrap '(let-syntax ((λ lambda))
+ (λ x x)))))))
+ (display (alpha expanded-list)) (newline))
(let-values (((global-map expanded-list)
(expand initial-environment
(list (empty-wrap '(lambda lambda (lambda lambda)))))))
- (alpha expanded-list))
+ (display (alpha expanded-list)) (newline))
+
+(let-values (((global-map expanded-list)
+ (expand initial-environment
+ (list (empty-wrap '(define I (lambda x x)))
+ (empty-wrap '(I (lambda I I)))))))
+ (display (alpha expanded-list)) (newline))
+
+(let-values (((global-map expanded-list)
+ (expand initial-environment
+ (list (empty-wrap
+ '(define-syntax let
+ (syntax-rules ()
+ ((let (name value) body)
+ ((lambda name body) value)))))
+ (empty-wrap '(let (x (lambda x x)) (x x)))))))
+ (display (alpha expanded-list)) (newline))
#;(begin
(load "examples/untyped-lambda-calculus.sld")