! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs classes classes.private
classes.tuple.private continuations definitions generic
-hash-sets init kernel kernel.private math namespaces sequences
+hash-sets kernel kernel.private math namespaces sequences
sets source-files.errors vocabs words ;
IN: compiler.units
GENERIC: definitions-changed ( set obj -- )
-[ V{ } clone definition-observers set-global ]
-"compiler.units" add-startup-hook
+STARTUP-HOOK: [
+ V{ } clone definition-observers set-global
-! This goes here because vocabs cannot depend on init
-[ V{ } clone vocab-observers set-global ]
-"vocabs" add-startup-hook
+ ! This goes here because vocabs cannot depend on init
+ V{ } clone vocab-observers set-global
+]
: add-definition-observer ( obj -- )
definition-observers get push ;