compile the left-hand sides of define-judgment only once, not during each time we try to check a judgment
related to PR 12380
This commit is contained in:
parent
2d0fa3a60b
commit
b93486ed69
|
@ -1883,18 +1883,20 @@
|
||||||
(define outputs
|
(define outputs
|
||||||
(if mtchs
|
(if mtchs
|
||||||
(for/fold ([outputs '()]) ([m mtchs])
|
(for/fold ([outputs '()]) ([m mtchs])
|
||||||
(define os
|
(define os
|
||||||
(term-let ([names/ellipses (lookup-binding (mtch-bindings m) 'names)] ...)
|
(term-let ([names/ellipses (lookup-binding (mtch-bindings m) 'names)] ...)
|
||||||
#,body))
|
#,body))
|
||||||
(if os (append os outputs) outputs))
|
(if os (append os outputs) outputs))
|
||||||
'()))
|
'()))
|
||||||
(for ([output outputs])
|
(for ([output outputs])
|
||||||
(check-judgment-form-contract `#,name output compiled-output-ctcs 'O '#,mode))
|
(check-judgment-form-contract `#,name output compiled-output-ctcs 'O '#,mode))
|
||||||
outputs))))]))
|
outputs))))]))
|
||||||
(with-syntax ([(clause-proc ...) (map compile-clause clauses)])
|
(with-syntax ([(clause-proc ...) (map compile-clause clauses)]
|
||||||
#'(λ (input)
|
[(clause-proc-ids ...) (generate-temporaries clauses)])
|
||||||
(for/fold ([outputs '()]) ([rule (list clause-proc ...)])
|
(with-syntax ([(backwards-ids ...) (reverse (syntax->list #'(clause-proc-ids ...)))])
|
||||||
(append (rule input) outputs)))))
|
#'(let ([clause-proc-ids clause-proc] ...)
|
||||||
|
(λ (input)
|
||||||
|
(append (backwards-ids input) ...))))))
|
||||||
|
|
||||||
(define-for-syntax (do-compile-judgment-form-lws clauses)
|
(define-for-syntax (do-compile-judgment-form-lws clauses)
|
||||||
(syntax-case clauses ()
|
(syntax-case clauses ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user