Fixing confusing printing from Arjun
This commit is contained in:
parent
4e757e07fc
commit
f440332768
|
@ -142,7 +142,7 @@
|
||||||
#:reflection-name 'variant)
|
#:reflection-name 'variant)
|
||||||
...
|
...
|
||||||
(define variant?
|
(define variant?
|
||||||
(flat-named-contract 'variant? variant*?))
|
variant*?)
|
||||||
...
|
...
|
||||||
(define (datatype? x)
|
(define (datatype? x)
|
||||||
(or (variant? x) ...))
|
(or (variant? x) ...))
|
||||||
|
|
|
@ -17,6 +17,14 @@
|
||||||
(set! success (add1 success))
|
(set! success (add1 success))
|
||||||
(error 'check "failed: ~s vs. ~s" a b)))
|
(error 'check "failed: ~s vs. ~s" a b)))
|
||||||
|
|
||||||
|
(check (to-string print Foo?) "#<procedure:Foo?>")
|
||||||
|
(check (to-string write Foo?) "#<procedure:Foo?>")
|
||||||
|
(check (to-string display Foo?) "#<procedure:Foo?>")
|
||||||
|
|
||||||
|
(check (to-string print bar?) "#<procedure:bar?>")
|
||||||
|
(check (to-string write bar?) "#<procedure:bar?>")
|
||||||
|
(check (to-string display bar?) "#<procedure:bar?>")
|
||||||
|
|
||||||
(check (to-string print (bar "a" 'b)) "(bar \"a\" 'b)")
|
(check (to-string print (bar "a" 'b)) "(bar \"a\" 'b)")
|
||||||
(check (to-string write (bar "a" 'b)) "#(struct: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)")
|
(check (to-string display (bar "a" 'b)) "#(struct:bar a b)")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user