Display irritants nicely.

original commit: 26b909744cb2697c00bf09638871c7688d328657
This commit is contained in:
Vincent St-Amour 2011-06-16 17:23:34 -04:00
parent 261821834f
commit 77e9234c06
10 changed files with 37 additions and 36 deletions

View File

@ -1,7 +1,7 @@
#;
(
TR missed opt: all-real.rkt 24:0 (+ (ann 3 Real) (ann 4 Real)) -- binary, args all float-arg-expr, return type not Float -- caused by: 24:8 (quote 3), 24:21 (quote 4)
TR missed opt: all-real.rkt 25:0 (* (ann 3 Real) (ann 4 Real)) -- binary, args all float-arg-expr, return type not Float -- caused by: 25:8 (quote 3), 25:21 (quote 4)
TR missed opt: all-real.rkt 24:0 (+ (ann 3 Real) (ann 4 Real)) -- binary, args all float-arg-expr, return type not Float -- caused by: 24:8 3, 24:21 4
TR missed opt: all-real.rkt 25:0 (* (ann 3 Real) (ann 4 Real)) -- binary, args all float-arg-expr, return type not Float -- caused by: 25:8 3, 25:21 4
7
12
)

View File

@ -1,6 +1,6 @@
#;
(
TR missed opt: multiple-irritants.rkt 9:0 (* (ann 4 Integer) (ann 5 Integer) 6.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 9:8 (quote 4), 9:24 (quote 5)
TR missed opt: multiple-irritants.rkt 9:0 (* (ann 4 Integer) (ann 5 Integer) 6.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 9:8 4, 9:24 5
120.0
)

View File

@ -1,14 +1,14 @@
#;
(
TR missed opt: nested-same-kind.rkt 25:0 (* 2.0 (* 3.0 (ann 4 Integer))) -- binary, args all float-arg-expr, return type not Float -- caused by: 25:19 (quote 4) (2 times)
TR missed opt: nested-same-kind.rkt 25:0 (* 2.0 (* 3.0 (ann 4 Integer))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 25:7 (#%app * (quote 3.0) (quote 4))
TR missed opt: nested-same-kind.rkt 26:0 (* 1.0 (* 2.0 (* 3.0 (ann 4 Integer)))) -- binary, args all float-arg-expr, return type not Float -- caused by: 26:26 (quote 4) (3 times)
TR missed opt: nested-same-kind.rkt 26:0 (* 1.0 (* 2.0 (* 3.0 (ann 4 Integer)))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 26:14 (#%app * (quote 3.0) (quote 4)) (2 times)
TR missed opt: nested-same-kind.rkt 27:0 (* 2.0 (* 3.0 (ann 4 Integer) (ann 5 Integer))) -- binary, args all float-arg-expr, return type not Float -- caused by: 27:19 (quote 4), 27:35 (quote 5) (2 times)
TR missed opt: nested-same-kind.rkt 27:0 (* 2.0 (* 3.0 (ann 4 Integer) (ann 5 Integer))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 27:7 (#%app * (quote 3.0) (quote 4) (quote 5))
TR missed opt: nested-same-kind.rkt 28:0 (* (* 3.0 (ann 4 Integer)) (* 3.0 (ann 4 Integer))) -- binary, args all float-arg-expr, return type not Float -- caused by: 28:15 (quote 4), 28:39 (quote 4) (3 times)
TR missed opt: nested-same-kind.rkt 28:0 (* (* 3.0 (ann 4 Integer)) (* 3.0 (ann 4 Integer))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 28:27 (#%app * (quote 3.0) (quote 4))
TR missed opt: nested-same-kind.rkt 28:0 (* (* 3.0 (ann 4 Integer)) (* 3.0 (ann 4 Integer))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 28:3 (#%app * (quote 3.0) (quote 4))
TR missed opt: nested-same-kind.rkt 25:0 (* 2.0 (* 3.0 (ann 4 Integer))) -- binary, args all float-arg-expr, return type not Float -- caused by: 25:19 4 (2 times)
TR missed opt: nested-same-kind.rkt 25:0 (* 2.0 (* 3.0 (ann 4 Integer))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 25:7 (* 3.0 (ann 4 Integer))
TR missed opt: nested-same-kind.rkt 26:0 (* 1.0 (* 2.0 (* 3.0 (ann 4 Integer)))) -- binary, args all float-arg-expr, return type not Float -- caused by: 26:26 4 (3 times)
TR missed opt: nested-same-kind.rkt 26:0 (* 1.0 (* 2.0 (* 3.0 (ann 4 Integer)))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 26:14 (* 3.0 (ann 4 Integer)) (2 times)
TR missed opt: nested-same-kind.rkt 27:0 (* 2.0 (* 3.0 (ann 4 Integer) (ann 5 Integer))) -- binary, args all float-arg-expr, return type not Float -- caused by: 27:19 4, 27:35 5 (2 times)
TR missed opt: nested-same-kind.rkt 27:0 (* 2.0 (* 3.0 (ann 4 Integer) (ann 5 Integer))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 27:7 (* 3.0 (ann 4 Integer) (ann 5 Integer))
TR missed opt: nested-same-kind.rkt 28:0 (* (* 3.0 (ann 4 Integer)) (* 3.0 (ann 4 Integer))) -- binary, args all float-arg-expr, return type not Float -- caused by: 28:15 4, 28:39 4 (3 times)
TR missed opt: nested-same-kind.rkt 28:0 (* (* 3.0 (ann 4 Integer)) (* 3.0 (ann 4 Integer))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 28:27 (* 3.0 (ann 4 Integer))
TR missed opt: nested-same-kind.rkt 28:0 (* (* 3.0 (ann 4 Integer)) (* 3.0 (ann 4 Integer))) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 28:3 (* 3.0 (ann 4 Integer))
24.0
24.0
120.0

View File

@ -1,30 +1,30 @@
#;
(
TR missed opt: pair.rkt 58:0 (car (ann (list 1 2 3) (Listof Byte))) -- car/cdr on a potentially empty list -- caused by: 58:10 (#%app list (quote 1) (quote 2) (quote 3))
TR missed opt: pair.rkt 58:0 (car (ann (list 1 2 3) (Listof Byte))) -- car/cdr on a potentially empty list -- caused by: 58:10 (list 1 2 3)
TR opt: pair.rkt 59:1 car -- pair
TR missed opt: pair.rkt 60:0 (cdr (ann (list 1 2 3) (Listof Byte))) -- car/cdr on a potentially empty list -- caused by: 60:10 (#%app list (quote 1) (quote 2) (quote 3))
TR missed opt: pair.rkt 60:0 (cdr (ann (list 1 2 3) (Listof Byte))) -- car/cdr on a potentially empty list -- caused by: 60:10 (list 1 2 3)
TR opt: pair.rkt 61:1 cdr -- pair
TR opt: pair.rkt 62:1 cdr -- pair
TR opt: pair.rkt 62:6 cdr -- pair
TR opt: pair.rkt 63:1 cdr -- pair
TR opt: pair.rkt 63:6 cdr -- pair
TR opt: pair.rkt 63:11 cdr -- pair
TR missed opt: pair.rkt 64:16 (cdr (cdr (cdr (cdr (list 1 2 3))))) -- car/cdr on a potentially empty list -- caused by: 64:21 (#%app cdr (#%app cdr (#%app cdr (#%app list (quote 1) (quote 2) (quote 3)))))
TR missed opt: pair.rkt 64:16 (cdr (cdr (cdr (cdr (list 1 2 3))))) -- car/cdr on a potentially empty list -- caused by: 64:21 (cdr (cdr (cdr (list 1 2 3))))
TR opt: pair.rkt 64:22 cdr -- pair
TR opt: pair.rkt 64:27 cdr -- pair
TR opt: pair.rkt 64:32 cdr -- pair
TR missed opt: pair.rkt 67:0 (mcar (ann (mlist 1) (MListof Byte))) -- mpair op on a potentially empty mlist -- caused by: (no location) (#%app mcons (quote 1) null)
TR missed opt: pair.rkt 67:0 (mcar (ann (mlist 1) (MListof Byte))) -- mpair op on a potentially empty mlist -- caused by: 67:0 (mcar (ann (mlist 1) (MListof Byte)))
TR opt: pair.rkt 68:1 mcar -- mutable pair
TR missed opt: pair.rkt 69:0 (mcdr (ann (mlist 1) (MListof Byte))) -- mpair op on a potentially empty mlist -- caused by: (no location) (#%app mcons (quote 1) null)
TR missed opt: pair.rkt 69:0 (mcdr (ann (mlist 1) (MListof Byte))) -- mpair op on a potentially empty mlist -- caused by: 69:0 (mcdr (ann (mlist 1) (MListof Byte)))
TR opt: pair.rkt 70:1 mcdr -- mutable pair
TR opt: pair.rkt 71:1 mcdr -- mutable pair
TR opt: pair.rkt 71:7 mcdr -- mutable pair
TR opt: pair.rkt 72:1 mcdr -- mutable pair
TR opt: pair.rkt 72:7 mcdr -- mutable pair
TR opt: pair.rkt 72:13 mcdr -- mutable pair
TR missed opt: pair.rkt 73:0 (set-mcar! (ann (mlist 2) (MListof Byte)) 2) -- mpair op on a potentially empty mlist -- caused by: (no location) (#%app mcons (quote 2) null)
TR missed opt: pair.rkt 73:0 (set-mcar! (ann (mlist 2) (MListof Byte)) 2) -- mpair op on a potentially empty mlist -- caused by: 73:0 (set-mcar! (ann (mlist 2) (MListof Byte)) 2)
TR opt: pair.rkt 74:1 set-mcar! -- mutable pair
TR missed opt: pair.rkt 75:0 (set-mcdr! (ann (mlist 2) (MListof Byte)) (ann (mlist 2) (MListof Byte))) -- mpair op on a potentially empty mlist -- caused by: (no location) (#%app mcons (quote 2) null)
TR missed opt: pair.rkt 75:0 (set-mcdr! (ann (mlist 2) (MListof Byte)) (ann (mlist 2) (MListof Byte))) -- mpair op on a potentially empty mlist -- caused by: 75:0 (set-mcdr! (ann (mlist 2) (MListof Byte)) (ann (mlist 2) (MListof Byte)))
TR opt: pair.rkt 77:1 mcar -- mutable pair
TR opt: pair.rkt 78:1 mcdr -- mutable pair
TR opt: pair.rkt 79:1 set-mcar! -- mutable pair

View File

@ -1,13 +1,13 @@
#;
(
TR missed opt: precision-loss.rkt 24:0 (+ (* 3/4 2/3) 2.0) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 24:3 (#%app * (quote 3/4) (quote 2/3))
TR missed opt: precision-loss.rkt 24:0 (+ (* 3/4 2/3) 2.0) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 24:3 (* 3/4 2/3)
TR opt: precision-loss.rkt 24:1 + -- binary float
TR opt: precision-loss.rkt 26:1 + -- binary float
TR missed opt: precision-loss.rkt 28:0 (+ (- 3/4) 2.0) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 28:3 (#%app - (quote 3/4))
TR missed opt: precision-loss.rkt 28:0 (+ (- 3/4) 2.0) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 28:3 (- 3/4)
TR opt: precision-loss.rkt 28:1 + -- binary float
TR opt: precision-loss.rkt 30:1 + -- binary float
TR missed opt: precision-loss.rkt 36:0 (* (ann (* 3/4 2/3) Real) 2.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 36:11 (quote 3/4), 36:15 (quote 2/3) (2 times)
TR missed opt: precision-loss.rkt 36:0 (* (ann (* 3/4 2/3) Real) 2.0) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 36:8 (#%app * (quote 3/4) (quote 2/3))
TR missed opt: precision-loss.rkt 36:0 (* (ann (* 3/4 2/3) Real) 2.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 36:11 3/4, 36:15 2/3 (2 times)
TR missed opt: precision-loss.rkt 36:0 (* (ann (* 3/4 2/3) Real) 2.0) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 36:8 (* 3/4 2/3)
2.5
2.75
1.25

View File

@ -1,9 +1,9 @@
#;
(
TR missed opt: real-in-float-expr.rkt 17:0 (* (ann 3 Real) 2.3) -- binary, args all float-arg-expr, return type not Float -- caused by: 17:8 (quote 3)
TR missed opt: real-in-float-expr.rkt 17:0 (* (ann 3 Real) 2.3) -- binary, args all float-arg-expr, return type not Float -- caused by: 17:8 3
TR opt: real-in-float-expr.rkt 22:1 * -- fixnum bounded expr
TR opt: real-in-float-expr.rkt 23:1 + -- fixnum bounded expr
TR missed opt: real-in-float-expr.rkt 26:0 (* (ann 2 Natural) 2.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 26:8 (quote 2)
TR missed opt: real-in-float-expr.rkt 26:0 (* (ann 2 Natural) 2.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 26:8 2
6.8999999999999995
6
5

View File

@ -1,11 +1,11 @@
#;
(
TR opt: float-real.rkt 18:1 + -- binary float
TR missed opt: float-real.rkt 19:0 (+ 2.3 (* (ann 2 Integer) 3.2)) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 19:7 (#%app * (quote 2) (quote 3.2))
TR missed opt: float-real.rkt 19:0 (+ 2.3 (* (ann 2 Integer) 3.2)) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 19:7 (* (ann 2 Integer) 3.2)
TR opt: float-real.rkt 19:1 + -- binary float
TR missed opt: float-real.rkt 19:7 (* (ann 2 Integer) 3.2) -- binary, args all float-arg-expr, return type not Float -- caused by: 19:15 (quote 2)
TR missed opt: float-real.rkt 20:0 (* 2.3 (* (ann 2 Integer) 3.1)) -- binary, args all float-arg-expr, return type not Float -- caused by: 20:15 (quote 2) (2 times)
TR missed opt: float-real.rkt 20:0 (* 2.3 (* (ann 2 Integer) 3.1)) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 20:7 (#%app * (quote 2) (quote 3.1))
TR missed opt: float-real.rkt 19:7 (* (ann 2 Integer) 3.2) -- binary, args all float-arg-expr, return type not Float -- caused by: 19:15 2
TR missed opt: float-real.rkt 20:0 (* 2.3 (* (ann 2 Integer) 3.1)) -- binary, args all float-arg-expr, return type not Float -- caused by: 20:15 2 (2 times)
TR missed opt: float-real.rkt 20:0 (* 2.3 (* (ann 2 Integer) 3.1)) -- exact arithmetic subexpression inside a float expression, extra precision discarded -- caused by: 20:7 (* (ann 2 Integer) 3.1)
5.3
8.7
14.26

View File

@ -1,7 +1,7 @@
#;
(
TR missed opt: invalid-derived-pair.rkt 12:2 (cadr x) -- car/cdr on a potentially empty list -- caused by: 12:2 (#%app cdr x)
TR missed opt: invalid-derived-pair.rkt 17:6 (cadr x) -- car/cdr on a potentially empty list -- caused by: 17:6 (#%app cdr x)
TR missed opt: invalid-derived-pair.rkt 12:2 (cadr x) -- car/cdr on a potentially empty list -- caused by: 12:2 (cadr x)
TR missed opt: invalid-derived-pair.rkt 17:6 (cadr x) -- car/cdr on a potentially empty list -- caused by: 17:6 (cadr x)
)
#lang typed/racket #:optimize

View File

@ -1,7 +1,7 @@
#;
(
TR missed opt: invalid-float-promotion.rkt 12:0 (/ (ann 1 Integer) 2.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 12:8 (quote 1)
TR missed opt: invalid-float-promotion.rkt 13:0 (* (ann 2/3 Exact-Rational) 3.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 13:8 (quote 2/3)
TR missed opt: invalid-float-promotion.rkt 12:0 (/ (ann 1 Integer) 2.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 12:8 1
TR missed opt: invalid-float-promotion.rkt 13:0 (* (ann 2/3 Exact-Rational) 3.0) -- binary, args all float-arg-expr, return type not Float -- caused by: 13:8 2/3
0.5
2.0
)

View File

@ -180,9 +180,10 @@
kind
(string-join
(map (lambda (irritant)
(format "~a ~a"
(line+col->string irritant)
(syntax->datum irritant)))
(let ([irritant (locate-stx irritant)])
(format "~a ~s"
(line+col->string irritant)
(syntax->datum irritant))))
(sort irritants <
#:key (lambda (x)
(or (syntax-position x) 0))))