       request-exit
       input)))
 
-(def ^:dynamic level 0)
+(def ^{:dynamic true :tag 'long} level (long 0))
 (def counter (atom 1000))
 (defn inc-counter []
   (swap! counter inc))

    (uncaughtException [thread exception]
      (f thread exception))))

(def debug-ex-handler (make-error-handler (fn [thread exception] (debug-repl))))

(defn debug-uncaught-exceptions! []
  (Thread/setDefaultUncaughtExceptionHandler debug-ex-handler))


(def ^:dynamic *locals*)
(defn eval-with-locals
  "Evals a form with given locals.
  The locals should be a map of symbols to values."
  [locals form]
  (binding [*locals* locals]
    (eval
