From aaf8e6621575ffa255ec1ab2b6f84a2914031999 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 11 May 2008 00:41:47 -0500 Subject: [PATCH] Fix prettyprinting for INTERSECTION: --- core/prettyprint/prettyprint-tests.factor | 6 ++++++ core/prettyprint/prettyprint.factor | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/core/prettyprint/prettyprint-tests.factor b/core/prettyprint/prettyprint-tests.factor index 0faae398e9..ed6b2f3c3c 100755 --- a/core/prettyprint/prettyprint-tests.factor +++ b/core/prettyprint/prettyprint-tests.factor @@ -334,5 +334,11 @@ PREDICATE: predicate-see-test < integer even? ; [ \ predicate-see-test see ] with-string-writer ] 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 [ ] [ \ curry see ] unit-test diff --git a/core/prettyprint/prettyprint.factor b/core/prettyprint/prettyprint.factor index 4974e1df3c..a3c3f4926b 100755 --- a/core/prettyprint/prettyprint.factor +++ b/core/prettyprint/prettyprint.factor @@ -7,8 +7,8 @@ vectors words prettyprint.backend prettyprint.sections prettyprint.config sorting splitting math.parser vocabs definitions effects classes.builtin classes.tuple io.files classes continuations hashtables classes.mixin classes.union -classes.predicate classes.singleton combinators quotations -sets ; +classes.intersection classes.predicate classes.singleton +combinators quotations sets ; : make-pprint ( obj quot -- block in use ) [ @@ -238,6 +238,11 @@ M: union-class see-class* dup pprint-word members pprint-elements pprint-; block> ; +M: intersection-class see-class* + ; + M: mixin-class see-class*