[honu] remove unused embedding of racket code inside a honu expression via %racket

This commit is contained in:
Jon Rafkind 2012-10-03 17:21:10 -06:00
parent 8210acc696
commit c758069a09
4 changed files with 6 additions and 30 deletions

View File

@ -11,24 +11,6 @@
(provide (all-defined-out))
(define (honu->racket forms)
(define-literal-set literals (%racket))
forms
#;
(syntax-parse forms #:literal-sets (literals)
#:literals ([literal-syntax syntax])
[(%racket x) #'x
#;
(honu->racket #'x)]
[(literal-syntax form) #'#'form]
[(form ...)
(datum->syntax forms
(map honu->racket (syntax->list #'(form ...)))
forms
forms)]
[x #'x]
[() forms]))
(define (strip-stops code)
(define-syntax-class stopper #:literal-sets (cruft)
#;

View File

@ -34,8 +34,7 @@
honu-$
;; FIXME: in-lines should probably not be here
honu-in-lines
postfix
%racket)
postfix)
(define-syntax-rule (define-literal+set set literal ...)
(begin
@ -44,5 +43,4 @@
(define-literal-set set (literal ...)))))
(define-literal-set cruft (#%parens #%brackets #%braces
%racket
semicolon colon honu-comma))

View File

@ -49,7 +49,7 @@
#f
;; unary
(lambda (argument)
(with-syntax ([argument (honu->racket argument)])
(with-syntax ([argument argument])
(racket-syntax (operator argument))))
postfix?))
@ -62,8 +62,8 @@
(begin-for-syntax
(define-syntax-rule (mutator change)
(lambda (left right)
(with-syntax ([left (honu->racket left)]
[right (change left (honu->racket right))])
(with-syntax ([left left]
[right (change left right)])
(racket-syntax (set! left right))))))
;; Traditional assignment operator

View File

@ -25,7 +25,6 @@
;; phase -1
(require (for-template racket/base
racket/splicing
(only-in "literals.rkt" %racket)
"compile.rkt"
"syntax.rkt"
"extra.rkt"))
@ -507,13 +506,10 @@
colon (~seq variable:id honu-equal list:honu-expression (~optional honu-comma)) ...
(~seq honu-where where:honu-expression (~optional honu-comma)) ...)
(define filter (if (attribute where)
(with-syntax ([(where.result ...) (map honu->racket (syntax->list #'(where.result ...)))])
#'((#:when where.result) ...))
#'((#:when where.result) ...)
#'()))
(define comprehension
(with-syntax ([((filter ...) ...) filter]
[(list.result ...) (map honu->racket (syntax->list #'(list.result ...)))]
[work.result (honu->racket #'work.result)])
(with-syntax ([((filter ...) ...) filter])
(racket-syntax (for/list ([variable list.result]
...
filter ... ...)