Skip to content

Commit b8d7a59

Browse files
committed
fixed formatting
1 parent 932caf6 commit b8d7a59

File tree

1 file changed

+30
-27
lines changed

1 file changed

+30
-27
lines changed

src/reports/timeline.rkt

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -347,33 +347,36 @@
347347

348348
(define (render-phase-explanations explanations)
349349
`((dt "Explanations")
350-
(dd (details
351-
(summary "Click to see full explanations table")
352-
(table
353-
((class "times"))
354-
(thead
355-
(tr (th "Operator") (th "Subexpression") (th "Explanation") (th "Count") (th "Locations")))
356-
,@(append*
357-
(for/list ([rec (in-list (sort explanations > #:key fourth))])
358-
(match-define (list op expr expl cnt mcnt flows locations) rec)
359-
360-
(define safe-locations (or locations '())) ;; Fallback to empty list if locations is #f
361-
362-
(append (list `(tr (td (code ,(~a op)))
363-
(td (code ,(~a expr)))
364-
(td (b ,(~a expl)))
365-
(td ,(~a cnt))
366-
(td ,(~a mcnt))
367-
368-
;; Handle locations: Iterate over each location's inner lists and create a row for each
369-
(for/list ([location-list (in-list safe-locations)])
370-
;; Handle each location in the inner list
371-
(for/list ([location (in-list location-list)])
372-
`(tr (td "") (td "Location") (td ,(~a location)) (td ""))))
373-
374-
(for/list ([flow (in-list (or flows '()))])
375-
(match-define (list ex type v) flow)
376-
`(tr (td "") (td (code ,(~a ex))) (td ,type) (td ,(~a v))))))))))))))
350+
(dd
351+
(details
352+
(summary "Click to see full explanations table")
353+
(table
354+
((class "times"))
355+
(thead
356+
(tr (th "Operator") (th "Subexpression") (th "Explanation") (th "Count") (th "Locations")))
357+
,@
358+
(append*
359+
(for/list ([rec (in-list (sort explanations > #:key fourth))])
360+
(match-define (list op expr expl cnt mcnt flows locations) rec)
361+
362+
(define safe-locations (or locations '())) ;; Fallback to empty list if locations is #f
363+
364+
(append
365+
(list
366+
`(tr
367+
(td (code ,(~a op)))
368+
(td (code ,(~a expr)))
369+
(td (b ,(~a expl)))
370+
(td ,(~a cnt))
371+
(td ,(~a mcnt))
372+
;; Handle locations: Iterate over each location's inner lists and create a row for each
373+
(for/list ([location-list (in-list safe-locations)])
374+
;; Handle each location in the inner list
375+
(for/list ([location (in-list location-list)])
376+
`(tr (td "") (td "Location") (td ,(~a location)) (td ""))))
377+
(for/list ([flow (in-list (or flows '()))])
378+
(match-define (list ex type v) flow)
379+
`(tr (td "") (td (code ,(~a ex))) (td ,type) (td ,(~a v))))))))))))))
377380

378381
(define (render-phase-confusion confusion-matrix)
379382
(match-define (list (list true-pos false-neg false-pos true-neg)) confusion-matrix)

0 commit comments

Comments
 (0)