move singletons to core
parent
a861292f60
commit
11feb563eb
|
@ -43,6 +43,7 @@ IN: bootstrap.syntax
|
||||||
"PRIMITIVE:"
|
"PRIMITIVE:"
|
||||||
"PRIVATE>"
|
"PRIVATE>"
|
||||||
"SBUF\""
|
"SBUF\""
|
||||||
|
"SINLETON:"
|
||||||
"SYMBOL:"
|
"SYMBOL:"
|
||||||
"TUPLE:"
|
"TUPLE:"
|
||||||
"T{"
|
"T{"
|
||||||
|
|
|
@ -9,4 +9,4 @@ GENERIC: zammo ( obj -- )
|
||||||
[ "yes!" ] [ bzzt zammo ] unit-test
|
[ "yes!" ] [ bzzt zammo ] unit-test
|
||||||
[ ] [ SINGLETON: omg ] unit-test
|
[ ] [ SINGLETON: omg ] unit-test
|
||||||
[ t ] [ omg singleton? ] 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
|
\ singleton
|
||||||
over [ eq? ] curry define-predicate-class ;
|
over [ eq? ] curry define-predicate-class ;
|
||||||
|
|
||||||
: SINGLETON:
|
|
||||||
scan define-singleton ; parsing
|
|
||||||
|
|
||||||
M: singleton see-class* ( class -- )
|
M: singleton see-class* ( class -- )
|
||||||
<colon \ SINGLETON: pprint-word pprint-word ;
|
<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
|
quotations io assocs splitting classes.tuple generic.standard
|
||||||
generic.math classes io.files vocabs float-arrays float-vectors
|
generic.math classes io.files vocabs float-arrays float-vectors
|
||||||
classes.union classes.mixin classes.predicate compiler.units
|
classes.union classes.mixin classes.predicate compiler.units
|
||||||
combinators debugger ;
|
combinators debugger classes.singleton ;
|
||||||
IN: bootstrap.syntax
|
IN: bootstrap.syntax
|
||||||
|
|
||||||
! These words are defined as a top-level form, instead of with
|
! These words are defined as a top-level form, instead of with
|
||||||
|
@ -154,6 +154,10 @@ IN: bootstrap.syntax
|
||||||
parse-definition define-predicate-class
|
parse-definition define-predicate-class
|
||||||
] define-syntax
|
] define-syntax
|
||||||
|
|
||||||
|
"SINGLETON:" [
|
||||||
|
scan define-singleton
|
||||||
|
] define-syntax
|
||||||
|
|
||||||
"TUPLE:" [
|
"TUPLE:" [
|
||||||
parse-tuple-definition define-tuple-class
|
parse-tuple-definition define-tuple-class
|
||||||
] define-syntax
|
] define-syntax
|
||||||
|
|
Loading…
Reference in New Issue