Download presentation
Presentation is loading. Please wait.
Published byJade Alexandrina Parks Modified over 6 years ago
1
Goals of my lectures A way of adding types DSL-making “tools”
Another DSL example
2
Goals of my lectures A way of adding types DSL-making “tools”
Another DSL example Last time: type-of, type=?, assign-type define-type check-type #%datum add1 This time: #%app lambda Type constructors Type checking types
3
Goals of my lectures A way of adding types DSL-making “tools”
Another DSL example Last time (basic): syntax-parse Syntax objects Syntax properties Interposition: #%app, #%datum Today (deep end): Phasing Pattern expanders Id macros Syntax classes Definition contexts
4
Goals of my lectures A way of adding types DSL-making “tools”
Another DSL example Next time
5
Id macros are tricky! Racket macro expansion algorithm:
For syntax object #’(x y z): If x is macro Pass #’(x y z) to syntax transformer registered as macro x Else Pass #’(#%app x y z) to #%app macro Ambiguity: what if x = id macro that expands to add1 We want to invoke x macro on just x, but algorithm doesn’t do that
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.