Browse files

Changed all instances of ^x across contrib to (meta x) since the ^x f…

…orm is being deprecated in 1.1

refs #48
  • Loading branch information...
1 parent eb73c54 commit e5b7819ef66410a87b8072417dc2f09ac4ddb03f @tomfaulhaber tomfaulhaber committed Dec 11, 2009
@@ -147,7 +147,7 @@
(defn- var-parts [e]
- (let [{:keys [name ns]} ^(.var e)]
+ (let [{:keys [name ns]} (meta (.var e))]
[(Compiler/munge (str (.getName ns))) (var-munge name)]))
(defmethod tojs clojure.lang.Compiler$UnresolvedVarExpr [e ctx]
@@ -318,7 +318,7 @@
(eval f)
(when-not (or (and (instance? Compiler$DefExpr mainexpr)
- (skip-def (:name ^(.var mainexpr))))
+ (skip-def (:name (meta (.var mainexpr)))))
(and (instance? Compiler$InstanceMethodExpr mainexpr)
(or (= "setMacro" (.methodName mainexpr))
(and (= "addMethod" (.methodName mainexpr))
@@ -94,8 +94,8 @@"}
(catch Condition c#
(binding [*condition-object* c#
- *condition* ^c#
- *selector* (~dispatch-fn ^c#)]
+ *condition* (meta c#)
+ *selector* (~dispatch-fn (meta c#))]
(fn [[_ key & body]]
@@ -117,7 +117,7 @@"}
(defmethod stack-trace-info Condition
- (stack-trace-info ^condition))
+ (stack-trace-info (meta condition)))
(defmethod stack-trace-info Throwable
@@ -54,7 +54,7 @@ or API adjustments."}
(defn- qualify-sym [sym]
(let [v (resolve sym)]
(assert v)
- (apply symbol (map #(str (% ^v)) [:ns :name]))))
+ (apply symbol (map #(str (% (meta v))) [:ns :name]))))
(defmacro deferror
"Define a new error type"
@@ -110,7 +110,7 @@ or API adjustments."}
(defmacro raise
"Raise an error of the type err-name, constructed with the given args"
[err-name & args]
- `(raise* (~err-name ~(zipmap (::args ^(resolve err-name))
+ `(raise* (~err-name ~(zipmap (::args (meta (resolve err-name)))
; It'd be nice to assert that these are used in a tail position of a handler
@@ -37,7 +37,7 @@
#(vector (ns-name %)
(fn [f]
- (let [f-meta ^(find-var (symbol (str (ns-name %)) (str f)))]
+ (let [f-meta (meta (find-var (symbol (str (ns-name %)) (str f))))]
[f (:arglists f-meta) (:doc f-meta)]))
(fn [a] (instance? clojure.lang.IFn a))
@@ -107,7 +107,7 @@
(when-let [filepath (:file (meta v))]
(when-let [strm (.getResourceAsStream (RT/baseLoader) filepath)]
(with-open [rdr (LineNumberReader. (InputStreamReader. strm))]
- (dotimes [_ (dec (:line ^v))] (.readLine rdr))
+ (dotimes [_ (dec (:line (meta v)))] (.readLine rdr))
(let [text (StringBuilder.)
pbr (proxy [PushbackReader] [rdr]
(read [] (let [i (proxy-super read)]
@@ -49,7 +49,7 @@
(defmethod constructor-form :default
[o] nil)
(defmethod constructor-form ::type
- [o] (cons (::constructor ^o) (deconstruct o)))
+ [o] (cons (::constructor (meta o)) (deconstruct o)))
(defmacro deftype
"Define a data type by a type tag (a namespace-qualified keyword)
@@ -21,10 +21,10 @@ general, and xml trees in particular.
; This uses the negative form (no-auto) so that the result from any
; naive function, including user functions, defaults to "auto".
(defn auto
- [v x] (with-meta x ((if v dissoc assoc) ^x :zip-filter/no-auto? true)))
+ [v x] (with-meta x ((if v dissoc assoc) (meta x) :zip-filter/no-auto? true)))
(defn auto?
- [x] (not (:zip-filter/no-auto? ^x)))
+ [x] (not (:zip-filter/no-auto? (meta x))))
(defn right-locs
"Returns a lazy sequence of locations to the right of loc, starting with loc."
@@ -74,7 +74,7 @@ general, and xml trees in particular.
#^{:private true}
[pred loc]
(let [rtn (pred loc)]
- (cond (and (map? ^rtn) (:zip-filter/is-node? ^rtn)) (list rtn)
+ (cond (and (map? (meta rtn)) (:zip-filter/is-node? (meta rtn))) (list rtn)
(= rtn true) (list loc)
(= rtn false) nil
(nil? rtn) nil
@@ -86,7 +86,7 @@ general, and xml trees in particular.
[loc preds mkpred]
(reduce (fn [prevseq expr]
(mapcat #(fixup-apply (or (mkpred expr) expr) %) prevseq))
- (list (with-meta loc (assoc ^loc :zip-filter/is-node? true)))
+ (list (with-meta loc (assoc (meta loc) :zip-filter/is-node? true)))
; see for examples

0 comments on commit e5b7819

Please sign in to comment.