File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 221221
222222;; Converts a patch to full alt with valid history
223223(define (reconstruct! alts)
224+
224225 ;; extracts the base expression of a patch
225226 (define (get-starting-expr altn)
226227 (match* ((alt-event altn) (alt-prevs altn))
240241 [(list 'taylor name var) (list 'taylor loc0 name var)]
241242 [(list 'rr input proof soundiness) (list 'rr loc0 input proof soundiness)]
242243 [(list 'simplify input proof soundiness) (list 'simplify loc0 input proof soundiness)]))
243- (define expr* (location-do loc0 (alt-expr orig) (const (alt-expr altn))))
244+ (define expr* (location-do loc0 (alt-expr orig) (const (batchref->expr ( alt-expr altn) ))))
244245 (alt expr* event* (list (loop (first prevs))) (alt-preprocessing orig))])))
245246
246247 (^patched^ (reap [sow]
247248 (for ([altn (in-list alts)]) ;; does not have preproc
248249 (define start-expr (get-starting-expr altn))
249- (if start-expr
250- (for ([full-altn (in-list (^next-alts^))])
251- (define expr (alt-expr full-altn))
252- (for ([loc (in-list (get-locations expr start-expr))])
253- (sow (reconstruct-alt altn loc full-altn))))
254- ; altn is a full alt (probably iter 0 simplify)
255- (sow altn)))))
250+ (for ([full-altn (in-list (^next-alts^))])
251+ (define expr (alt-expr full-altn))
252+ (for ([loc (in-list (get-locations expr start-expr))])
253+ (sow (reconstruct-alt altn loc full-altn)))))))
256254
257255 (void))
258256
Original file line number Diff line number Diff line change 203203
204204 (define out (append approximations rewritten))
205205
206- (define (rebuild-alts x)
207- (match-define (alt expr event prevs preprocessing) x)
208- (alt (batchref->expr expr) event (map rebuild-alts prevs) preprocessing))
209-
210- (map rebuild-alts out))
206+ out)
You can’t perform that action at this time.
0 commit comments