Skip to content

Commit d07031d

Browse files
committed
wip
1 parent 964d4fb commit d07031d

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

src/sci/impl/multimethods.cljc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@
4444
a reference type e.g. a var (i.e. via the Var-quote dispatch macro #'
4545
or the var special form)."
4646
{:arglists '([name docstring? attr-map? dispatch-fn & options])}
47-
[_ _ ctx mm-name & options]
48-
(let [[ctx mm-name options] (if (symbol? ctx)
49-
[nil ctx (cons mm-name options)]
50-
[ctx mm-name options])
51-
docstring (if (string? (first options))
47+
[_ _ mm-name & options]
48+
(let [docstring (if (string? (first options))
5249
(first options)
5350
nil)
5451
options (if (string? (first options))

src/sci/impl/namespaces.cljc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,8 +1173,7 @@
11731173
'clojure-version (copy-core-var clojure-version)])
11741174
;; end clojure version
11751175
;; multimethods
1176-
'defmulti (macrofy 'defmulti sci.impl.multimethods/defmulti
1177-
clojure-core-ns true)
1176+
'defmulti (macrofy 'defmulti sci.impl.multimethods/defmulti clojure-core-ns)
11781177
'defmethod (macrofy 'defmethod sci.impl.multimethods/defmethod)
11791178
'get-method (copy-core-var get-method)
11801179
'methods (copy-core-var methods)
@@ -1191,8 +1190,7 @@
11911190
clojure-core-ns)
11921191
'extend (copy-var sci.impl.protocols/extend clojure-core-ns {:name 'extend})
11931192
'extends? (copy-core-var sci.impl.protocols/extends?)
1194-
'extend-type (macrofy 'extend-type sci.impl.protocols/extend-type
1195-
clojure-core-ns true)
1193+
'extend-type (macrofy 'extend-type sci.impl.protocols/extend-type clojure-core-ns)
11961194
'extend-protocol (macrofy 'extend-protocol sci.impl.protocols/extend-protocol
11971195
clojure-core-ns true)
11981196
'-reified-methods (new-var '-reified-methods #(types/getMethods %))

src/sci/impl/protocols.cljc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,8 @@
244244
impls))]
245245
expansion))
246246

247-
(defn extend-type [form _env ctx atype & proto+meths]
248-
(let [[ctx atype proto+meths] (if (symbol? ctx)
249-
[nil ctx (cons atype proto+meths)]
250-
[ctx atype proto+meths])
251-
ctx (or ctx (store/get-ctx))
247+
(defn extend-type [form _env atype & proto+meths]
248+
(let [ctx (store/get-ctx)
252249
#?@(:cljs [atype (get cljs-type-symbols atype atype)])
253250
proto+meths (utils/split-when #(not (seq? %)) proto+meths)]
254251
`(do ~@(map

0 commit comments

Comments
 (0)