move singletons to core

db4
Doug Coleman 2008-04-02 13:11:55 -05:00
parent a861292f60
commit 11feb563eb
6 changed files with 7 additions and 5 deletions

View File

@ -43,6 +43,7 @@ IN: bootstrap.syntax
"PRIMITIVE:"
"PRIVATE>"
"SBUF\""
"SINLETON:"
"SYMBOL:"
"TUPLE:"
"T{"

View File

@ -9,4 +9,4 @@ GENERIC: zammo ( obj -- )
[ "yes!" ] [ bzzt zammo ] unit-test
[ ] [ SINGLETON: omg ] unit-test
[ t ] [ omg singleton? ] unit-test
[ "USING: classes.singleton ;\nIN: classes.singleton.tests\nSINGLETON: omg\n" ] [ [ omg see ] with-string-writer ] unit-test
[ "IN: classes.singleton.tests\nSINGLETON: omg\n" ] [ [ omg see ] with-string-writer ] unit-test

View File

@ -15,8 +15,5 @@ PREDICATE: singleton < predicate-class
\ singleton
over [ eq? ] curry define-predicate-class ;
: SINGLETON:
scan define-singleton ; parsing
M: singleton see-class* ( class -- )
<colon \ SINGLETON: pprint-word pprint-word ;

View File

@ -6,7 +6,7 @@ namespaces parser sequences strings sbufs vectors words
quotations io assocs splitting classes.tuple generic.standard
generic.math classes io.files vocabs float-arrays float-vectors
classes.union classes.mixin classes.predicate compiler.units
combinators debugger ;
combinators debugger classes.singleton ;
IN: bootstrap.syntax
! These words are defined as a top-level form, instead of with
@ -154,6 +154,10 @@ IN: bootstrap.syntax
parse-definition define-predicate-class
] define-syntax
"SINGLETON:" [
scan define-singleton
] define-syntax
"TUPLE:" [
parse-tuple-definition define-tuple-class
] define-syntax