File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 77; ; You must not remove this notice, or any other, from this software.
88
99(ns cljs.repl
10- (:require-macros cljs.repl))
10+ (:require-macros cljs.repl)
11+ (:require [cljs.spec :as spec]))
1112
12- (defn print-doc [m ]
13+ (defn print-doc [{n :ns nm :name :as m} ]
1314 (println " -------------------------" )
1415 (println (str (when-let [ns (:ns m)] (str ns " /" )) (:name m)))
1516 (when (:protocol m)
4647 (println " " name)
4748 (println " " arglists)
4849 (when doc
49- (println " " doc)))))))
50+ (println " " doc))))
51+ (when n
52+ (when-let [specs (spec/fn-specs (symbol (str (ns-name n)) (name nm)))]
53+ (println " Spec" )
54+ (run! (fn [[role spec]]
55+ (when (and spec (not (= spec ::spec/unknown )))
56+ (println " " (str (name role) " :" ) (spec/describe spec))))
57+ specs))))))
You can’t perform that action at this time.
0 commit comments