Merge branch 'master' of git://factorcode.org/git/factor

db4
Alfredo Beaumont 2008-07-06 01:29:29 +02:00
commit ab408a436d
5 changed files with 10 additions and 5 deletions

View File

@ -3,7 +3,7 @@ kernel math namespaces parser prettyprint sequences strings
tools.test vectors words quotations classes classes.algebra
classes.private classes.union classes.mixin classes.predicate
vectors definitions source-files compiler.units growable
random inference effects kernel.private sbufs math.order
random inference effects kernel.private sbufs math.order
classes.tuple ;
IN: classes.algebra.tests
@ -288,6 +288,8 @@ INTERSECTION: generic-class generic class ;
generic-class flatten-class
] unit-test
[ \ + flatten-class ] must-fail
INTERSECTION: empty-intersection ;
[ t ] [ object empty-intersection class<= ] unit-test

View File

@ -207,9 +207,6 @@ GENERIC: (flatten-class) ( class -- )
M: anonymous-union (flatten-class)
members>> [ (flatten-class) ] each ;
M: word (flatten-class)
normalize-class (flatten-class) ;
: flatten-class ( class -- assoc )
[ (flatten-class) ] H{ } make-assoc ;

View File

@ -31,3 +31,6 @@ M: intersection-class rank-class drop 2 ;
M: intersection-class instance?
"participants" word-prop [ instance? ] with all? ;
M: intersection-class (flatten-class)
participants <anonymous-intersection> (flatten-class) ;

View File

@ -32,3 +32,6 @@ M: union-class rank-class drop 2 ;
M: union-class instance?
"members" word-prop [ instance? ] with contains? ;
M: union-class (flatten-class)
members <anonymous-union> (flatten-class) ;

View File

@ -37,7 +37,7 @@ namespaces continuations layouts accessors ;
[ ] [ "tetris" shake-and-bake ] unit-test
[ t ] [ 1200000 small-enough? ] unit-test
[ t ] [ 1500000 small-enough? ] unit-test
[ ] [ "bunny" shake-and-bake ] unit-test