File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 33 (:refer-clojure :exclude [defmulti defmethod ])
44 (:require
55 #?(:clj [clojure.string :as str])
6+ [sci.ctx-store :as store]
67 [sci.impl.hierarchies :refer [global-hierarchy]]))
78
89#?(:clj (set! *warn-on-reflection* true ))
4445 or the var special form)."
4546 {:arglists '([name docstring? attr-map? dispatch-fn & options])}
4647 [_ _ ctx mm-name & options]
47- (let [docstring (if (string? (first options))
48+ (let [[ctx mm-name options] (if (symbol? ctx)
49+ [nil ctx mm-name options]
50+ [ctx mm-name options])
51+ docstring (if (string? (first options))
4852 (first options)
4953 nil )
5054 options (if (string? (first options))
7175
7276 (let [options (apply hash-map options)
7377 default (get options :default :default )
74- hierarchy (get options :hierarchy (global-hierarchy ctx))]
78+ hierarchy (get options :hierarchy (global-hierarchy ( or ctx ( store/get-ctx )) ))]
7579 (check-valid-options options :default :hierarchy )
7680 #?(:clj `(let [v# (def ~mm-name )]
7781 (when-not (and (clojure.core/has-root-impl v#) (clojure.core/multi-fn?-impl (deref v#)))
You can’t perform that action at this time.
0 commit comments