diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/printer.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/printer.rkt index 64363491..b34c12a4 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/printer.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/printer.rkt @@ -240,7 +240,7 @@ null) (match rng [(AnyValues: (Top:)) '(AnyValues)] - [(AnyValues: f) `(AnyValues : ,(type->sexp f))] + [(AnyValues: f) `(AnyValues : ,(filter->sexp f))] [(Values: (list (Result: t (FilterSet: (Top:) (Top:)) (Empty:)))) (list (type->sexp t))] [(Values: (list (Result: t @@ -480,7 +480,7 @@ [(F: nm) nm] ;; FIXME (Values are not types and shouldn't need to be considered here [(AnyValues: (Top:)) 'AnyValues] - [(AnyValues: f) (displayln (list 'this-case (NoFilter? f) (Top? f))) `(AnyValues : ,(filter->sexp f))] + [(AnyValues: f) `(AnyValues : ,(filter->sexp f))] [(Values: (list v)) v] [(Values: (list v ...)) (cons 'values (map t->s v))] [(ValuesDots: v dty dbound) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/type-printer-tests.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/type-printer-tests.rkt index 09f2f726..68645a16 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/type-printer-tests.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/type-printer-tests.rkt @@ -104,6 +104,13 @@ " 'append 'update 'replace 'truncate" " 'truncate/replace)] [#:mode (U" " 'binary 'text)] Void)")) + (check-prints-as? (-> Univ (-AnyValues -top)) "(-> Any AnyValues)") + (check-prints-as? (-> Univ (-AnyValues (-filter -String '(0 0)))) + "(-> Any AnyValues : (String @ (0 0)))") + (check-prints-as? (-AnyValues -top) "AnyValues") + (check-prints-as? (-AnyValues (-filter -String '(0 0))) + "(AnyValues : (String @ (0 0)))") + (check-prints-as? (->opt Univ [] -Void) "(-> Any Void)") (check-prints-as? (->opt [-String] -Void) "(->* () (String) Void)") (check-prints-as? (->opt Univ [-String] -Void) "(->* (Any) (String) Void)")