From 2adeed9cb3b4628108586b4c6d9c79bd36a1a49c Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 20 Jul 2015 00:32:42 -0700 Subject: [PATCH] factor: rename classes:members to class-members so it doesn't conflict with sets:members. ugh. --- basis/compiler/cfg/def-use/def-use.factor | 4 +--- .../propagation/transforms/transforms.factor | 2 +- basis/help/lint/checks/checks.factor | 1 - basis/prettyprint/sections/sections.factor | 1 - basis/regexp/classes/classes.factor | 1 - basis/see/see.factor | 10 ++++------ basis/tools/deploy/shaker/shaker.factor | 1 - basis/tools/destructors/destructors.factor | 1 - basis/tools/scaffold/scaffold.factor | 1 - basis/ui/gestures/gestures.factor | 1 - core/classes/algebra/algebra.factor | 16 +++++++--------- core/classes/classes.factor | 8 ++++---- core/classes/intersection/intersection.factor | 6 +++--- core/classes/mixin/mixin.factor | 6 +++--- core/classes/union/union.factor | 10 +++++----- core/compiler/units/units.factor | 1 - core/generic/generic.factor | 1 - core/parser/parser.factor | 1 - extra/anagrams/anagrams.factor | 3 +-- 19 files changed, 29 insertions(+), 46 deletions(-) diff --git a/basis/compiler/cfg/def-use/def-use.factor b/basis/compiler/cfg/def-use/def-use.factor index c32789eab9..dfa0ba083c 100644 --- a/basis/compiler/cfg/def-use/def-use.factor +++ b/basis/compiler/cfg/def-use/def-use.factor @@ -3,10 +3,8 @@ USING: accessors arrays assocs combinators compiler.cfg compiler.cfg.instructions compiler.cfg.instructions.syntax compiler.cfg.rpo compiler.units fry generic kernel namespaces -quotations sequences sequences.generalizations sets slots words -; +quotations sequences sequences.generalizations sets slots words ; FROM: namespaces => set ; -FROM: sets => members ; IN: compiler.cfg.def-use ! Utilities for iterating over instruction operands diff --git a/basis/compiler/tree/propagation/transforms/transforms.factor b/basis/compiler/tree/propagation/transforms/transforms.factor index a756fa5701..1770cfde68 100644 --- a/basis/compiler/tree/propagation/transforms/transforms.factor +++ b/basis/compiler/tree/propagation/transforms/transforms.factor @@ -10,7 +10,7 @@ namespaces quotations sequences sequences.generalizations sequences.private sets sets.private stack-checker stack-checker.dependencies vectors words ; FROM: math => float ; -FROM: sets => set members ; +FROM: sets => set ; IN: compiler.tree.propagation.transforms \ equal? [ diff --git a/basis/help/lint/checks/checks.factor b/basis/help/lint/checks/checks.factor index ad25daf2b2..0133e3b7c8 100644 --- a/basis/help/lint/checks/checks.factor +++ b/basis/help/lint/checks/checks.factor @@ -7,7 +7,6 @@ help.markup help.topics io io.streams.string kernel macros math namespaces sequences sequences.deep sets splitting strings summary tools.destructors unicode.categories vocabs vocabs.loader words words.constant words.symbol ; -FROM: sets => members ; IN: help.lint.checks ERROR: simple-lint-error message ; diff --git a/basis/prettyprint/sections/sections.factor b/basis/prettyprint/sections/sections.factor index aba8a8a57f..334639e643 100644 --- a/basis/prettyprint/sections/sections.factor +++ b/basis/prettyprint/sections/sections.factor @@ -4,7 +4,6 @@ USING: accessors classes.maybe combinators combinators.short-circuit continuations hashtables io io.styles kernel make math namespaces prettyprint.config sequences sets splitting strings vocabs vocabs.parser words ; -FROM: sets => members ; FROM: namespaces => set ; IN: prettyprint.sections diff --git a/basis/regexp/classes/classes.factor b/basis/regexp/classes/classes.factor index 60dc6638d6..71e70c60d9 100644 --- a/basis/regexp/classes/classes.factor +++ b/basis/regexp/classes/classes.factor @@ -5,7 +5,6 @@ combinators.smart combinators.short-circuit locals unicode.categories sequences fry macros arrays assocs sets classes unicode.script unicode.data ; FROM: ascii => ascii? ; -FROM: sets => members ; IN: regexp.classes SINGLETONS: dot letter-class LETTER-class Letter-class digit-class diff --git a/basis/see/see.factor b/basis/see/see.factor index e543ca46bb..5530fe9394 100644 --- a/basis/see/see.factor +++ b/basis/see/see.factor @@ -9,8 +9,6 @@ prettyprint.backend prettyprint.config prettyprint.custom prettyprint.sections sequences sets slots sorting strings summary words words.symbol words.constant words.alias vocabs ; FROM: namespaces => set ; -FROM: classes => members ; -RENAME: members sets => set-members IN: see GENERIC: synopsis* ( defspec -- ) @@ -142,17 +140,17 @@ GENERIC: see-class* ( word -- ) M: union-class see-class* ; + class-members pprint-elements pprint-; block> ; M: intersection-class see-class* ; + class-participants pprint-elements pprint-; block> ; M: mixin-class see-class* block> ; @@ -258,7 +256,7 @@ PRIVATE> dup class? [ dup seeing-implementors % ] when dup generic? [ dup seeing-methods % ] when drop - ] { } make set-members ; + ] { } make members ; : see-methods ( word -- ) methods see-all nl ; diff --git a/basis/tools/deploy/shaker/shaker.factor b/basis/tools/deploy/shaker/shaker.factor index 8cc79a1c1d..f574c3e5d7 100755 --- a/basis/tools/deploy/shaker/shaker.factor +++ b/basis/tools/deploy/shaker/shaker.factor @@ -26,7 +26,6 @@ QUALIFIED: vocabs.loader FROM: assocs => change-at ; FROM: namespaces => set ; FROM: sequences => change-nth ; -FROM: sets => members ; IN: tools.deploy.shaker ! This file is some hairy shit. diff --git a/basis/tools/destructors/destructors.factor b/basis/tools/destructors/destructors.factor index d76c242ff5..7da604ddf3 100644 --- a/basis/tools/destructors/destructors.factor +++ b/basis/tools/destructors/destructors.factor @@ -3,7 +3,6 @@ USING: accessors arrays assocs classes combinators.smart continuations destructors fry io io.styles kernel namespaces prettyprint sequences sets sorting ; -FROM: sets => members ; IN: tools.destructors members ; IN: tools.scaffold SYMBOL: developer-name diff --git a/basis/ui/gestures/gestures.factor b/basis/ui/gestures/gestures.factor index c26e37c237..07b8d16e54 100644 --- a/basis/ui/gestures/gestures.factor +++ b/basis/ui/gestures/gestures.factor @@ -6,7 +6,6 @@ math.vectors classes.tuple classes boxes calendar timers combinators sets columns fry deques ui.gadgets ui.gadgets.private ascii combinators.short-circuit ; FROM: namespaces => set ; -FROM: sets => members ; IN: ui.gestures : get-gesture-handler ( gesture gadget -- quot ) diff --git a/core/classes/algebra/algebra.factor b/core/classes/algebra/algebra.factor index 322320e837..7fa4bc9bbc 100644 --- a/core/classes/algebra/algebra.factor +++ b/core/classes/algebra/algebra.factor @@ -2,9 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays assocs classes classes.private combinators kernel make math math.order namespaces sequences -sorting vectors words ; -FROM: classes => members ; -RENAME: members sets => set-members +sets sorting vectors words ; IN: classes.algebra DEFER: sort-classes @@ -28,7 +26,7 @@ ERROR: not-a-classoid object ; : ( members -- classoid ) check-classoids - [ null eq? ] reject set-members + [ null eq? ] reject members dup length 1 = [ first ] [ sort-classes f like anonymous-union boa ] if ; M: anonymous-union rank-class drop 6 ; @@ -39,7 +37,7 @@ INSTANCE: anonymous-intersection classoid : ( participants -- classoid ) check-classoids - set-members dup length 1 = + members dup length 1 = [ first ] [ sort-classes f like anonymous-intersection boa ] if ; M: anonymous-intersection rank-class drop 4 ; @@ -140,7 +138,7 @@ SYMBOL: +incomparable+ [ members>> ] dip [ class<= ] curry all? ; : right-union<= ( first second -- ? ) - members [ class<= ] with any? ; + class-members [ class<= ] with any? ; : right-anonymous-union<= ( first second -- ? ) members>> [ class<= ] with any? ; @@ -179,8 +177,8 @@ PREDICATE: nontrivial-anonymous-complement < anonymous-complement class>> { [ anonymous-union? ] [ anonymous-intersection? ] - [ members ] - [ participants ] + [ class-members ] + [ class-participants ] } cleave or or or ; PREDICATE: empty-union < anonymous-union members>> empty? ; @@ -199,7 +197,7 @@ PREDICATE: empty-intersection < anonymous-intersection participants>> empty? ; { [ over anonymous-union? ] [ left-anonymous-union<= ] } { [ over nontrivial-anonymous-intersection? ] [ left-anonymous-intersection<= ] } { [ over nontrivial-anonymous-complement? ] [ left-anonymous-complement<= ] } - { [ dup members ] [ right-union<= ] } + { [ dup class-members ] [ right-union<= ] } { [ dup anonymous-union? ] [ right-anonymous-union<= ] } { [ dup anonymous-intersection? ] [ right-anonymous-intersection<= ] } { [ dup anonymous-complement? ] [ class>> classes-intersect? not ] } diff --git a/core/classes/classes.factor b/core/classes/classes.factor index c0251f36d0..10af059866 100644 --- a/core/classes/classes.factor +++ b/core/classes/classes.factor @@ -115,11 +115,11 @@ M: predicate reset-word : subclass-of? ( class superclass -- ? ) swap superclass-of? ; -: members ( class -- seq ) +: class-members ( class -- seq ) #! Output f for non-classes to work with algebra code dup class? [ "members" word-prop ] [ drop f ] if ; -: participants ( class -- seq ) +: class-participants ( class -- seq ) #! Output f for non-classes to work with algebra code dup class? [ "participants" word-prop ] [ drop f ] if ; @@ -128,8 +128,8 @@ GENERIC: implementors ( class/classes -- seq ) ! update-map : class-uses ( class -- seq ) [ - [ members % ] - [ participants % ] + [ class-members % ] + [ class-participants % ] [ superclass [ , ] when* ] tri ] { } make ; diff --git a/core/classes/intersection/intersection.factor b/core/classes/intersection/intersection.factor index 543de2d9c0..1e423a472f 100644 --- a/core/classes/intersection/intersection.factor +++ b/core/classes/intersection/intersection.factor @@ -21,7 +21,7 @@ PREDICATE: intersection-class < class ] if-empty ; : define-intersection-predicate ( class -- ) - dup participants intersection-predicate-quot define-predicate ; + dup class-participants intersection-predicate-quot define-predicate ; M: intersection-class update-class define-intersection-predicate ; @@ -34,10 +34,10 @@ M: anonymous-intersection instance? participants>> [ instance? ] with all? ; M: intersection-class normalize-class - participants normalize-class ; + class-participants normalize-class ; M: intersection-class (flatten-class) - participants (flatten-class) ; + class-participants (flatten-class) ; ! Horribly inefficient and inaccurate : intersect-flattened-classes ( seq1 seq2 -- seq3 ) diff --git a/core/classes/mixin/mixin.factor b/core/classes/mixin/mixin.factor index 4fc7a15c9b..bacb34a385 100644 --- a/core/classes/mixin/mixin.factor +++ b/core/classes/mixin/mixin.factor @@ -11,7 +11,7 @@ PREDICATE: mixin-class < union-class "mixin" word-prop ; M: mixin-class normalize-class ; M: mixin-class (classes-intersect?) - members [ classes-intersect? ] with any? ; + class-members [ classes-intersect? ] with any? ; M: mixin-class reset-class [ call-next-method ] [ "mixin" remove-word-prop ] bi ; @@ -34,10 +34,10 @@ ERROR: check-mixin-class-error class ; 2tri ; : if-mixin-member? ( class mixin true false -- ) - [ check-mixin-class 2dup members member-eq? ] 2dip if ; inline + [ check-mixin-class 2dup class-members member-eq? ] 2dip if ; inline : change-mixin-class ( class mixin quot -- ) - [ [ members swap bootstrap-word ] dip call ] [ drop ] 2bi + [ [ class-members swap bootstrap-word ] dip call ] [ drop ] 2bi swap redefine-mixin-class ; inline : (add-mixin-instance) ( class mixin -- ) diff --git a/core/classes/union/union.factor b/core/classes/union/union.factor index a9c833f285..5434361098 100644 --- a/core/classes/union/union.factor +++ b/core/classes/union/union.factor @@ -17,7 +17,7 @@ GENERIC: union-of-builtins? ( class -- ? ) M: builtin-class union-of-builtins? drop t ; M: union-class union-of-builtins? - members [ union-of-builtins? ] all? ; + class-members [ union-of-builtins? ] all? ; M: class union-of-builtins? drop f ; @@ -36,12 +36,12 @@ M: class union-of-builtins? surround ; : slow-union-predicate-quot ( class -- quot ) - members [ predicate-def ] map unclip swap + class-members [ predicate-def ] map unclip swap [ [ dup ] prepend [ drop t ] ] { } map>assoc alist>quot ; : union-predicate-quot ( class -- quot ) { - { [ dup members empty? ] [ empty-union-predicate-quot ] } + { [ dup class-members empty? ] [ empty-union-predicate-quot ] } { [ dup union-of-builtins? ] [ fast-union-predicate-quot ] } [ slow-union-predicate-quot ] } cond ; @@ -91,7 +91,7 @@ M: anonymous-union class-name members>> [ class-name ] map " " join ; M: union-class normalize-class - members normalize-class ; + class-members normalize-class ; M: union-class (flatten-class) - members (flatten-class) ; + class-members (flatten-class) ; diff --git a/core/compiler/units/units.factor b/core/compiler/units/units.factor index b3430175fd..002eac7e03 100644 --- a/core/compiler/units/units.factor +++ b/core/compiler/units/units.factor @@ -5,7 +5,6 @@ classes.tuple classes.tuple.private continuations definitions generic hash-sets init kernel kernel.private math namespaces sequences sets source-files.errors vocabs words ; FROM: namespaces => set ; -FROM: sets => members ; IN: compiler.units PRIMITIVE: modify-code-heap ( alist update-existing? reset-pics? -- ) diff --git a/core/generic/generic.factor b/core/generic/generic.factor index 23fca8faeb..6f402bca7d 100644 --- a/core/generic/generic.factor +++ b/core/generic/generic.factor @@ -4,7 +4,6 @@ USING: accessors arrays assocs classes classes.algebra classes.algebra.private classes.maybe classes.private combinators definitions kernel make namespaces sequences sets words ; -FROM: sets => members ; IN: generic ! Method combination protocol diff --git a/core/parser/parser.factor b/core/parser/parser.factor index 5793cbf4df..3a5dbac73b 100644 --- a/core/parser/parser.factor +++ b/core/parser/parser.factor @@ -5,7 +5,6 @@ compiler.units continuations definitions effects io io.encodings.utf8 io.files kernel lexer math.parser namespaces parser.notes quotations sequences sets slots source-files vectors vocabs vocabs.parser words words.symbol ; -FROM: sets => members ; IN: parser : location ( -- loc ) diff --git a/extra/anagrams/anagrams.factor b/extra/anagrams/anagrams.factor index 7150fa8b28..0ee35dc818 100644 --- a/extra/anagrams/anagrams.factor +++ b/extra/anagrams/anagrams.factor @@ -2,8 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: ascii assocs fry io.encodings.ascii io.files kernel math -math.statistics memoize sequences sequences.extras sorting ; -FROM: sets => members ; +math.statistics memoize sequences sequences.extras sorting sets ; IN: anagrams : make-anagram-hash ( strings -- assoc )