diff --git a/core/bootstrap/syntax.factor b/core/bootstrap/syntax.factor index e5a439c32b..fb5923382e 100755 --- a/core/bootstrap/syntax.factor +++ b/core/bootstrap/syntax.factor @@ -43,7 +43,7 @@ IN: bootstrap.syntax "PRIMITIVE:" "PRIVATE>" "SBUF\"" - "SINLETON:" + "SINGLETON:" "SYMBOL:" "TUPLE:" "T{" diff --git a/core/classes/singleton/singleton-tests.factor b/core/classes/singleton/singleton-tests.factor index 92a9877477..2ed51abb93 100644 --- a/core/classes/singleton/singleton-tests.factor +++ b/core/classes/singleton/singleton-tests.factor @@ -8,5 +8,5 @@ GENERIC: zammo ( obj -- str ) [ ] [ M: bzzt zammo drop "yes!" ; ] unit-test [ "yes!" ] [ bzzt zammo ] unit-test [ ] [ SINGLETON: omg ] unit-test -[ t ] [ omg singleton? ] unit-test +[ t ] [ omg singleton-class? ] unit-test [ "IN: classes.singleton.tests\nSINGLETON: omg\n" ] [ [ omg see ] with-string-writer ] unit-test diff --git a/core/classes/singleton/singleton.factor b/core/classes/singleton/singleton.factor index 13fd242dad..65d7422ed7 100755 --- a/core/classes/singleton/singleton.factor +++ b/core/classes/singleton/singleton.factor @@ -1,19 +1,11 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: classes.predicate kernel namespaces parser quotations -sequences words prettyprint prettyprint.backend prettyprint.sections -compiler.units classes ; +USING: classes.predicate kernel sequences words ; IN: classes.singleton -PREDICATE: singleton < predicate-class +PREDICATE: singleton-class < predicate-class [ "predicate-definition" word-prop ] [ [ eq? ] curry ] bi sequence= ; -: define-singleton ( token -- ) - create-class-in - dup save-location - \ singleton - over [ eq? ] curry define-predicate-class ; - -M: singleton see-class* ( class -- ) - block> ; +M: singleton-class see-class* ( class -- ) + \ SINGLETON: pprint-word pprint-word ; + M: tuple-class see-class*