Using clojure.contrib functions in slime REPL

Posted by Tyler on Stack Overflow See other posts from Stack Overflow or by Tyler
Published on 2010-05-18T04:45:41Z Indexed on 2010/05/18 4:50 UTC
Read the original article Hit count: 351

Filed under:
|

I want to use the functions in the clojure.contrib.trace namespace in slime at the REPL. How can I get slime to load them automatically? A related question, how can I add a specific namespace into a running repl?

On the clojure.contrib API it describes usage like this:

(ns my-namespace
  (:require clojure.contrib.trace))

But adding this to my code results in the file being unable to load with an "Unable to resolve symbol" error for any function from the trace package.

I use leiningen 'lein swank' to start the ServerSocket and the project.clj file looks like this

 (defproject test-project "0.1.0"
   :description "Connect 4 Agent written in Clojure"
   :dependencies [[org.clojure/clojure "1.2.0-master-SNAPSHOT"]
                  [org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]]
   :dev-dependencies [[leiningen/lein-swank "1.2.0-SNAPSHOT"]
                      [swank-clojure "1.2.0"]])

Everything seems up to date, i.e. 'lein deps' doesn't produce any changes. So what's up?

© Stack Overflow or respective owner

Related posts about clojure

Related posts about slime