effect 2.0.0-next.46 → 2.0.0-next.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/BigInt/dist/effect-BigInt.cjs.d.mts +2 -0
  2. package/BigInt/dist/effect-BigInt.cjs.d.mts.map +1 -0
  3. package/BigInt/dist/effect-BigInt.cjs.d.ts +2 -0
  4. package/BigInt/dist/effect-BigInt.cjs.d.ts.map +1 -0
  5. package/{Bigint/dist/effect-Bigint.cjs.dev.js → BigInt/dist/effect-BigInt.cjs.dev.js} +30 -30
  6. package/BigInt/dist/effect-BigInt.cjs.js +7 -0
  7. package/{Bigint/dist/effect-Bigint.cjs.mjs → BigInt/dist/effect-BigInt.cjs.mjs} +2 -2
  8. package/{Bigint/dist/effect-Bigint.cjs.prod.js → BigInt/dist/effect-BigInt.cjs.prod.js} +30 -30
  9. package/{Bigint/dist/effect-Bigint.esm.js → BigInt/dist/effect-BigInt.esm.js} +28 -28
  10. package/BigInt/package.json +4 -0
  11. package/Brand/dist/effect-Brand.cjs.dev.js +3 -3
  12. package/Brand/dist/effect-Brand.cjs.prod.js +3 -3
  13. package/Cache/dist/effect-Cache.cjs.dev.js +28 -28
  14. package/Cache/dist/effect-Cache.cjs.prod.js +28 -28
  15. package/Cause/dist/effect-Cause.cjs.dev.js +8 -8
  16. package/Cause/dist/effect-Cause.cjs.prod.js +8 -8
  17. package/Channel/dist/effect-Channel.cjs.dev.js +41 -41
  18. package/Channel/dist/effect-Channel.cjs.prod.js +41 -41
  19. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +36 -38
  20. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +36 -38
  21. package/Chunk/dist/effect-Chunk.cjs.dev.js +3 -3
  22. package/Chunk/dist/effect-Chunk.cjs.prod.js +3 -3
  23. package/Clock/dist/effect-Clock.cjs.dev.js +14 -14
  24. package/Clock/dist/effect-Clock.cjs.prod.js +14 -14
  25. package/Config/dist/effect-Config.cjs.dev.js +11 -11
  26. package/Config/dist/effect-Config.cjs.prod.js +11 -11
  27. package/ConfigError/dist/effect-ConfigError.cjs.dev.js +4 -4
  28. package/ConfigError/dist/effect-ConfigError.cjs.prod.js +4 -4
  29. package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +13 -13
  30. package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +13 -13
  31. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +5 -5
  32. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +5 -5
  33. package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +4 -4
  34. package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +4 -4
  35. package/Console/dist/effect-Console.cjs.dev.js +32 -32
  36. package/Console/dist/effect-Console.cjs.prod.js +32 -32
  37. package/Context/dist/effect-Context.cjs.dev.js +3 -3
  38. package/Context/dist/effect-Context.cjs.prod.js +3 -3
  39. package/Data/dist/effect-Data.cjs.dev.js +50 -46
  40. package/Data/dist/effect-Data.cjs.prod.js +50 -46
  41. package/Data/dist/effect-Data.esm.js +11 -5
  42. package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +14 -14
  43. package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +14 -14
  44. package/Deferred/dist/effect-Deferred.cjs.dev.js +8 -8
  45. package/Deferred/dist/effect-Deferred.cjs.prod.js +8 -8
  46. package/Differ/dist/effect-Differ.cjs.dev.js +5 -5
  47. package/Differ/dist/effect-Differ.cjs.prod.js +5 -5
  48. package/Duration/dist/effect-Duration.cjs.dev.js +4 -4
  49. package/Duration/dist/effect-Duration.cjs.prod.js +4 -4
  50. package/Duration/dist/effect-Duration.esm.js +2 -2
  51. package/Effect/dist/effect-Effect.cjs.dev.js +67 -136
  52. package/Effect/dist/effect-Effect.cjs.mjs +2 -11
  53. package/Effect/dist/effect-Effect.cjs.prod.js +67 -136
  54. package/Effect/dist/effect-Effect.esm.js +30 -90
  55. package/Effectable/dist/effect-Effectable.cjs.dev.js +1 -1
  56. package/Effectable/dist/effect-Effectable.cjs.prod.js +1 -1
  57. package/Either/dist/effect-Either.cjs.dev.js +17 -3
  58. package/Either/dist/effect-Either.cjs.mjs +3 -1
  59. package/Either/dist/effect-Either.cjs.prod.js +17 -3
  60. package/Either/dist/effect-Either.esm.js +13 -1
  61. package/Encoding/dist/effect-Encoding.cjs.dev.js +3 -3
  62. package/Encoding/dist/effect-Encoding.cjs.prod.js +3 -3
  63. package/Exit/dist/effect-Exit.cjs.dev.js +8 -8
  64. package/Exit/dist/effect-Exit.cjs.prod.js +8 -8
  65. package/Fiber/dist/effect-Fiber.cjs.dev.js +29 -29
  66. package/Fiber/dist/effect-Fiber.cjs.prod.js +29 -29
  67. package/FiberId/dist/effect-FiberId.cjs.dev.js +5 -5
  68. package/FiberId/dist/effect-FiberId.cjs.prod.js +5 -5
  69. package/FiberRef/dist/effect-FiberRef.cjs.dev.js +29 -29
  70. package/FiberRef/dist/effect-FiberRef.cjs.prod.js +29 -29
  71. package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +9 -9
  72. package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +9 -9
  73. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +10 -10
  74. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +10 -10
  75. package/GroupBy/dist/effect-GroupBy.cjs.dev.js +43 -43
  76. package/GroupBy/dist/effect-GroupBy.cjs.prod.js +43 -43
  77. package/HashMap/dist/effect-HashMap.cjs.dev.js +4 -4
  78. package/HashMap/dist/effect-HashMap.cjs.prod.js +4 -4
  79. package/HashSet/dist/effect-HashSet.cjs.dev.js +4 -4
  80. package/HashSet/dist/effect-HashSet.cjs.prod.js +4 -4
  81. package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +29 -29
  82. package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +29 -29
  83. package/Layer/dist/effect-Layer.cjs.dev.js +151 -52
  84. package/Layer/dist/effect-Layer.cjs.mjs +12 -0
  85. package/Layer/dist/effect-Layer.cjs.prod.js +151 -52
  86. package/Layer/dist/effect-Layer.esm.js +92 -2
  87. package/List/dist/effect-List.cjs.dev.js +3 -3
  88. package/List/dist/effect-List.cjs.prod.js +3 -3
  89. package/LogLevel/dist/effect-LogLevel.cjs.dev.js +8 -8
  90. package/LogLevel/dist/effect-LogLevel.cjs.prod.js +8 -8
  91. package/Logger/dist/effect-Logger.cjs.dev.js +33 -39
  92. package/Logger/dist/effect-Logger.cjs.prod.js +33 -39
  93. package/Logger/dist/effect-Logger.esm.js +0 -5
  94. package/Match/dist/effect-Match.cjs.d.mts +2 -0
  95. package/Match/dist/effect-Match.cjs.d.mts.map +1 -0
  96. package/Match/dist/effect-Match.cjs.d.ts +2 -0
  97. package/Match/dist/effect-Match.cjs.d.ts.map +1 -0
  98. package/Match/dist/effect-Match.cjs.dev.js +620 -0
  99. package/Match/dist/effect-Match.cjs.js +7 -0
  100. package/Match/dist/effect-Match.cjs.mjs +39 -0
  101. package/Match/dist/effect-Match.cjs.prod.js +620 -0
  102. package/Match/dist/effect-Match.esm.js +258 -0
  103. package/Match/package.json +4 -0
  104. package/Metric/dist/effect-Metric.cjs.dev.js +27 -27
  105. package/Metric/dist/effect-Metric.cjs.prod.js +27 -27
  106. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +4 -4
  107. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +4 -4
  108. package/MetricHook/dist/effect-MetricHook.cjs.dev.js +6 -6
  109. package/MetricHook/dist/effect-MetricHook.cjs.prod.js +6 -6
  110. package/MetricKey/dist/effect-MetricKey.cjs.dev.js +7 -7
  111. package/MetricKey/dist/effect-MetricKey.cjs.prod.js +7 -7
  112. package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +4 -4
  113. package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +4 -4
  114. package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +1 -1
  115. package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +1 -1
  116. package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +29 -29
  117. package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +29 -29
  118. package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +8 -8
  119. package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +8 -8
  120. package/MetricState/dist/effect-MetricState.cjs.dev.js +1 -1
  121. package/MetricState/dist/effect-MetricState.cjs.prod.js +1 -1
  122. package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +4 -4
  123. package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +4 -4
  124. package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +4 -4
  125. package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +4 -4
  126. package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +3 -3
  127. package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +3 -3
  128. package/Option/dist/effect-Option.cjs.dev.js +3 -3
  129. package/Option/dist/effect-Option.cjs.prod.js +3 -3
  130. package/Pool/dist/effect-Pool.cjs.dev.js +29 -29
  131. package/Pool/dist/effect-Pool.cjs.prod.js +29 -29
  132. package/Predicate/dist/effect-Predicate.cjs.dev.js +5 -5
  133. package/Predicate/dist/effect-Predicate.cjs.mjs +1 -1
  134. package/Predicate/dist/effect-Predicate.cjs.prod.js +5 -5
  135. package/Predicate/dist/effect-Predicate.esm.js +5 -5
  136. package/PubSub/dist/effect-PubSub.cjs.dev.js +28 -28
  137. package/PubSub/dist/effect-PubSub.cjs.prod.js +28 -28
  138. package/Queue/dist/effect-Queue.cjs.dev.js +28 -28
  139. package/Queue/dist/effect-Queue.cjs.prod.js +28 -28
  140. package/README.md +23 -0
  141. package/Random/dist/effect-Random.cjs.dev.js +14 -14
  142. package/Random/dist/effect-Random.cjs.prod.js +14 -14
  143. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +3 -3
  144. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +3 -3
  145. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +3 -3
  146. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +3 -3
  147. package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +3 -3
  148. package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +3 -3
  149. package/Ref/dist/effect-Ref.cjs.dev.js +9 -9
  150. package/Ref/dist/effect-Ref.cjs.prod.js +9 -9
  151. package/Reloadable/dist/effect-Reloadable.cjs.dev.js +33 -33
  152. package/Reloadable/dist/effect-Reloadable.cjs.prod.js +33 -33
  153. package/Request/dist/effect-Request.cjs.dev.js +28 -28
  154. package/Request/dist/effect-Request.cjs.prod.js +28 -28
  155. package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +36 -38
  156. package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +36 -38
  157. package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +42 -44
  158. package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +42 -44
  159. package/Resource/dist/effect-Resource.cjs.dev.js +31 -31
  160. package/Resource/dist/effect-Resource.cjs.prod.js +31 -31
  161. package/Runtime/dist/effect-Runtime.cjs.dev.js +30 -30
  162. package/Runtime/dist/effect-Runtime.cjs.prod.js +30 -30
  163. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +33 -34
  164. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +33 -34
  165. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +6 -6
  166. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +6 -6
  167. package/STM/dist/effect-STM.cjs.dev.js +45 -45
  168. package/STM/dist/effect-STM.cjs.prod.js +45 -45
  169. package/Schedule/dist/effect-Schedule.cjs.dev.js +20 -20
  170. package/Schedule/dist/effect-Schedule.cjs.prod.js +20 -20
  171. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +3 -3
  172. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +3 -3
  173. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +3 -3
  174. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +3 -3
  175. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +3 -3
  176. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +3 -3
  177. package/Scheduler/dist/effect-Scheduler.cjs.dev.js +8 -8
  178. package/Scheduler/dist/effect-Scheduler.cjs.prod.js +8 -8
  179. package/Scope/dist/effect-Scope.cjs.dev.js +27 -27
  180. package/Scope/dist/effect-Scope.cjs.prod.js +27 -27
  181. package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +34 -36
  182. package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +34 -36
  183. package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +31 -31
  184. package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +31 -31
  185. package/Sink/dist/effect-Sink.cjs.dev.js +39 -39
  186. package/Sink/dist/effect-Sink.cjs.prod.js +39 -39
  187. package/SortedMap/dist/effect-SortedMap.cjs.dev.js +3 -3
  188. package/SortedMap/dist/effect-SortedMap.cjs.prod.js +3 -3
  189. package/SortedSet/dist/effect-SortedSet.cjs.dev.js +3 -3
  190. package/SortedSet/dist/effect-SortedSet.cjs.prod.js +3 -3
  191. package/Stream/dist/effect-Stream.cjs.dev.js +43 -43
  192. package/Stream/dist/effect-Stream.cjs.prod.js +43 -43
  193. package/Streamable/dist/effect-Streamable.cjs.dev.js +43 -43
  194. package/Streamable/dist/effect-Streamable.cjs.prod.js +43 -43
  195. package/String/dist/effect-String.cjs.dev.js +3 -3
  196. package/String/dist/effect-String.cjs.prod.js +3 -3
  197. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +46 -46
  198. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +46 -46
  199. package/Supervisor/dist/effect-Supervisor.cjs.dev.js +33 -34
  200. package/Supervisor/dist/effect-Supervisor.cjs.prod.js +33 -34
  201. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +30 -30
  202. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +30 -30
  203. package/TArray/dist/effect-TArray.cjs.dev.js +47 -47
  204. package/TArray/dist/effect-TArray.cjs.prod.js +47 -47
  205. package/TDeferred/dist/effect-TDeferred.cjs.dev.js +46 -46
  206. package/TDeferred/dist/effect-TDeferred.cjs.prod.js +46 -46
  207. package/TMap/dist/effect-TMap.cjs.dev.js +48 -48
  208. package/TMap/dist/effect-TMap.cjs.prod.js +48 -48
  209. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +45 -45
  210. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +45 -45
  211. package/TPubSub/dist/effect-TPubSub.cjs.dev.js +50 -50
  212. package/TPubSub/dist/effect-TPubSub.cjs.prod.js +50 -50
  213. package/TQueue/dist/effect-TQueue.cjs.dev.js +47 -47
  214. package/TQueue/dist/effect-TQueue.cjs.prod.js +47 -47
  215. package/TRandom/dist/effect-TRandom.cjs.dev.js +46 -46
  216. package/TRandom/dist/effect-TRandom.cjs.prod.js +46 -46
  217. package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +50 -50
  218. package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +50 -50
  219. package/TRef/dist/effect-TRef.cjs.dev.js +45 -45
  220. package/TRef/dist/effect-TRef.cjs.prod.js +45 -45
  221. package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +46 -46
  222. package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +46 -46
  223. package/TSet/dist/effect-TSet.cjs.dev.js +48 -48
  224. package/TSet/dist/effect-TSet.cjs.prod.js +48 -48
  225. package/Take/dist/effect-Take.cjs.dev.js +36 -38
  226. package/Take/dist/effect-Take.cjs.prod.js +36 -38
  227. package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +5 -5
  228. package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +5 -5
  229. package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +20 -20
  230. package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +20 -20
  231. package/TestClock/dist/effect-TestClock.cjs.dev.js +32 -32
  232. package/TestClock/dist/effect-TestClock.cjs.prod.js +32 -32
  233. package/TestConfig/dist/effect-TestConfig.cjs.dev.js +3 -3
  234. package/TestConfig/dist/effect-TestConfig.cjs.prod.js +3 -3
  235. package/TestContext/dist/effect-TestContext.cjs.dev.js +34 -36
  236. package/TestContext/dist/effect-TestContext.cjs.prod.js +34 -36
  237. package/TestLive/dist/effect-TestLive.cjs.dev.js +14 -14
  238. package/TestLive/dist/effect-TestLive.cjs.prod.js +14 -14
  239. package/TestServices/dist/effect-TestServices.cjs.dev.js +40 -42
  240. package/TestServices/dist/effect-TestServices.cjs.prod.js +40 -42
  241. package/TestSized/dist/effect-TestSized.cjs.dev.js +8 -8
  242. package/TestSized/dist/effect-TestSized.cjs.prod.js +8 -8
  243. package/Tracer/dist/effect-Tracer.cjs.dev.js +20 -18
  244. package/Tracer/dist/effect-Tracer.cjs.mjs +1 -0
  245. package/Tracer/dist/effect-Tracer.cjs.prod.js +20 -18
  246. package/Tracer/dist/effect-Tracer.esm.js +7 -6
  247. package/dist/{Context-da73ddfa.cjs.dev.js → Context-607e9b4c.cjs.dev.js} +2 -2
  248. package/dist/{Context-9fe5eb16.cjs.prod.js → Context-c91d8ca0.cjs.prod.js} +2 -2
  249. package/dist/{Either-d43f082c.cjs.prod.js → Either-a3f96c60.cjs.prod.js} +2 -2
  250. package/dist/{Either-fa0ef1d9.cjs.dev.js → Either-e7500e90.cjs.dev.js} +2 -2
  251. package/dist/{Option-463b42e6.cjs.dev.js → Option-01caa9d4.cjs.dev.js} +1 -1
  252. package/dist/{Option-935e5d7c.cjs.prod.js → Option-dd52e82a.cjs.prod.js} +1 -1
  253. package/dist/{Ref-acdee7ef.cjs.dev.js → Ref-548003d1.cjs.dev.js} +1 -1
  254. package/dist/{Ref-4014b526.cjs.prod.js → Ref-6608e3b6.cjs.prod.js} +1 -1
  255. package/dist/{cache-7eed9d33.cjs.dev.js → cache-7953c9ae.cjs.dev.js} +5 -5
  256. package/dist/{cache-5c7d77e4.cjs.prod.js → cache-d7096ab5.cjs.prod.js} +5 -5
  257. package/dist/{circular-c8b65bdb.cjs.dev.js → circular-171d6971.cjs.dev.js} +8 -9
  258. package/dist/{circular-c2dbce1a.cjs.dev.js → circular-8568ddf2.cjs.dev.js} +7 -7
  259. package/dist/{circular-1f481ffb.cjs.prod.js → circular-894f44de.cjs.prod.js} +7 -7
  260. package/dist/{circular-9e10a5a7.cjs.prod.js → circular-b6cc8a1d.cjs.prod.js} +8 -9
  261. package/dist/{config-5ba54da1.cjs.prod.js → config-615bcaef.cjs.prod.js} +3 -3
  262. package/dist/{config-3b7935a3.cjs.dev.js → config-ea74e7d0.cjs.dev.js} +3 -3
  263. package/dist/{configProvider-f34a82f1.cjs.dev.js → configProvider-089a1159.cjs.dev.js} +4 -4
  264. package/dist/{configProvider-b6b20998.cjs.prod.js → configProvider-3877a6ec.cjs.prod.js} +4 -4
  265. package/dist/{core-b7401357.cjs.dev.js → core-365f89c2.cjs.dev.js} +3 -3
  266. package/dist/{core-07202cc0.cjs.prod.js → core-3908bc43.cjs.prod.js} +3 -3
  267. package/dist/{core-c5747f88.cjs.dev.js → core-3d37486a.cjs.dev.js} +3 -3
  268. package/dist/{core-7411d1e1.cjs.prod.js → core-8ccae4e2.cjs.prod.js} +3 -3
  269. package/dist/{core-effect-9201ea63.cjs.prod.js → core-effect-37a0d753.cjs.prod.js} +8 -8
  270. package/dist/{core-effect-1c564d42.cjs.dev.js → core-effect-c529ccac.cjs.dev.js} +8 -8
  271. package/dist/{dataSource-b83bc277.cjs.prod.js → dataSource-0e407d86.cjs.prod.js} +2 -2
  272. package/dist/{dataSource-b5eda714.cjs.dev.js → dataSource-d125d7af.cjs.dev.js} +2 -2
  273. package/dist/declarations/src/{Bigint.d.ts → BigInt.d.ts} +27 -27
  274. package/dist/declarations/src/{Bigint.d.ts.map → BigInt.d.ts.map} +1 -1
  275. package/dist/declarations/src/Channel.d.ts +4 -2
  276. package/dist/declarations/src/Channel.d.ts.map +1 -1
  277. package/dist/declarations/src/Data.d.ts +1 -2
  278. package/dist/declarations/src/Data.d.ts.map +1 -1
  279. package/dist/declarations/src/Effect.d.ts +67 -102
  280. package/dist/declarations/src/Effect.d.ts.map +1 -1
  281. package/dist/declarations/src/Either.d.ts +16 -0
  282. package/dist/declarations/src/Either.d.ts.map +1 -1
  283. package/dist/declarations/src/FiberRef.d.ts +2 -2
  284. package/dist/declarations/src/FiberRef.d.ts.map +1 -1
  285. package/dist/declarations/src/Layer.d.ts +98 -3
  286. package/dist/declarations/src/Layer.d.ts.map +1 -1
  287. package/dist/declarations/src/Logger.d.ts +2 -7
  288. package/dist/declarations/src/Logger.d.ts.map +1 -1
  289. package/dist/declarations/src/Match.d.ts +420 -0
  290. package/dist/declarations/src/Match.d.ts.map +1 -0
  291. package/dist/declarations/src/Predicate.d.ts +4 -4
  292. package/dist/declarations/src/Queue.d.ts +5 -0
  293. package/dist/declarations/src/Queue.d.ts.map +1 -1
  294. package/dist/declarations/src/Stream.d.ts +4 -2
  295. package/dist/declarations/src/Stream.d.ts.map +1 -1
  296. package/dist/declarations/src/Tracer.d.ts +17 -10
  297. package/dist/declarations/src/Tracer.d.ts.map +1 -1
  298. package/dist/declarations/src/index.d.ts +5 -1
  299. package/dist/declarations/src/index.d.ts.map +1 -1
  300. package/dist/{defaultServices-9d7ce86f.cjs.prod.js → defaultServices-1c3db777.cjs.prod.js} +15 -4
  301. package/dist/{defaultServices-755d5b46.cjs.dev.js → defaultServices-a933c201.cjs.dev.js} +15 -4
  302. package/dist/effect.cjs.dev.js +6 -3
  303. package/dist/effect.cjs.mjs +2 -1
  304. package/dist/effect.cjs.prod.js +6 -3
  305. package/dist/effect.esm.js +4 -2
  306. package/dist/{fiber-5156eff2.cjs.dev.js → fiber-13587a5a.cjs.dev.js} +3 -3
  307. package/dist/{fiber-9519d109.cjs.prod.js → fiber-2858bd1f.cjs.prod.js} +3 -3
  308. package/dist/{fiberRefs-98b71233.cjs.dev.js → fiberRefs-abe2a811.cjs.dev.js} +1 -1
  309. package/dist/{fiberRefs-558c17e6.cjs.prod.js → fiberRefs-ea1edd57.cjs.prod.js} +1 -1
  310. package/dist/{fiberRuntime-31ae011f.cjs.prod.js → fiberRuntime-9fafeaab.cjs.prod.js} +27 -23
  311. package/dist/{fiberRuntime-d3872282.cjs.dev.js → fiberRuntime-ebcb168f.cjs.dev.js} +27 -23
  312. package/dist/{groupBy-862cc2da.cjs.dev.js → groupBy-050e6b17.cjs.dev.js} +4 -4
  313. package/dist/{groupBy-724f64ef.cjs.prod.js → groupBy-93f35a1d.cjs.prod.js} +4 -4
  314. package/dist/{hook-8cefc909.cjs.dev.js → hook-2c94278c.cjs.dev.js} +1 -1
  315. package/dist/{hook-98ce30e4.cjs.prod.js → hook-9af5cf52.cjs.prod.js} +1 -1
  316. package/dist/{key-198b6670.cjs.dev.js → key-2d4efb00.cjs.dev.js} +2 -2
  317. package/dist/{key-eb8a12b2.cjs.prod.js → key-9b2f3322.cjs.prod.js} +2 -2
  318. package/dist/{layer-29574350.cjs.dev.js → layer-09807eda.cjs.dev.js} +15 -10
  319. package/dist/{layer-51ff4846.cjs.prod.js → layer-fc5b5ca7.cjs.prod.js} +15 -10
  320. package/dist/{patch-0220a642.cjs.dev.js → patch-2f545954.cjs.dev.js} +1 -1
  321. package/dist/{patch-7c559bb2.cjs.prod.js → patch-e72c6c2f.cjs.prod.js} +1 -1
  322. package/dist/{pathPatch-fab016f1.cjs.dev.js → pathPatch-9fa78980.cjs.dev.js} +1 -1
  323. package/dist/{pathPatch-b56a4da2.cjs.prod.js → pathPatch-f3064fa9.cjs.prod.js} +1 -1
  324. package/dist/{pool-3211287f.cjs.dev.js → pool-7c9cd8e9.cjs.dev.js} +5 -5
  325. package/dist/{pool-f77d7705.cjs.prod.js → pool-9370f703.cjs.prod.js} +5 -5
  326. package/dist/{query-c36decd5.cjs.dev.js → query-6cd164ab.cjs.dev.js} +3 -3
  327. package/dist/{query-a52b25f0.cjs.prod.js → query-8147932f.cjs.prod.js} +3 -3
  328. package/dist/{queue-7a223c44.cjs.dev.js → queue-06ce789d.cjs.dev.js} +23 -13
  329. package/dist/{queue-315ea45d.cjs.prod.js → queue-6afe5f19.cjs.prod.js} +23 -13
  330. package/dist/{registry-62ff192e.cjs.dev.js → registry-35e8eb48.cjs.dev.js} +2 -2
  331. package/dist/{registry-d5258dff.cjs.prod.js → registry-5c67df33.cjs.prod.js} +2 -2
  332. package/dist/{runtime-005f8a9b.cjs.prod.js → runtime-d41d839b.cjs.prod.js} +6 -6
  333. package/dist/{runtime-57c8ddf8.cjs.dev.js → runtime-fb1c1c19.cjs.dev.js} +6 -6
  334. package/dist/{schedule-e7a9f93f.cjs.dev.js → schedule-0e1db444.cjs.dev.js} +3 -3
  335. package/dist/{schedule-8cdf6bf1.cjs.prod.js → schedule-64057679.cjs.prod.js} +3 -3
  336. package/dist/{scopedRef-eb19c7a6.cjs.dev.js → scopedRef-2ea09a4f.cjs.dev.js} +6 -6
  337. package/dist/{scopedRef-789d7fef.cjs.prod.js → scopedRef-7a6d42f7.cjs.prod.js} +6 -6
  338. package/dist/{singleProducerAsyncInput-f9b258b1.cjs.prod.js → singleProducerAsyncInput-8b8ad112.cjs.prod.js} +1 -1
  339. package/dist/{singleProducerAsyncInput-9ff8389b.cjs.dev.js → singleProducerAsyncInput-97f74016.cjs.dev.js} +1 -1
  340. package/dist/{sink-572d8981.cjs.prod.js → sink-6d1a77bf.cjs.prod.js} +3 -3
  341. package/dist/{sink-8d3427e7.cjs.dev.js → sink-ebf2fbdb.cjs.dev.js} +3 -3
  342. package/dist/{stm-f250b596.cjs.prod.js → stm-4a6de085.cjs.prod.js} +3 -3
  343. package/dist/{stm-8aca0022.cjs.dev.js → stm-dbec85f1.cjs.dev.js} +3 -3
  344. package/dist/{stream-34d80d2c.cjs.dev.js → stream-478aa5a8.cjs.dev.js} +9 -6
  345. package/dist/{stream-ea4f4d44.cjs.prod.js → stream-f7345889.cjs.prod.js} +9 -6
  346. package/dist/{synchronizedRef-ed8aa6ac.cjs.prod.js → synchronizedRef-432b4455.cjs.prod.js} +1 -1
  347. package/dist/{synchronizedRef-a12fd967.cjs.dev.js → synchronizedRef-fa63e917.cjs.dev.js} +1 -1
  348. package/dist/{tArray-17f078f2.cjs.dev.js → tArray-0c9045e7.cjs.dev.js} +3 -3
  349. package/dist/{tArray-d184e22f.cjs.prod.js → tArray-b30ccc3e.cjs.prod.js} +3 -3
  350. package/dist/{tMap-e219f30e.cjs.prod.js → tMap-001c791c.cjs.prod.js} +4 -4
  351. package/dist/{tMap-1a5aa78b.cjs.dev.js → tMap-0625df1d.cjs.dev.js} +4 -4
  352. package/dist/{tQueue-47129ad0.cjs.prod.js → tQueue-6accdd70.cjs.prod.js} +3 -3
  353. package/dist/{tQueue-0a4fc773.cjs.dev.js → tQueue-cdbf9130.cjs.dev.js} +3 -3
  354. package/dist/{tRef-ab4c5713.cjs.prod.js → tRef-8b60d85b.cjs.prod.js} +1 -1
  355. package/dist/{tRef-b860ef05.cjs.dev.js → tRef-b5bae36d.cjs.dev.js} +1 -1
  356. package/internal/channel.esm.js +2 -2
  357. package/internal/core-effect.esm.js +1 -1
  358. package/internal/fiberRuntime.esm.js +27 -23
  359. package/internal/layer/circular.esm.js +5 -6
  360. package/internal/layer.esm.js +9 -5
  361. package/internal/logger.esm.js +3 -3
  362. package/internal/matcher.esm.js +314 -0
  363. package/internal/queue.esm.js +24 -14
  364. package/internal/stream.esm.js +7 -4
  365. package/internal/tracer.esm.js +14 -4
  366. package/package.json +21 -13
  367. package/src/{Bigint.ts → BigInt.ts} +26 -26
  368. package/src/Channel.ts +4 -2
  369. package/src/Data.ts +18 -16
  370. package/src/Duration.ts +2 -2
  371. package/src/Effect.ts +84 -151
  372. package/src/Either.ts +33 -0
  373. package/src/FiberRef.ts +2 -3
  374. package/src/Layer.ts +157 -3
  375. package/src/Logger.ts +2 -8
  376. package/src/Match.ts +800 -0
  377. package/src/Predicate.ts +4 -4
  378. package/src/Queue.ts +8 -0
  379. package/src/Stream.ts +4 -2
  380. package/src/Tracer.ts +18 -9
  381. package/src/index.ts +6 -1
  382. package/src/internal/channel.ts +5 -3
  383. package/src/internal/core-effect.ts +27 -22
  384. package/src/internal/core.ts +5 -7
  385. package/src/internal/fiberRuntime.ts +39 -13
  386. package/src/internal/layer/circular.ts +21 -6
  387. package/src/internal/layer.ts +20 -4
  388. package/src/internal/logger.ts +4 -4
  389. package/src/internal/matcher.ts +594 -0
  390. package/src/internal/queue.ts +26 -11
  391. package/src/internal/stream.ts +9 -7
  392. package/src/internal/tracer.ts +28 -5
  393. package/src/tsconfig.json +41 -0
  394. package/Bigint/dist/effect-Bigint.cjs.d.mts +0 -2
  395. package/Bigint/dist/effect-Bigint.cjs.d.mts.map +0 -1
  396. package/Bigint/dist/effect-Bigint.cjs.d.ts +0 -2
  397. package/Bigint/dist/effect-Bigint.cjs.d.ts.map +0 -1
  398. package/Bigint/dist/effect-Bigint.cjs.js +0 -7
  399. package/Bigint/package.json +0 -4
  400. /package/dist/{Effectable-c4c14a2b.cjs.prod.js → Effectable-6a8a05f1.cjs.prod.js} +0 -0
  401. /package/dist/{Effectable-7314aed8.cjs.dev.js → Effectable-71c10ab9.cjs.dev.js} +0 -0
  402. /package/dist/{FiberId-1d7ac632.cjs.prod.js → FiberId-54d8bd67.cjs.prod.js} +0 -0
  403. /package/dist/{FiberId-d88ddce6.cjs.dev.js → FiberId-6708cdca.cjs.dev.js} +0 -0
  404. /package/dist/{HashSet-ac02a3e1.cjs.prod.js → HashSet-86613304.cjs.prod.js} +0 -0
  405. /package/dist/{HashSet-5963ad6b.cjs.dev.js → HashSet-dd020cb0.cjs.dev.js} +0 -0
  406. /package/dist/{RuntimeFlagsPatch-866fa259.cjs.prod.js → RuntimeFlagsPatch-902b4680.cjs.prod.js} +0 -0
  407. /package/dist/{RuntimeFlagsPatch-69102b03.cjs.dev.js → RuntimeFlagsPatch-cf423492.cjs.dev.js} +0 -0
  408. /package/dist/{boundaries-f212e414.cjs.dev.js → boundaries-b5265184.cjs.dev.js} +0 -0
  409. /package/dist/{boundaries-9af538e3.cjs.prod.js → boundaries-bfd86b3e.cjs.prod.js} +0 -0
  410. /package/dist/{configError-b43723af.cjs.prod.js → configError-856c7153.cjs.prod.js} +0 -0
  411. /package/dist/{configError-d5efe9c0.cjs.dev.js → configError-a824b415.cjs.dev.js} +0 -0
  412. /package/dist/{configSecret-e2faa181.cjs.prod.js → configSecret-9b941a86.cjs.prod.js} +0 -0
  413. /package/dist/{configSecret-3e8ae336.cjs.dev.js → configSecret-e7bb51da.cjs.dev.js} +0 -0
  414. /package/dist/{keyType-0c5e6178.cjs.prod.js → keyType-4ec0b247.cjs.prod.js} +0 -0
  415. /package/dist/{keyType-7c164b82.cjs.dev.js → keyType-f30c9fa4.cjs.dev.js} +0 -0
  416. /package/dist/{label-655343b5.cjs.prod.js → label-a588e6cd.cjs.prod.js} +0 -0
  417. /package/dist/{label-011edbe7.cjs.dev.js → label-b0cebeae.cjs.dev.js} +0 -0
  418. /package/dist/{state-0bdf02b7.cjs.prod.js → state-40d5dc71.cjs.prod.js} +0 -0
  419. /package/dist/{state-931050c4.cjs.dev.js → state-620f7a22.cjs.dev.js} +0 -0
  420. /package/dist/{take-85daaf79.cjs.prod.js → take-15455ae3.cjs.prod.js} +0 -0
  421. /package/dist/{take-f9ef9e2e.cjs.dev.js → take-1c250e7a.cjs.dev.js} +0 -0
package/src/Effect.ts CHANGED
@@ -21,23 +21,20 @@ import type * as FiberRef from "./FiberRef"
21
21
  import type * as FiberRefs from "./FiberRefs"
22
22
  import type * as FiberRefsPatch from "./FiberRefsPatch"
23
23
  import type { LazyArg } from "./Function"
24
- import { identity } from "./Function"
24
+ import { dual, identity } from "./Function"
25
25
  import type * as HashMap from "./HashMap"
26
26
  import type * as HashSet from "./HashSet"
27
27
  import type { TypeLambda } from "./HKT"
28
- import { clockTag } from "./internal/clock"
29
28
  import * as core from "./internal/core"
30
29
  import * as effect from "./internal/core-effect"
31
30
  import * as defaultServices from "./internal/defaultServices"
32
31
  import * as circular from "./internal/effect/circular"
33
32
  import * as fiberRuntime from "./internal/fiberRuntime"
34
33
  import * as layer from "./internal/layer"
35
- import * as circularLayer from "./internal/layer/circular"
36
34
  import * as query from "./internal/query"
37
35
  import * as _runtime from "./internal/runtime"
38
36
  import * as _schedule from "./internal/schedule"
39
37
  import type * as Layer from "./Layer"
40
- import type * as Logger from "./Logger"
41
38
  import type { LogLevel } from "./LogLevel"
42
39
  import type * as Metric from "./Metric"
43
40
  import type * as MetricLabel from "./MetricLabel"
@@ -2726,15 +2723,6 @@ export const withConcurrency: {
2726
2723
  // scheduler
2727
2724
  // ---------------------------------------------------------------------------------------
2728
2725
 
2729
- /**
2730
- * @since 2.0.0
2731
- * @category scheduler
2732
- */
2733
- export const setScheduler = (scheduler: Scheduler.Scheduler): Layer.Layer<never, never, never> =>
2734
- layer.scopedDiscard(
2735
- fiberRuntime.fiberRefLocallyScoped(Scheduler.currentScheduler, scheduler)
2736
- )
2737
-
2738
2726
  /**
2739
2727
  * Sets the provided scheduler for usage in the wrapped effect
2740
2728
  *
@@ -2789,15 +2777,6 @@ export const clock: Effect<never, never, Clock.Clock> = effect.clock
2789
2777
  */
2790
2778
  export const clockWith: <R, E, A>(f: (clock: Clock.Clock) => Effect<R, E, A>) => Effect<R, E, A> = effect.clockWith
2791
2779
 
2792
- /**
2793
- * @since 2.0.0
2794
- * @category clock
2795
- */
2796
- export const setClock = <A extends Clock.Clock>(clock: A): Layer.Layer<never, never, never> =>
2797
- layer.scopedDiscard(
2798
- fiberRuntime.fiberRefLocallyScopedWith(defaultServices.currentServices, Context.add(clockTag, clock))
2799
- )
2800
-
2801
2780
  /**
2802
2781
  * Sets the implementation of the clock service to the specified value and
2803
2782
  * restores it to its original value when the scope is closed.
@@ -2988,15 +2967,6 @@ export const config: <A>(config: Config<A>) => Effect<never, ConfigError, A> = d
2988
2967
  export const configProviderWith: <R, E, A>(f: (configProvider: ConfigProvider) => Effect<R, E, A>) => Effect<R, E, A> =
2989
2968
  defaultServices.configProviderWith
2990
2969
 
2991
- /**
2992
- * Sets the current `ConfigProvider`.
2993
- *
2994
- * @since 2.0.0
2995
- * @category config
2996
- */
2997
- export const setConfigProvider: (configProvider: ConfigProvider) => Layer.Layer<never, never, never> =
2998
- circularLayer.setConfigProvider
2999
-
3000
2970
  /**
3001
2971
  * Executes the specified workflow with the specified configuration provider.
3002
2972
  *
@@ -4265,10 +4235,10 @@ export const withLogSpan: {
4265
4235
  * @category logging
4266
4236
  */
4267
4237
  export const annotateLogs: {
4268
- (key: string, value: Logger.AnnotationValue): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>
4269
- (values: Record<string, Logger.AnnotationValue>): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>
4270
- <R, E, A>(effect: Effect<R, E, A>, key: string, value: Logger.AnnotationValue): Effect<R, E, A>
4271
- <R, E, A>(effect: Effect<R, E, A>, values: Record<string, Logger.AnnotationValue>): Effect<R, E, A>
4238
+ (key: string, value: unknown): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>
4239
+ (values: Record<string, unknown>): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>
4240
+ <R, E, A>(effect: Effect<R, E, A>, key: string, value: unknown): Effect<R, E, A>
4241
+ <R, E, A>(effect: Effect<R, E, A>, values: Record<string, unknown>): Effect<R, E, A>
4272
4242
  } = effect.annotateLogs
4273
4243
 
4274
4244
  /**
@@ -4277,8 +4247,7 @@ export const annotateLogs: {
4277
4247
  * @since 2.0.0
4278
4248
  * @category logging
4279
4249
  */
4280
- export const logAnnotations: Effect<never, never, HashMap.HashMap<string, Logger.AnnotationValue>> =
4281
- effect.logAnnotations
4250
+ export const logAnnotations: Effect<never, never, HashMap.HashMap<string, unknown>> = effect.logAnnotations
4282
4251
 
4283
4252
  /**
4284
4253
  * Decides wether child fibers will report or not unhandled errors via the logger
@@ -4291,15 +4260,6 @@ export const withUnhandledErrorLogLevel: {
4291
4260
  <R, E, B>(self: Effect<R, E, B>, level: Option.Option<LogLevel>): Effect<R, E, B>
4292
4261
  } = core.withUnhandledErrorLogLevel
4293
4262
 
4294
- /**
4295
- * @since 2.0.0
4296
- * @category logging
4297
- */
4298
- export const setUnhandledErrorLogLevel = (level: Option.Option<LogLevel>): Layer.Layer<never, never, never> =>
4299
- layer.scopedDiscard(
4300
- fiberRuntime.fiberRefLocallyScoped(core.currentUnhandledErrorLogLevel, level)
4301
- )
4302
-
4303
4263
  // -------------------------------------------------------------------------------------
4304
4264
  // alternatives
4305
4265
  // -------------------------------------------------------------------------------------
@@ -4744,6 +4704,21 @@ export const zipWith: {
4744
4704
  ): Effect<R | R2, E | E2, B>
4745
4705
  } = fiberRuntime.zipWithOptions
4746
4706
 
4707
+ // -------------------------------------------------------------------------------------
4708
+ // applicatives
4709
+ // -------------------------------------------------------------------------------------
4710
+ /**
4711
+ * @category combining
4712
+ * @since 2.0.0
4713
+ */
4714
+ export const ap: {
4715
+ <R2, E2, A>(that: Effect<R2, E2, A>): <R, E, B>(self: Effect<R, E, (a: A) => B>) => Effect<R | R2, E | E2, B>
4716
+ <R, E, A, B, R2, E2>(self: Effect<R, E, (a: A) => B>, that: Effect<R2, E2, A>): Effect<R | R2, E | E2, B>
4717
+ } = dual(
4718
+ 2,
4719
+ <R, E, A, B, R2, E2>(self: Effect<R, E, (a: A) => B>, that: Effect<R2, E2, A>): Effect<R | R2, E | E2, B> =>
4720
+ zipWith(self, that, (f, a) => f(a))
4721
+ )
4747
4722
  // -------------------------------------------------------------------------------------
4748
4723
  // requests & batching
4749
4724
  // -------------------------------------------------------------------------------------
@@ -4812,42 +4787,6 @@ export const withRequestBatching: {
4812
4787
  <R, E, A>(self: Effect<R, E, A>, requestBatching: boolean): Effect<R, E, A>
4813
4788
  } = core.withRequestBatching
4814
4789
 
4815
- /**
4816
- * @since 2.0.0
4817
- * @category requests & batching
4818
- */
4819
- export const setRequestBatching = (requestBatching: boolean) =>
4820
- layer.scopedDiscard(
4821
- fiberRuntime.fiberRefLocallyScoped(core.currentRequestBatching, requestBatching)
4822
- )
4823
-
4824
- /**
4825
- * @since 2.0.0
4826
- * @category requests & batching
4827
- */
4828
- export const setRequestCaching = (requestCaching: boolean) =>
4829
- layer.scopedDiscard(
4830
- fiberRuntime.fiberRefLocallyScoped(query.currentCacheEnabled, requestCaching)
4831
- )
4832
-
4833
- /**
4834
- * @since 2.0.0
4835
- * @category requests & batching
4836
- */
4837
- export const setRequestCache: {
4838
- <R, E>(
4839
- cache: Effect<R, E, Request.Cache>
4840
- ): Layer.Layer<Exclude<R, Scope.Scope>, E, never>
4841
- (
4842
- cache: Request.Cache
4843
- ): Layer.Layer<never, never, never>
4844
- } = (<R, E>(cache: Request.Cache | Effect<R, E, Request.Cache>) =>
4845
- layer.scopedDiscard(
4846
- core.isEffect(cache) ?
4847
- core.flatMap(cache, (x) => fiberRuntime.fiberRefLocallyScoped(query.currentCache as any, x)) :
4848
- fiberRuntime.fiberRefLocallyScoped(query.currentCache as any, cache)
4849
- )) as any
4850
-
4851
4790
  /**
4852
4791
  * @since 2.0.0
4853
4792
  * @category requests & batching
@@ -4870,14 +4809,6 @@ export const withRequestCache: {
4870
4809
  // tracing
4871
4810
  // -------------------------------------------------------------------------------------
4872
4811
 
4873
- /**
4874
- * Create a Layer that sets the current Tracer
4875
- *
4876
- * @since 2.0.0
4877
- * @category tracing
4878
- */
4879
- export const setTracer: (tracer: Tracer.Tracer) => Layer.Layer<never, never, never> = circularLayer.setTracer
4880
-
4881
4812
  /**
4882
4813
  * @since 2.0.0
4883
4814
  * @category tracing
@@ -4916,15 +4847,6 @@ export const withTracerTiming: {
4916
4847
  <R, E, A>(effect: Effect<R, E, A>, enabled: boolean): Effect<R, E, A>
4917
4848
  } = core.withTracerTiming
4918
4849
 
4919
- /**
4920
- * @since 2.0.0
4921
- * @category tracing
4922
- */
4923
- export const setTracerTiming: (enabled: boolean) => Layer.Layer<never, never, never> = (enabled: boolean) =>
4924
- layer.scopedDiscard(
4925
- fiberRuntime.fiberRefLocallyScoped(core.currentTracerTimingEnabled, enabled)
4926
- )
4927
-
4928
4850
  /**
4929
4851
  * Adds an annotation to each span in this effect.
4930
4852
  *
@@ -4932,10 +4854,10 @@ export const setTracerTiming: (enabled: boolean) => Layer.Layer<never, never, ne
4932
4854
  * @category tracing
4933
4855
  */
4934
4856
  export const annotateSpans: {
4935
- (key: string, value: Tracer.AttributeValue): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>
4936
- (values: Record<string, Tracer.AttributeValue>): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>
4937
- <R, E, A>(effect: Effect<R, E, A>, key: string, value: Tracer.AttributeValue): Effect<R, E, A>
4938
- <R, E, A>(effect: Effect<R, E, A>, values: Record<string, Tracer.AttributeValue>): Effect<R, E, A>
4857
+ (key: string, value: unknown): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>
4858
+ (values: Record<string, unknown>): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>
4859
+ <R, E, A>(effect: Effect<R, E, A>, key: string, value: unknown): Effect<R, E, A>
4860
+ <R, E, A>(effect: Effect<R, E, A>, values: Record<string, unknown>): Effect<R, E, A>
4939
4861
  } = effect.annotateSpans
4940
4862
 
4941
4863
  /**
@@ -4945,8 +4867,8 @@ export const annotateSpans: {
4945
4867
  * @category tracing
4946
4868
  */
4947
4869
  export const annotateCurrentSpan: {
4948
- (key: string, value: Tracer.AttributeValue): Effect<never, never, void>
4949
- (values: Record<string, Tracer.AttributeValue>): Effect<never, never, void>
4870
+ (key: string, value: unknown): Effect<never, never, void>
4871
+ (values: Record<string, unknown>): Effect<never, never, void>
4950
4872
  } = effect.annotateCurrentSpan
4951
4873
 
4952
4874
  /**
@@ -4965,8 +4887,7 @@ export const currentParentSpan: Effect<never, never, Option.Option<Tracer.Parent
4965
4887
  * @since 2.0.0
4966
4888
  * @category tracing
4967
4889
  */
4968
- export const spanAnnotations: Effect<never, never, HashMap.HashMap<string, Tracer.AttributeValue>> =
4969
- effect.spanAnnotations
4890
+ export const spanAnnotations: Effect<never, never, HashMap.HashMap<string, unknown>> = effect.spanAnnotations
4970
4891
 
4971
4892
  /**
4972
4893
  * @since 2.0.0
@@ -4983,12 +4904,12 @@ export const spanLinks: Effect<never, never, Chunk.Chunk<Tracer.SpanLink>> = eff
4983
4904
  export const linkSpans: {
4984
4905
  (
4985
4906
  span: Tracer.ParentSpan,
4986
- attributes?: Record<string, Tracer.AttributeValue>
4907
+ attributes?: Record<string, unknown>
4987
4908
  ): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>
4988
4909
  <R, E, A>(
4989
4910
  self: Effect<R, E, A>,
4990
4911
  span: Tracer.ParentSpan,
4991
- attributes?: Record<string, Tracer.AttributeValue>
4912
+ attributes?: Record<string, unknown>
4992
4913
  ): Effect<R, E, A>
4993
4914
  } = effect.linkSpans
4994
4915
 
@@ -5001,40 +4922,36 @@ export const linkSpans: {
5001
4922
  export const makeSpan: (
5002
4923
  name: string,
5003
4924
  options?: {
5004
- readonly attributes?: Record<string, Tracer.AttributeValue>
4925
+ readonly attributes?: Record<string, unknown>
5005
4926
  readonly links?: ReadonlyArray<Tracer.SpanLink>
5006
4927
  readonly parent?: Tracer.ParentSpan
5007
4928
  readonly root?: boolean
4929
+ readonly sampled?: boolean
5008
4930
  readonly context?: Context.Context<never>
5009
4931
  }
5010
4932
  ) => Effect<never, never, Tracer.Span> = effect.makeSpan
5011
4933
 
5012
4934
  /**
5013
- * Adds the provided span to the span stack.
5014
- *
5015
- * @since 2.0.0
5016
- * @category tracing
5017
- */
5018
- export const setParentSpan: (span: Tracer.ParentSpan) => Layer.Layer<never, never, never> = circularLayer.setParentSpan
5019
-
5020
- /**
5021
- * Create and add a span to the current span stack.
4935
+ * Create a new span for tracing, and automatically close it when the Scope
4936
+ * finalizes.
5022
4937
  *
5023
- * The span is ended when the Layer is released.
4938
+ * The span is not added to the current span stack, so no child spans will be
4939
+ * created for it.
5024
4940
  *
5025
4941
  * @since 2.0.0
5026
4942
  * @category tracing
5027
4943
  */
5028
- export const setSpan: (
4944
+ export const makeSpanScoped: (
5029
4945
  name: string,
5030
4946
  options?: {
5031
- readonly attributes?: Record<string, Tracer.AttributeValue>
4947
+ readonly attributes?: Record<string, unknown>
5032
4948
  readonly links?: ReadonlyArray<Tracer.SpanLink>
5033
4949
  readonly parent?: Tracer.ParentSpan
5034
4950
  readonly root?: boolean
4951
+ readonly sampled?: boolean
5035
4952
  readonly context?: Context.Context<never>
5036
4953
  }
5037
- ) => Layer.Layer<never, never, never> = circularLayer.setSpan
4954
+ ) => Effect<Scope.Scope, never, Tracer.Span> = fiberRuntime.makeSpanScoped
5038
4955
 
5039
4956
  /**
5040
4957
  * Create a new span for tracing, and automatically close it when the effect
@@ -5051,10 +4968,11 @@ export const useSpan: {
5051
4968
  <R, E, A>(
5052
4969
  name: string,
5053
4970
  options: {
5054
- readonly attributes?: Record<string, Tracer.AttributeValue>
4971
+ readonly attributes?: Record<string, unknown>
5055
4972
  readonly links?: ReadonlyArray<Tracer.SpanLink>
5056
4973
  readonly parent?: Tracer.ParentSpan
5057
4974
  readonly root?: boolean
4975
+ readonly sampled?: boolean
5058
4976
  readonly context?: Context.Context<never>
5059
4977
  },
5060
4978
  evaluate: (span: Tracer.Span) => Effect<R, E, A>
@@ -5062,74 +4980,90 @@ export const useSpan: {
5062
4980
  } = effect.useSpan
5063
4981
 
5064
4982
  /**
5065
- * Create a new span for tracing, and automatically close it when the Scope
5066
- * finalizes.
5067
- *
5068
- * The span is not added to the current span stack, so no child spans will be
5069
- * created for it.
4983
+ * Wraps the effect with a new span for tracing.
5070
4984
  *
5071
4985
  * @since 2.0.0
5072
4986
  * @category tracing
5073
4987
  */
5074
- export const useSpanScoped: (
5075
- name: string,
5076
- options?: {
5077
- readonly attributes?: Record<string, Tracer.AttributeValue>
5078
- readonly links?: ReadonlyArray<Tracer.SpanLink>
5079
- readonly parent?: Tracer.ParentSpan
5080
- readonly root?: boolean
5081
- readonly context?: Context.Context<never>
5082
- }
5083
- ) => Effect<Scope.Scope, never, Tracer.Span> = fiberRuntime.useSpanScoped
4988
+ export const withSpan: {
4989
+ (
4990
+ name: string,
4991
+ options?: {
4992
+ readonly attributes?: Record<string, unknown>
4993
+ readonly links?: ReadonlyArray<Tracer.SpanLink>
4994
+ readonly parent?: Tracer.ParentSpan
4995
+ readonly root?: boolean
4996
+ readonly sampled?: boolean
4997
+ readonly context?: Context.Context<never>
4998
+ }
4999
+ ): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>
5000
+ <R, E, A>(
5001
+ self: Effect<R, E, A>,
5002
+ name: string,
5003
+ options?: {
5004
+ readonly attributes?: Record<string, unknown>
5005
+ readonly links?: ReadonlyArray<Tracer.SpanLink>
5006
+ readonly parent?: Tracer.ParentSpan
5007
+ readonly root?: boolean
5008
+ readonly sampled?: boolean
5009
+ readonly context?: Context.Context<never>
5010
+ }
5011
+ ): Effect<R, E, A>
5012
+ } = effect.withSpan
5084
5013
 
5085
5014
  /**
5086
5015
  * Wraps the effect with a new span for tracing.
5087
5016
  *
5017
+ * The span is ended when the Scope is finalized.
5018
+ *
5088
5019
  * @since 2.0.0
5089
5020
  * @category tracing
5090
5021
  */
5091
- export const withSpan: {
5022
+ export const withSpanScoped: {
5092
5023
  (
5093
5024
  name: string,
5094
5025
  options?: {
5095
- readonly attributes?: Record<string, Tracer.AttributeValue>
5026
+ readonly attributes?: Record<string, unknown>
5096
5027
  readonly links?: ReadonlyArray<Tracer.SpanLink>
5097
5028
  readonly parent?: Tracer.ParentSpan
5098
5029
  readonly root?: boolean
5030
+ readonly sampled?: boolean
5099
5031
  readonly context?: Context.Context<never>
5100
5032
  }
5101
- ): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>
5033
+ ): <R, E, A>(self: Effect<R, E, A>) => Effect<R | Scope.Scope, E, A>
5102
5034
  <R, E, A>(
5103
5035
  self: Effect<R, E, A>,
5104
5036
  name: string,
5105
5037
  options?: {
5106
- readonly attributes?: Record<string, Tracer.AttributeValue>
5038
+ readonly attributes?: Record<string, unknown>
5107
5039
  readonly links?: ReadonlyArray<Tracer.SpanLink>
5108
5040
  readonly parent?: Tracer.ParentSpan
5109
5041
  readonly root?: boolean
5042
+ readonly sampled?: boolean
5110
5043
  readonly context?: Context.Context<never>
5111
5044
  }
5112
- ): Effect<R, E, A>
5113
- } = effect.withSpan
5045
+ ): Effect<Scope.Scope | R, E, A>
5046
+ } = fiberRuntime.withSpanScoped
5114
5047
 
5115
5048
  /**
5116
5049
  * Create and add a span to the current span stack.
5117
5050
  *
5118
- * The span is ended when the Scope is finalized.
5051
+ * The span is ended & removed from the stack when the Scope is finalized.
5119
5052
  *
5120
5053
  * @since 2.0.0
5121
5054
  * @category tracing
5122
5055
  */
5123
- export const withSpanScoped: (
5056
+ export const setSpan: (
5124
5057
  name: string,
5125
5058
  options?: {
5126
- readonly attributes?: Record<string, Tracer.AttributeValue>
5059
+ readonly attributes?: Record<string, unknown>
5127
5060
  readonly links?: ReadonlyArray<Tracer.SpanLink>
5128
5061
  readonly parent?: Tracer.ParentSpan
5129
5062
  readonly root?: boolean
5063
+ readonly sampled?: boolean
5130
5064
  readonly context?: Context.Context<never>
5131
5065
  }
5132
- ) => Effect<Scope.Scope, never, void> = fiberRuntime.withSpanScoped
5066
+ ) => Effect<Scope.Scope, never, void> = fiberRuntime.setSpan
5133
5067
 
5134
5068
  /**
5135
5069
  * Adds the provided span to the current span stack.
@@ -5148,8 +5082,7 @@ export const withParentSpan: {
5148
5082
  * @since 2.0.0
5149
5083
  * @category tracing
5150
5084
  */
5151
- export const withParentSpanScoped: (span: Tracer.ParentSpan) => Effect<Scope.Scope, never, void> =
5152
- fiberRuntime.withParentSpanScoped
5085
+ export const setParentSpan: (span: Tracer.ParentSpan) => Effect<Scope.Scope, never, void> = fiberRuntime.setParentSpan
5153
5086
 
5154
5087
  // -------------------------------------------------------------------------------------
5155
5088
  // optionality
package/src/Either.ts CHANGED
@@ -503,6 +503,39 @@ export const flatMap: {
503
503
  isLeft(self) ? left(self.left) : f(self.right)
504
504
  )
505
505
 
506
+ /**
507
+ * @since 2.0.0
508
+ * @category combining
509
+ */
510
+ export const zipWith: {
511
+ <E2, A2, A, B>(
512
+ that: Either<E2, A2>,
513
+ f: (a: A, b: A2) => B
514
+ ): <E>(self: Either<E, A>) => Either<E2 | E, B>
515
+ <E, A, E2, A2, B>(
516
+ self: Either<E, A>,
517
+ that: Either<E2, A2>,
518
+ f: (a: A, b: A2) => B
519
+ ): Either<E | E2, B>
520
+ } = dual(
521
+ 3,
522
+ <E, A, E2, A2, B>(self: Either<E, A>, that: Either<E2, A2>, f: (a: A, b: A2) => B): Either<E | E2, B> =>
523
+ flatMap(self, (a) => map(that, (b) => f(a, b)))
524
+ )
525
+
526
+ /**
527
+ * @category combining
528
+ * @since 2.0.0
529
+ */
530
+ export const ap: {
531
+ <E2, A>(that: Either<E2, A>): <E, B>(self: Either<E, (a: A) => B>) => Either<E | E2, B>
532
+ <E, A, B, E2>(self: Either<E, (a: A) => B>, that: Either<E2, A>): Either<E | E2, B>
533
+ } = dual(
534
+ 2,
535
+ <E, A, B, E2>(self: Either<E, (a: A) => B>, that: Either<E2, A>): Either<E | E2, B> =>
536
+ zipWith(self, that, (f, a) => f(a))
537
+ )
538
+
506
539
  /**
507
540
  * Takes a structure of `Option`s and returns an `Option` of values with the same structure.
508
541
  *
package/src/FiberRef.ts CHANGED
@@ -316,8 +316,7 @@ export const unhandledErrorLogLevel: FiberRef<Option.Option<LogLevel.LogLevel>>
316
316
  * @since 2.0.0
317
317
  * @category fiberRefs
318
318
  */
319
- export const currentLogAnnotations: FiberRef<HashMap.HashMap<string, Logger.AnnotationValue>> =
320
- core.currentLogAnnotations
319
+ export const currentLogAnnotations: FiberRef<HashMap.HashMap<string, unknown>> = core.currentLogAnnotations
321
320
 
322
321
  /**
323
322
  * @since 2.0.0
@@ -383,7 +382,7 @@ export const currentTracerTimingEnabled: FiberRef<boolean> = core.currentTracerT
383
382
  * @since 2.0.0
384
383
  * @category fiberRefs
385
384
  */
386
- export const currentTracerSpanAnnotations: FiberRef<HashMap.HashMap<string, Tracer.AttributeValue>> =
385
+ export const currentTracerSpanAnnotations: FiberRef<HashMap.HashMap<string, unknown>> =
387
386
  core.currentTracerSpanAnnotations
388
387
 
389
388
  /**