Created
November 19, 2018 23:23
-
-
Save LeifAndersen/59852e811826715a50f2108dde526cbc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang at-exp racket/unit | |
| (require drracket/tool | |
| racket/port | |
| racket/format | |
| racket/class) | |
| (import drracket:tool^) | |
| (export drracket:tool-exports^) | |
| (define inp | |
| (open-input-string | |
| (~a "#lang racket\n" | |
| (apply | |
| ~s | |
| '((define-syntax (f stx) | |
| (syntax-case stx () | |
| [(_ a b) #'(list 'a 'b)])) | |
| (f 3 blue)))))) | |
| (define (def-mixin super%) | |
| (class super% | |
| (super-new) | |
| (parameterize ([current-namespace (make-empty-namespace)]) | |
| (define next (send this get-next-settings)) | |
| (drracket:eval:expand-program inp next #t void void | |
| (λ (data next) | |
| (writeln data) | |
| (next)))))) | |
| (define (phase1) (void)) | |
| (define (phase2) (void)) | |
| (drracket:get/extend:extend-definitions-text def-mixin) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment