Fix prettyprinting for INTERSECTION:

db4
Slava Pestov 2008-05-11 00:41:47 -05:00
parent 8a4ef17039
commit aaf8e66215
2 changed files with 13 additions and 2 deletions

View File

@ -334,5 +334,11 @@ PREDICATE: predicate-see-test < integer even? ;
[ \ predicate-see-test see ] with-string-writer [ \ predicate-see-test see ] with-string-writer
] unit-test ] unit-test
INTERSECTION: intersection-see-test sequence number ;
[ "USING: math sequences ;\nIN: prettyprint.tests\nINTERSECTION: intersection-see-test sequence number ;\n" ] [
[ \ intersection-see-test see ] with-string-writer
] unit-test
[ ] [ \ compose see ] unit-test [ ] [ \ compose see ] unit-test
[ ] [ \ curry see ] unit-test [ ] [ \ curry see ] unit-test

View File

@ -7,8 +7,8 @@ vectors words prettyprint.backend prettyprint.sections
prettyprint.config sorting splitting math.parser vocabs prettyprint.config sorting splitting math.parser vocabs
definitions effects classes.builtin classes.tuple io.files definitions effects classes.builtin classes.tuple io.files
classes continuations hashtables classes.mixin classes.union classes continuations hashtables classes.mixin classes.union
classes.predicate classes.singleton combinators quotations classes.intersection classes.predicate classes.singleton
sets ; combinators quotations sets ;
: make-pprint ( obj quot -- block in use ) : make-pprint ( obj quot -- block in use )
[ [
@ -238,6 +238,11 @@ M: union-class see-class*
dup pprint-word dup pprint-word
members pprint-elements pprint-; block> ; members pprint-elements pprint-; block> ;
M: intersection-class see-class*
<colon \ INTERSECTION: pprint-word
dup pprint-word
participants pprint-elements pprint-; block> ;
M: mixin-class see-class* M: mixin-class see-class*
<block \ MIXIN: pprint-word <block \ MIXIN: pprint-word
dup pprint-word <block dup pprint-word <block