USING: accessors assocs combinators definitions graphs kernel
make namespaces quotations sequences sets words words.symbol ;
FROM: namespaces => set ;
+QUALIFIED: sets
IN: classes
ERROR: bad-inheritance class superclass ;
: class-usages ( class -- seq ) [ class-usage ] closure keys ;
-M: class implementors implementors-map get at keys ;
+M: class implementors implementors-map get at sets:members ;
M: sequence implementors [ implementors ] gather ;
dup class-uses update-map get remove-vertex ;
: implementors-map+ ( class -- )
- [ H{ } clone ] dip implementors-map get set-at ;
+ [ HS{ } clone ] dip implementors-map get set-at ;
: implementors-map- ( class -- )
implementors-map get delete-at ;
[ swap implementor-classes [ implementors-map get at ] map ] dip call ; inline
: reveal-method ( method classes generic -- )
- [ [ [ conjoin ] with each ] with-implementors ]
+ [ [ [ adjoin ] with each ] with-implementors ]
[ [ set-at ] with-methods ]
2bi ;
] keep eq?
[
[ [ delete-at ] with-methods ]
- [ [ [ delete-at ] with each ] with-implementors ] 2bi
- reset-caches
+ [ [ [ delete ] with each ] with-implementors ]
+ 2bi reset-caches
] [ 2drop ] if
] if
]