Skip to content

Commit 710cdae

Browse files
committed
Remove utils deftype macros
1 parent d280f07 commit 710cdae

File tree

9 files changed

+18
-24
lines changed

9 files changed

+18
-24
lines changed

.clj-kondo/config.edn

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
{:lint-as {manifold.utils/definterface+ clojure.core/definterface
2-
manifold.utils/deftype+ clojure.core/deftype
3-
manifold.utils/defrecord+ clojure.core/defrecord
4-
manifold.utils/defprotocol+ clojure.core/defprotocol}
1+
{:lint-as {manifold.utils/definterface+ clojure.core/definterface}
52

63
:hooks {:analyze-call
74
{manifold.stream.core/def-source manifold.hooks/def-sink-or-source

src/manifold/bus.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
[manifold
66
[stream :as s]
77
[deferred :as d]
8-
[utils :refer [deftype+ definterface+]]])
8+
[utils :refer [definterface+]]]
9+
[potemkin.types :refer [deftype+]])
910
(:import
1011
[java.util.concurrent
1112
ConcurrentHashMap]

src/manifold/deferred.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
[riddley.compiler :as compiler]
99
[manifold
1010
[executor :as ex]
11-
[utils :as utils :refer [defprotocol+ deftype+ definterface+]]
11+
[utils :as utils :refer [definterface+]]
1212
[time :as time]
1313
[debug :as debug]]
1414
[clojure.set :as set]
15-
[potemkin.types :refer [def-abstract-type reify+]])
15+
[potemkin.types :refer [def-abstract-type reify+ defprotocol+ deftype+]])
1616
(:import
1717
[java.util
1818
LinkedList]
@@ -1388,9 +1388,9 @@
13881388
(extend-protocol Deferrable
13891389

13901390
CompletionStage
1391-
(to-deferred [f]
1391+
(to-deferred [cs]
13921392
(let [d (deferred)]
1393-
(.handle ^CompletionStage f
1393+
(.handle ^CompletionStage cs
13941394
(reify BiFunction
13951395
(apply [_ val err]
13961396
(if (nil? err)

src/manifold/stream.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
(:require
77
[clojure.core :as clj]
88
[manifold.deferred :as d]
9-
[manifold.utils :as utils :refer [deftype+]]
9+
[potemkin.types :refer [deftype+]]
10+
[manifold.utils :as utils]
1011
[manifold.time :as time]
1112
[manifold.stream
1213
[core :as core]

src/manifold/stream/core.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(ns manifold.stream.core
22
{:no-doc true}
3-
(:require [manifold.utils :refer [defprotocol+ definterface+ deftype+]]))
3+
(:require [manifold.utils :refer [definterface+]]
4+
[potemkin.types :refer [deftype+ defprotocol+]]))
45

56
(defprotocol+ Sinkable
67
(to-sink [_] "Provides a conversion mechanism to Manifold sinks."))

src/manifold/stream/default.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
[clojure.tools.logging :as log]
55
[manifold
66
[deferred :as d]
7-
[utils :as utils :refer [deftype+ defrecord+]]
7+
[utils :as utils]
88
[executor :as ex]]
99
[manifold.stream
1010
[graph :as g]
1111
[core :as s]]
12-
[manifold.time :as time])
12+
[manifold.time :as time]
13+
[potemkin.types :refer [deftype+ defrecord+]])
1314
(:import
1415
[java.util
1516
LinkedList

src/manifold/stream/graph.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
{:no-doc true}
33
(:require
44
[manifold.deferred :as d]
5-
[manifold.utils :as utils :refer [deftype+]]
5+
[manifold.utils :as utils]
6+
[potemkin.types :refer [deftype+]]
67
[manifold.stream.core :as s]
78
[manifold.executor :as ex]
89
[clojure.tools.logging :as log])

src/manifold/time.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
[clojure.tools.logging :as log]
66
[manifold.executor :as ex]
77
[clojure.string :as str]
8-
[manifold.utils :refer [definterface+ defprotocol+]])
8+
[manifold.utils :refer [definterface+]]
9+
[potemkin.types :refer [defprotocol+]])
910
(:import
1011
[java.util
1112
Calendar

src/manifold/utils.clj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,6 @@
130130

131131
;;;
132132

133-
(defmacro defprotocol+ [name & body]
134-
`(potemkin.types/defprotocol+ ~name ~@body))
135-
136-
(defmacro deftype+ [name & body]
137-
`(potemkin.types/deftype+ ~name ~@body))
138-
139-
(defmacro defrecord+ [name & body]
140-
`(potemkin.types/defrecord+ ~name ~@body))
141-
142133
(defmacro definterface+ [name & body]
143134
(when-not (resolve name)
144135
`(definterface ~name ~@body)))

0 commit comments

Comments
 (0)