diff --git a/collects/plai/datatype.rkt b/collects/plai/datatype.rkt index eeff071b87..960cbedce4 100644 --- a/collects/plai/datatype.rkt +++ b/collects/plai/datatype.rkt @@ -142,7 +142,7 @@ #:reflection-name 'variant) ... (define variant? - (flat-named-contract 'variant? variant*?)) + variant*?) ... (define (datatype? x) (or (variant? x) ...)) diff --git a/collects/tests/plai/printer.rkt b/collects/tests/plai/printer.rkt index 8771f456cd..947eab6adc 100644 --- a/collects/tests/plai/printer.rkt +++ b/collects/tests/plai/printer.rkt @@ -17,6 +17,14 @@ (set! success (add1 success)) (error 'check "failed: ~s vs. ~s" a b))) +(check (to-string print Foo?) "#") +(check (to-string write Foo?) "#") +(check (to-string display Foo?) "#") + +(check (to-string print bar?) "#") +(check (to-string write bar?) "#") +(check (to-string display bar?) "#") + (check (to-string print (bar "a" 'b)) "(bar \"a\" 'b)") (check (to-string write (bar "a" 'b)) "#(struct:bar \"a\" b)") (check (to-string display (bar "a" 'b)) "#(struct:bar a b)")