Hi,

Am 10.04.2011 um 14:37 schrieb limux:

> java.lang.IllegalStateException: distinct already refers to:
> #'clojureql.core/distinct in namespace: myoa.core (core.clj:1). but in
> clojureql/core.clj has already (:refer-clojure
>   :exclude [take drop sort distinct conj! disj! compile case]).

What clojureql does is only of importance to clojureql. What happens is that 
your namespace (myoa.core) "use"s clojureql and then tries to define an own Var 
named distinct. This leads to the problem. To fix this you have to exclude the 
clojureql distinct from the use clause. (ns myoa.core (:use [clojureql.core 
:exclude (distinct)]))

Here for illustration of what happens. The refers can be read as use clauses in 
the ns definition. (I just used refer, because I don't have the corresponding 
files. use is basically refer + loading from the file.)

user=> (ns foo.bar)
nil
foo.bar=> (def x 5)
#'foo.bar/x
foo.bar=> (ns yoyo.dyne)
nil
yoyo.dyne=> (refer 'foo.bar)
nil
yoyo.dyne=> (def x 6)
java.lang.IllegalStateException: x already refers to: #'foo.bar/x in namespace: 
yoyo.dyne (NO_SOURCE_FILE:5)
yoyo.dyne=> (ns frob.nicate)
nil
frob.nicate=> (refer 'foo.bar :exclude '(x))       
nil
frob.nicate=> (def x 7)
#'frob.nicate/x

Hope this helps.

Sincerely
Meikel

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to