Skip to content

Commit 7062836

Browse files
committed
fmt
1 parent 53c4c5a commit 7062836

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

src/core/egg-herbie.rkt

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -301,15 +301,16 @@
301301
[(list op args ...)
302302
;; Unfortunately the type parameter doesn't tell us much because mixed exprs exist
303303
;; so if we see something like (and a b) we literally don't know which "and" it is
304-
(cons op (map loop args (cond
305-
[(and (operator-exists? op) (impl-exists? op))
306-
(if (representation? type)
307-
(impl-info op 'itype)
308-
(operator-info op 'itype))]
309-
[(impl-exists? op)
310-
(impl-info op 'itype)]
311-
[(operator-exists? op)
312-
(operator-info op 'itype)])))])))
304+
(cons op
305+
(map loop
306+
args
307+
(cond
308+
[(and (operator-exists? op) (impl-exists? op))
309+
(if (representation? type)
310+
(impl-info op 'itype)
311+
(operator-info op 'itype))]
312+
[(impl-exists? op) (impl-info op 'itype)]
313+
[(operator-exists? op) (operator-info op 'itype)])))])))
313314

314315
;; Parses a string from egg into a single S-expr.
315316
(define (egg-expr->expr egg-expr ctx)
@@ -1027,9 +1028,12 @@
10271028
type))
10281029
(approx (loop spec spec-type) (loop impl type))]
10291030
[(list op args ...)
1030-
(cons op (map loop args (if (representation? type)
1031-
(impl-info op 'itype)
1032-
(operator-info op 'itype))))])))
1031+
(cons op
1032+
(map loop
1033+
args
1034+
(if (representation? type)
1035+
(impl-info op 'itype)
1036+
(operator-info op 'itype))))])))
10331037

10341038
(define (eggref id)
10351039
(cdr (vector-ref egg-nodes id)))

src/core/searchreals.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
[n 0])
9494
(match-define (search-space true false other true-hints other-hints) space)
9595
(timeline-push! 'sampling n (make-sampling-table var-reprs true false other))
96-
96+
9797
(define n* (remainder n (vector-length var-reprs)))
9898
(if (or (>= n depth) (empty? (search-space-other space)) (>= (length other) (expt 2 depth)))
9999
(list (append (search-space-true space) (search-space-other space))

0 commit comments

Comments
 (0)