Created
November 19, 2018 23:42
-
-
Save LeifAndersen/0d6a3a00ef4f90dc6a3f043adebac0ea to your computer and use it in GitHub Desktop.
This file contains 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) | |
(begin | |
(error "Shouldn't be an internal error") | |
#'(list 'a 'b))])) | |
(f 3 blue)))))) | |
(define (def-mixin super%) | |
(class super% | |
(inherit get-next-settings) | |
(super-new) | |
(parameterize ([current-namespace (make-empty-namespace)]) | |
(drracket:eval:expand-program inp | |
(get-next-settings) | |
#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