move singletons to core
parent
a861292f60
commit
11feb563eb
|
@ -43,6 +43,7 @@ IN: bootstrap.syntax
|
|||
"PRIMITIVE:"
|
||||
"PRIVATE>"
|
||||
"SBUF\""
|
||||
"SINLETON:"
|
||||
"SYMBOL:"
|
||||
"TUPLE:"
|
||||
"T{"
|
||||
|
|
|
@ -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
|
|
@ -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 ;
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue