Previously, if typevars were given in a polymorphic type specification but none of them were actually used within its body, type simplification would still produce a "forall" type, e.g. `(forall () list)` where simply a `list` would do. This patch fixes these cases by only keeping the "forall" when at least one typevar is used within a type's body. --- scrutinizer.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scrutinizer.scm b/scrutinizer.scm index c437933..77b14f5 100644 --- a/scrutinizer.scm +++ b/scrutinizer.scm @@ -1389,7 +1389,7 @@ (cdr e))) (else t))))) (let ((t2 (simplify t))) - (when (pair? typeenv) + (when (pair? used) (set! t2 `(forall ,(filter-map (lambda (e) -- 1.7.10.4 _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers