~ chicken-core (chicken-5) ba053bb487e6431b81a3230c405ac73f5b5bee05


commit ba053bb487e6431b81a3230c405ac73f5b5bee05
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Sat Feb 6 13:19:41 2016 +1300
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Sat Feb 6 16:56:23 2016 +0100

    Unrename types when reporting scrutiny results
    
    Points the `##core#real-name` property of renamed type variables at
    their original names so that types can be syntax-stripped before
    printing and scrutiny warnings will print types as they appear in the
    source, rather than using their gensym'd counterparts.
    
    Also tweaks the scrutinizer's reporting procedures to implicitly format
    their arguments, as they were only ever called with a sprintf-formatted
    string, and slightly changes the grammar and punctuation of some
    scrutiny messages.
    
    As a nice side effect, this change stops us from having to commit
    changes to tests/scrutiny*.expected every time the number of gensyms
    used by the compiler changes.
    
    Signed-off-by: Peter Bex <peter@more-magic.net>

diff --git a/scrutinizer.scm b/scrutinizer.scm
index 8c9c32ef..12251bcd 100644
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -112,11 +112,11 @@
 (define-constant +maximal-union-type-length+ 20)
 (define-constant +maximal-complex-object-constructor-result-type-length+ 256)
 
+(define-inline (unrename-type x) (strip-syntax x))
 
 (define specialization-statistics '())
 (define trail '())
 
-
 (define (multiples n)
   (if (= n 1) "" "s"))
 
@@ -164,16 +164,13 @@
 	     (lambda (a)
 	       (cond
 		((eq? a 'deprecated)
-		 (report
-		  loc
-		  (sprintf "use of deprecated `~a'" id))
+		 (report loc "use of deprecated `~a'" id)
 		 '(*))
 		((and (pair? a) (eq? (car a) 'deprecated))
 		 (report
 		  loc
-		  (sprintf 
-		      "use of deprecated `~a' - consider `~a'"
-		    id (cadr a)))
+		  "use of deprecated `~a' - consider `~a'"
+		  id (cadr a))
 		 '(*))
 		(else (list a)))))
 	    (else '(*))))
@@ -195,10 +192,10 @@
 	    ((assq id e) =>
 	     (lambda (a)
 	       (cond ((eq? 'undefined (cdr a))
-		      #;(report 
+		      #;(report
 		       loc
-		       (sprintf "access to variable `~a' which has an undefined value"
-			 (real-name id db)))
+		       "access to variable `~a' which has an undefined value"
+		       (real-name id db))
 		      '(*))
 		     (else (list (cdr a))))))
 	    (else (global-result id loc))))
@@ -215,12 +212,11 @@
     (define (always-true t loc x)
       (let ((f (always-true1 t)))
 	(when f
-	  (report-notice 
+	  (report-notice
 	   loc
-	   (sprintf
-	       "expected value of type boolean in conditional but were given a value of type\n  `~a' which is always true:~%~%~a"
-	     t
-	     (pp-fragment x))))
+	   "expected a value of type boolean in conditional, but \
+	    was given a value of type `~a' which is always true:~%~%~a"
+	   t (pp-fragment x)))
 	f))
 
     (define (single what tv loc)
@@ -231,30 +227,31 @@
 		  ((zero? n)
 		   (report
 		    loc
-		    (sprintf "expected ~a a single result, but were given zero results" what))
+		    "expected a single result ~a, but received zero results"
+		    what)
 		   'undefined)
 		  (else
 		   (report
 		    loc
-		    (sprintf "expected ~a a single result, but were given ~a result~a"
-		      what n (multiples n)))
+		    "expected a single result ~a, but received ~a result~a"
+		    what n (multiples n))
 		   (first tv))))))
 
-    (define (report-notice loc desc #!optional (show complain))
-      (when show
+    (define (report-notice loc msg . args)
+      (when complain
 	(##sys#notice
-	 (conc (location-name loc) desc))))
+	 (conc (location-name loc)
+	       (sprintf "~?" msg (map unrename-type args))))))
 
-    (define (report loc desc #!optional (show complain))
-      (when show
+    (define (report loc msg . args)
+      (when complain
 	(warning
-	 (conc (location-name loc) desc))))
+	 (conc (location-name loc)
+	       (sprintf "~?" msg (map unrename-type args))))))
 
-    (define (report-error loc desc #!optional (show complain))
-      (when show
-	(warning 
-	 (conc (location-name loc) desc)))
-      (set! errors #t))
+    (define (report-error loc msg . args)
+      (set! errors #t)
+      (apply report loc msg args))
 
     (define (location-name loc)
       (define (lname loc1)
@@ -320,23 +317,21 @@
 	(cond ((and (not pptype?) (not (match-types xptype ptype typeenv)))
 	       (report
 		loc
-		(sprintf
-		    "~aexpected a value of type `~a', but was given a value of type `~a'"
-		  (pname) 
-		  (resolve xptype typeenv)
-		  (resolve ptype typeenv)))
+		"~aexpected a value of type `~a' but was given a value of type `~a'"
+		(pname)
+		(resolve xptype typeenv)
+		(resolve ptype typeenv))
 	       (values '* #f))
 	      (else
 	       (let-values (((atypes values-rest ok alen)
 			     (procedure-argument-types ptype nargs typeenv)))
 		 (unless ok
-		   (report 
+		   (report
 		    loc
-		    (sprintf
-			"~aexpected ~a argument~a, but was given ~a argument~a"
-		      (pname)
-		      alen (multiples alen)
-		      nargs (multiples nargs))))
+		    "~aexpected ~a argument~a but was given ~a argument~a"
+		    (pname)
+		    alen (multiples alen)
+		    nargs (multiples nargs)))
 		 (do ((actualtypes (cdr actualtypes) (cdr actualtypes))
 		      (atypes atypes (cdr atypes))
 		      (i 1 (add1 i)))
@@ -347,12 +342,11 @@
 			    typeenv)
 		     (report
 		      loc
-		      (sprintf
-			  "~aexpected argument #~a of type `~a', but was given an argument of type `~a'"
-			(pname) 
-			i
-			(resolve (car atypes) typeenv)
-			(resolve (car actualtypes) typeenv)))))
+		      "~aexpected argument #~a of type `~a' but was given an argument of type `~a'"
+		      (pname)
+		      i
+		      (resolve (car atypes) typeenv)
+		      (resolve (car actualtypes) typeenv))))
 		 (when (noreturn-procedure-type? ptype)
 		   (set! noreturn #t))
 		 (let ((r (procedure-result-types ptype values-rest (cdr actualtypes) typeenv)))
@@ -365,9 +359,9 @@
 				     (cond ((match-argument-types (list pt) (cdr actualtypes) typeenv)
 					    (report-notice
 					     loc
-					     (sprintf 
-						 "~athe predicate is called with an argument of type\n  `~a' and will always return true"
-					       (pname) (cadr actualtypes)))
+					     "~athe predicate is called with an argument of type `~a' \
+					      and will always return true"
+					     (pname) (cadr actualtypes))
 					    (when specialize
 					      (specialize-node!
 					       node (cdr args)
@@ -378,9 +372,9 @@
 					      (match-argument-types (list `(not ,pt)) (cdr actualtypes) typeenv))
 					    (report-notice
 					     loc
-					     (sprintf 
-						 "~athe predicate is called with an argument of type\n  `~a' and will always return false"
-					       (pname) (cadr actualtypes)))
+					     "~athe predicate is called with an argument of type `~a' \
+					      and will always return false"
+					     (pname) (cadr actualtypes))
 					    (when specialize
 					      (specialize-node!
 					       node (cdr args)
@@ -521,9 +515,8 @@
 					       (not (= (length r1) (length r2))))
 					  (report
 					   loc
-					   (sprintf
-					       "branches in conditional expression differ in the number of results:~%~%~a"
-					     (pp-fragment n)))
+					   "branches in conditional expression differ in the number of results:~%~%~a"
+					   (pp-fragment n))
 					  '*)
 					 (nor1 r2)
 					 (nor2 r1)
@@ -622,10 +615,9 @@
 			       (not (match-types type rt typeenv)))
 		      ((if strict-variable-types report-error report)
 		       loc
-		       (sprintf 
-			   "assignment of value of type `~a' to toplevel variable `~a' does not match declared type `~a'"
-			 rt var type)
-		       #t))
+		       "assignment of value of type `~a' to toplevel variable `~a' \
+			does not match declared type `~a'"
+		       rt var type))
 		    (when (and (not type) ;XXX global declaration could allow this
 			       (not b)
 			       (not (eq? '* rt))
@@ -655,10 +647,8 @@
 			       (unless (compatible-types? ot rt)
 				 (report
 				  loc
-				  (sprintf 
-				      "variable `~a' of type `~a' was modified to a value of type `~a'"
-				    var ot rt)
-				  #t)))))
+				  "variable `~a' of type `~a' was modified to a value of type `~a'"
+				  var ot rt)))))
 		      ;; don't use "add-to-blist" since the current operation does not affect aliases
 		      (let ((t (if (or strict-variable-types
 				       (not (get db var 'captured)))
@@ -802,23 +792,21 @@
 			  ((null? rt)
 			   (report
 			    loc
-			    (sprintf
-				"expression returns zero values but is declared to have a single result of type `~a'"
-			      t)))
+			    "expression returns zero values but is declared to have \
+			     a single result of type `~a'" t))
 			  (else
 			   (when (> (length rt) 1)
 			     (report
 			      loc
-			      (sprintf 
-				  "expression returns ~a values but is declared to have a single result"
-				(length rt))))
+			      "expression returns ~a values but is declared to have \
+			       a single result" (length rt)))
 			   (when (and (second params)
 				      (not (type<=? t (first rt))))
 			     ((if strict-variable-types report-error report-notice)
 			      loc
-			      (sprintf
-				  "expression returns a result of type `~a', but is declared to return `~a', which is not a subtype"
-				(first rt) t)))))
+			      "expression returns a result of type `~a' but is \
+			       declared to return `~a', which is not a subtype"
+			      (first rt) t))))
 		    (list t)))
 		 ((##core#typecase)
 		  (let* ((ts (walk (first subs) e loc #f #f flow ctags))
@@ -1172,12 +1160,6 @@
 	    ((pair? x)
 	     (cons (subst (car x)) (subst (cdr x))))
 	    (else x)))
-    (define (rename v)
-      (cond ((assq v typeenv) => cdr)
-	    (else
-	     (let ((new (gensym v)))
-	       (set! typeenv (alist-cons v new typeenv))
-	       new))))
     (define (simplify t)
       ;;(dd "simplify/rec: ~s" t)
       (call/cc 
@@ -1189,7 +1171,9 @@
 		     (set! typeenv
 		       (append (map (lambda (v)
 				      (let ((v (if (symbol? v) v (first v))))
-					(cons v (gensym v))) )
+					(let ((v* (gensym v)))
+					  (mark-variable v* '##core#real-name v)
+					  (cons v v*))))
 				    typevars)
 			       typeenv))
 		     (set! constraints 
@@ -1300,7 +1284,6 @@
 				     (lambda (c)
 				       (list v (simplify (cadr c)))))
 				    (else v)))))
-				     
 		     typeenv)
 		   ,(subst t2))))
       (dd "simplify: ~a -> ~a" t t2)
@@ -1771,12 +1754,18 @@
 	   ;; correct, because type variables have to be renamed:
 	   (let-values (((t pred pure) (validate-type new name)))
 	     (unless t
-	       (warning "invalid type specification" name new))
+	       (warning
+		(sprintf "invalid type specification for `~a': ~a"
+			 name
+			 (unrename-type new))))
 	     (when (and old (not (compatible-types? old t)))
 	       (warning
 		(sprintf
-		    "type-definition `~a' for toplevel binding `~a' conflicts with previously loaded type `~a'"
-		  name new old)))
+		 "type definition for toplevel binding `~a' \
+		  conflicts with previously loaded type:\
+		  ~n  New type:      ~a\
+		  ~n  Original type: ~a"
+		 name (unrename-type old) (unrename-type new))))
 	     (mark-variable name '##compiler#type t)
 	     ;; We only allow db-loaded types to affect core code
 	     ;; because core isn't properly namespaced.  User code may
diff --git a/tests/scrutiny-2.expected b/tests/scrutiny-2.expected
index c6bcea95..4cabcc4b 100644
--- a/tests/scrutiny-2.expected
+++ b/tests/scrutiny-2.expected
@@ -1,88 +1,66 @@
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type
-  `pair' and will always return true
+  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type `pair' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type
-  `null' and will always return false
+  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type `null' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type
-  `null' and will always return false
+  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type `null' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type
-  `fixnum' and will always return false
+  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type
-  `float' and will always return false
+  (scrutiny-tests-2.scm:14) in procedure call to `pair?', the predicate is called with an argument of type `float' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:21) in procedure call to `list?', the predicate is called with an argument of type
-  `null' and will always return true
+  (scrutiny-tests-2.scm:21) in procedure call to `list?', the predicate is called with an argument of type `null' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:21) in procedure call to `list?', the predicate is called with an argument of type
-  `null' and will always return true
+  (scrutiny-tests-2.scm:21) in procedure call to `list?', the predicate is called with an argument of type `null' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:21) in procedure call to `list?', the predicate is called with an argument of type
-  `fixnum' and will always return false
+  (scrutiny-tests-2.scm:21) in procedure call to `list?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:21) in procedure call to `list?', the predicate is called with an argument of type
-  `float' and will always return false
+  (scrutiny-tests-2.scm:21) in procedure call to `list?', the predicate is called with an argument of type `float' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type
-  `null' and will always return true
+  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type `null' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type
-  `null' and will always return true
+  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type `null' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type
-  `pair' and will always return false
+  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type `pair' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type
-  `fixnum' and will always return false
+  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type
-  `float' and will always return false
+  (scrutiny-tests-2.scm:22) in procedure call to `null?', the predicate is called with an argument of type `float' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:23) in procedure call to `fixnum?', the predicate is called with an argument of type
-  `fixnum' and will always return true
+  (scrutiny-tests-2.scm:23) in procedure call to `fixnum?', the predicate is called with an argument of type `fixnum' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:23) in procedure call to `fixnum?', the predicate is called with an argument of type
-  `float' and will always return false
+  (scrutiny-tests-2.scm:23) in procedure call to `fixnum?', the predicate is called with an argument of type `float' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:25) in procedure call to `flonum?', the predicate is called with an argument of type
-  `float' and will always return true
+  (scrutiny-tests-2.scm:25) in procedure call to `flonum?', the predicate is called with an argument of type `float' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:25) in procedure call to `flonum?', the predicate is called with an argument of type
-  `fixnum' and will always return false
+  (scrutiny-tests-2.scm:25) in procedure call to `flonum?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:27) in procedure call to `number?', the predicate is called with an argument of type
-  `fixnum' and will always return true
+  (scrutiny-tests-2.scm:27) in procedure call to `number?', the predicate is called with an argument of type `fixnum' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:27) in procedure call to `number?', the predicate is called with an argument of type
-  `float' and will always return true
+  (scrutiny-tests-2.scm:27) in procedure call to `number?', the predicate is called with an argument of type `float' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:27) in procedure call to `number?', the predicate is called with an argument of type
-  `number' and will always return true
+  (scrutiny-tests-2.scm:27) in procedure call to `number?', the predicate is called with an argument of type `number' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:27) in procedure call to `number?', the predicate is called with an argument of type
-  `null' and will always return false
+  (scrutiny-tests-2.scm:27) in procedure call to `number?', the predicate is called with an argument of type `null' and will always return false
diff --git a/tests/scrutiny.expected b/tests/scrutiny.expected
index 914d7d52..04fe4727 100644
--- a/tests/scrutiny.expected
+++ b/tests/scrutiny.expected
@@ -2,14 +2,12 @@
 Note: in local procedure `c',
   in local procedure `b',
   in toplevel procedure `a':
-  expected value of type boolean in conditional but were given a value of type
-  `number' which is always true:
+  expected a value of type boolean in conditional, but was given a value of type `number' which is always true:
 
 (if x 1 2)
 
 Note: in toplevel procedure `b':
-  expected value of type boolean in conditional but were given a value of type
-  `true' which is always true:
+  expected a value of type boolean in conditional, but was given a value of type `true' which is always true:
 
 (if x 1 2)
 
@@ -19,85 +17,84 @@ Warning: in toplevel procedure `foo':
 (if x (values 1 2) (values 1 2 (+ (+ ...))))
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:19) in procedure call to `bar', expected argument #2 of type `number', but was given an argument of type `symbol'
+  (scrutiny-tests.scm:19) in procedure call to `bar', expected argument #2 of type `number' but was given an argument of type `symbol'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:21) in procedure call to `pp', expected 1 argument, but was given 0 arguments
+  (scrutiny-tests.scm:21) in procedure call to `pp', expected 1 argument but was given 0 arguments
 
 Warning: at toplevel:
-  expected in argument #1 of procedure call `(print (cpu-time))' a single result, but were given 2 results
+  expected a single result in argument #1 of procedure call `(print (cpu-time))', but received 2 results
 
 Warning: at toplevel:
-  expected in argument #1 of procedure call `(print (values))' a single result, but were given zero results
+  expected a single result in argument #1 of procedure call `(print (values))', but received zero results
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:27) in procedure call to `x', expected a value of type `(procedure () *)', but was given a value of type `fixnum'
+  (scrutiny-tests.scm:27) in procedure call to `x', expected a value of type `(procedure () *)' but was given a value of type `fixnum'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:29) in procedure call to `+', expected argument #1 of type `number', but was given an argument of type `symbol'
+  (scrutiny-tests.scm:29) in procedure call to `+', expected argument #1 of type `number' but was given an argument of type `symbol'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:29) in procedure call to `+', expected argument #2 of type `number', but was given an argument of type `symbol'
+  (scrutiny-tests.scm:29) in procedure call to `+', expected argument #2 of type `number' but was given an argument of type `symbol'
 
 Warning: at toplevel:
-  assignment of value of type `fixnum' to toplevel variable `car' does not match declared type `(forall (a191) (procedure car ((pair a191 *)) a191))'
+  assignment of value of type `fixnum' to toplevel variable `car' does not match declared type `(forall (a) (procedure car ((pair a *)) a))'
 
 Warning: at toplevel:
-  expected in `let' binding of `g10' a single result, but were given 2 results
+  expected a single result in `let' binding of `g10', but received 2 results
 
 Warning: at toplevel:
-  in procedure call to `g10', expected a value of type `(procedure () *)', but was given a value of type `fixnum'
+  in procedure call to `g10', expected a value of type `(procedure () *)' but was given a value of type `fixnum'
 
 Note: in toplevel procedure `foo':
-  expected value of type boolean in conditional but were given a value of type
-  `(procedure bar32 () *)' which is always true:
+  expected a value of type boolean in conditional, but was given a value of type `(procedure bar () *)' which is always true:
 
 (if bar 3 (##core#undefined))
 
 Warning: in toplevel procedure `foo2':
-  (scrutiny-tests.scm:58) in procedure call to `string-append', expected argument #1 of type `string', but was given an argument of type `number'
+  (scrutiny-tests.scm:58) in procedure call to `string-append', expected argument #1 of type `string' but was given an argument of type `number'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:66) in procedure call to `foo3', expected argument #1 of type `string', but was given an argument of type `fixnum'
+  (scrutiny-tests.scm:66) in procedure call to `foo3', expected argument #1 of type `string' but was given an argument of type `fixnum'
 
 Warning: in toplevel procedure `foo4':
-  (scrutiny-tests.scm:71) in procedure call to `+', expected argument #1 of type `number', but was given an argument of type `string'
+  (scrutiny-tests.scm:71) in procedure call to `+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: in toplevel procedure `foo5':
-  (scrutiny-tests.scm:77) in procedure call to `+', expected argument #1 of type `number', but was given an argument of type `string'
+  (scrutiny-tests.scm:77) in procedure call to `+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: in toplevel procedure `foo6':
-  (scrutiny-tests.scm:83) in procedure call to `+', expected argument #1 of type `number', but was given an argument of type `string'
+  (scrutiny-tests.scm:83) in procedure call to `+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:90) in procedure call to `+', expected argument #1 of type `number', but was given an argument of type `string'
+  (scrutiny-tests.scm:90) in procedure call to `+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: in toplevel procedure `foo10':
-  (scrutiny-tests.scm:104) in procedure call to `foo9', expected argument #1 of type `string', but was given an argument of type `number'
+  (scrutiny-tests.scm:104) in procedure call to `foo9', expected argument #1 of type `string' but was given an argument of type `number'
 
 Warning: in toplevel procedure `foo10':
-  (scrutiny-tests.scm:105) in procedure call to `+', expected argument #1 of type `number', but was given an argument of type `string'
+  (scrutiny-tests.scm:105) in procedure call to `+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Note: in toplevel procedure `foo10':
-  expression returns a result of type `string', but is declared to return `pair', which is not a subtype
+  expression returns a result of type `string' but is declared to return `pair', which is not a subtype
 
 Warning: in toplevel procedure `foo10':
-  (scrutiny-tests.scm:109) in procedure call to `string-append', expected argument #1 of type `string', but was given an argument of type `pair'
+  (scrutiny-tests.scm:109) in procedure call to `string-append', expected argument #1 of type `string' but was given an argument of type `pair'
 
 Warning: in toplevel procedure `foo10':
   expression returns 2 values but is declared to have a single result
 
 Note: in toplevel procedure `foo10':
-  expression returns a result of type `fixnum', but is declared to return `*', which is not a subtype
+  expression returns a result of type `fixnum' but is declared to return `*', which is not a subtype
 
 Warning: in toplevel procedure `foo10':
   expression returns zero values but is declared to have a single result of type `*'
 
 Warning: in toplevel procedure `foo10':
-  (scrutiny-tests.scm:112) in procedure call to `*', expected argument #1 of type `number', but was given an argument of type `string'
+  (scrutiny-tests.scm:112) in procedure call to `*', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: in toplevel procedure `foo#blabla':
-  (scrutiny-tests.scm:137) in procedure call to `+', expected argument #2 of type `number', but was given an argument of type `symbol'
+  (scrutiny-tests.scm:137) in procedure call to `+', expected argument #2 of type `number' but was given an argument of type `symbol'
 
 Warning: at toplevel:
   use of deprecated `deprecated-procedure'
@@ -106,54 +103,45 @@ Warning: at toplevel:
   use of deprecated `another-deprecated-procedure' - consider `replacement-procedure'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:162) in procedure call to `apply1', expected argument #2 of type `(list-of number)', but was given an argument of type `(list symbol fixnum fixnum)'
+  (scrutiny-tests.scm:162) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:163) in procedure call to `apply1', expected argument #2 of type `(list-of number)', but was given an argument of type `(list symbol fixnum fixnum)'
+  (scrutiny-tests.scm:163) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)'
 
 Note: at toplevel:
-  (scrutiny-tests.scm:176) in procedure call to `fixnum?', the predicate is called with an argument of type
-  `fixnum' and will always return true
+  (scrutiny-tests.scm:176) in procedure call to `fixnum?', the predicate is called with an argument of type `fixnum' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests.scm:184) in procedure call to `symbol?', the predicate is called with an argument of type
-  `(or char string)' and will always return false
+  (scrutiny-tests.scm:184) in procedure call to `symbol?', the predicate is called with an argument of type `(or char string)' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:188) in procedure call to `char-or-string?', the predicate is called with an argument of type
-  `fixnum' and will always return false
+  (scrutiny-tests.scm:188) in procedure call to `char-or-string?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:189) in procedure call to `symbol?', the predicate is called with an argument of type
-  `(or char string)' and will always return false
+  (scrutiny-tests.scm:189) in procedure call to `symbol?', the predicate is called with an argument of type `(or char string)' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:190) in procedure call to `string?', the predicate is called with an argument of type
-  `fixnum' and will always return false
+  (scrutiny-tests.scm:190) in procedure call to `string?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:194) in procedure call to `symbol?', the predicate is called with an argument of type
-  `char' and will always return false
+  (scrutiny-tests.scm:194) in procedure call to `symbol?', the predicate is called with an argument of type `char' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:195) in procedure call to `string?', the predicate is called with an argument of type
-  `symbol' and will always return false
+  (scrutiny-tests.scm:195) in procedure call to `string?', the predicate is called with an argument of type `symbol' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:199) in procedure call to `symbol?', the predicate is called with an argument of type
-  `(or char string)' and will always return false
+  (scrutiny-tests.scm:199) in procedure call to `symbol?', the predicate is called with an argument of type `(or char string)' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:200) in procedure call to `string?', the predicate is called with an argument of type
-  `symbol' and will always return false
+  (scrutiny-tests.scm:200) in procedure call to `string?', the predicate is called with an argument of type `symbol' and will always return false
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:204) in procedure call to `f', expected argument #1 of type `pair', but was given an argument of type `null'
+  (scrutiny-tests.scm:204) in procedure call to `f', expected argument #1 of type `pair' but was given an argument of type `null'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:206) in procedure call to `f', expected argument #1 of type `null', but was given an argument of type `(list fixnum)'
+  (scrutiny-tests.scm:206) in procedure call to `f', expected argument #1 of type `null' but was given an argument of type `(list fixnum)'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:208) in procedure call to `f', expected argument #1 of type `list', but was given an argument of type `(pair fixnum fixnum)'
+  (scrutiny-tests.scm:208) in procedure call to `f', expected argument #1 of type `list' but was given an argument of type `(pair fixnum fixnum)'
 
 Warning: redefinition of standard binding: car
Trap