File tree Expand file tree Collapse file tree 3 files changed +19
-8
lines changed
redex-gui-lib/redex/private Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,8 @@ todo:
132132 [editor zoom-out-pb]))
133133
134134 (define choice-vp (new vertical-panel% [alignment '(center center)] [parent lower-hp] [stretchable-width #f ]))
135- (define reduction-names (if (IO-judgment-form? red)
136- '()
137- (reduction-relation->rule-names red)))
135+ (define reduction-names (reduction-relation/IO-jf->rule-names red))
136+
138137 (define reds-choice
139138 (and (not (null? reduction-names))
140139 (new choice%
Original file line number Diff line number Diff line change 4444 compiled-input-contract-pat
4545 compiled-output-contract-pat
4646 input-contract-pat
47- output-contract-pat)
47+ output-contract-pat
48+ rule-names)
4849 #:methods gen:custom-write
4950 [(define (write-proc rjf port _mode)
5051 (if (runtime-judgment-form-mode rjf)
6667 name proc mode lang
6768 original-contract-expression ;; (or/c #f (listof s-exp))
6869 input-contract-pat
69- output-contract-pat)
70+ output-contract-pat
71+ (rule-names '() ))
7072 (define cache (cons (box (make-hash)) (box (make-hash))))
7173 (make-runtime-judgment-form
7274 name proc mode cache lang
98100 (runtime-judgment-form-input-contract-pat parent-judgment-form)))
99101 (or output-contract-pat
100102 (and parent-judgment-form
101- (runtime-judgment-form-output-contract-pat parent-judgment-form)))))
103+ (runtime-judgment-form-output-contract-pat parent-judgment-form)))
104+ (map (lambda (raw-name)
105+ (cond
106+ [raw-name => (lambda (x)
107+ (if (symbol? x)
108+ x
109+ (string->symbol x)))]
110+ [else raw-name]))
111+ rule-names)))
102112
103113(define-for-syntax (prune-syntax stx)
104114 (datum->syntax
939949 #,lang
940950 original-contract-expression
941951 judgment-form-input-contract
942- judgment-form-output-contract))
952+ judgment-form-output-contract
953+ '#,rule-names))
943954 (define jf-cache (runtime-judgment-form-cache the-runtime-judgment-form))
944955 (define original-contract-expression-id
945956 (runtime-judgment-form-original-contract-expression the-runtime-judgment-form))
Original file line number Diff line number Diff line change 28712871(define (reduction-relation/IO-jf->rule-names x)
28722872 (cond
28732873 [(reduction-relation? x) (reduction-relation->rule-names x)]
2874- [(IO-judgment-form? x) '( judgment-form-> rule-names x)]))
2874+ [(IO-judgment-form? x) (runtime- judgment-form-rule-names x)]))
28752875
28762876
28772877;
33613361(provide (rename-out [-reduction-relation reduction-relation])
33623362 ::=
33633363 reduction-relation->rule-names
3364+ reduction-relation/IO-jf->rule-names
33643365 reduction-relation/IO-jf-lang
33653366 extend-reduction-relation
33663367 reduction-relation?
You can’t perform that action at this time.
0 commit comments