Skip to content

Commit 3b7d9e1

Browse files
authored
Merge pull request #1303 from herbie-fp/autofix-34-1
Automated Resyntax fixes
2 parents 2dd270f + 519e48d commit 3b7d9e1

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

infra/convert-demo.rkt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
(define (format-expr is-version-10 expr)
1616
(match expr
1717
[(? string?)
18-
(define parsed (string->number expr))
19-
(unless parsed
20-
(raise (error "string that is not a num")))
21-
parsed]
18+
(or (string->number expr) (raise (error "string that is not a num")))]
2219
[(list op args ...) (format-op (cons op (map (curry format-expr is-version-10) args)))]
2320
[(? symbol?)
2421
(if is-version-10

src/utils/errors.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
(for/list ([(name loc) (in-dict ctx)])
6464
(define name* (or name "(unnamed)"))
6565
(match loc
66-
[(srcloc file line col _ _) (cons name* (list file line col))]
66+
[(srcloc file line col _ _) (list name* file line col)]
6767
[#f (cons name* #f)])))
6868

6969
(define (syntax-locations->datum exn)

src/utils/timeline.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
(make-hasheq (list (cons 'type (~a type))
4747
(cons 'time (current-inexact-milliseconds))
4848
(cons 'gc-time (current-gc-milliseconds))
49-
(cons 'memory (list (list live-memory alloc-memory))))))
49+
(list 'memory (list live-memory alloc-memory)))))
5050
(set-box! (*timeline*) (cons b (unbox (*timeline*))))))
5151

5252
(define (timeline-push! key . values)

0 commit comments

Comments
 (0)