On Mon, Dec 8, 2008 at 9:05 AM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> On Dec 7, 9:01 am, Mibu <[EMAIL PROTECTED]> wrote:
>> Is it possible to remove the asserts in derive that restrict the
>> parent and child to namespace-qualified names?
>>
>> It would be much more useful if the asserts are moved to the global-
>> hierarchy case ([child parent]) and the "private" hierarchies ([h
>> child parent]) can do as they wish.
>
> Added to todo[1] - patch welcome

I believe this should do it.

- J.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Index: src/clj/clojure/core.clj
===================================================================
--- src/clj/clojure/core.clj	(revision 1147)
+++ src/clj/clojure/core.clj	(working copy)
@@ -3045,13 +3045,14 @@
   child can be either a namespace-qualified symbol or keyword or a
   class. h must be a hierarchy obtained from make-hierarchy, if not
   supplied defaults to, and modifies, the global hierarchy."
-  ([tag parent] (alter-var-root #'global-hierarchy derive tag parent) nil)
-  ([h tag parent]
+  ([tag parent]
    (assert (not= tag parent))
    (assert (or (class? tag) (and (instance? clojure.lang.Named tag) (namespace tag))))
    (assert (instance? clojure.lang.Named parent))
    (assert (namespace parent))
 
+   (alter-var-root #'global-hierarchy derive tag parent) nil)
+  ([h tag parent]
    (let [tp (:parents h)
          td (:descendants h)
          ta (:ancestors h)

Reply via email to