             (import 'conexp.fca.contexts.Context)
             (import 'conexp.fca.lattices.Lattice)
 
-            ~@(for [[new-name, ^clojure.lang.Var var] (conexp-functions orig-ns)]
+            ~@(for [orig-ns orig-nss
+                    [new-name, ^clojure.lang.Var var] (conexp-functions orig-ns)]
                 (let [orig-name (symbol (str (.ns var)) (str (.sym var))),
                       arglists  (:arglists (meta var))]
                   (apply generate-definition

;;;

(defn generate-java-interface
  "Given a name of a file generates the code for the Java interface in
  that file. After this has been compiled it can be used to call
  conexp-clj functions from Java."
  [orig-ns new-ns file-name]
  (let [methods (mapcat #(apply function-signatures %)
                        (conexp-functions orig-ns)),
        methods (mapcat #(list (symbol "^{:static true}") %) methods)]
    (with-open [out (writer file-name)]
      (binding [*print-meta* true


;;;

(generate-java-interface conexp.main/conexp-clj-namespaces
                         'conexp.contrib.java.Main
                         "src/conexp/contrib/java/Main.clj")

