]> gitweb.factorcode.org Git - factor.git/commitdiff
sets: rename unordered-set back to set.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 Mar 2016 22:46:29 +0000 (15:46 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 Mar 2016 22:46:29 +0000 (15:46 -0700)
16 files changed:
basis/bit-sets/bit-sets.factor
basis/compiler/tree/propagation/transforms/transforms.factor
basis/hash-sets/wrapped/wrapped.factor
basis/linked-sets/linked-sets.factor
basis/random/random.factor
basis/summary/summary.factor
basis/tools/crossref/crossref-docs.factor
core/graphs/graphs-docs.factor
core/hash-sets/hash-sets-docs.factor
core/hash-sets/hash-sets.factor
core/sets/sets-docs.factor
core/sets/sets-tests.factor
core/sets/sets.factor
extra/sets/extras/extras-docs.factor
extra/yaml/yaml-docs.factor
extra/yaml/yaml.factor

index 2b4fb129ee4b9d5ff7ba43e1ef7c97d73ab40165..0f1bca79997dcebc81cc3fe9bf95244600a21139 100644 (file)
@@ -9,7 +9,7 @@ TUPLE: bit-set { table bit-array read-only } ;
 : <bit-set> ( capacity -- bit-set )
     <bit-array> bit-set boa ; inline
 
-INSTANCE: bit-set unordered-set
+INSTANCE: bit-set set
 
 M: bit-set in?
     over integer? [ table>> ?nth ] [ 2drop f ] if ; inline
index 0d566228d1a83fe04834107eeaf9e95e62e2a244..67b0e5cba1630ea7728470cfbf868e5785dbd6e7 100644 (file)
@@ -302,17 +302,17 @@ CONSTANT: lookup-table-at-max 256
 : diff-quot ( seq -- quot: ( seq' -- seq'' ) )
     [ tester ] keep '[ members [ @ ] reject _ set-like ] ;
 
-M\ unordered-set diff [ diff-quot ] 1 define-partial-eval
+M\ sets:set diff [ diff-quot ] 1 define-partial-eval
 
 : intersect-quot ( seq -- quot: ( seq' -- seq'' ) )
     [ tester ] keep '[ members _ filter _ set-like ] ;
 
-M\ unordered-set intersect [ intersect-quot ] 1 define-partial-eval
+M\ sets:set intersect [ intersect-quot ] 1 define-partial-eval
 
 : intersects?-quot ( seq -- quot: ( seq' -- seq'' ) )
     tester '[ members _ any? ] ;
 
-M\ unordered-set intersects? [ intersects?-quot ] 1 define-partial-eval
+M\ sets:set intersects? [ intersects?-quot ] 1 define-partial-eval
 
 : bit-quot ( #call -- quot/f )
     in-d>> second value-info interval>> 0 fixnum-bits [a,b] interval-subset?
index f2db814f1b8f2dc76c14f22b27f822ac8b6c8e00..76dc893edccba34541fe2ee60d81b04b45c170be 100644 (file)
@@ -45,6 +45,6 @@ M: wrapped-hash-set members
 M: wrapped-hash-set equal?
     over wrapped-hash-set? [ [ underlying>> ] same? ] [ 2drop f ] if ;
 
-INSTANCE: wrapped-hash-set unordered-set
+INSTANCE: wrapped-hash-set set
 
 { "hash-sets.wrapped" "prettyprint" } "hash-sets.wrapped.prettyprint" require-when
index 46545c497b024548666f0a8a0ac0bde0b4fe74ee..15230d13f2440a8811e21803f1d5ed4ac4d776db 100644 (file)
@@ -43,7 +43,7 @@ M: linked-set equal?
 : >linked-set ( set -- linked-set )
     [ 0 <linked-set> ] dip union! ;
 
-INSTANCE: linked-set unordered-set
+INSTANCE: linked-set set
 
 M: linked-set set-like
     drop dup linked-set? [ >linked-set ] unless ;
index 6be5ed996ab1a5f5c40bf3f7c0f598603c2ff1a2..496c5d8fbf2a2d05bdeec7d49b7019a371948e37 100644 (file)
@@ -105,7 +105,7 @@ M: hashtable random
         [ array-nth ] [ [ 1 + ] dip array-nth ] 2bi 2array
     ] if-zero ;
 
-M: unordered-set random members random ;
+M: sets:set random members random ;
 
 M: hash-set random
     dup cardinality [ drop f ] [
index 86eb9618975c62ca73ee1a88f5f84fdce08fb081..3449c3bb49ee99554471d5d338379d9538196cdc 100644 (file)
@@ -21,7 +21,7 @@ M: assoc tuple-summary
 M: object tuple-summary
     object-summary "a " " tuple" surround ;
 
-M: unordered-set tuple-summary
+M: set tuple-summary
     dup cardinality "members" container-summary ;
 
 M: tuple summary
index 387c5ef8684a299af26456494bcf0e2a2642e536..3c47e57daee7a654e87572157093a969f1b3d83d 100644 (file)
@@ -55,7 +55,7 @@ HELP: usage.
 { $examples { $code "\\ reverse usage." } } ;
 
 HELP: quot-uses
-{ $values { "obj" object } { "set" "a " { $link unordered-set } " of words" } }
+{ $values { "obj" object } { "set" "a " { $link set } " of words" } }
 { $description "Outputs a set of words referenced by the quotation and any quotations it contains." } ;
 
 { usage usage. } related-words
index 1c1ca4df87a4379b4cd8495964075b56dff879ba..b358dc85c95da8639cb1efcd732599c67bc0e252 100644 (file)
@@ -23,7 +23,7 @@ HELP: add-vertex
 { $side-effects "graph" } ;
 
 HELP: remove-vertex
-{ $values { "vertex" object } { "edges" sequence } { "graph" "an " { $link assoc } " mapping vertices to " { $link unordered-set } "s of edges" } }
+{ $values { "vertex" object } { "edges" sequence } { "graph" "an " { $link assoc } " mapping vertices to " { $link set } "s of edges" } }
 { $description "Removes a vertex from a graph, using the given edges sequence." }
 { $notes "The " { $snippet "edges" } " sequence must have all the values passed to " { $link add-vertex } ", otherwise some vertices of the graph may continue to refer to the removed vertex." }
 { $side-effects "graph" } ;
index d78db9b9c6213924029f12d571b16f7e2b2a0726..a5d24f034f464e473141cebdf4aaf528ff3d3ae7 100644 (file)
@@ -11,7 +11,7 @@ ARTICLE: "hash-sets" "Hash sets"
 ABOUT: "hash-sets"
 
 HELP: hash-set
-{ $class-description "The class of hashtable-like sets. These implement the " { $link unordered-set } " mixin." } ;
+{ $class-description "The class of hashtable-like sets. These implement the " { $link set } " mixin." } ;
 
 HELP: <hash-set>
 { $values { "capacity" number } { "hash-set" hash-set } }
index 272c99d85876a263aba27968232664db3d04501d..73006ba7eca6a131e4eb3a2838c00daeb39306be 100644 (file)
@@ -134,7 +134,7 @@ M: hash-set equal?
 M: hash-set set-like
     drop dup hash-set? [ ?members >hash-set ] unless ; inline
 
-INSTANCE: hash-set unordered-set
+INSTANCE: hash-set set
 
 ! Overrides for performance
 
index 481a6ed6aca168b28b1fc53c9205761912b6a075..955a56b9da9aaf2108b13930460b2ec13dae475c 100644 (file)
@@ -6,8 +6,8 @@ ARTICLE: "sets" "Sets"
 "A set is an unordered collection of elements. Words for working with sets are in the " { $vocab-link "sets" } " vocabulary." $nl
 "All sets are instances of a mixin class:"
 { $subsections
-    unordered-set
-    unordered-set?
+    set
+    set?
 }
 { $subsections "set-operations" "set-implementations" } ;
 
@@ -73,11 +73,11 @@ $nl
 $nl
 "As one particular example, " { $link POSTPONE: f } " is a representation of the empty set, since it is an empty sequence." ;
 
-HELP: unordered-set
+HELP: set
 { $class-description "The class of all sets. Custom implementations of the set protocol should be declared as instances of this mixin for all set implementation to work correctly." } ;
 
 HELP: adjoin
-{ $values { "elt" object } { "set" unordered-set } }
+{ $values { "elt" object } { "set" set } }
 { $description "Destructively adds " { $snippet "elt" } " to " { $snippet "set" } ". For sequences, this guarantees that this element is not duplicated, and that it is at the end of the sequence." $nl "Each mutable set type is expected to implement a method on this generic word." }
 { $examples
     { $example
@@ -92,26 +92,26 @@ HELP: adjoin
 { $side-effects "set" } ;
 
 HELP: ?adjoin
-{ $values { "elt" object } { "set" unordered-set } { "?" boolean } }
+{ $values { "elt" object } { "set" set } { "?" boolean } }
 { $description "A version of " { $link adjoin } " which returns whether the element was added to the set." }
 { $notes "This is slightly less efficient than " { $link adjoin } " due to the initial membership test." } ;
 
 HELP: delete
-{ $values { "elt" object } { "set" unordered-set } }
+{ $values { "elt" object } { "set" set } }
 { $description "Destructively removes " { $snippet "elt" } " from " { $snippet "set" } ". If the element is not present, this does nothing." $nl "Each mutable set type is expected to implement a method on this generic word." }
 { $side-effects "set" } ;
 
 HELP: clear-set
-{ $values { "set" unordered-set } }
+{ $values { "set" set } }
 { $contract "Removes all entries from the set." }
 { $side-effects "set" } ;
 
 HELP: members
-{ $values { "set" unordered-set } { "seq" sequence } }
+{ $values { "set" set } { "seq" sequence } }
 { $description "Creates a sequence with a single copy of each member of the set." $nl "Each set type is expected to implement a method on this generic word." } ;
 
 HELP: in?
-{ $values { "elt" object } { "set" unordered-set } { "?" boolean } }
+{ $values { "elt" object } { "set" set } { "?" boolean } }
 { $description "Tests whether the element is a member of the set." $nl "Each set type is expected to implement a method on this generic word as part of the set protocol." } ;
 
 HELP: adjoin-at
@@ -120,14 +120,14 @@ HELP: adjoin-at
 { $side-effects "assoc" } ;
 
 HELP: duplicates
-{ $values { "set" unordered-set } { "seq" sequence } }
+{ $values { "set" set } { "seq" sequence } }
 { $description "Outputs a sequence consisting of elements which occur more than once in " { $snippet "set" } "." }
 { $examples
     { $example "USING: sets prettyprint ;" "{ 1 2 3 1 2 1 } duplicates ." "{ 1 2 1 }" }
 } ;
 
 HELP: all-unique?
-{ $values { "set" unordered-set } { "?" boolean } }
+{ $values { "set" set } { "?" boolean } }
 { $description "Tests whether a set contains any repeated elements." }
 { $example
     "USING: sets prettyprint ;"
@@ -136,14 +136,14 @@ HELP: all-unique?
 } ;
 
 HELP: diff
-{ $values { "set1" unordered-set } { "set2" unordered-set } { "set" unordered-set } }
+{ $values { "set1" set } { "set2" set } { "set" set } }
 { $description "Outputs a set consisting of elements present in " { $snippet "set1" } " but not " { $snippet "set2" } ", comparing elements for equality." $nl "This word has a default definition which works for all sets, but set implementations may override the default for efficiency."
 } { $examples
     { $example "USING: sets prettyprint ;" "{ 1 2 3 } { 2 3 4 } diff ." "{ 1 }" }
 } ;
 
 HELP: intersect
-{ $values { "set1" unordered-set } { "set2" unordered-set } { "set" unordered-set } }
+{ $values { "set1" set } { "set2" set } { "set" set } }
 { $description "Outputs a set consisting of elements present in both " { $snippet "set1" } " and " { $snippet "set2" } "."
 "This word has a default definition which works for all sets, but set implementations may override the default for efficiency." }
 { $examples
@@ -151,11 +151,11 @@ HELP: intersect
 } ;
 
 HELP: intersection
-{ $values { "sets" sequence } { "set/f" { $maybe unordered-set } } }
+{ $values { "sets" sequence } { "set/f" { $maybe set } } }
 { $description "Outputs the intersection of all the sets of the sequence " { $snippet "sets" } ", or " { $link f } " if " { $snippet "sets" } " is empty." } ;
 
 HELP: union
-{ $values { "set1" unordered-set } { "set2" unordered-set } { "set" unordered-set } }
+{ $values { "set1" set } { "set2" set } { "set" set } }
 { $description "Outputs a set consisting of elements present in either " { $snippet "set1" } " or " { $snippet "set2" } " which does not contain duplicate values." $nl "This word has a default definition which works for all sets, but set implementations may override the default for efficiency." }
 { $examples
     { $example "USING: sets prettyprint ;" "{ 1 2 3 } { 2 3 4 } union ." "{ 1 2 3 4 }" }
@@ -164,32 +164,32 @@ HELP: union
 { diff intersect union } related-words
 
 HELP: union!
-{ $values { "set1" unordered-set } { "set2" unordered-set } }
+{ $values { "set1" set } { "set2" set } }
 { $description "Adds all members from " { $snippet "set2" } " to " { $snippet "set1" } "." }
 { $side-effects "set1" } ;
 
 HELP: diff!
-{ $values { "set1" unordered-set } { "set2" unordered-set } }
+{ $values { "set1" set } { "set2" set } }
 { $description "Removes all members from " { $snippet "set1" } " contained in " { $snippet "set2" } "." }
 { $side-effects "set1" } ;
 
 HELP: intersect!
-{ $values { "set1" unordered-set } { "set2" unordered-set } }
+{ $values { "set1" set } { "set2" set } }
 { $description "Removes all members from " { $snippet "set1" } " not contained in " { $snippet "set2" } "." }
 { $side-effects "set1" } ;
 
 HELP: intersects?
-{ $values { "set1" unordered-set } { "set2" unordered-set } { "?" boolean } }
+{ $values { "set1" set } { "set2" set } { "?" boolean } }
 { $description "Tests if " { $snippet "set1" } " and " { $snippet "set2" } " have any elements in common." }
 { $notes "If one of the sets is empty, the result is always " { $link f } "." } ;
 
 HELP: subset?
-{ $values { "set1" unordered-set } { "set2" unordered-set } { "?" boolean } }
+{ $values { "set1" set } { "set2" set } { "?" boolean } }
 { $description "Tests if every element of " { $snippet "set1" } " is contained in " { $snippet "set2" } "." }
 { $notes "If " { $snippet "set1" } " is empty, the result is always " { $link t } "." } ;
 
 HELP: set=
-{ $values { "set1" unordered-set } { "set2" unordered-set } { "?" boolean } }
+{ $values { "set1" set } { "set2" set } { "?" boolean } }
 { $description "Tests if both sets contain the same elements, disregrading order and duplicates." } ;
 
 HELP: gather
@@ -199,28 +199,28 @@ HELP: gather
 { $description "Maps a quotation onto a sequence, concatenates the results of the mapping, and removes duplicates." } ;
 
 HELP: set-like
-{ $values { "set" unordered-set } { "exemplar" unordered-set } { "set'" unordered-set } }
+{ $values { "set" set } { "exemplar" set } { "set'" set } }
 { $description "If the conversion is defined for the exemplar, converts the set into a set of the exemplar's class. This is not guaranteed to create a new set, for example if the input set and exemplar are of the same class." $nl "Set implementations may optionally implement a method on this generic word. The default implementation returns its input set." }
 { $examples
     { $example "USING: sets prettyprint ;" "{ 1 2 3 } HS{ } set-like ." "HS{ 1 2 3 }" }
 } ;
 
 HELP: within
-{ $values { "seq" sequence } { "set" unordered-set } { "subseq" sequence } }
+{ $values { "seq" sequence } { "set" set } { "subseq" sequence } }
 { $description "Returns the subsequence of the given sequence consisting of members of the set. This may contain duplicates, if the sequence has duplicates." } ;
 
 HELP: without
-{ $values { "seq" sequence } { "set" unordered-set } { "subseq" sequence } }
+{ $values { "seq" sequence } { "set" set } { "subseq" sequence } }
 { $description "Returns the subsequence of the given sequence consisting of things that are not members of the set. This may contain duplicates, if the sequence has duplicates." } ;
 
 HELP: null?
-{ $values { "set" unordered-set } { "?" boolean } }
+{ $values { "set" set } { "?" boolean } }
 { $description "Tests whether the given set is empty. This outputs " { $snippet "t" } " when given a null set of any type." } ;
 
 HELP: cardinality
-{ $values { "set" unordered-set } { "n" "a non-negative integer" } }
+{ $values { "set" set } { "n" "a non-negative integer" } }
 { $description "Returns the number of elements in the set. All sets support this operation." } ;
 
 HELP: combine
-{ $values { "sets" { $sequence unordered-set } } { "set/f" { $maybe unordered-set } } }
+{ $values { "sets" { $sequence set } } { "set/f" { $maybe set } } }
 { $description "Outputs the union of a sequence of sets, or " { $link f } " if the sequence is empty." } ;
index da2ba02f024d649deb6618a23d9dd83d82efc238..40ad691842b6e9d971ffb6d729d05a844b80ebcb 100644 (file)
@@ -111,18 +111,18 @@ IN: sets.tests
 { H{ { 3 H{ { 1 1 } { 2 2 } } } } } [ H{ } clone 1 3 pick conjoin-at 2 3 pick conjoin-at ] unit-test
 
 TUPLE: null-set ;
-INSTANCE: null-set unordered-set
+INSTANCE: null-set set
 M: null-set members drop f ;
 
 { 0 } [ T{ null-set } cardinality ] unit-test
 { f } [ T{ null-set } members ] unit-test
 { t } [ T{ null-set } T{ null-set } set-like T{ null-set } = ] unit-test
 
-{ t } [ T{ null-set } unordered-set? ] unit-test
-{ t } [ HS{ } unordered-set? ] unit-test
-{ t } [ { } unordered-set? ] unit-test
-{ t } [ 5 <bit-set> unordered-set? ] unit-test
-{ f } [ H{ } unordered-set? ] unit-test
+{ t } [ T{ null-set } set? ] unit-test
+{ t } [ HS{ } set? ] unit-test
+{ t } [ { } set? ] unit-test
+{ t } [ 5 <bit-set> set? ] unit-test
+{ f } [ H{ } set? ] unit-test
 
 { HS{ } } [ HS{ } [ clear-set ] keep ] unit-test
 { HS{ } } [ HS{ 1 2 3 } [ clear-set ] keep ] unit-test
index 26ea09c2e1e24daf210c61486f02569464713ae7..2614a5287c9df99fa2a8d1bde7801c41c670dc45 100644 (file)
@@ -3,9 +3,8 @@
 USING: assocs hashtables kernel math sequences vectors ;
 IN: sets
 
-! unordered-set protocol
-! The word name ``set`` is for dynamic variables.
-MIXIN: unordered-set
+MIXIN: set
+
 GENERIC: adjoin ( elt set -- )
 GENERIC: ?adjoin ( elt set -- ? )
 GENERIC: in? ( elt set -- ? )
@@ -36,15 +35,15 @@ M: f clear-set drop ; inline
 ! Defaults for some methods.
 ! Override them for efficiency
 
-M: unordered-set ?adjoin 2dup in? [ 2drop f ] [ adjoin t ] if ;
+M: set ?adjoin 2dup in? [ 2drop f ] [ adjoin t ] if ;
 
-M: unordered-set null? members null? ; inline
+M: set null? members null? ; inline
 
-M: unordered-set cardinality members length ;
+M: set cardinality members length ;
 
-M: unordered-set clear-set [ members ] keep [ delete ] curry each ;
+M: set clear-set [ members ] keep [ delete ] curry each ;
 
-M: unordered-set set-like drop ; inline
+M: set set-like drop ; inline
 
 <PRIVATE
 
@@ -56,7 +55,7 @@ M: unordered-set set-like drop ; inline
 
 PRIVATE>
 
-M: unordered-set union [ (union) ] keep set-like ;
+M: set union [ (union) ] keep set-like ;
 
 <PRIVATE
 
@@ -77,11 +76,11 @@ M: unordered-set union [ (union) ] keep set-like ;
 
 PRIVATE>
 
-M: unordered-set intersect [ (intersect) ] keep set-like ;
+M: set intersect [ (intersect) ] keep set-like ;
 
-M: unordered-set diff [ (diff) ] keep set-like ;
+M: set diff [ (diff) ] keep set-like ;
 
-M: unordered-set intersects?
+M: set intersects?
     small/large sequence/tester any? ;
 
 <PRIVATE
@@ -91,17 +90,17 @@ M: unordered-set intersects?
 
 PRIVATE>
 
-M: unordered-set subset?
+M: set subset?
     2dup [ cardinality ] bi@ > [ 2drop f ] [ (subset?) ] if ;
 
-M: unordered-set set=
+M: set set=
     2dup [ cardinality ] bi@ eq? [ (subset?) ] [ 2drop f ] if ;
 
-M: unordered-set fast-set ;
+M: set fast-set ;
 
-M: unordered-set duplicates drop f ;
+M: set duplicates drop f ;
 
-M: unordered-set all-unique? drop t ;
+M: set all-unique? drop t ;
 
 <PRIVATE
 
@@ -115,7 +114,7 @@ M: unordered-set all-unique? drop t ;
 PRIVATE>
 
 ! Sequences are sets
-INSTANCE: sequence unordered-set
+INSTANCE: sequence set
 
 M: sequence in?
     member? ; inline
index 5e931cbc75626a79c69cf1155c6df225b258e7a5..174f91f44bd6496acf5be30e8303fdb66399c664 100644 (file)
@@ -6,7 +6,7 @@ IN: sets.extras
 HELP: setwise-xor
 { $values
     { "seq1" sequence } { "seq2" sequence }
-    { "set" unordered-set }
+    { "set" set }
 }
 { $description "Converts the sequences to sets and takes the element-wise " { $link xor } ". Outputs elements that are in either set but not in both." }
 { $example
@@ -17,11 +17,11 @@ HELP: setwise-xor
 { $notes "Known as setxor1d in numpy." } ;
 
 HELP: symmetric-diff
-{ $values { "set1" unordered-set } { "set2" unordered-set } { "set" unordered-set } }
+{ $values { "set1" set } { "set2" set } { "set" set } }
 { $description "Find the symmetric difference of two sets.  Outputs a set containing elements that in either set but not in both." } ;
 
 HELP: proper-subset?
-{ $values { "set1" unordered-set } { "set2" unordered-set } { "?" boolean } }
+{ $values { "set1" set } { "set2" set } { "?" boolean } }
 { $description "Find whether " { $snippet "set1" } " is a proper subset of " { $snippet "set2" } ".  Returns true if " { $snippet "set1" } " is a subset of " { $snippet "set2" } " but " { $snippet "set2" } " is not a subset of " { $snippet "set1" } "." } ;
 
 ARTICLE: "sets.extras" "Extra sets words"
index 75dcaa5364291acb86d36a78747ce50275175940..9bbd8286d01f66e17ec6e80628bcce95eb22a186 100644 (file)
@@ -125,7 +125,7 @@ ARTICLE: "yaml-mapping" "Mapping between Factor and YAML types"
 "The following Factor types are not preserved, unless another type has precedence:"
 { $list
   { { $link assoc } " -> !!map -> " { $link hashtable } }
-  { { $link unordered-set } " -> !!set -> " { $link hash-set } }
+  { { $link set } " -> !!set -> " { $link hash-set } }
   { { $link sequence } " -> !!seq -> " { $link array } }
 }
 "Examples of type precedence which preserves type: " { $link byte-array } " over " { $link sequence } "."
index 058ead1e53927d0098e697d01f6b7d7fb92dc094..6eeaed345623902e498c4f5a04c30a842be59fc7 100644 (file)
@@ -203,7 +203,7 @@ M: yaml-alias (deref-aliases) anchor>> of ;
 M: sequence (deref-aliases)
     [ (deref-aliases) ] with map! ;
 
-M: unordered-set (deref-aliases)
+M: sets:set (deref-aliases)
     [ members (deref-aliases) ] [ clear-set ] [ swap union! ] tri ;
 
 : assoc-map! ( assoc quot -- assoc' )
@@ -332,7 +332,7 @@ M: string (replace-aliases) nip ;
 M: sequence (replace-aliases)
     [ ?replace-aliases ] with map ;
 
-M: unordered-set (replace-aliases)
+M: sets:set (replace-aliases)
     [ members (replace-aliases) ] keep set-like ;
 
 M: assoc (replace-aliases)
@@ -361,7 +361,7 @@ M: string (replace-anchors) nip ;
 M: sequence (replace-anchors)
     [ ?replace-anchors ] with map ;
 
-M: unordered-set (replace-anchors)
+M: sets:set (replace-anchors)
     [ members ?replace-anchors ] keep set-like ;
 
 M: assoc (replace-anchors)
@@ -469,7 +469,7 @@ M: assoc emit-value ( emitter event anchor assoc -- )
     [ nip emit-assoc-body ]
     [ 2drop emit-assoc-end ] 4tri ;
 
-M: unordered-set emit-value ( emitter event anchor set -- )
+M: sets:set emit-value ( emitter event anchor set -- )
     [ drop YAML_SET_TAG f emit-assoc-start ]
     [ nip emit-set-body ]
     [ 2drop emit-assoc-end ] 4tri ;