diff --git a/extra/delegate/delegate.factor b/extra/delegate/delegate.factor index 8ff5e2110b..f7dcc8821d 100644 --- a/extra/delegate/delegate.factor +++ b/extra/delegate/delegate.factor @@ -1,7 +1,6 @@ ! Copyright (C) 2007 Daniel Ehrenberg ! See http://factorcode.org/license.txt for BSD license. -USING: parser generic kernel classes words slots io definitions -sequences sequences.private assocs prettyprint.sections arrays ; +USING: parser generic kernel classes words slots assocs sequences arrays ; IN: delegate : define-protocol ( wordlist protocol -- ) @@ -40,31 +39,6 @@ M: tuple-class group-words : CONSULT: scan-word scan-word parse-definition swapd define-consult ; parsing -PROTOCOL: sequence-protocol - clone clone-like like new new-resizable nth nth-unsafe - set-nth set-nth-unsafe length set-length lengthen ; - -PROTOCOL: assoc-protocol - at* assoc-size >alist set-at assoc-clone-like - delete-at clear-assoc new-assoc assoc-like ; - ! assoc-find excluded because GENERIC# 1 - ! everything should work, just slower (with >alist) - -PROTOCOL: stream-protocol - stream-close stream-read1 stream-read stream-read-until - stream-flush stream-write1 stream-write stream-format - stream-nl make-span-stream make-block-stream stream-readln - make-cell-stream stream-write-table set-timeout ; - -PROTOCOL: definition-protocol - where set-where forget uses redefined* - synopsis* definer definition ; - -PROTOCOL: prettyprint-section-protocol - section-fits? indent-section? unindent-first-line? - newline-after? short-section? short-section long-section -
delegate>block add-section ; - : define-mimic ( group mimicker mimicked -- ) >r >r group-words r> r> [ pick "methods" word-prop at dup diff --git a/extra/delegate/protocols/protocols.factor b/extra/delegate/protocols/protocols.factor new file mode 100644 index 0000000000..07f4ce119a --- /dev/null +++ b/extra/delegate/protocols/protocols.factor @@ -0,0 +1,32 @@ +! Copyright (C) 2007 Daniel Ehrenberg +! See http://factorcode.org/license.txt for BSD license. +USING: delegate sequences.private sequences assocs prettyprint.sections +io definitions kernel ; +IN: delegate.protocols + +PROTOCOL: sequence-protocol + clone clone-like like new new-resizable nth nth-unsafe + set-nth set-nth-unsafe length set-length lengthen ; + +PROTOCOL: assoc-protocol + at* assoc-size >alist set-at assoc-clone-like + delete-at clear-assoc new-assoc assoc-like ; + ! assoc-find excluded because GENERIC# 1 + ! everything should work, just slower (with >alist) + +PROTOCOL: stream-protocol + stream-close stream-read1 stream-read stream-read-until + stream-flush stream-write1 stream-write stream-format + stream-nl make-span-stream make-block-stream stream-readln + make-cell-stream stream-write-table set-timeout ; + +PROTOCOL: definition-protocol + where set-where forget uses redefined* + synopsis* definer definition ; + +PROTOCOL: prettyprint-section-protocol + section-fits? indent-section? unindent-first-line? + newline-after? short-section? short-section long-section +
delegate>block add-section ; + + diff --git a/extra/xml/data/data.factor b/extra/xml/data/data.factor index ae54816471..469f6b560d 100644 --- a/extra/xml/data/data.factor +++ b/extra/xml/data/data.factor @@ -1,6 +1,7 @@ ! Copyright (C) 2005, 2006 Daniel Ehrenberg ! See http://factorcode.org/license.txt for BSD license. -USING: kernel sequences sequences.private assocs arrays delegate vectors ; +USING: kernel sequences sequences.private assocs arrays +delegate.protocols delegate vectors ; IN: xml.data TUPLE: name space tag url ;