@fncts/io 0.0.20 → 0.0.22

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 (1688) hide show
  1. package/Cached/api.d.ts +2 -2
  2. package/Channel/ChildExecutorDecision/api.d.ts +2 -2
  3. package/Channel/UpstreamPullRequest/api.d.ts +2 -2
  4. package/Channel/api/interruptWhen.d.ts +5 -5
  5. package/Channel/api/mapOutConcurrentIO.d.ts +8 -0
  6. package/Channel/api/mergeAll.d.ts +2 -2
  7. package/Channel/api/mergeAllUnboundedWith.d.ts +2 -2
  8. package/Channel/api/mergeAllWith.d.ts +2 -2
  9. package/Channel/api/mergeMap.d.ts +2 -2
  10. package/Channel/api/mergeWith.d.ts +2 -2
  11. package/Channel/api/zipConcurrent.d.ts +16 -0
  12. package/Channel/api.d.ts +62 -62
  13. package/Channel/core-api.d.ts +11 -11
  14. package/Channel/definition.d.ts +35 -21
  15. package/Channel/internal/SingleProducerAsyncInput.d.ts +1 -1
  16. package/CountdownLatch.d.ts +25 -0
  17. package/Fiber/FiberMessage.d.ts +67 -0
  18. package/Fiber/FiberRuntime.d.ts +116 -0
  19. package/Fiber/api/interrupt.d.ts +1 -1
  20. package/Fiber/api/interruptAs.d.ts +6 -1
  21. package/Fiber/api/location.d.ts +1 -2
  22. package/Fiber/api/mapFiber.d.ts +2 -2
  23. package/Fiber/api/mapIO.d.ts +5 -5
  24. package/Fiber/api/zipWith.d.ts +2 -2
  25. package/Fiber/definition.d.ts +17 -16
  26. package/Fiber.d.ts +2 -3
  27. package/FiberDescriptor.d.ts +3 -6
  28. package/FiberRef/api/locallyScoped.d.ts +2 -2
  29. package/FiberRef/api/locallyScopedWith.d.ts +2 -2
  30. package/FiberRef/api.d.ts +18 -18
  31. package/FiberRef/definition.d.ts +2 -2
  32. package/FiberRef/unsafe.d.ts +5 -0
  33. package/FiberRefs/api.d.ts +30 -2
  34. package/FiberRefs/definition.d.ts +14 -7
  35. package/FiberRefs/join.d.ts +3 -3
  36. package/FiberScope/constructors.d.ts +2 -2
  37. package/FiberScope/definition.d.ts +8 -5
  38. package/FiberStatus/constructors.d.ts +3 -7
  39. package/FiberStatus/definition.d.ts +16 -28
  40. package/Future/api.d.ts +21 -21
  41. package/Hub/api.d.ts +27 -25
  42. package/Hub/definition.d.ts +13 -9
  43. package/IO/api/acquireRelease.d.ts +1 -1
  44. package/IO/api/acquireReleaseExit.d.ts +1 -1
  45. package/IO/api/asyncInterrupt.d.ts +39 -0
  46. package/IO/api/bracket.d.ts +1 -1
  47. package/IO/api/bracketExit.d.ts +1 -1
  48. package/IO/api/concurrency.d.ts +2 -2
  49. package/IO/api/core-scope.d.ts +7 -43
  50. package/IO/api/delay.d.ts +8 -0
  51. package/IO/api/ensuringChildren.d.ts +3 -3
  52. package/IO/api/environment.d.ts +11 -15
  53. package/IO/api/{foreachC.d.ts → foreachConcurrent.d.ts} +8 -8
  54. package/IO/api/foreachExec.d.ts +1 -1
  55. package/IO/api/fork.d.ts +36 -0
  56. package/IO/api/forkIn.d.ts +3 -3
  57. package/IO/api/fulfill.d.ts +3 -3
  58. package/IO/api/interrupt.d.ts +9 -13
  59. package/IO/api/onExit.d.ts +3 -3
  60. package/IO/api/onTermination.d.ts +4 -4
  61. package/IO/api/provideLayer.d.ts +3 -3
  62. package/IO/api/provideSomeLayer.d.ts +3 -7
  63. package/IO/api/race.d.ts +2 -2
  64. package/IO/api/raceFirst.d.ts +2 -2
  65. package/IO/api/repeat.d.ts +3 -3
  66. package/IO/api/retry.d.ts +7 -7
  67. package/IO/api/schedule.d.ts +5 -5
  68. package/IO/api/scoped.d.ts +2 -2
  69. package/IO/api/supervised.d.ts +2 -4
  70. package/IO/api/timeout.d.ts +5 -5
  71. package/IO/api/withFinalizer.d.ts +3 -3
  72. package/IO/api/withFinalizerExit.d.ts +3 -3
  73. package/IO/api/zipConcurrent.d.ts +13 -0
  74. package/IO/api.d.ts +208 -306
  75. package/IO/definition.d.ts +111 -130
  76. package/IO/runtime.d.ts +19 -22
  77. package/IO.d.ts +5 -3
  78. package/Layer/MemoMap.d.ts +5 -5
  79. package/Layer/api.d.ts +28 -28
  80. package/LogLevel.d.ts +12 -12
  81. package/LogSpan.d.ts +2 -2
  82. package/Logger/api.d.ts +5 -5
  83. package/Push/api.d.ts +232 -0
  84. package/Push/definition.d.ts +34 -0
  85. package/Push/internal.d.ts +11 -0
  86. package/Push.d.ts +3 -0
  87. package/Queue/api/dimapIO.d.ts +70 -13
  88. package/Queue/api/filterInputIO.d.ts +12 -20
  89. package/Queue/api/filterOutputIO.d.ts +10 -21
  90. package/Queue/api/operations.d.ts +15 -14
  91. package/Queue/api/poll.d.ts +2 -2
  92. package/Queue/api/takeBetween.d.ts +3 -3
  93. package/Queue/api/zipWithIO.d.ts +7 -24
  94. package/Queue/definition.d.ts +112 -8
  95. package/Queue/internal.d.ts +7 -7
  96. package/Ref/Atomic.d.ts +22 -2
  97. package/Ref/Derived.d.ts +4 -2
  98. package/Ref/DerivedAll.d.ts +7 -3
  99. package/Ref/Synchronized/api.d.ts +31 -29
  100. package/Ref/Synchronized/constructors.d.ts +1 -1
  101. package/Ref/Synchronized/definition.d.ts +6 -4
  102. package/Ref/Synchronized.d.ts +3 -0
  103. package/Ref/api/collect.d.ts +3 -3
  104. package/Ref/api/dimap.d.ts +21 -21
  105. package/Ref/api/filter.d.ts +7 -6
  106. package/Ref/api/get.d.ts +1 -1
  107. package/Ref/api/match.d.ts +3 -3
  108. package/Ref/api/matchAll.d.ts +1 -1
  109. package/Ref/api/modify.d.ts +27 -27
  110. package/Ref/api/set.d.ts +3 -3
  111. package/Ref/constructors.d.ts +1 -1
  112. package/Ref/definition.d.ts +46 -20
  113. package/Ref/symbols.d.ts +30 -0
  114. package/Ref.d.ts +2 -0
  115. package/RefSubject/Atomic.d.ts +36 -0
  116. package/RefSubject/Synchronized/api.d.ts +9 -0
  117. package/RefSubject/Synchronized/definition.d.ts +40 -0
  118. package/RefSubject/api.d.ts +116 -0
  119. package/RefSubject/definition.d.ts +45 -0
  120. package/RefSubject.d.ts +3 -0
  121. package/RuntimeConfig.d.ts +0 -24
  122. package/RuntimeFlag.d.ts +10 -0
  123. package/RuntimeFlags/Patch.d.ts +53 -0
  124. package/RuntimeFlags/RuntimeFlags.d.ts +82 -0
  125. package/RuntimeFlags.d.ts +2 -0
  126. package/STM/api/core-api.d.ts +10 -10
  127. package/STM/api.d.ts +61 -61
  128. package/STM/internal/Journal.d.ts +4 -4
  129. package/Schedule/Decision.d.ts +2 -2
  130. package/Schedule/api.d.ts +121 -105
  131. package/Scope/ReleaseMap/api/releaseAll.d.ts +2 -2
  132. package/Scope/ReleaseMap/api.d.ts +10 -10
  133. package/Scope/ReleaseMap/definition.d.ts +1 -1
  134. package/Scope/api.d.ts +8 -8
  135. package/ScopedRef/api.d.ts +1 -1
  136. package/Sink/api.d.ts +66 -66
  137. package/State/api.d.ts +4 -4
  138. package/State/internal.d.ts +1 -1
  139. package/Stream/api/zipAllWith.d.ts +2 -2
  140. package/Stream/api/zipWith.d.ts +2 -2
  141. package/Stream/api/zipWithChunks.d.ts +2 -2
  142. package/Stream/api.d.ts +217 -205
  143. package/Stream/internal/DebounceState.d.ts +3 -3
  144. package/Stream/internal/Handoff.d.ts +6 -6
  145. package/Stream/internal/SinkEndReason.d.ts +3 -3
  146. package/Stream/internal/Take.d.ts +8 -8
  147. package/Subject/Atomic.d.ts +18 -0
  148. package/Subject/api.d.ts +13 -0
  149. package/Subject/definition.d.ts +15 -0
  150. package/Subject.d.ts +3 -0
  151. package/SubscriptionRef.d.ts +38 -0
  152. package/Supervisor/api.d.ts +4 -4
  153. package/SupervisorPatch.d.ts +4 -4
  154. package/TExit/definition.d.ts +2 -2
  155. package/TFuture/api.d.ts +7 -7
  156. package/TFuture/definition.d.ts +2 -2
  157. package/TReentrantLock/api.d.ts +4 -4
  158. package/TReentrantLock/definition.d.ts +3 -3
  159. package/TRef/api.d.ts +26 -27
  160. package/TRef/constructors.d.ts +6 -6
  161. package/TRef/definition.d.ts +47 -34
  162. package/TRef/symbols.d.ts +20 -0
  163. package/TRef.d.ts +1 -0
  164. package/TSemaphore/api.d.ts +4 -4
  165. package/TSemaphore/constructors.d.ts +6 -0
  166. package/TSemaphore/definition.d.ts +2 -2
  167. package/_cjs/Cached/api.cjs +9 -32
  168. package/_cjs/Cached/api.cjs.map +1 -1
  169. package/_cjs/Cached/definition.cjs +2 -7
  170. package/_cjs/Cached/definition.cjs.map +1 -1
  171. package/_cjs/Cached/internal.cjs +0 -3
  172. package/_cjs/Cached/internal.cjs.map +1 -1
  173. package/_cjs/Cached.cjs +0 -6
  174. package/_cjs/Cached.cjs.map +1 -1
  175. package/_cjs/CancellerState.cjs +3 -22
  176. package/_cjs/CancellerState.cjs.map +1 -1
  177. package/_cjs/Channel/ChildExecutorDecision/api.cjs +19 -20
  178. package/_cjs/Channel/ChildExecutorDecision/api.cjs.map +1 -1
  179. package/_cjs/Channel/ChildExecutorDecision/definition.cjs +0 -5
  180. package/_cjs/Channel/ChildExecutorDecision/definition.cjs.map +1 -1
  181. package/_cjs/Channel/ChildExecutorDecision.cjs +0 -4
  182. package/_cjs/Channel/ChildExecutorDecision.cjs.map +1 -1
  183. package/_cjs/Channel/UpstreamPullRequest/api.cjs +15 -20
  184. package/_cjs/Channel/UpstreamPullRequest/api.cjs.map +1 -1
  185. package/_cjs/Channel/UpstreamPullRequest/definition.cjs +0 -6
  186. package/_cjs/Channel/UpstreamPullRequest/definition.cjs.map +1 -1
  187. package/_cjs/Channel/UpstreamPullRequest.cjs +0 -4
  188. package/_cjs/Channel/UpstreamPullRequest.cjs.map +1 -1
  189. package/_cjs/Channel/UpstreamPullStrategy/definition.cjs +0 -4
  190. package/_cjs/Channel/UpstreamPullStrategy/definition.cjs.map +1 -1
  191. package/_cjs/Channel/UpstreamPullStrategy.cjs +0 -2
  192. package/_cjs/Channel/UpstreamPullStrategy.cjs.map +1 -1
  193. package/_cjs/Channel/api/interruptWhen.cjs +14 -22
  194. package/_cjs/Channel/api/interruptWhen.cjs.map +1 -1
  195. package/_cjs/Channel/api/mapOutConcurrentIO.cjs +42 -0
  196. package/_cjs/Channel/api/mapOutConcurrentIO.cjs.map +1 -0
  197. package/_cjs/Channel/api/mergeAll.cjs +6 -8
  198. package/_cjs/Channel/api/mergeAll.cjs.map +1 -1
  199. package/_cjs/Channel/api/mergeAllUnboundedWith.cjs +6 -8
  200. package/_cjs/Channel/api/mergeAllUnboundedWith.cjs.map +1 -1
  201. package/_cjs/Channel/api/mergeAllWith.cjs +40 -71
  202. package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
  203. package/_cjs/Channel/api/mergeMap.cjs +6 -9
  204. package/_cjs/Channel/api/mergeMap.cjs.map +1 -1
  205. package/_cjs/Channel/api/mergeWith.cjs +35 -67
  206. package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
  207. package/_cjs/Channel/api/run.cjs +1 -7
  208. package/_cjs/Channel/api/run.cjs.map +1 -1
  209. package/_cjs/Channel/api/runCollect.cjs +0 -5
  210. package/_cjs/Channel/api/runCollect.cjs.map +1 -1
  211. package/_cjs/Channel/api/runDrain.cjs +0 -5
  212. package/_cjs/Channel/api/runDrain.cjs.map +1 -1
  213. package/_cjs/Channel/api/runScoped.cjs +6 -28
  214. package/_cjs/Channel/api/runScoped.cjs.map +1 -1
  215. package/_cjs/Channel/api/toPull.cjs +7 -29
  216. package/_cjs/Channel/api/toPull.cjs.map +1 -1
  217. package/_cjs/Channel/api/{zipC.cjs → zipConcurrent.cjs} +22 -30
  218. package/_cjs/Channel/api/zipConcurrent.cjs.map +1 -0
  219. package/_cjs/Channel/api.cjs +242 -367
  220. package/_cjs/Channel/api.cjs.map +1 -1
  221. package/_cjs/Channel/core-api.cjs +34 -48
  222. package/_cjs/Channel/core-api.cjs.map +1 -1
  223. package/_cjs/Channel/definition.cjs +20 -106
  224. package/_cjs/Channel/definition.cjs.map +1 -1
  225. package/_cjs/Channel/internal/ChannelExecutor.cjs +161 -371
  226. package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
  227. package/_cjs/Channel/internal/ChannelState.cjs +5 -37
  228. package/_cjs/Channel/internal/ChannelState.cjs.map +1 -1
  229. package/_cjs/Channel/internal/MergeDecision.cjs +4 -27
  230. package/_cjs/Channel/internal/MergeDecision.cjs.map +1 -1
  231. package/_cjs/Channel/internal/MergeState.cjs +3 -24
  232. package/_cjs/Channel/internal/MergeState.cjs.map +1 -1
  233. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +37 -131
  234. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
  235. package/_cjs/Channel.cjs +0 -6
  236. package/_cjs/Channel.cjs.map +1 -1
  237. package/_cjs/Clock/api.cjs +0 -7
  238. package/_cjs/Clock/api.cjs.map +1 -1
  239. package/_cjs/Clock/definition.cjs +0 -6
  240. package/_cjs/Clock/definition.cjs.map +1 -1
  241. package/_cjs/Clock/live.cjs +2 -12
  242. package/_cjs/Clock/live.cjs.map +1 -1
  243. package/_cjs/Clock.cjs +0 -6
  244. package/_cjs/Clock.cjs.map +1 -1
  245. package/_cjs/Console/api.cjs +0 -7
  246. package/_cjs/Console/api.cjs.map +1 -1
  247. package/_cjs/Console/definition.cjs +0 -6
  248. package/_cjs/Console/definition.cjs.map +1 -1
  249. package/_cjs/Console/live.cjs +0 -11
  250. package/_cjs/Console/live.cjs.map +1 -1
  251. package/_cjs/Console.cjs +0 -6
  252. package/_cjs/Console.cjs.map +1 -1
  253. package/_cjs/CountdownLatch.cjs +50 -0
  254. package/_cjs/CountdownLatch.cjs.map +1 -0
  255. package/_cjs/Differ/api.cjs +5 -28
  256. package/_cjs/Differ/api.cjs.map +1 -1
  257. package/_cjs/Differ/definition.cjs +0 -4
  258. package/_cjs/Differ/definition.cjs.map +1 -1
  259. package/_cjs/Fiber/FiberMessage.cjs +72 -0
  260. package/_cjs/Fiber/FiberMessage.cjs.map +1 -0
  261. package/_cjs/Fiber/FiberRuntime.cjs +735 -0
  262. package/_cjs/Fiber/FiberRuntime.cjs.map +1 -0
  263. package/_cjs/Fiber/api/await.cjs +0 -1
  264. package/_cjs/Fiber/api/await.cjs.map +1 -1
  265. package/_cjs/Fiber/api/awaitAll.cjs +2 -8
  266. package/_cjs/Fiber/api/awaitAll.cjs.map +1 -1
  267. package/_cjs/Fiber/api/children.cjs +0 -1
  268. package/_cjs/Fiber/api/children.cjs.map +1 -1
  269. package/_cjs/Fiber/api/collectAll.cjs +3 -25
  270. package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
  271. package/_cjs/Fiber/api/fromIO.cjs +1 -6
  272. package/_cjs/Fiber/api/fromIO.cjs.map +1 -1
  273. package/_cjs/Fiber/api/id.cjs +0 -1
  274. package/_cjs/Fiber/api/id.cjs.map +1 -1
  275. package/_cjs/Fiber/api/inheritRefs.cjs +1 -2
  276. package/_cjs/Fiber/api/inheritRefs.cjs.map +1 -1
  277. package/_cjs/Fiber/api/interrupt.cjs +3 -8
  278. package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
  279. package/_cjs/Fiber/api/interruptAll.cjs +3 -13
  280. package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
  281. package/_cjs/Fiber/api/interruptAs.cjs +15 -8
  282. package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
  283. package/_cjs/Fiber/api/interruptFork.cjs +2 -9
  284. package/_cjs/Fiber/api/interruptFork.cjs.map +1 -1
  285. package/_cjs/Fiber/api/join.cjs +3 -6
  286. package/_cjs/Fiber/api/join.cjs.map +1 -1
  287. package/_cjs/Fiber/api/joinAll.cjs +1 -7
  288. package/_cjs/Fiber/api/joinAll.cjs.map +1 -1
  289. package/_cjs/Fiber/api/location.cjs +1 -8
  290. package/_cjs/Fiber/api/location.cjs.map +1 -1
  291. package/_cjs/Fiber/api/mapFiber.cjs +6 -11
  292. package/_cjs/Fiber/api/mapFiber.cjs.map +1 -1
  293. package/_cjs/Fiber/api/mapIO.cjs +14 -27
  294. package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
  295. package/_cjs/Fiber/api/poll.cjs +0 -1
  296. package/_cjs/Fiber/api/poll.cjs.map +1 -1
  297. package/_cjs/Fiber/api/zipWith.cjs +7 -21
  298. package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
  299. package/_cjs/Fiber/constructors.cjs +0 -18
  300. package/_cjs/Fiber/constructors.cjs.map +1 -1
  301. package/_cjs/Fiber/definition.cjs +11 -14
  302. package/_cjs/Fiber/definition.cjs.map +1 -1
  303. package/_cjs/Fiber.cjs +15 -72
  304. package/_cjs/Fiber.cjs.map +1 -1
  305. package/_cjs/FiberDescriptor.cjs +1 -6
  306. package/_cjs/FiberDescriptor.cjs.map +1 -1
  307. package/_cjs/FiberRef/api/locallyScoped.cjs +6 -10
  308. package/_cjs/FiberRef/api/locallyScoped.cjs.map +1 -1
  309. package/_cjs/FiberRef/api/locallyScopedWith.cjs +5 -8
  310. package/_cjs/FiberRef/api/locallyScopedWith.cjs.map +1 -1
  311. package/_cjs/FiberRef/api.cjs +78 -97
  312. package/_cjs/FiberRef/api.cjs.map +1 -1
  313. package/_cjs/FiberRef/constructors.cjs +1 -11
  314. package/_cjs/FiberRef/constructors.cjs.map +1 -1
  315. package/_cjs/FiberRef/definition.cjs +5 -23
  316. package/_cjs/FiberRef/definition.cjs.map +1 -1
  317. package/_cjs/FiberRef/unsafe.cjs +20 -48
  318. package/_cjs/FiberRef/unsafe.cjs.map +1 -1
  319. package/_cjs/FiberRef.cjs +0 -12
  320. package/_cjs/FiberRef.cjs.map +1 -1
  321. package/_cjs/FiberRefs/api.cjs +74 -32
  322. package/_cjs/FiberRefs/api.cjs.map +1 -1
  323. package/_cjs/FiberRefs/definition.cjs +5 -17
  324. package/_cjs/FiberRefs/definition.cjs.map +1 -1
  325. package/_cjs/FiberRefs/join.cjs +51 -71
  326. package/_cjs/FiberRefs/join.cjs.map +1 -1
  327. package/_cjs/FiberRefs.cjs +0 -6
  328. package/_cjs/FiberRefs.cjs.map +1 -1
  329. package/_cjs/FiberScope/constructors.cjs +0 -4
  330. package/_cjs/FiberScope/constructors.cjs.map +1 -1
  331. package/_cjs/FiberScope/definition.cjs +15 -20
  332. package/_cjs/FiberScope/definition.cjs.map +1 -1
  333. package/_cjs/FiberScope.cjs +0 -4
  334. package/_cjs/FiberScope.cjs.map +1 -1
  335. package/_cjs/FiberStatus/constructors.cjs +5 -20
  336. package/_cjs/FiberStatus/constructors.cjs.map +1 -1
  337. package/_cjs/FiberStatus/definition.cjs +18 -77
  338. package/_cjs/FiberStatus/definition.cjs.map +1 -1
  339. package/_cjs/FiberStatus.cjs +0 -4
  340. package/_cjs/FiberStatus.cjs.map +1 -1
  341. package/_cjs/Future/api.cjs +99 -141
  342. package/_cjs/Future/api.cjs.map +1 -1
  343. package/_cjs/Future/constructors.cjs +1 -12
  344. package/_cjs/Future/constructors.cjs.map +1 -1
  345. package/_cjs/Future/definition.cjs +2 -15
  346. package/_cjs/Future/definition.cjs.map +1 -1
  347. package/_cjs/Future.cjs +0 -6
  348. package/_cjs/Future.cjs.map +1 -1
  349. package/_cjs/Hub/api.cjs +112 -172
  350. package/_cjs/Hub/api.cjs.map +1 -1
  351. package/_cjs/Hub/definition.cjs +14 -7
  352. package/_cjs/Hub/definition.cjs.map +1 -1
  353. package/_cjs/Hub/internal.cjs +30 -122
  354. package/_cjs/Hub/internal.cjs.map +1 -1
  355. package/_cjs/Hub.cjs +0 -4
  356. package/_cjs/Hub.cjs.map +1 -1
  357. package/_cjs/IO/api/acquireRelease.cjs +0 -4
  358. package/_cjs/IO/api/acquireRelease.cjs.map +1 -1
  359. package/_cjs/IO/api/acquireReleaseExit.cjs +1 -7
  360. package/_cjs/IO/api/acquireReleaseExit.cjs.map +1 -1
  361. package/_cjs/IO/api/acquireReleaseInterruptible.cjs +0 -4
  362. package/_cjs/IO/api/acquireReleaseInterruptible.cjs.map +1 -1
  363. package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs +2 -6
  364. package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs.map +1 -1
  365. package/_cjs/IO/api/addFinalizer.cjs +0 -4
  366. package/_cjs/IO/api/addFinalizer.cjs.map +1 -1
  367. package/_cjs/IO/api/addFinalizerExit.cjs +1 -8
  368. package/_cjs/IO/api/addFinalizerExit.cjs.map +1 -1
  369. package/_cjs/IO/api/asyncIO.cjs +8 -16
  370. package/_cjs/IO/api/asyncIO.cjs.map +1 -1
  371. package/_cjs/IO/api/asyncInterrupt.cjs +77 -0
  372. package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -0
  373. package/_cjs/IO/api/bracket.cjs +3 -7
  374. package/_cjs/IO/api/bracket.cjs.map +1 -1
  375. package/_cjs/IO/api/bracketExit.cjs +3 -10
  376. package/_cjs/IO/api/bracketExit.cjs.map +1 -1
  377. package/_cjs/IO/api/clockWith.cjs +2 -14
  378. package/_cjs/IO/api/clockWith.cjs.map +1 -1
  379. package/_cjs/IO/api/concurrency.cjs +9 -22
  380. package/_cjs/IO/api/concurrency.cjs.map +1 -1
  381. package/_cjs/IO/api/concurrentFinalizers.cjs +1 -8
  382. package/_cjs/IO/api/concurrentFinalizers.cjs.map +1 -1
  383. package/_cjs/IO/api/consoleWith.cjs +2 -14
  384. package/_cjs/IO/api/consoleWith.cjs.map +1 -1
  385. package/_cjs/IO/api/core-scope.cjs +60 -126
  386. package/_cjs/IO/api/core-scope.cjs.map +1 -1
  387. package/_cjs/{Fiber/api/evalOn.cjs → IO/api/delay.cjs} +10 -18
  388. package/_cjs/IO/api/delay.cjs.map +1 -0
  389. package/_cjs/IO/api/ensuringChildren.cjs +7 -10
  390. package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
  391. package/_cjs/IO/api/environment.cjs +35 -64
  392. package/_cjs/IO/api/environment.cjs.map +1 -1
  393. package/_cjs/IO/api/{foreachC.cjs → foreachConcurrent.cjs} +36 -73
  394. package/_cjs/IO/api/foreachConcurrent.cjs.map +1 -0
  395. package/_cjs/IO/api/foreachExec.cjs +4 -11
  396. package/_cjs/IO/api/foreachExec.cjs.map +1 -1
  397. package/_cjs/IO/api/fork.cjs +75 -0
  398. package/_cjs/IO/api/fork.cjs.map +1 -0
  399. package/_cjs/IO/api/forkAll.cjs +3 -7
  400. package/_cjs/IO/api/forkAll.cjs.map +1 -1
  401. package/_cjs/IO/api/forkIn.cjs +8 -14
  402. package/_cjs/IO/api/forkIn.cjs.map +1 -1
  403. package/_cjs/IO/api/forkScoped.cjs +1 -9
  404. package/_cjs/IO/api/forkScoped.cjs.map +1 -1
  405. package/_cjs/IO/api/fulfill.cjs +8 -12
  406. package/_cjs/IO/api/fulfill.cjs.map +1 -1
  407. package/_cjs/IO/api/interrupt.cjs +51 -77
  408. package/_cjs/IO/api/interrupt.cjs.map +1 -1
  409. package/_cjs/IO/api/memoize.cjs +1 -8
  410. package/_cjs/IO/api/memoize.cjs.map +1 -1
  411. package/_cjs/IO/api/onExit.cjs +6 -9
  412. package/_cjs/IO/api/onExit.cjs.map +1 -1
  413. package/_cjs/IO/api/onTermination.cjs +5 -11
  414. package/_cjs/IO/api/onTermination.cjs.map +1 -1
  415. package/_cjs/IO/api/once.cjs +1 -7
  416. package/_cjs/IO/api/once.cjs.map +1 -1
  417. package/_cjs/IO/api/provideLayer.cjs +6 -12
  418. package/_cjs/IO/api/provideLayer.cjs.map +1 -1
  419. package/_cjs/IO/api/provideSomeLayer.cjs +5 -20
  420. package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
  421. package/_cjs/IO/api/race.cjs +8 -17
  422. package/_cjs/IO/api/race.cjs.map +1 -1
  423. package/_cjs/IO/api/raceFirst.cjs +6 -9
  424. package/_cjs/IO/api/raceFirst.cjs.map +1 -1
  425. package/_cjs/IO/api/randomWith.cjs +1 -13
  426. package/_cjs/IO/api/randomWith.cjs.map +1 -1
  427. package/_cjs/IO/api/repeat.cjs +12 -27
  428. package/_cjs/IO/api/repeat.cjs.map +1 -1
  429. package/_cjs/IO/api/retry.cjs +14 -29
  430. package/_cjs/IO/api/retry.cjs.map +1 -1
  431. package/_cjs/IO/api/schedule.cjs +15 -21
  432. package/_cjs/IO/api/schedule.cjs.map +1 -1
  433. package/_cjs/IO/api/scope.cjs +0 -6
  434. package/_cjs/IO/api/scope.cjs.map +1 -1
  435. package/_cjs/IO/api/scopeWith.cjs +0 -5
  436. package/_cjs/IO/api/scopeWith.cjs.map +1 -1
  437. package/_cjs/IO/api/scoped.cjs +6 -15
  438. package/_cjs/IO/api/scoped.cjs.map +1 -1
  439. package/_cjs/IO/api/sequenceT.cjs +1 -7
  440. package/_cjs/IO/api/sequenceT.cjs.map +1 -1
  441. package/_cjs/IO/api/sleep.cjs +0 -4
  442. package/_cjs/IO/api/sleep.cjs.map +1 -1
  443. package/_cjs/IO/api/stateful.cjs +0 -6
  444. package/_cjs/IO/api/stateful.cjs.map +1 -1
  445. package/_cjs/IO/api/supervised.cjs +6 -14
  446. package/_cjs/IO/api/supervised.cjs.map +1 -1
  447. package/_cjs/IO/api/timeout.cjs +10 -18
  448. package/_cjs/IO/api/timeout.cjs.map +1 -1
  449. package/_cjs/IO/api/withChildren.cjs +2 -10
  450. package/_cjs/IO/api/withChildren.cjs.map +1 -1
  451. package/_cjs/IO/api/withEarlyRelease.cjs +1 -8
  452. package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
  453. package/_cjs/IO/api/withFinalizer.cjs +6 -8
  454. package/_cjs/IO/api/withFinalizer.cjs.map +1 -1
  455. package/_cjs/IO/api/withFinalizerExit.cjs +6 -8
  456. package/_cjs/IO/api/withFinalizerExit.cjs.map +1 -1
  457. package/_cjs/IO/api/zipConcurrent.cjs +51 -0
  458. package/_cjs/IO/api/zipConcurrent.cjs.map +1 -0
  459. package/_cjs/IO/api.cjs +669 -1057
  460. package/_cjs/IO/api.cjs.map +1 -1
  461. package/_cjs/IO/definition.cjs +121 -213
  462. package/_cjs/IO/definition.cjs.map +1 -1
  463. package/_cjs/IO/runtime.cjs +51 -119
  464. package/_cjs/IO/runtime.cjs.map +1 -1
  465. package/_cjs/IO.cjs +41 -123
  466. package/_cjs/IO.cjs.map +1 -1
  467. package/_cjs/IOEnv/definition.cjs +1 -12
  468. package/_cjs/IOEnv/definition.cjs.map +1 -1
  469. package/_cjs/IOEnv/live.cjs +1 -12
  470. package/_cjs/IOEnv/live.cjs.map +1 -1
  471. package/_cjs/IOEnv/services.cjs +0 -5
  472. package/_cjs/IOEnv/services.cjs.map +1 -1
  473. package/_cjs/IOEnv.cjs +0 -6
  474. package/_cjs/IOEnv.cjs.map +1 -1
  475. package/_cjs/InterruptStatus/constructors.cjs +0 -5
  476. package/_cjs/InterruptStatus/constructors.cjs.map +1 -1
  477. package/_cjs/InterruptStatus/definition.cjs +0 -5
  478. package/_cjs/InterruptStatus/definition.cjs.map +1 -1
  479. package/_cjs/InterruptStatus.cjs +0 -4
  480. package/_cjs/InterruptStatus.cjs.map +1 -1
  481. package/_cjs/Layer/MemoMap.cjs +54 -111
  482. package/_cjs/Layer/MemoMap.cjs.map +1 -1
  483. package/_cjs/Layer/api.cjs +112 -184
  484. package/_cjs/Layer/api.cjs.map +1 -1
  485. package/_cjs/Layer/definition.cjs +9 -51
  486. package/_cjs/Layer/definition.cjs.map +1 -1
  487. package/_cjs/Layer.cjs +0 -6
  488. package/_cjs/Layer.cjs.map +1 -1
  489. package/_cjs/LogLevel.cjs +24 -36
  490. package/_cjs/LogLevel.cjs.map +1 -1
  491. package/_cjs/LogSpan.cjs +16 -21
  492. package/_cjs/LogSpan.cjs.map +1 -1
  493. package/_cjs/Logger/api.cjs +18 -21
  494. package/_cjs/Logger/api.cjs.map +1 -1
  495. package/_cjs/Logger/constructors.cjs +3 -18
  496. package/_cjs/Logger/constructors.cjs.map +1 -1
  497. package/_cjs/Logger/definition.cjs +0 -3
  498. package/_cjs/Logger/definition.cjs.map +1 -1
  499. package/_cjs/Logger.cjs +0 -6
  500. package/_cjs/Logger.cjs.map +1 -1
  501. package/_cjs/Push/api.cjs +474 -0
  502. package/_cjs/Push/api.cjs.map +1 -0
  503. package/_cjs/Push/definition.cjs +43 -0
  504. package/_cjs/Push/definition.cjs.map +1 -0
  505. package/_cjs/Push/internal.cjs +40 -0
  506. package/_cjs/Push/internal.cjs.map +1 -0
  507. package/_cjs/Push.cjs +39 -0
  508. package/_cjs/Push.cjs.map +1 -0
  509. package/_cjs/Queue/api/dimapIO.cjs +109 -55
  510. package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
  511. package/_cjs/Queue/api/filterInputIO.cjs +61 -36
  512. package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
  513. package/_cjs/Queue/api/filterOutputIO.cjs +72 -44
  514. package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
  515. package/_cjs/Queue/api/operations.cjs +21 -35
  516. package/_cjs/Queue/api/operations.cjs.map +1 -1
  517. package/_cjs/Queue/api/poll.cjs +1 -7
  518. package/_cjs/Queue/api/poll.cjs.map +1 -1
  519. package/_cjs/Queue/api/takeBetween.cjs +24 -34
  520. package/_cjs/Queue/api/takeBetween.cjs.map +1 -1
  521. package/_cjs/Queue/api/zipWithIO.cjs +33 -48
  522. package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
  523. package/_cjs/Queue/api.cjs +0 -14
  524. package/_cjs/Queue/api.cjs.map +1 -1
  525. package/_cjs/Queue/constructors.cjs +4 -17
  526. package/_cjs/Queue/constructors.cjs.map +1 -1
  527. package/_cjs/Queue/definition.cjs +18 -11
  528. package/_cjs/Queue/definition.cjs.map +1 -1
  529. package/_cjs/Queue/internal.cjs +63 -117
  530. package/_cjs/Queue/internal.cjs.map +1 -1
  531. package/_cjs/Queue/strategy.cjs +27 -68
  532. package/_cjs/Queue/strategy.cjs.map +1 -1
  533. package/_cjs/Queue.cjs +0 -10
  534. package/_cjs/Queue.cjs.map +1 -1
  535. package/_cjs/Random/api.cjs +0 -17
  536. package/_cjs/Random/api.cjs.map +1 -1
  537. package/_cjs/Random/definition.cjs +0 -7
  538. package/_cjs/Random/definition.cjs.map +1 -1
  539. package/_cjs/Random/live.cjs +2 -16
  540. package/_cjs/Random/live.cjs.map +1 -1
  541. package/_cjs/Random.cjs +0 -6
  542. package/_cjs/Random.cjs.map +1 -1
  543. package/_cjs/Ref/Atomic.cjs +54 -26
  544. package/_cjs/Ref/Atomic.cjs.map +1 -1
  545. package/_cjs/Ref/Derived.cjs +11 -20
  546. package/_cjs/Ref/Derived.cjs.map +1 -1
  547. package/_cjs/Ref/DerivedAll.cjs +17 -23
  548. package/_cjs/Ref/DerivedAll.cjs.map +1 -1
  549. package/_cjs/Ref/Synchronized/api.cjs +99 -103
  550. package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
  551. package/_cjs/Ref/Synchronized/constructors.cjs +1 -11
  552. package/_cjs/Ref/Synchronized/constructors.cjs.map +1 -1
  553. package/_cjs/Ref/Synchronized/definition.cjs +16 -39
  554. package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
  555. package/_cjs/{FiberState.cjs → Ref/Synchronized.cjs} +4 -10
  556. package/_cjs/Ref/Synchronized.cjs.map +1 -0
  557. package/_cjs/Ref/api/collect.cjs +7 -12
  558. package/_cjs/Ref/api/collect.cjs.map +1 -1
  559. package/_cjs/Ref/api/dimap.cjs +55 -60
  560. package/_cjs/Ref/api/dimap.cjs.map +1 -1
  561. package/_cjs/Ref/api/filter.cjs +14 -19
  562. package/_cjs/Ref/api/filter.cjs.map +1 -1
  563. package/_cjs/Ref/api/get.cjs +0 -2
  564. package/_cjs/Ref/api/get.cjs.map +1 -1
  565. package/_cjs/Ref/api/match.cjs +8 -10
  566. package/_cjs/Ref/api/match.cjs.map +1 -1
  567. package/_cjs/Ref/api/matchAll.cjs +6 -8
  568. package/_cjs/Ref/api/matchAll.cjs.map +1 -1
  569. package/_cjs/Ref/api/modify.cjs +73 -171
  570. package/_cjs/Ref/api/modify.cjs.map +1 -1
  571. package/_cjs/Ref/api/set.cjs +8 -8
  572. package/_cjs/Ref/api/set.cjs.map +1 -1
  573. package/_cjs/Ref/api.cjs +2 -26
  574. package/_cjs/Ref/api.cjs.map +1 -1
  575. package/_cjs/Ref/constructors.cjs +2 -9
  576. package/_cjs/Ref/constructors.cjs.map +1 -1
  577. package/_cjs/Ref/definition.cjs +11 -7
  578. package/_cjs/Ref/definition.cjs.map +1 -1
  579. package/_cjs/Ref/symbols.cjs +37 -0
  580. package/_cjs/Ref/symbols.cjs.map +1 -0
  581. package/_cjs/Ref.cjs +22 -18
  582. package/_cjs/Ref.cjs.map +1 -1
  583. package/_cjs/RefSubject/Atomic.cjs +109 -0
  584. package/_cjs/RefSubject/Atomic.cjs.map +1 -0
  585. package/_cjs/{FiberState/constructors.cjs → RefSubject/Synchronized/api.cjs} +13 -34
  586. package/_cjs/RefSubject/Synchronized/api.cjs.map +1 -0
  587. package/_cjs/RefSubject/Synchronized/definition.cjs +56 -0
  588. package/_cjs/RefSubject/Synchronized/definition.cjs.map +1 -0
  589. package/_cjs/RefSubject/api.cjs +245 -0
  590. package/_cjs/RefSubject/api.cjs.map +1 -0
  591. package/_cjs/{FiberState/api.cjs → RefSubject/definition.cjs} +12 -16
  592. package/_cjs/RefSubject/definition.cjs.map +1 -0
  593. package/_cjs/RefSubject.cjs +39 -0
  594. package/_cjs/RefSubject.cjs.map +1 -0
  595. package/_cjs/Reloadable/api.cjs +3 -18
  596. package/_cjs/Reloadable/api.cjs.map +1 -1
  597. package/_cjs/Reloadable/constructors.cjs +14 -41
  598. package/_cjs/Reloadable/constructors.cjs.map +1 -1
  599. package/_cjs/Reloadable/definition.cjs +0 -14
  600. package/_cjs/Reloadable/definition.cjs.map +1 -1
  601. package/_cjs/Reloadable.cjs +0 -6
  602. package/_cjs/Reloadable.cjs.map +1 -1
  603. package/_cjs/RuntimeConfig.cjs +1 -44
  604. package/_cjs/RuntimeConfig.cjs.map +1 -1
  605. package/_cjs/RuntimeFlag.cjs +6 -0
  606. package/_cjs/RuntimeFlag.cjs.map +1 -0
  607. package/_cjs/RuntimeFlags/Patch.cjs +76 -0
  608. package/_cjs/RuntimeFlags/Patch.cjs.map +1 -0
  609. package/_cjs/RuntimeFlags/RuntimeFlags.cjs +107 -0
  610. package/_cjs/RuntimeFlags/RuntimeFlags.cjs.map +1 -0
  611. package/_cjs/RuntimeFlags.cjs +28 -0
  612. package/_cjs/RuntimeFlags.cjs.map +1 -0
  613. package/_cjs/STM/api/core-api.cjs +36 -42
  614. package/_cjs/STM/api/core-api.cjs.map +1 -1
  615. package/_cjs/STM/api/core-constructors.cjs +0 -15
  616. package/_cjs/STM/api/core-constructors.cjs.map +1 -1
  617. package/_cjs/STM/api.cjs +218 -302
  618. package/_cjs/STM/api.cjs.map +1 -1
  619. package/_cjs/STM/definition.cjs +9 -72
  620. package/_cjs/STM/definition.cjs.map +1 -1
  621. package/_cjs/STM/driver.cjs +12 -65
  622. package/_cjs/STM/driver.cjs.map +1 -1
  623. package/_cjs/STM/internal/CommitState.cjs +5 -32
  624. package/_cjs/STM/internal/CommitState.cjs.map +1 -1
  625. package/_cjs/STM/internal/Entry.cjs +0 -20
  626. package/_cjs/STM/internal/Entry.cjs.map +1 -1
  627. package/_cjs/STM/internal/Journal.cjs +50 -142
  628. package/_cjs/STM/internal/Journal.cjs.map +1 -1
  629. package/_cjs/STM/internal/TryCommit.cjs +2 -12
  630. package/_cjs/STM/internal/TryCommit.cjs.map +1 -1
  631. package/_cjs/STM/internal/Versioned.cjs +0 -3
  632. package/_cjs/STM/internal/Versioned.cjs.map +1 -1
  633. package/_cjs/STM.cjs +0 -10
  634. package/_cjs/STM.cjs.map +1 -1
  635. package/_cjs/Schedule/Decision.cjs +13 -37
  636. package/_cjs/Schedule/Decision.cjs.map +1 -1
  637. package/_cjs/Schedule/Driver.cjs +0 -5
  638. package/_cjs/Schedule/Driver.cjs.map +1 -1
  639. package/_cjs/Schedule/api/driver.cjs +6 -22
  640. package/_cjs/Schedule/api/driver.cjs.map +1 -1
  641. package/_cjs/Schedule/api.cjs +440 -492
  642. package/_cjs/Schedule/api.cjs.map +1 -1
  643. package/_cjs/Schedule/definition.cjs +0 -2
  644. package/_cjs/Schedule/definition.cjs.map +1 -1
  645. package/_cjs/Schedule.cjs +0 -8
  646. package/_cjs/Schedule.cjs.map +1 -1
  647. package/_cjs/Scope/Finalizer/definition.cjs +0 -6
  648. package/_cjs/Scope/Finalizer/definition.cjs.map +1 -1
  649. package/_cjs/Scope/Finalizer.cjs +0 -2
  650. package/_cjs/Scope/Finalizer.cjs.map +1 -1
  651. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +13 -24
  652. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
  653. package/_cjs/Scope/ReleaseMap/api.cjs +65 -79
  654. package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
  655. package/_cjs/Scope/ReleaseMap/constructors.cjs +1 -12
  656. package/_cjs/Scope/ReleaseMap/constructors.cjs.map +1 -1
  657. package/_cjs/Scope/ReleaseMap/definition.cjs +0 -9
  658. package/_cjs/Scope/ReleaseMap/definition.cjs.map +1 -1
  659. package/_cjs/Scope/ReleaseMap.cjs +0 -6
  660. package/_cjs/Scope/ReleaseMap.cjs.map +1 -1
  661. package/_cjs/Scope/api.cjs +34 -69
  662. package/_cjs/Scope/api.cjs.map +1 -1
  663. package/_cjs/Scope/definition.cjs +0 -12
  664. package/_cjs/Scope/definition.cjs.map +1 -1
  665. package/_cjs/Scope.cjs +0 -4
  666. package/_cjs/Scope.cjs.map +1 -1
  667. package/_cjs/ScopedRef/api.cjs +7 -26
  668. package/_cjs/ScopedRef/api.cjs.map +1 -1
  669. package/_cjs/ScopedRef/definition.cjs +1 -5
  670. package/_cjs/ScopedRef/definition.cjs.map +1 -1
  671. package/_cjs/ScopedRef.cjs +0 -4
  672. package/_cjs/ScopedRef.cjs.map +1 -1
  673. package/_cjs/Sink/api.cjs +292 -484
  674. package/_cjs/Sink/api.cjs.map +1 -1
  675. package/_cjs/Sink/definition.cjs +0 -3
  676. package/_cjs/Sink/definition.cjs.map +1 -1
  677. package/_cjs/Sink.cjs +0 -4
  678. package/_cjs/Sink.cjs.map +1 -1
  679. package/_cjs/State/api.cjs +18 -32
  680. package/_cjs/State/api.cjs.map +1 -1
  681. package/_cjs/State/definition.cjs +2 -7
  682. package/_cjs/State/definition.cjs.map +1 -1
  683. package/_cjs/State/internal.cjs +0 -3
  684. package/_cjs/State/internal.cjs.map +1 -1
  685. package/_cjs/State.cjs +0 -4
  686. package/_cjs/State.cjs.map +1 -1
  687. package/_cjs/Stream/api/zipAllWith.cjs +16 -43
  688. package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
  689. package/_cjs/Stream/api/zipWith.cjs +6 -9
  690. package/_cjs/Stream/api/zipWith.cjs.map +1 -1
  691. package/_cjs/Stream/api/zipWithChunks.cjs +14 -32
  692. package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
  693. package/_cjs/Stream/api.cjs +961 -1205
  694. package/_cjs/Stream/api.cjs.map +1 -1
  695. package/_cjs/Stream/definition.cjs +0 -8
  696. package/_cjs/Stream/definition.cjs.map +1 -1
  697. package/_cjs/Stream/internal/DebounceState.cjs +16 -44
  698. package/_cjs/Stream/internal/DebounceState.cjs.map +1 -1
  699. package/_cjs/Stream/internal/Handoff.cjs +34 -80
  700. package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
  701. package/_cjs/Stream/internal/Pull.cjs +2 -25
  702. package/_cjs/Stream/internal/Pull.cjs.map +1 -1
  703. package/_cjs/Stream/internal/SinkEndReason.cjs +13 -28
  704. package/_cjs/Stream/internal/SinkEndReason.cjs.map +1 -1
  705. package/_cjs/Stream/internal/Take.cjs +32 -75
  706. package/_cjs/Stream/internal/Take.cjs.map +1 -1
  707. package/_cjs/Stream/internal/util.cjs +3 -13
  708. package/_cjs/Stream/internal/util.cjs.map +1 -1
  709. package/_cjs/Stream.cjs +0 -4
  710. package/_cjs/Stream.cjs.map +1 -1
  711. package/_cjs/{FiberState/definition.cjs → Subject/Atomic.cjs} +21 -36
  712. package/_cjs/Subject/Atomic.cjs.map +1 -0
  713. package/_cjs/{IO/api/withRuntimeConfig.cjs → Subject/api.cjs} +17 -14
  714. package/_cjs/Subject/api.cjs.map +1 -0
  715. package/_cjs/Subject/definition.cjs +11 -0
  716. package/_cjs/Subject/definition.cjs.map +1 -0
  717. package/_cjs/Subject.cjs +39 -0
  718. package/_cjs/Subject.cjs.map +1 -0
  719. package/_cjs/SubscriptionRef.cjs +54 -0
  720. package/_cjs/SubscriptionRef.cjs.map +1 -0
  721. package/_cjs/Supervisor/api.cjs +24 -37
  722. package/_cjs/Supervisor/api.cjs.map +1 -1
  723. package/_cjs/Supervisor/constructors.cjs +2 -26
  724. package/_cjs/Supervisor/constructors.cjs.map +1 -1
  725. package/_cjs/Supervisor/definition.cjs +6 -44
  726. package/_cjs/Supervisor/definition.cjs.map +1 -1
  727. package/_cjs/Supervisor.cjs +0 -6
  728. package/_cjs/Supervisor.cjs.map +1 -1
  729. package/_cjs/SupervisorPatch.cjs +25 -75
  730. package/_cjs/SupervisorPatch.cjs.map +1 -1
  731. package/_cjs/TExit/constructors.cjs +0 -12
  732. package/_cjs/TExit/constructors.cjs.map +1 -1
  733. package/_cjs/TExit/definition.cjs +14 -76
  734. package/_cjs/TExit/definition.cjs.map +1 -1
  735. package/_cjs/TExit.cjs +0 -4
  736. package/_cjs/TExit.cjs.map +1 -1
  737. package/_cjs/TFuture/api.cjs +21 -37
  738. package/_cjs/TFuture/api.cjs.map +1 -1
  739. package/_cjs/TFuture/constructors.cjs +1 -13
  740. package/_cjs/TFuture/constructors.cjs.map +1 -1
  741. package/_cjs/TFuture/definition.cjs +0 -4
  742. package/_cjs/TFuture/definition.cjs.map +1 -1
  743. package/_cjs/TFuture.cjs +0 -6
  744. package/_cjs/TFuture.cjs.map +1 -1
  745. package/_cjs/TReentrantLock/api.cjs +41 -111
  746. package/_cjs/TReentrantLock/api.cjs.map +1 -1
  747. package/_cjs/TReentrantLock/definition.cjs +7 -38
  748. package/_cjs/TReentrantLock/definition.cjs.map +1 -1
  749. package/_cjs/TReentrantLock.cjs +0 -4
  750. package/_cjs/TReentrantLock.cjs.map +1 -1
  751. package/_cjs/TRef/api.cjs +95 -296
  752. package/_cjs/TRef/api.cjs.map +1 -1
  753. package/_cjs/TRef/constructors.cjs +0 -19
  754. package/_cjs/TRef/constructors.cjs.map +1 -1
  755. package/_cjs/TRef/definition.cjs +84 -34
  756. package/_cjs/TRef/definition.cjs.map +1 -1
  757. package/_cjs/TRef/symbols.cjs +27 -0
  758. package/_cjs/TRef/symbols.cjs.map +1 -0
  759. package/_cjs/TRef.cjs +11 -6
  760. package/_cjs/TRef.cjs.map +1 -1
  761. package/_cjs/TSemaphore/api.cjs +30 -49
  762. package/_cjs/TSemaphore/api.cjs.map +1 -1
  763. package/_cjs/TSemaphore/constructors.cjs +13 -11
  764. package/_cjs/TSemaphore/constructors.cjs.map +1 -1
  765. package/_cjs/TSemaphore/definition.cjs +0 -4
  766. package/_cjs/TSemaphore/definition.cjs.map +1 -1
  767. package/_cjs/TSemaphore.cjs +0 -6
  768. package/_cjs/TSemaphore.cjs.map +1 -1
  769. package/_cjs/TxnId.cjs +0 -3
  770. package/_cjs/TxnId.cjs.map +1 -1
  771. package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +19 -24
  772. package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -1
  773. package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +19 -24
  774. package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -1
  775. package/_cjs/collection/immutable/Conc/filterIO.cjs +14 -19
  776. package/_cjs/collection/immutable/Conc/filterIO.cjs.map +1 -1
  777. package/_cjs/collection/immutable/Conc/findIO.cjs +18 -28
  778. package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
  779. package/_cjs/collection/immutable/Conc/mapIO.cjs +11 -14
  780. package/_cjs/collection/immutable/Conc/mapIO.cjs.map +1 -1
  781. package/_cjs/collection/immutable/Conc/takeWhileIO.cjs +29 -36
  782. package/_cjs/collection/immutable/Conc/takeWhileIO.cjs.map +1 -1
  783. package/_cjs/collection/immutable/Conc.cjs +0 -12
  784. package/_cjs/collection/immutable/Conc.cjs.map +1 -1
  785. package/_cjs/data/Exit/foreachIO.cjs +6 -10
  786. package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
  787. package/_cjs/internal/HashedPair.cjs +4 -15
  788. package/_cjs/internal/HashedPair.cjs.map +1 -1
  789. package/_cjs/internal/Hub.cjs +13 -175
  790. package/_cjs/internal/Hub.cjs.map +1 -1
  791. package/_cjs/internal/IsFatal.cjs +22 -62
  792. package/_cjs/internal/IsFatal.cjs.map +1 -1
  793. package/_cjs/internal/MutableQueue.cjs +11 -77
  794. package/_cjs/internal/MutableQueue.cjs.map +1 -1
  795. package/_cjs/internal/Scheduler.cjs +0 -18
  796. package/_cjs/internal/Scheduler.cjs.map +1 -1
  797. package/_cjs/internal/StackTraceBuilder.cjs +0 -9
  798. package/_cjs/internal/StackTraceBuilder.cjs.map +1 -1
  799. package/_mjs/Cached/api.mjs +6 -13
  800. package/_mjs/Cached/api.mjs.map +1 -1
  801. package/_mjs/Cached/definition.mjs +2 -4
  802. package/_mjs/Cached/definition.mjs.map +1 -1
  803. package/_mjs/Cached/internal.mjs +0 -1
  804. package/_mjs/Cached/internal.mjs.map +1 -1
  805. package/_mjs/Cached.mjs.map +1 -1
  806. package/_mjs/CancellerState.mjs +6 -15
  807. package/_mjs/CancellerState.mjs.map +1 -1
  808. package/_mjs/Channel/ChildExecutorDecision/api.mjs +18 -18
  809. package/_mjs/Channel/ChildExecutorDecision/api.mjs.map +1 -1
  810. package/_mjs/Channel/ChildExecutorDecision/definition.mjs +0 -2
  811. package/_mjs/Channel/ChildExecutorDecision/definition.mjs.map +1 -1
  812. package/_mjs/Channel/ChildExecutorDecision.mjs.map +1 -1
  813. package/_mjs/Channel/UpstreamPullRequest/api.mjs +14 -16
  814. package/_mjs/Channel/UpstreamPullRequest/api.mjs.map +1 -1
  815. package/_mjs/Channel/UpstreamPullRequest/definition.mjs +0 -2
  816. package/_mjs/Channel/UpstreamPullRequest/definition.mjs.map +1 -1
  817. package/_mjs/Channel/UpstreamPullRequest.mjs.map +1 -1
  818. package/_mjs/Channel/UpstreamPullStrategy/definition.mjs +0 -1
  819. package/_mjs/Channel/UpstreamPullStrategy/definition.mjs.map +1 -1
  820. package/_mjs/Channel/UpstreamPullStrategy.mjs.map +1 -1
  821. package/_mjs/Channel/api/interruptWhen.mjs +11 -10
  822. package/_mjs/Channel/api/interruptWhen.mjs.map +1 -1
  823. package/_mjs/Channel/api/mapOutConcurrentIO.mjs +34 -0
  824. package/_mjs/Channel/api/mapOutConcurrentIO.mjs.map +1 -0
  825. package/_mjs/Channel/api/mergeAll.mjs +5 -4
  826. package/_mjs/Channel/api/mergeAll.mjs.map +1 -1
  827. package/_mjs/Channel/api/mergeAllUnboundedWith.mjs +5 -4
  828. package/_mjs/Channel/api/mergeAllUnboundedWith.mjs.map +1 -1
  829. package/_mjs/Channel/api/mergeAllWith.mjs +39 -39
  830. package/_mjs/Channel/api/mergeAllWith.mjs.map +1 -1
  831. package/_mjs/Channel/api/mergeMap.mjs +5 -4
  832. package/_mjs/Channel/api/mergeMap.mjs.map +1 -1
  833. package/_mjs/Channel/api/mergeWith.mjs +34 -50
  834. package/_mjs/Channel/api/mergeWith.mjs.map +1 -1
  835. package/_mjs/Channel/api/run.mjs +1 -2
  836. package/_mjs/Channel/api/run.mjs.map +1 -1
  837. package/_mjs/Channel/api/runCollect.mjs +0 -1
  838. package/_mjs/Channel/api/runCollect.mjs.map +1 -1
  839. package/_mjs/Channel/api/runDrain.mjs +0 -1
  840. package/_mjs/Channel/api/runDrain.mjs.map +1 -1
  841. package/_mjs/Channel/api/runScoped.mjs +6 -21
  842. package/_mjs/Channel/api/runScoped.mjs.map +1 -1
  843. package/_mjs/Channel/api/toPull.mjs +7 -20
  844. package/_mjs/Channel/api/toPull.mjs.map +1 -1
  845. package/_mjs/Channel/api/zipConcurrent.mjs +32 -0
  846. package/_mjs/Channel/api/zipConcurrent.mjs.map +1 -0
  847. package/_mjs/Channel/api.mjs +201 -267
  848. package/_mjs/Channel/api.mjs.map +1 -1
  849. package/_mjs/Channel/core-api.mjs +28 -35
  850. package/_mjs/Channel/core-api.mjs.map +1 -1
  851. package/_mjs/Channel/definition.mjs +32 -67
  852. package/_mjs/Channel/definition.mjs.map +1 -1
  853. package/_mjs/Channel/internal/ChannelExecutor.mjs +161 -340
  854. package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
  855. package/_mjs/Channel/internal/ChannelState.mjs +5 -20
  856. package/_mjs/Channel/internal/ChannelState.mjs.map +1 -1
  857. package/_mjs/Channel/internal/MergeDecision.mjs +5 -16
  858. package/_mjs/Channel/internal/MergeDecision.mjs.map +1 -1
  859. package/_mjs/Channel/internal/MergeState.mjs +6 -15
  860. package/_mjs/Channel/internal/MergeState.mjs.map +1 -1
  861. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +40 -103
  862. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
  863. package/_mjs/Channel.mjs.map +1 -1
  864. package/_mjs/Clock/api.mjs +0 -2
  865. package/_mjs/Clock/api.mjs.map +1 -1
  866. package/_mjs/Clock/definition.mjs +0 -2
  867. package/_mjs/Clock/definition.mjs.map +1 -1
  868. package/_mjs/Clock/live.mjs +2 -6
  869. package/_mjs/Clock/live.mjs.map +1 -1
  870. package/_mjs/Clock.mjs.map +1 -1
  871. package/_mjs/Console/api.mjs +0 -2
  872. package/_mjs/Console/api.mjs.map +1 -1
  873. package/_mjs/Console/definition.mjs +0 -2
  874. package/_mjs/Console/definition.mjs.map +1 -1
  875. package/_mjs/Console/live.mjs +0 -4
  876. package/_mjs/Console/live.mjs.map +1 -1
  877. package/_mjs/Console.mjs.map +1 -1
  878. package/_mjs/CountdownLatch.mjs +39 -0
  879. package/_mjs/CountdownLatch.mjs.map +1 -0
  880. package/_mjs/Differ/api.mjs +5 -20
  881. package/_mjs/Differ/api.mjs.map +1 -1
  882. package/_mjs/Differ/definition.mjs +0 -2
  883. package/_mjs/Differ/definition.mjs.map +1 -1
  884. package/_mjs/Fiber/FiberMessage.mjs +56 -0
  885. package/_mjs/Fiber/FiberMessage.mjs.map +1 -0
  886. package/_mjs/Fiber/FiberRuntime.mjs +728 -0
  887. package/_mjs/Fiber/FiberRuntime.mjs.map +1 -0
  888. package/_mjs/Fiber/api/await.mjs.map +1 -1
  889. package/_mjs/Fiber/api/awaitAll.mjs +2 -3
  890. package/_mjs/Fiber/api/awaitAll.mjs.map +1 -1
  891. package/_mjs/Fiber/api/children.mjs.map +1 -1
  892. package/_mjs/Fiber/api/collectAll.mjs +3 -4
  893. package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
  894. package/_mjs/Fiber/api/fromIO.mjs +1 -2
  895. package/_mjs/Fiber/api/fromIO.mjs.map +1 -1
  896. package/_mjs/Fiber/api/id.mjs.map +1 -1
  897. package/_mjs/Fiber/api/inheritRefs.mjs +1 -1
  898. package/_mjs/Fiber/api/inheritRefs.mjs.map +1 -1
  899. package/_mjs/Fiber/api/interrupt.mjs +3 -4
  900. package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
  901. package/_mjs/Fiber/api/interruptAll.mjs +3 -6
  902. package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
  903. package/_mjs/Fiber/api/interruptAs.mjs +13 -5
  904. package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
  905. package/_mjs/Fiber/api/interruptFork.mjs +2 -5
  906. package/_mjs/Fiber/api/interruptFork.mjs.map +1 -1
  907. package/_mjs/Fiber/api/join.mjs +3 -3
  908. package/_mjs/Fiber/api/join.mjs.map +1 -1
  909. package/_mjs/Fiber/api/joinAll.mjs +1 -2
  910. package/_mjs/Fiber/api/joinAll.mjs.map +1 -1
  911. package/_mjs/Fiber/api/location.mjs +1 -3
  912. package/_mjs/Fiber/api/location.mjs.map +1 -1
  913. package/_mjs/Fiber/api/mapFiber.mjs +5 -4
  914. package/_mjs/Fiber/api/mapFiber.mjs.map +1 -1
  915. package/_mjs/Fiber/api/mapIO.mjs +11 -10
  916. package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
  917. package/_mjs/Fiber/api/poll.mjs.map +1 -1
  918. package/_mjs/Fiber/api/zipWith.mjs +6 -5
  919. package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
  920. package/_mjs/Fiber/constructors.mjs +0 -6
  921. package/_mjs/Fiber/constructors.mjs.map +1 -1
  922. package/_mjs/Fiber/definition.mjs +9 -5
  923. package/_mjs/Fiber/definition.mjs.map +1 -1
  924. package/_mjs/Fiber.mjs +3 -4
  925. package/_mjs/Fiber.mjs.map +1 -1
  926. package/_mjs/FiberDescriptor.mjs +1 -4
  927. package/_mjs/FiberDescriptor.mjs.map +1 -1
  928. package/_mjs/FiberRef/api/locallyScoped.mjs +5 -4
  929. package/_mjs/FiberRef/api/locallyScoped.mjs.map +1 -1
  930. package/_mjs/FiberRef/api/locallyScopedWith.mjs +5 -4
  931. package/_mjs/FiberRef/api/locallyScopedWith.mjs.map +1 -1
  932. package/_mjs/FiberRef/api.mjs +64 -66
  933. package/_mjs/FiberRef/api.mjs.map +1 -1
  934. package/_mjs/FiberRef/constructors.mjs +1 -4
  935. package/_mjs/FiberRef/constructors.mjs.map +1 -1
  936. package/_mjs/FiberRef/definition.mjs +5 -10
  937. package/_mjs/FiberRef/definition.mjs.map +1 -1
  938. package/_mjs/FiberRef/unsafe.mjs +17 -30
  939. package/_mjs/FiberRef/unsafe.mjs.map +1 -1
  940. package/_mjs/FiberRef.mjs +2 -2
  941. package/_mjs/FiberRef.mjs.map +1 -1
  942. package/_mjs/FiberRefs/api.mjs +70 -24
  943. package/_mjs/FiberRefs/api.mjs.map +1 -1
  944. package/_mjs/FiberRefs/definition.mjs +2 -13
  945. package/_mjs/FiberRefs/definition.mjs.map +1 -1
  946. package/_mjs/FiberRefs/join.mjs +51 -61
  947. package/_mjs/FiberRefs/join.mjs.map +1 -1
  948. package/_mjs/FiberRefs.mjs.map +1 -1
  949. package/_mjs/FiberScope/constructors.mjs +0 -2
  950. package/_mjs/FiberScope/constructors.mjs.map +1 -1
  951. package/_mjs/FiberScope/definition.mjs +15 -12
  952. package/_mjs/FiberScope/definition.mjs.map +1 -1
  953. package/_mjs/FiberScope.mjs.map +1 -1
  954. package/_mjs/FiberStatus/constructors.mjs +5 -15
  955. package/_mjs/FiberStatus/constructors.mjs.map +1 -1
  956. package/_mjs/FiberStatus/definition.mjs +14 -66
  957. package/_mjs/FiberStatus/definition.mjs.map +1 -1
  958. package/_mjs/FiberStatus.mjs.map +1 -1
  959. package/_mjs/Future/api.mjs +87 -110
  960. package/_mjs/Future/api.mjs.map +1 -1
  961. package/_mjs/Future/constructors.mjs +1 -5
  962. package/_mjs/Future/constructors.mjs.map +1 -1
  963. package/_mjs/Future/definition.mjs +3 -9
  964. package/_mjs/Future/definition.mjs.map +1 -1
  965. package/_mjs/Future.mjs.map +1 -1
  966. package/_mjs/Hub/api.mjs +98 -123
  967. package/_mjs/Hub/api.mjs.map +1 -1
  968. package/_mjs/Hub/definition.mjs +13 -3
  969. package/_mjs/Hub/definition.mjs.map +1 -1
  970. package/_mjs/Hub/internal.mjs +30 -90
  971. package/_mjs/Hub/internal.mjs.map +1 -1
  972. package/_mjs/Hub.mjs.map +1 -1
  973. package/_mjs/IO/api/acquireRelease.mjs +0 -1
  974. package/_mjs/IO/api/acquireRelease.mjs.map +1 -1
  975. package/_mjs/IO/api/acquireReleaseExit.mjs +1 -2
  976. package/_mjs/IO/api/acquireReleaseExit.mjs.map +1 -1
  977. package/_mjs/IO/api/acquireReleaseInterruptible.mjs +0 -1
  978. package/_mjs/IO/api/acquireReleaseInterruptible.mjs.map +1 -1
  979. package/_mjs/IO/api/acquireReleaseInterruptibleExit.mjs +2 -2
  980. package/_mjs/IO/api/acquireReleaseInterruptibleExit.mjs.map +1 -1
  981. package/_mjs/IO/api/addFinalizer.mjs +0 -1
  982. package/_mjs/IO/api/addFinalizer.mjs.map +1 -1
  983. package/_mjs/IO/api/addFinalizerExit.mjs +1 -2
  984. package/_mjs/IO/api/addFinalizerExit.mjs.map +1 -1
  985. package/_mjs/IO/api/asyncIO.mjs +8 -8
  986. package/_mjs/IO/api/asyncIO.mjs.map +1 -1
  987. package/_mjs/IO/api/asyncInterrupt.mjs +65 -0
  988. package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -0
  989. package/_mjs/IO/api/bracket.mjs +2 -3
  990. package/_mjs/IO/api/bracket.mjs.map +1 -1
  991. package/_mjs/IO/api/bracketExit.mjs +2 -3
  992. package/_mjs/IO/api/bracketExit.mjs.map +1 -1
  993. package/_mjs/IO/api/clockWith.mjs +2 -5
  994. package/_mjs/IO/api/clockWith.mjs.map +1 -1
  995. package/_mjs/IO/api/concurrency.mjs +8 -11
  996. package/_mjs/IO/api/concurrency.mjs.map +1 -1
  997. package/_mjs/IO/api/concurrentFinalizers.mjs +1 -2
  998. package/_mjs/IO/api/concurrentFinalizers.mjs.map +1 -1
  999. package/_mjs/IO/api/consoleWith.mjs +2 -5
  1000. package/_mjs/IO/api/consoleWith.mjs.map +1 -1
  1001. package/_mjs/IO/api/core-scope.mjs +56 -94
  1002. package/_mjs/IO/api/core-scope.mjs.map +1 -1
  1003. package/_mjs/IO/api/delay.mjs +12 -0
  1004. package/_mjs/IO/api/delay.mjs.map +1 -0
  1005. package/_mjs/IO/api/ensuringChildren.mjs +7 -5
  1006. package/_mjs/IO/api/ensuringChildren.mjs.map +1 -1
  1007. package/_mjs/IO/api/environment.mjs +29 -42
  1008. package/_mjs/IO/api/environment.mjs.map +1 -1
  1009. package/_mjs/IO/api/foreachConcurrent.mjs +104 -0
  1010. package/_mjs/IO/api/foreachConcurrent.mjs.map +1 -0
  1011. package/_mjs/IO/api/foreachExec.mjs +3 -4
  1012. package/_mjs/IO/api/foreachExec.mjs.map +1 -1
  1013. package/_mjs/IO/api/fork.mjs +64 -0
  1014. package/_mjs/IO/api/fork.mjs.map +1 -0
  1015. package/_mjs/IO/api/forkAll.mjs +3 -3
  1016. package/_mjs/IO/api/forkAll.mjs.map +1 -1
  1017. package/_mjs/IO/api/forkIn.mjs +7 -6
  1018. package/_mjs/IO/api/forkIn.mjs.map +1 -1
  1019. package/_mjs/IO/api/forkScoped.mjs +1 -2
  1020. package/_mjs/IO/api/forkScoped.mjs.map +1 -1
  1021. package/_mjs/IO/api/fulfill.mjs +7 -6
  1022. package/_mjs/IO/api/fulfill.mjs.map +1 -1
  1023. package/_mjs/IO/api/interrupt.mjs +45 -58
  1024. package/_mjs/IO/api/interrupt.mjs.map +1 -1
  1025. package/_mjs/IO/api/memoize.mjs +1 -2
  1026. package/_mjs/IO/api/memoize.mjs.map +1 -1
  1027. package/_mjs/IO/api/onExit.mjs +5 -4
  1028. package/_mjs/IO/api/onExit.mjs.map +1 -1
  1029. package/_mjs/IO/api/onTermination.mjs +5 -4
  1030. package/_mjs/IO/api/onTermination.mjs.map +1 -1
  1031. package/_mjs/IO/api/once.mjs +1 -2
  1032. package/_mjs/IO/api/once.mjs.map +1 -1
  1033. package/_mjs/IO/api/provideLayer.mjs +5 -4
  1034. package/_mjs/IO/api/provideLayer.mjs.map +1 -1
  1035. package/_mjs/IO/api/provideSomeLayer.mjs +5 -12
  1036. package/_mjs/IO/api/provideSomeLayer.mjs.map +1 -1
  1037. package/_mjs/IO/api/race.mjs +7 -7
  1038. package/_mjs/IO/api/race.mjs.map +1 -1
  1039. package/_mjs/IO/api/raceFirst.mjs +5 -4
  1040. package/_mjs/IO/api/raceFirst.mjs.map +1 -1
  1041. package/_mjs/IO/api/randomWith.mjs +1 -4
  1042. package/_mjs/IO/api/randomWith.mjs.map +1 -1
  1043. package/_mjs/IO/api/repeat.mjs +8 -13
  1044. package/_mjs/IO/api/repeat.mjs.map +1 -1
  1045. package/_mjs/IO/api/retry.mjs +12 -18
  1046. package/_mjs/IO/api/retry.mjs.map +1 -1
  1047. package/_mjs/IO/api/schedule.mjs +15 -15
  1048. package/_mjs/IO/api/schedule.mjs.map +1 -1
  1049. package/_mjs/IO/api/scope.mjs +0 -1
  1050. package/_mjs/IO/api/scope.mjs.map +1 -1
  1051. package/_mjs/IO/api/scopeWith.mjs +0 -1
  1052. package/_mjs/IO/api/scopeWith.mjs.map +1 -1
  1053. package/_mjs/IO/api/scoped.mjs +3 -6
  1054. package/_mjs/IO/api/scoped.mjs.map +1 -1
  1055. package/_mjs/IO/api/sequenceT.mjs +1 -2
  1056. package/_mjs/IO/api/sequenceT.mjs.map +1 -1
  1057. package/_mjs/IO/api/sleep.mjs +0 -1
  1058. package/_mjs/IO/api/sleep.mjs.map +1 -1
  1059. package/_mjs/IO/api/stateful.mjs +0 -1
  1060. package/_mjs/IO/api/stateful.mjs.map +1 -1
  1061. package/_mjs/IO/api/supervised.mjs +5 -9
  1062. package/_mjs/IO/api/supervised.mjs.map +1 -1
  1063. package/_mjs/IO/api/timeout.mjs +10 -9
  1064. package/_mjs/IO/api/timeout.mjs.map +1 -1
  1065. package/_mjs/IO/api/withChildren.mjs +2 -4
  1066. package/_mjs/IO/api/withChildren.mjs.map +1 -1
  1067. package/_mjs/IO/api/withEarlyRelease.mjs +1 -2
  1068. package/_mjs/IO/api/withEarlyRelease.mjs.map +1 -1
  1069. package/_mjs/IO/api/withFinalizer.mjs +5 -4
  1070. package/_mjs/IO/api/withFinalizer.mjs.map +1 -1
  1071. package/_mjs/IO/api/withFinalizerExit.mjs +5 -4
  1072. package/_mjs/IO/api/withFinalizerExit.mjs.map +1 -1
  1073. package/_mjs/IO/api/zipConcurrent.mjs +41 -0
  1074. package/_mjs/IO/api/zipConcurrent.mjs.map +1 -0
  1075. package/_mjs/IO/api.mjs +545 -797
  1076. package/_mjs/IO/api.mjs.map +1 -1
  1077. package/_mjs/IO/definition.mjs +107 -150
  1078. package/_mjs/IO/definition.mjs.map +1 -1
  1079. package/_mjs/IO/runtime.mjs +51 -86
  1080. package/_mjs/IO/runtime.mjs.map +1 -1
  1081. package/_mjs/IO.mjs +7 -5
  1082. package/_mjs/IO.mjs.map +1 -1
  1083. package/_mjs/IOEnv/definition.mjs +1 -2
  1084. package/_mjs/IOEnv/definition.mjs.map +1 -1
  1085. package/_mjs/IOEnv/live.mjs +1 -2
  1086. package/_mjs/IOEnv/live.mjs.map +1 -1
  1087. package/_mjs/IOEnv/services.mjs +0 -1
  1088. package/_mjs/IOEnv/services.mjs.map +1 -1
  1089. package/_mjs/IOEnv.mjs.map +1 -1
  1090. package/_mjs/InterruptStatus/constructors.mjs +0 -3
  1091. package/_mjs/InterruptStatus/constructors.mjs.map +1 -1
  1092. package/_mjs/InterruptStatus/definition.mjs +0 -3
  1093. package/_mjs/InterruptStatus/definition.mjs.map +1 -1
  1094. package/_mjs/InterruptStatus.mjs.map +1 -1
  1095. package/_mjs/Layer/MemoMap.mjs +54 -82
  1096. package/_mjs/Layer/MemoMap.mjs.map +1 -1
  1097. package/_mjs/Layer/api.mjs +93 -130
  1098. package/_mjs/Layer/api.mjs.map +1 -1
  1099. package/_mjs/Layer/definition.mjs +15 -34
  1100. package/_mjs/Layer/definition.mjs.map +1 -1
  1101. package/_mjs/Layer.mjs.map +1 -1
  1102. package/_mjs/LogLevel.mjs +24 -29
  1103. package/_mjs/LogLevel.mjs.map +1 -1
  1104. package/_mjs/LogSpan.mjs +16 -18
  1105. package/_mjs/LogSpan.mjs.map +1 -1
  1106. package/_mjs/Logger/api.mjs +16 -14
  1107. package/_mjs/Logger/api.mjs.map +1 -1
  1108. package/_mjs/Logger/constructors.mjs +3 -11
  1109. package/_mjs/Logger/constructors.mjs.map +1 -1
  1110. package/_mjs/Logger/definition.mjs +0 -1
  1111. package/_mjs/Logger/definition.mjs.map +1 -1
  1112. package/_mjs/Logger.mjs.map +1 -1
  1113. package/_mjs/Push/api.mjs +417 -0
  1114. package/_mjs/Push/api.mjs.map +1 -0
  1115. package/_mjs/Push/definition.mjs +33 -0
  1116. package/_mjs/Push/definition.mjs.map +1 -0
  1117. package/_mjs/Push/internal.mjs +26 -0
  1118. package/_mjs/Push/internal.mjs.map +1 -0
  1119. package/_mjs/Push.mjs +5 -0
  1120. package/_mjs/Push.mjs.map +1 -0
  1121. package/_mjs/Queue/api/dimapIO.mjs +101 -42
  1122. package/_mjs/Queue/api/dimapIO.mjs.map +1 -1
  1123. package/_mjs/Queue/api/filterInputIO.mjs +59 -24
  1124. package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
  1125. package/_mjs/Queue/api/filterOutputIO.mjs +70 -32
  1126. package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
  1127. package/_mjs/Queue/api/operations.mjs +18 -22
  1128. package/_mjs/Queue/api/operations.mjs.map +1 -1
  1129. package/_mjs/Queue/api/poll.mjs +1 -2
  1130. package/_mjs/Queue/api/poll.mjs.map +1 -1
  1131. package/_mjs/Queue/api/takeBetween.mjs +23 -27
  1132. package/_mjs/Queue/api/takeBetween.mjs.map +1 -1
  1133. package/_mjs/Queue/api/zipWithIO.mjs +30 -33
  1134. package/_mjs/Queue/api/zipWithIO.mjs.map +1 -1
  1135. package/_mjs/Queue/api.mjs.map +1 -1
  1136. package/_mjs/Queue/constructors.mjs +5 -9
  1137. package/_mjs/Queue/constructors.mjs.map +1 -1
  1138. package/_mjs/Queue/definition.mjs +14 -7
  1139. package/_mjs/Queue/definition.mjs.map +1 -1
  1140. package/_mjs/Queue/internal.mjs +57 -93
  1141. package/_mjs/Queue/internal.mjs.map +1 -1
  1142. package/_mjs/Queue/strategy.mjs +28 -55
  1143. package/_mjs/Queue/strategy.mjs.map +1 -1
  1144. package/_mjs/Queue.mjs.map +1 -1
  1145. package/_mjs/Random/api.mjs +0 -8
  1146. package/_mjs/Random/api.mjs.map +1 -1
  1147. package/_mjs/Random/definition.mjs +0 -2
  1148. package/_mjs/Random/definition.mjs.map +1 -1
  1149. package/_mjs/Random/live.mjs +2 -9
  1150. package/_mjs/Random/live.mjs.map +1 -1
  1151. package/_mjs/Random.mjs.map +1 -1
  1152. package/_mjs/Ref/Atomic.mjs +49 -3
  1153. package/_mjs/Ref/Atomic.mjs.map +1 -1
  1154. package/_mjs/Ref/Derived.mjs +11 -9
  1155. package/_mjs/Ref/Derived.mjs.map +1 -1
  1156. package/_mjs/Ref/DerivedAll.mjs +15 -11
  1157. package/_mjs/Ref/DerivedAll.mjs.map +1 -1
  1158. package/_mjs/Ref/Synchronized/api.mjs +82 -68
  1159. package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
  1160. package/_mjs/Ref/Synchronized/constructors.mjs +1 -2
  1161. package/_mjs/Ref/Synchronized/constructors.mjs.map +1 -1
  1162. package/_mjs/Ref/Synchronized/definition.mjs +16 -28
  1163. package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
  1164. package/_mjs/Ref/Synchronized.mjs +5 -0
  1165. package/_mjs/Ref/Synchronized.mjs.map +1 -0
  1166. package/_mjs/Ref/api/collect.mjs +6 -5
  1167. package/_mjs/Ref/api/collect.mjs.map +1 -1
  1168. package/_mjs/Ref/api/dimap.mjs +45 -41
  1169. package/_mjs/Ref/api/dimap.mjs.map +1 -1
  1170. package/_mjs/Ref/api/filter.mjs +12 -10
  1171. package/_mjs/Ref/api/filter.mjs.map +1 -1
  1172. package/_mjs/Ref/api/get.mjs +0 -1
  1173. package/_mjs/Ref/api/get.mjs.map +1 -1
  1174. package/_mjs/Ref/api/match.mjs +7 -7
  1175. package/_mjs/Ref/api/match.mjs.map +1 -1
  1176. package/_mjs/Ref/api/matchAll.mjs +5 -5
  1177. package/_mjs/Ref/api/matchAll.mjs.map +1 -1
  1178. package/_mjs/Ref/api/modify.mjs +63 -143
  1179. package/_mjs/Ref/api/modify.mjs.map +1 -1
  1180. package/_mjs/Ref/api/set.mjs +7 -6
  1181. package/_mjs/Ref/api/set.mjs.map +1 -1
  1182. package/_mjs/Ref/api.mjs +5 -7
  1183. package/_mjs/Ref/api.mjs.map +1 -1
  1184. package/_mjs/Ref/constructors.mjs +2 -3
  1185. package/_mjs/Ref/constructors.mjs.map +1 -1
  1186. package/_mjs/Ref/definition.mjs +10 -3
  1187. package/_mjs/Ref/definition.mjs.map +1 -1
  1188. package/_mjs/Ref/symbols.mjs +25 -0
  1189. package/_mjs/Ref/symbols.mjs.map +1 -0
  1190. package/_mjs/Ref.mjs +4 -2
  1191. package/_mjs/Ref.mjs.map +1 -1
  1192. package/_mjs/RefSubject/Atomic.mjs +100 -0
  1193. package/_mjs/RefSubject/Atomic.mjs.map +1 -0
  1194. package/_mjs/RefSubject/Synchronized/api.mjs +15 -0
  1195. package/_mjs/RefSubject/Synchronized/api.mjs.map +1 -0
  1196. package/_mjs/RefSubject/Synchronized/definition.mjs +45 -0
  1197. package/_mjs/RefSubject/Synchronized/definition.mjs.map +1 -0
  1198. package/_mjs/RefSubject/api.mjs +220 -0
  1199. package/_mjs/RefSubject/api.mjs.map +1 -0
  1200. package/_mjs/RefSubject/definition.mjs +11 -0
  1201. package/_mjs/RefSubject/definition.mjs.map +1 -0
  1202. package/_mjs/RefSubject.mjs +5 -0
  1203. package/_mjs/RefSubject.mjs.map +1 -0
  1204. package/_mjs/Reloadable/api.mjs +3 -12
  1205. package/_mjs/Reloadable/api.mjs.map +1 -1
  1206. package/_mjs/Reloadable/constructors.mjs +14 -26
  1207. package/_mjs/Reloadable/constructors.mjs.map +1 -1
  1208. package/_mjs/Reloadable/definition.mjs +0 -6
  1209. package/_mjs/Reloadable/definition.mjs.map +1 -1
  1210. package/_mjs/Reloadable.mjs.map +1 -1
  1211. package/_mjs/RuntimeConfig.mjs +0 -31
  1212. package/_mjs/RuntimeConfig.mjs.map +1 -1
  1213. package/_mjs/RuntimeFlag.mjs +2 -0
  1214. package/_mjs/RuntimeFlag.mjs.map +1 -0
  1215. package/_mjs/RuntimeFlags/Patch.mjs +58 -0
  1216. package/_mjs/RuntimeFlags/Patch.mjs.map +1 -0
  1217. package/_mjs/RuntimeFlags/RuntimeFlags.mjs +82 -0
  1218. package/_mjs/RuntimeFlags/RuntimeFlags.mjs.map +1 -0
  1219. package/_mjs/RuntimeFlags.mjs +4 -0
  1220. package/_mjs/RuntimeFlags.mjs.map +1 -0
  1221. package/_mjs/STM/api/core-api.mjs +29 -27
  1222. package/_mjs/STM/api/core-api.mjs.map +1 -1
  1223. package/_mjs/STM/api/core-constructors.mjs +0 -8
  1224. package/_mjs/STM/api/core-constructors.mjs.map +1 -1
  1225. package/_mjs/STM/api.mjs +182 -212
  1226. package/_mjs/STM/api.mjs.map +1 -1
  1227. package/_mjs/STM/definition.mjs +14 -36
  1228. package/_mjs/STM/definition.mjs.map +1 -1
  1229. package/_mjs/STM/driver.mjs +12 -54
  1230. package/_mjs/STM/driver.mjs.map +1 -1
  1231. package/_mjs/STM/internal/CommitState.mjs +5 -25
  1232. package/_mjs/STM/internal/CommitState.mjs.map +1 -1
  1233. package/_mjs/STM/internal/Entry.mjs +0 -12
  1234. package/_mjs/STM/internal/Entry.mjs.map +1 -1
  1235. package/_mjs/STM/internal/Journal.mjs +50 -128
  1236. package/_mjs/STM/internal/Journal.mjs.map +1 -1
  1237. package/_mjs/STM/internal/TryCommit.mjs +3 -8
  1238. package/_mjs/STM/internal/TryCommit.mjs.map +1 -1
  1239. package/_mjs/STM/internal/Versioned.mjs +0 -1
  1240. package/_mjs/STM/internal/Versioned.mjs.map +1 -1
  1241. package/_mjs/STM.mjs +2 -2
  1242. package/_mjs/STM.mjs.map +1 -1
  1243. package/_mjs/Schedule/Decision.mjs +14 -25
  1244. package/_mjs/Schedule/Decision.mjs.map +1 -1
  1245. package/_mjs/Schedule/Driver.mjs +0 -2
  1246. package/_mjs/Schedule/Driver.mjs.map +1 -1
  1247. package/_mjs/Schedule/api/driver.mjs +6 -8
  1248. package/_mjs/Schedule/api/driver.mjs.map +1 -1
  1249. package/_mjs/Schedule/api.mjs +379 -374
  1250. package/_mjs/Schedule/api.mjs.map +1 -1
  1251. package/_mjs/Schedule/definition.mjs.map +1 -1
  1252. package/_mjs/Schedule.mjs.map +1 -1
  1253. package/_mjs/Scope/Finalizer/definition.mjs +0 -1
  1254. package/_mjs/Scope/Finalizer/definition.mjs.map +1 -1
  1255. package/_mjs/Scope/Finalizer.mjs.map +1 -1
  1256. package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs +12 -12
  1257. package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs.map +1 -1
  1258. package/_mjs/Scope/ReleaseMap/api.mjs +59 -60
  1259. package/_mjs/Scope/ReleaseMap/api.mjs.map +1 -1
  1260. package/_mjs/Scope/ReleaseMap/constructors.mjs +1 -4
  1261. package/_mjs/Scope/ReleaseMap/constructors.mjs.map +1 -1
  1262. package/_mjs/Scope/ReleaseMap/definition.mjs +0 -2
  1263. package/_mjs/Scope/ReleaseMap/definition.mjs.map +1 -1
  1264. package/_mjs/Scope/ReleaseMap.mjs.map +1 -1
  1265. package/_mjs/Scope/api.mjs +28 -45
  1266. package/_mjs/Scope/api.mjs.map +1 -1
  1267. package/_mjs/Scope/definition.mjs +0 -4
  1268. package/_mjs/Scope/definition.mjs.map +1 -1
  1269. package/_mjs/Scope.mjs.map +1 -1
  1270. package/_mjs/ScopedRef/api.mjs +7 -11
  1271. package/_mjs/ScopedRef/api.mjs.map +1 -1
  1272. package/_mjs/ScopedRef/definition.mjs +1 -3
  1273. package/_mjs/ScopedRef/definition.mjs.map +1 -1
  1274. package/_mjs/ScopedRef.mjs.map +1 -1
  1275. package/_mjs/Sink/api.mjs +282 -383
  1276. package/_mjs/Sink/api.mjs.map +1 -1
  1277. package/_mjs/Sink/definition.mjs +0 -1
  1278. package/_mjs/Sink/definition.mjs.map +1 -1
  1279. package/_mjs/Sink.mjs.map +1 -1
  1280. package/_mjs/State/api.mjs +16 -19
  1281. package/_mjs/State/api.mjs.map +1 -1
  1282. package/_mjs/State/definition.mjs +2 -4
  1283. package/_mjs/State/definition.mjs.map +1 -1
  1284. package/_mjs/State/internal.mjs +0 -1
  1285. package/_mjs/State/internal.mjs.map +1 -1
  1286. package/_mjs/State.mjs.map +1 -1
  1287. package/_mjs/Stream/api/zipAllWith.mjs +15 -30
  1288. package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
  1289. package/_mjs/Stream/api/zipWith.mjs +5 -4
  1290. package/_mjs/Stream/api/zipWith.mjs.map +1 -1
  1291. package/_mjs/Stream/api/zipWithChunks.mjs +13 -23
  1292. package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
  1293. package/_mjs/Stream/api.mjs +827 -936
  1294. package/_mjs/Stream/api.mjs.map +1 -1
  1295. package/_mjs/Stream/definition.mjs +0 -4
  1296. package/_mjs/Stream/definition.mjs.map +1 -1
  1297. package/_mjs/Stream/internal/DebounceState.mjs +18 -34
  1298. package/_mjs/Stream/internal/DebounceState.mjs.map +1 -1
  1299. package/_mjs/Stream/internal/Handoff.mjs +33 -51
  1300. package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
  1301. package/_mjs/Stream/internal/Pull.mjs +2 -9
  1302. package/_mjs/Stream/internal/Pull.mjs.map +1 -1
  1303. package/_mjs/Stream/internal/SinkEndReason.mjs +13 -22
  1304. package/_mjs/Stream/internal/SinkEndReason.mjs.map +1 -1
  1305. package/_mjs/Stream/internal/Take.mjs +28 -42
  1306. package/_mjs/Stream/internal/Take.mjs.map +1 -1
  1307. package/_mjs/Stream/internal/util.mjs +3 -6
  1308. package/_mjs/Stream/internal/util.mjs.map +1 -1
  1309. package/_mjs/Stream.mjs.map +1 -1
  1310. package/_mjs/Subject/Atomic.mjs +22 -0
  1311. package/_mjs/Subject/Atomic.mjs.map +1 -0
  1312. package/_mjs/Subject/api.mjs +18 -0
  1313. package/_mjs/Subject/api.mjs.map +1 -0
  1314. package/_mjs/Subject/definition.mjs +3 -0
  1315. package/_mjs/Subject/definition.mjs.map +1 -0
  1316. package/_mjs/Subject.mjs +5 -0
  1317. package/_mjs/Subject.mjs.map +1 -0
  1318. package/_mjs/SubscriptionRef.mjs +41 -0
  1319. package/_mjs/SubscriptionRef.mjs.map +1 -0
  1320. package/_mjs/Supervisor/api.mjs +22 -29
  1321. package/_mjs/Supervisor/api.mjs.map +1 -1
  1322. package/_mjs/Supervisor/constructors.mjs +2 -14
  1323. package/_mjs/Supervisor/constructors.mjs.map +1 -1
  1324. package/_mjs/Supervisor/definition.mjs +6 -32
  1325. package/_mjs/Supervisor/definition.mjs.map +1 -1
  1326. package/_mjs/Supervisor.mjs.map +1 -1
  1327. package/_mjs/SupervisorPatch.mjs +28 -55
  1328. package/_mjs/SupervisorPatch.mjs.map +1 -1
  1329. package/_mjs/TExit/constructors.mjs +0 -6
  1330. package/_mjs/TExit/constructors.mjs.map +1 -1
  1331. package/_mjs/TExit/definition.mjs +14 -57
  1332. package/_mjs/TExit/definition.mjs.map +1 -1
  1333. package/_mjs/TExit.mjs.map +1 -1
  1334. package/_mjs/TFuture/api.mjs +17 -17
  1335. package/_mjs/TFuture/api.mjs.map +1 -1
  1336. package/_mjs/TFuture/constructors.mjs +1 -4
  1337. package/_mjs/TFuture/constructors.mjs.map +1 -1
  1338. package/_mjs/TFuture/definition.mjs.map +1 -1
  1339. package/_mjs/TFuture.mjs.map +1 -1
  1340. package/_mjs/TReentrantLock/api.mjs +41 -85
  1341. package/_mjs/TReentrantLock/api.mjs.map +1 -1
  1342. package/_mjs/TReentrantLock/definition.mjs +7 -26
  1343. package/_mjs/TReentrantLock/definition.mjs.map +1 -1
  1344. package/_mjs/TReentrantLock.mjs.map +1 -1
  1345. package/_mjs/TRef/api.mjs +79 -257
  1346. package/_mjs/TRef/api.mjs.map +1 -1
  1347. package/_mjs/TRef/constructors.mjs +0 -7
  1348. package/_mjs/TRef/constructors.mjs.map +1 -1
  1349. package/_mjs/TRef/definition.mjs +84 -19
  1350. package/_mjs/TRef/definition.mjs.map +1 -1
  1351. package/_mjs/TRef/symbols.mjs +17 -0
  1352. package/_mjs/TRef/symbols.mjs.map +1 -0
  1353. package/_mjs/TRef.mjs +1 -0
  1354. package/_mjs/TRef.mjs.map +1 -1
  1355. package/_mjs/TSemaphore/api.mjs +26 -32
  1356. package/_mjs/TSemaphore/api.mjs.map +1 -1
  1357. package/_mjs/TSemaphore/constructors.mjs +10 -4
  1358. package/_mjs/TSemaphore/constructors.mjs.map +1 -1
  1359. package/_mjs/TSemaphore/definition.mjs.map +1 -1
  1360. package/_mjs/TSemaphore.mjs.map +1 -1
  1361. package/_mjs/TxnId.mjs +0 -1
  1362. package/_mjs/TxnId.mjs.map +1 -1
  1363. package/_mjs/collection/immutable/Conc/dropUntilIO.mjs +19 -20
  1364. package/_mjs/collection/immutable/Conc/dropUntilIO.mjs.map +1 -1
  1365. package/_mjs/collection/immutable/Conc/dropWhileIO.mjs +19 -20
  1366. package/_mjs/collection/immutable/Conc/dropWhileIO.mjs.map +1 -1
  1367. package/_mjs/collection/immutable/Conc/filterIO.mjs +14 -15
  1368. package/_mjs/collection/immutable/Conc/filterIO.mjs.map +1 -1
  1369. package/_mjs/collection/immutable/Conc/findIO.mjs +17 -22
  1370. package/_mjs/collection/immutable/Conc/findIO.mjs.map +1 -1
  1371. package/_mjs/collection/immutable/Conc/mapIO.mjs +10 -9
  1372. package/_mjs/collection/immutable/Conc/mapIO.mjs.map +1 -1
  1373. package/_mjs/collection/immutable/Conc/takeWhileIO.mjs +28 -30
  1374. package/_mjs/collection/immutable/Conc/takeWhileIO.mjs.map +1 -1
  1375. package/_mjs/collection/immutable/Conc.mjs.map +1 -1
  1376. package/_mjs/data/Exit/foreachIO.mjs +5 -4
  1377. package/_mjs/data/Exit/foreachIO.mjs.map +1 -1
  1378. package/_mjs/internal/HashedPair.mjs +4 -7
  1379. package/_mjs/internal/HashedPair.mjs.map +1 -1
  1380. package/_mjs/internal/Hub.mjs +13 -158
  1381. package/_mjs/internal/Hub.mjs.map +1 -1
  1382. package/_mjs/internal/IsFatal.mjs +24 -51
  1383. package/_mjs/internal/IsFatal.mjs.map +1 -1
  1384. package/_mjs/internal/MutableQueue.mjs +10 -57
  1385. package/_mjs/internal/MutableQueue.mjs.map +1 -1
  1386. package/_mjs/internal/Scheduler.mjs +0 -11
  1387. package/_mjs/internal/Scheduler.mjs.map +1 -1
  1388. package/_mjs/internal/StackTraceBuilder.mjs +0 -3
  1389. package/_mjs/internal/StackTraceBuilder.mjs.map +1 -1
  1390. package/_src/Cached/api.ts +2 -2
  1391. package/_src/Channel/ChildExecutorDecision/api.ts +14 -17
  1392. package/_src/Channel/UpstreamPullRequest/api.ts +11 -13
  1393. package/_src/Channel/api/interruptWhen.ts +18 -17
  1394. package/_src/Channel/api/mapOutConcurrentIO.ts +66 -0
  1395. package/_src/Channel/api/mergeAll.ts +15 -16
  1396. package/_src/Channel/api/mergeAllUnboundedWith.ts +15 -27
  1397. package/_src/Channel/api/mergeAllWith.ts +114 -126
  1398. package/_src/Channel/api/mergeMap.ts +8 -18
  1399. package/_src/Channel/api/mergeWith.ts +154 -158
  1400. package/_src/Channel/api/toPull.ts +1 -1
  1401. package/_src/Channel/api/zipConcurrent.ts +68 -0
  1402. package/_src/Channel/api.ts +354 -414
  1403. package/_src/Channel/core-api.ts +75 -122
  1404. package/_src/Channel/definition.ts +49 -7
  1405. package/_src/Channel/internal/ChannelExecutor.ts +12 -16
  1406. package/_src/Channel/internal/SingleProducerAsyncInput.ts +2 -4
  1407. package/_src/CountdownLatch.ts +39 -0
  1408. package/_src/Fiber/FiberMessage.ts +78 -0
  1409. package/_src/Fiber/FiberRuntime.ts +822 -0
  1410. package/_src/Fiber/api/awaitAll.ts +1 -1
  1411. package/_src/Fiber/api/collectAll.ts +2 -2
  1412. package/_src/Fiber/api/inheritRefs.ts +1 -1
  1413. package/_src/Fiber/api/interrupt.ts +1 -2
  1414. package/_src/Fiber/api/interruptAll.ts +1 -2
  1415. package/_src/Fiber/api/interruptAs.ts +9 -2
  1416. package/_src/Fiber/api/interruptFork.ts +1 -1
  1417. package/_src/Fiber/api/location.ts +2 -2
  1418. package/_src/Fiber/api/mapFiber.ts +5 -7
  1419. package/_src/Fiber/api/mapIO.ts +21 -21
  1420. package/_src/Fiber/api/zipWith.ts +14 -17
  1421. package/_src/Fiber/definition.ts +17 -16
  1422. package/_src/Fiber.ts +2 -4
  1423. package/_src/FiberDescriptor.ts +1 -8
  1424. package/_src/FiberRef/api/locallyScoped.ts +8 -6
  1425. package/_src/FiberRef/api/locallyScopedWith.ts +5 -7
  1426. package/_src/FiberRef/api.ts +59 -52
  1427. package/_src/FiberRef/unsafe.ts +6 -1
  1428. package/_src/FiberRef.ts +0 -1
  1429. package/_src/FiberRefs/api.ts +69 -14
  1430. package/_src/FiberRefs/definition.ts +15 -7
  1431. package/_src/FiberRefs/join.ts +39 -48
  1432. package/_src/FiberScope/constructors.ts +2 -2
  1433. package/_src/FiberScope/definition.ts +21 -9
  1434. package/_src/FiberStatus/constructors.ts +6 -18
  1435. package/_src/FiberStatus/definition.ts +13 -54
  1436. package/_src/Future/api.ts +67 -53
  1437. package/_src/Hub/api.ts +84 -96
  1438. package/_src/Hub/definition.ts +22 -7
  1439. package/_src/Hub/internal.ts +8 -8
  1440. package/_src/IO/api/acquireRelease.ts +1 -1
  1441. package/_src/IO/api/acquireReleaseExit.ts +1 -1
  1442. package/_src/IO/api/asyncInterrupt.ts +77 -0
  1443. package/_src/IO/api/bracket.ts +1 -1
  1444. package/_src/IO/api/bracketExit.ts +1 -1
  1445. package/_src/IO/api/clockWith.ts +0 -1
  1446. package/_src/IO/api/concurrency.ts +5 -7
  1447. package/_src/IO/api/consoleWith.ts +0 -2
  1448. package/_src/IO/api/core-scope.ts +74 -90
  1449. package/_src/IO/api/delay.ts +8 -0
  1450. package/_src/IO/api/ensuringChildren.ts +8 -7
  1451. package/_src/IO/api/environment.ts +24 -42
  1452. package/_src/IO/api/{foreachC.ts → foreachConcurrent.ts} +30 -18
  1453. package/_src/IO/api/foreachExec.ts +3 -3
  1454. package/_src/IO/api/fork.ts +83 -0
  1455. package/_src/IO/api/forkIn.ts +7 -9
  1456. package/_src/IO/api/fulfill.ts +5 -3
  1457. package/_src/IO/api/interrupt.ts +49 -32
  1458. package/_src/IO/api/onExit.ts +8 -10
  1459. package/_src/IO/api/onTermination.ts +12 -14
  1460. package/_src/IO/api/provideLayer.ts +8 -10
  1461. package/_src/IO/api/provideSomeLayer.ts +5 -14
  1462. package/_src/IO/api/race.ts +19 -21
  1463. package/_src/IO/api/raceFirst.ts +5 -7
  1464. package/_src/IO/api/repeat.ts +3 -5
  1465. package/_src/IO/api/retry.ts +19 -21
  1466. package/_src/IO/api/schedule.ts +20 -21
  1467. package/_src/IO/api/scoped.ts +2 -2
  1468. package/_src/IO/api/sequenceT.ts +7 -1
  1469. package/_src/IO/api/stateful.ts +0 -2
  1470. package/_src/IO/api/supervised.ts +4 -8
  1471. package/_src/IO/api/timeout.ts +10 -16
  1472. package/_src/IO/api/withChildren.ts +2 -4
  1473. package/_src/IO/api/withFinalizer.ts +5 -7
  1474. package/_src/IO/api/withFinalizerExit.ts +6 -5
  1475. package/_src/IO/api/zipConcurrent.ts +69 -0
  1476. package/_src/IO/api.ts +576 -782
  1477. package/_src/IO/definition.ts +150 -137
  1478. package/_src/IO/runtime.ts +53 -64
  1479. package/_src/IO.ts +5 -3
  1480. package/_src/Layer/MemoMap.ts +62 -64
  1481. package/_src/Layer/api.ts +95 -104
  1482. package/_src/Layer/definition.ts +0 -1
  1483. package/_src/LogLevel.ts +24 -16
  1484. package/_src/LogSpan.ts +16 -16
  1485. package/_src/Logger/api.ts +18 -17
  1486. package/_src/Logger/constructors.ts +9 -15
  1487. package/_src/Push/api.ts +702 -0
  1488. package/_src/Push/definition.ts +42 -0
  1489. package/_src/Push/internal.ts +39 -0
  1490. package/_src/Push.ts +5 -0
  1491. package/_src/Queue/api/dimapIO.ts +124 -47
  1492. package/_src/Queue/api/filterInputIO.ts +69 -24
  1493. package/_src/Queue/api/filterOutputIO.ts +77 -17
  1494. package/_src/Queue/api/operations.ts +33 -31
  1495. package/_src/Queue/api/poll.ts +3 -1
  1496. package/_src/Queue/api/takeBetween.ts +29 -30
  1497. package/_src/Queue/api/zipWithIO.ts +47 -36
  1498. package/_src/Queue/constructors.ts +5 -5
  1499. package/_src/Queue/definition.ts +129 -8
  1500. package/_src/Queue/internal.ts +24 -38
  1501. package/_src/Queue/strategy.ts +12 -26
  1502. package/_src/Ref/Atomic.ts +70 -4
  1503. package/_src/Ref/Derived.ts +22 -1
  1504. package/_src/Ref/DerivedAll.ts +26 -2
  1505. package/_src/Ref/Synchronized/api.ts +129 -130
  1506. package/_src/Ref/Synchronized/constructors.ts +1 -1
  1507. package/_src/Ref/Synchronized/definition.ts +21 -14
  1508. package/_src/Ref/Synchronized.ts +5 -0
  1509. package/_src/Ref/api/collect.ts +6 -8
  1510. package/_src/Ref/api/dimap.ts +51 -64
  1511. package/_src/Ref/api/filter.ts +12 -16
  1512. package/_src/Ref/api/get.ts +2 -5
  1513. package/_src/Ref/api/match.ts +8 -7
  1514. package/_src/Ref/api/matchAll.ts +6 -5
  1515. package/_src/Ref/api/modify.ts +61 -165
  1516. package/_src/Ref/api/set.ts +7 -9
  1517. package/_src/Ref/constructors.ts +3 -1
  1518. package/_src/Ref/definition.ts +56 -23
  1519. package/_src/Ref/symbols.ts +29 -0
  1520. package/_src/Ref.ts +2 -0
  1521. package/_src/RefSubject/Atomic.ts +120 -0
  1522. package/_src/RefSubject/Synchronized/api.ts +14 -0
  1523. package/_src/RefSubject/Synchronized/definition.ts +72 -0
  1524. package/_src/RefSubject/api.ts +240 -0
  1525. package/_src/RefSubject/definition.ts +62 -0
  1526. package/_src/RefSubject.ts +5 -0
  1527. package/_src/Reloadable/constructors.ts +2 -2
  1528. package/_src/RuntimeConfig.ts +0 -31
  1529. package/_src/RuntimeFlag.ts +10 -0
  1530. package/_src/RuntimeFlags/Patch.ts +79 -0
  1531. package/_src/RuntimeFlags/RuntimeFlags.ts +112 -0
  1532. package/_src/RuntimeFlags.ts +4 -0
  1533. package/_src/STM/api/core-api.ts +32 -35
  1534. package/_src/STM/api.ts +211 -201
  1535. package/_src/STM/internal/Entry.ts +0 -10
  1536. package/_src/STM/internal/Journal.ts +24 -27
  1537. package/_src/STM.ts +0 -1
  1538. package/_src/Schedule/Decision.ts +10 -8
  1539. package/_src/Schedule/api/driver.ts +2 -6
  1540. package/_src/Schedule/api.ts +471 -474
  1541. package/_src/Schedule/definition.ts +0 -1
  1542. package/_src/Scope/ReleaseMap/api/releaseAll.ts +24 -26
  1543. package/_src/Scope/ReleaseMap/api.ts +77 -74
  1544. package/_src/Scope/ReleaseMap/constructors.ts +1 -1
  1545. package/_src/Scope/api.ts +16 -18
  1546. package/_src/ScopedRef/api.ts +0 -3
  1547. package/_src/ScopedRef/definition.ts +1 -2
  1548. package/_src/Sink/api.ts +326 -354
  1549. package/_src/State/api.ts +12 -8
  1550. package/_src/State/internal.ts +1 -1
  1551. package/_src/Stream/api/zipAllWith.ts +7 -6
  1552. package/_src/Stream/api/zipWith.ts +5 -8
  1553. package/_src/Stream/api/zipWithChunks.ts +7 -6
  1554. package/_src/Stream/api.ts +1086 -1203
  1555. package/_src/Stream/definition.ts +0 -2
  1556. package/_src/Stream/internal/DebounceState.ts +16 -17
  1557. package/_src/Stream/internal/Handoff.ts +32 -36
  1558. package/_src/Stream/internal/SinkEndReason.ts +13 -14
  1559. package/_src/Stream/internal/Take.ts +21 -21
  1560. package/_src/Stream/internal/util.ts +0 -2
  1561. package/_src/Subject/Atomic.ts +28 -0
  1562. package/_src/Subject/api.ts +18 -0
  1563. package/_src/Subject/definition.ts +18 -0
  1564. package/_src/Subject.ts +5 -0
  1565. package/_src/SubscriptionRef.ts +58 -0
  1566. package/_src/Supervisor/api.ts +20 -16
  1567. package/_src/Supervisor/definition.ts +0 -1
  1568. package/_src/SupervisorPatch.ts +10 -6
  1569. package/_src/TExit/definition.ts +0 -8
  1570. package/_src/TFuture/api.ts +23 -17
  1571. package/_src/TFuture/definition.ts +2 -3
  1572. package/_src/TReentrantLock/api.ts +18 -14
  1573. package/_src/TReentrantLock/definition.ts +1 -8
  1574. package/_src/TRef/api.ts +80 -250
  1575. package/_src/TRef/constructors.ts +6 -6
  1576. package/_src/TRef/definition.ts +161 -45
  1577. package/_src/TRef/symbols.ts +19 -0
  1578. package/_src/TRef.ts +1 -0
  1579. package/_src/TSemaphore/api.ts +20 -19
  1580. package/_src/TSemaphore/constructors.ts +7 -0
  1581. package/_src/TSemaphore/definition.ts +1 -1
  1582. package/_src/collection/immutable/Conc/dropUntilIO.ts +19 -21
  1583. package/_src/collection/immutable/Conc/dropWhileIO.ts +21 -23
  1584. package/_src/collection/immutable/Conc/filterIO.ts +15 -17
  1585. package/_src/collection/immutable/Conc/findIO.ts +17 -19
  1586. package/_src/collection/immutable/Conc/mapIO.ts +12 -10
  1587. package/_src/collection/immutable/Conc/takeWhileIO.ts +27 -29
  1588. package/_src/data/Exit/foreachIO.ts +8 -10
  1589. package/_src/global.ts +11 -3
  1590. package/_src/index.ts +10 -1
  1591. package/_src/internal/Hub.ts +17 -27
  1592. package/_src/internal/IsFatal.ts +14 -12
  1593. package/_src/internal/MutableQueue.ts +8 -8
  1594. package/_src/internal/StackTraceBuilder.ts +1 -2
  1595. package/collection/immutable/Conc/dropUntilIO.d.ts +3 -3
  1596. package/collection/immutable/Conc/dropWhileIO.d.ts +3 -3
  1597. package/collection/immutable/Conc/filterIO.d.ts +3 -3
  1598. package/collection/immutable/Conc/findIO.d.ts +2 -2
  1599. package/collection/immutable/Conc/mapIO.d.ts +3 -3
  1600. package/collection/immutable/Conc/takeWhileIO.d.ts +3 -3
  1601. package/data/Exit/foreachIO.d.ts +3 -3
  1602. package/global.d.ts +11 -3
  1603. package/index.d.ts +10 -1
  1604. package/internal/HashedPair.d.ts +2 -2
  1605. package/internal/Hub.d.ts +2 -2
  1606. package/internal/IsFatal.d.ts +3 -3
  1607. package/internal/MutableQueue.d.ts +3 -3
  1608. package/package.json +4 -4
  1609. package/Channel/api/mapOutIOC.d.ts +0 -8
  1610. package/Channel/api/zipC.d.ts +0 -16
  1611. package/Fiber/FiberContext.d.ts +0 -153
  1612. package/Fiber/api/evalOn.d.ts +0 -7
  1613. package/Fiber/api/evalOnIO.d.ts +0 -9
  1614. package/Fiber/api/interruptAsFork.d.ts +0 -8
  1615. package/FiberState/api.d.ts +0 -7
  1616. package/FiberState/constructors.d.ts +0 -22
  1617. package/FiberState/definition.d.ts +0 -38
  1618. package/FiberState.d.ts +0 -3
  1619. package/IO/api/withRuntimeConfig.d.ts +0 -10
  1620. package/IO/api/zipC.d.ts +0 -13
  1621. package/Ref/Atomic/Atomic.d.ts +0 -18
  1622. package/Ref/Atomic/api.d.ts +0 -53
  1623. package/_cjs/Channel/api/mapOutIOC.cjs +0 -63
  1624. package/_cjs/Channel/api/mapOutIOC.cjs.map +0 -1
  1625. package/_cjs/Channel/api/zipC.cjs.map +0 -1
  1626. package/_cjs/Fiber/FiberContext.cjs +0 -1088
  1627. package/_cjs/Fiber/FiberContext.cjs.map +0 -1
  1628. package/_cjs/Fiber/api/evalOn.cjs.map +0 -1
  1629. package/_cjs/Fiber/api/evalOnIO.cjs +0 -31
  1630. package/_cjs/Fiber/api/evalOnIO.cjs.map +0 -1
  1631. package/_cjs/Fiber/api/interruptAsFork.cjs +0 -15
  1632. package/_cjs/Fiber/api/interruptAsFork.cjs.map +0 -1
  1633. package/_cjs/FiberState/api.cjs.map +0 -1
  1634. package/_cjs/FiberState/constructors.cjs.map +0 -1
  1635. package/_cjs/FiberState/definition.cjs.map +0 -1
  1636. package/_cjs/FiberState.cjs.map +0 -1
  1637. package/_cjs/IO/api/foreachC.cjs.map +0 -1
  1638. package/_cjs/IO/api/withRuntimeConfig.cjs.map +0 -1
  1639. package/_cjs/IO/api/zipC.cjs +0 -67
  1640. package/_cjs/IO/api/zipC.cjs.map +0 -1
  1641. package/_cjs/Ref/Atomic/Atomic.cjs +0 -64
  1642. package/_cjs/Ref/Atomic/Atomic.cjs.map +0 -1
  1643. package/_cjs/Ref/Atomic/api.cjs +0 -156
  1644. package/_cjs/Ref/Atomic/api.cjs.map +0 -1
  1645. package/_mjs/Channel/api/mapOutIOC.mjs +0 -32
  1646. package/_mjs/Channel/api/mapOutIOC.mjs.map +0 -1
  1647. package/_mjs/Channel/api/zipC.mjs +0 -30
  1648. package/_mjs/Channel/api/zipC.mjs.map +0 -1
  1649. package/_mjs/Fiber/FiberContext.mjs +0 -1013
  1650. package/_mjs/Fiber/FiberContext.mjs.map +0 -1
  1651. package/_mjs/Fiber/api/evalOn.mjs +0 -17
  1652. package/_mjs/Fiber/api/evalOn.mjs.map +0 -1
  1653. package/_mjs/Fiber/api/evalOnIO.mjs +0 -16
  1654. package/_mjs/Fiber/api/evalOnIO.mjs.map +0 -1
  1655. package/_mjs/Fiber/api/interruptAsFork.mjs +0 -8
  1656. package/_mjs/Fiber/api/interruptAsFork.mjs.map +0 -1
  1657. package/_mjs/FiberState/api.mjs +0 -15
  1658. package/_mjs/FiberState/api.mjs.map +0 -1
  1659. package/_mjs/FiberState/constructors.mjs +0 -26
  1660. package/_mjs/FiberState/constructors.mjs.map +0 -1
  1661. package/_mjs/FiberState/definition.mjs +0 -26
  1662. package/_mjs/FiberState/definition.mjs.map +0 -1
  1663. package/_mjs/FiberState.mjs +0 -5
  1664. package/_mjs/FiberState.mjs.map +0 -1
  1665. package/_mjs/IO/api/foreachC.mjs +0 -118
  1666. package/_mjs/IO/api/foreachC.mjs.map +0 -1
  1667. package/_mjs/IO/api/withRuntimeConfig.mjs +0 -13
  1668. package/_mjs/IO/api/withRuntimeConfig.mjs.map +0 -1
  1669. package/_mjs/IO/api/zipC.mjs +0 -39
  1670. package/_mjs/IO/api/zipC.mjs.map +0 -1
  1671. package/_mjs/Ref/Atomic/Atomic.mjs +0 -47
  1672. package/_mjs/Ref/Atomic/Atomic.mjs.map +0 -1
  1673. package/_mjs/Ref/Atomic/api.mjs +0 -127
  1674. package/_mjs/Ref/Atomic/api.mjs.map +0 -1
  1675. package/_src/Channel/api/mapOutIOC.ts +0 -63
  1676. package/_src/Channel/api/zipC.ts +0 -104
  1677. package/_src/Fiber/FiberContext.ts +0 -1019
  1678. package/_src/Fiber/api/evalOn.ts +0 -17
  1679. package/_src/Fiber/api/evalOnIO.ts +0 -19
  1680. package/_src/Fiber/api/interruptAsFork.ts +0 -7
  1681. package/_src/FiberState/api.ts +0 -12
  1682. package/_src/FiberState/constructors.ts +0 -33
  1683. package/_src/FiberState/definition.ts +0 -44
  1684. package/_src/FiberState.ts +0 -5
  1685. package/_src/IO/api/withRuntimeConfig.ts +0 -20
  1686. package/_src/IO/api/zipC.ts +0 -74
  1687. package/_src/Ref/Atomic/Atomic.ts +0 -56
  1688. package/_src/Ref/Atomic/api.ts +0 -124
package/_src/IO/api.ts CHANGED
@@ -1,26 +1,21 @@
1
- import type { FiberStatus } from "../FiberStatus.js";
1
+ import type { Running } from "../FiberStatus.js";
2
2
  import type * as P from "@fncts/base/typeclass";
3
3
  import type { _E, _R } from "@fncts/base/types";
4
- import type { FiberContext } from "@fncts/io/Fiber/FiberContext";
5
- import type { Canceler } from "@fncts/io/IO/definition";
4
+ import type { FiberRuntime } from "@fncts/io/Fiber/FiberRuntime";
5
+ import type { RuntimeFlags } from "@fncts/io/RuntimeFlags";
6
6
 
7
7
  import { identity, pipe, tuple } from "@fncts/base/data/function";
8
- import { Stateful } from "@fncts/io/IO/definition";
9
8
  import {
10
9
  Async,
11
- Chain,
12
- Defer,
13
- DeferWith,
14
- Fail,
15
- Fork,
16
- IO,
17
- IOError,
18
- Logged,
19
- Match,
20
- Succeed,
21
- SucceedNow,
22
- Yield,
10
+ GenerateStackTrace,
11
+ OnSuccess,
12
+ OnSuccessAndFailure,
13
+ Sync,
14
+ UpdateRuntimeFlags,
15
+ YieldNow,
23
16
  } from "@fncts/io/IO/definition";
17
+ import { Stateful } from "@fncts/io/IO/definition";
18
+ import { Fail, IO, IOError, SucceedNow } from "@fncts/io/IO/definition";
24
19
 
25
20
  /**
26
21
  * Imports an asynchronous side-effect into a `IO`
@@ -32,103 +27,49 @@ export function async<R, E, A>(
32
27
  blockingOn: FiberId = FiberId.none,
33
28
  __tsplusTrace?: string,
34
29
  ): IO<R, E, A> {
35
- return IO.asyncMaybe(
36
- (cb) => {
37
- register(cb);
38
- return Nothing();
39
- },
40
- blockingOn,
41
- __tsplusTrace,
42
- );
43
- }
44
-
45
- /**
46
- * Imports an asynchronous effect into a pure `IO`, possibly returning the value synchronously.
47
- *
48
- * If the register function returns a value synchronously, then the callback
49
- * function must not be called. Otherwise the callback function must be called at most once.
50
- *
51
- * @tsplus static fncts.io.IOOps asyncMaybe
52
- */
53
- export function asyncMaybe<R, E, A>(
54
- register: (resolve: (_: IO<R, E, A>) => void) => Maybe<IO<R, E, A>>,
55
- blockingOn: FiberId = FiberId.none,
56
- __tsplusTrace?: string,
57
- ): IO<R, E, A> {
58
- return asyncInterrupt(
59
- (cb) => register(cb).match(() => Either.left(IO.unit), Either.right),
60
- blockingOn,
61
- __tsplusTrace,
62
- );
63
- }
64
-
65
- /**
66
- * Imports an asynchronous side-effect into an IO. The side-effect
67
- * has the option of returning the value synchronously, which is useful in
68
- * cases where it cannot be determined if the effect is synchronous or
69
- * asynchronous until the side-effect is actually executed. The effect also
70
- * has the option of returning a canceler, which will be used by the runtime
71
- * to cancel the asynchronous effect if the fiber executing the effect is
72
- * interrupted.
73
- *
74
- * If the register function returns a value synchronously, then the callback
75
- * function must not be called. Otherwise the callback function must be called
76
- * at most once.
77
- *
78
- * The list of fibers, that may complete the async callback, is used to
79
- * provide better diagnostics.
80
- *
81
- * @tsplus static fncts.io.IOOps asyncInterrupt
82
- */
83
- export function asyncInterrupt<R, E, A>(
84
- register: (cb: (resolve: IO<R, E, A>) => void) => Either<Canceler<R>, IO<R, E, A>>,
85
- blockingOn: FiberId = FiberId.none,
86
- __tsplusTrace?: string,
87
- ): IO<R, E, A> {
88
- return new Async(register, blockingOn, __tsplusTrace);
30
+ return new Async(register, () => blockingOn, __tsplusTrace);
89
31
  }
90
32
 
91
33
  /**
92
34
  * Attempts to convert defects into a failure, throwing away all information
93
35
  * about the cause of the failure.
94
36
  *
95
- * @tsplus fluent fncts.io.IO absorbWith
37
+ * @tsplus pipeable fncts.io.IO absorbWith
96
38
  */
97
- export function absorbWith_<R, E, A>(ma: IO<R, E, A>, f: (e: E) => unknown, __tsplusTrace?: string) {
98
- return ma.sandbox.matchIO((cause) => IO.failNow(cause.squashWith(f)), IO.succeedNow);
39
+ export function absorbWith<R, E, A>(f: (e: E) => unknown, __tsplusTrace?: string) {
40
+ return (ma: IO<R, E, A>): IO<R, unknown, A> =>
41
+ ma.sandbox.matchIO((cause) => IO.failNow(cause.squashWith(f)), IO.succeedNow);
99
42
  }
100
43
 
101
44
  /**
102
- * @tsplus fluent fncts.io.IO apFirst
103
- * @tsplus operator fncts.io.IO <
45
+ * @tsplus pipeable fncts.io.IO zipLeft
46
+ * @tsplus pipeable-operator fncts.io.IO <
104
47
  */
105
- export function apFirst_<R, E, A, R1, E1, B>(
106
- self: IO<R, E, A>,
107
- fb: IO<R1, E1, B>,
108
- __tsplusTrace?: string,
109
- ): IO<R1 | R, E1 | E, A> {
110
- return self.flatMap((a) => fb.map(() => a));
48
+ export function zipLeft<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string) {
49
+ return <R, E, A>(self: IO<R, E, A>): IO<R1 | R, E1 | E, A> => {
50
+ return self.flatMap((a) => fb.map(() => a));
51
+ };
111
52
  }
112
53
 
113
54
  /**
114
55
  * Combine two effectful actions, keeping only the result of the second
115
56
  *
116
- * @tsplus fluent fncts.io.IO apSecond
117
- * @tsplus operator fncts.io.IO >
57
+ * @tsplus pipeable fncts.io.IO zipRight
58
+ * @tsplus pipeable-operator fncts.io.IO >
118
59
  */
119
- export function apSecond_<R, E, A, R1, E1, B>(
120
- self: IO<R, E, A>,
121
- fb: IO<R1, E1, B>,
122
- __tsplusTrace?: string,
123
- ): IO<R1 | R, E1 | E, B> {
124
- return self.flatMap(() => fb);
60
+ export function zipRight<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string) {
61
+ return <R, E, A>(self: IO<R, E, A>): IO<R1 | R, E1 | E, B> => {
62
+ return self.flatMap(() => fb);
63
+ };
125
64
  }
126
65
 
127
66
  /**
128
- * @tsplus fluent fncts.io.IO as
67
+ * @tsplus pipeable fncts.io.IO as
129
68
  */
130
- export function as_<R, E, A, B>(self: IO<R, E, A>, b: Lazy<B>, __tsplusTrace?: string): IO<R, E, B> {
131
- return self.map(() => b());
69
+ export function as<B>(b: Lazy<B>, __tsplusTrace?: string) {
70
+ return <R, E, A>(self: IO<R, E, A>): IO<R, E, B> => {
71
+ return self.map(() => b());
72
+ };
132
73
  }
133
74
 
134
75
  /**
@@ -160,116 +101,124 @@ export function asUnit<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R
160
101
  * Returns an IO whose failure and success channels have been mapped by
161
102
  * the specified pair of functions, `f` and `g`.
162
103
  *
163
- * @tsplus fluent fncts.io.IO bimap
104
+ * @tsplus pipeable fncts.io.IO bimap
164
105
  */
165
- export function bimap_<R, E, A, E1, B>(
166
- self: IO<R, E, A>,
167
- f: (e: E) => E1,
168
- g: (a: A) => B,
169
- __tsplusTrace?: string,
170
- ): IO<R, E1, B> {
171
- return self.matchIO(
172
- (e) => IO.failNow(f(e)),
173
- (a) => IO.succeedNow(g(a)),
174
- );
106
+ export function bimap<E, A, E1, B>(f: (e: E) => E1, g: (a: A) => B, __tsplusTrace?: string) {
107
+ return <R>(self: IO<R, E, A>): IO<R, E1, B> => {
108
+ return self.matchIO(
109
+ (e) => IO.failNow(f(e)),
110
+ (a) => IO.succeedNow(g(a)),
111
+ );
112
+ };
175
113
  }
176
114
 
177
115
  /**
178
116
  * Returns an IO that effectfully "peeks" at the failure or success of
179
117
  * this effect.
180
118
  *
181
- * @tsplus fluent fncts.io.IO bitap
119
+ * @tsplus pipeable fncts.io.IO bitap
182
120
  */
183
- export function bitap_<R, E, A, R1, E1, R2, E2>(
184
- self: IO<R, E, A>,
121
+ export function bitap<E, A, R1, E1, R2, E2>(
185
122
  onFailure: (e: E) => IO<R1, E1, any>,
186
123
  onSuccess: (a: A) => IO<R2, E2, any>,
187
124
  __tsplusTrace?: string,
188
- ): IO<R | R1 | R2, E | E1 | E2, A> {
189
- return self.matchCauseIO(
190
- (cause) =>
191
- cause.failureOrCause.match(
192
- (e) => onFailure(e).flatMap(() => IO.failCauseNow(cause)),
193
- () => IO.failCauseNow(cause),
194
- ),
195
- (a) => onSuccess(a).apSecond(IO.succeedNow(a)),
196
- );
125
+ ) {
126
+ return <R>(self: IO<R, E, A>): IO<R | R1 | R2, E | E1 | E2, A> => {
127
+ return self.matchCauseIO(
128
+ (cause) =>
129
+ cause.failureOrCause.match(
130
+ (e) => onFailure(e).flatMap(() => IO.failCauseNow(cause)),
131
+ () => IO.failCauseNow(cause),
132
+ ),
133
+ (a) => onSuccess(a).zipRight(IO.succeedNow(a)),
134
+ );
135
+ };
197
136
  }
198
137
 
199
138
  /**
200
139
  * Recovers from the specified error
201
140
  *
202
- * @tsplus fluent fncts.io.IO catch
141
+ * @tsplus pipeable fncts.io.IO catch
203
142
  */
204
- export function catch_<N extends keyof E, K extends E[N] & string, R, E, A, R1, E1, A1>(
205
- ma: IO<R, E, A>,
143
+ export function catchTagWith<N extends keyof E, K extends E[N] & string, E, R1, E1, A1>(
206
144
  tag: N,
207
145
  k: K,
208
- f: (e: Extract<E, { [n in N]: K }>) => IO<R1, E1, A1>,
146
+ f: (
147
+ e: Extract<
148
+ E,
149
+ {
150
+ [n in N]: K;
151
+ }
152
+ >,
153
+ ) => IO<R1, E1, A1>,
209
154
  __tsplusTrace?: string,
210
- ): IO<R | R1, Exclude<E, { [n in N]: K }> | E1, A | A1> {
211
- return ma.catchAll((e) => {
212
- if (tag in e && e[tag] === k) {
213
- return f(e as any);
214
- }
215
- return IO.failNow(e as any);
216
- });
155
+ ) {
156
+ return <R, A>(
157
+ ma: IO<R, E, A>,
158
+ ): IO<
159
+ R | R1,
160
+ | Exclude<
161
+ E,
162
+ {
163
+ [n in N]: K;
164
+ }
165
+ >
166
+ | E1,
167
+ A | A1
168
+ > => {
169
+ return ma.catchAll((e) => {
170
+ if (isObject(e) && tag in e && e[tag] === k) {
171
+ return f(e as any);
172
+ }
173
+ return IO.failNow(e as any);
174
+ });
175
+ };
217
176
  }
218
177
 
219
178
  /**
220
179
  * Recovers from all errors
221
180
  *
222
- * @tsplus fluent fncts.io.IO catchAll
181
+ * @tsplus pipeable fncts.io.IO catchAll
223
182
  */
224
- export function catchAll_<R, E, A, R1, E1, A1>(
225
- ma: IO<R, E, A>,
226
- f: (e: E) => IO<R1, E1, A1>,
227
- __tsplusTrace?: string,
228
- ): IO<R | R1, E1, A | A1> {
229
- return ma.matchIO(f, IO.succeedNow);
183
+ export function catchAll<E, R1, E1, A1>(f: (e: E) => IO<R1, E1, A1>, __tsplusTrace?: string) {
184
+ return <R, A>(ma: IO<R, E, A>): IO<R | R1, E1, A | A1> => {
185
+ return ma.matchIO(f, IO.succeedNow);
186
+ };
230
187
  }
231
188
 
232
189
  /**
233
190
  *
234
191
  * Recovers from all errors with provided cause.
235
192
  *
236
- * @tsplus fluent fncts.io.IO catchAllCause
193
+ * @tsplus pipeable fncts.io.IO catchAllCause
237
194
  */
238
- export function catchAllCause_<R, E, A, R1, E1, A1>(
239
- ma: IO<R, E, A>,
240
- f: (_: Cause<E>) => IO<R1, E1, A1>,
241
- __tsplusTrace?: string,
242
- ) {
243
- return ma.matchCauseIO(f, IO.succeedNow);
195
+ export function catchAllCause<R, E, A, R1, E1, A1>(f: (_: Cause<E>) => IO<R1, E1, A1>, __tsplusTrace?: string) {
196
+ return (ma: IO<R, E, A>): IO<R | R1, E1, A | A1> => ma.matchCauseIO(f, IO.succeedNow);
244
197
  }
245
198
 
246
199
  /**
247
200
  * Recovers from some or all of the error cases.
248
201
  *
249
- * @tsplus fluent fncts.io.IO catchJust
202
+ * @tsplus pipeable fncts.io.IO catchJust
250
203
  */
251
- export function catchJust_<R, E, A, R1, E1, A1>(
252
- ma: IO<R, E, A>,
253
- f: (e: E) => Maybe<IO<R1, E1, A1>>,
254
- __tsplusTrace?: string,
255
- ): IO<R | R1, E | E1, A | A1> {
256
- return ma.matchCauseIO(
257
- (cause) => cause.failureOrCause.match((e) => f(e).getOrElse(IO.failCauseNow(cause)), IO.failCauseNow),
258
- IO.succeedNow,
259
- );
204
+ export function catchJust<E, R1, E1, A1>(f: (e: E) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string) {
205
+ return <R, A>(ma: IO<R, E, A>): IO<R | R1, E | E1, A | A1> => {
206
+ return ma.matchCauseIO(
207
+ (cause) => cause.failureOrCause.match((e) => f(e).getOrElse(IO.failCauseNow(cause)), IO.failCauseNow),
208
+ IO.succeedNow,
209
+ );
210
+ };
260
211
  }
261
212
 
262
213
  /**
263
214
  * Recovers from some or all of the error cases with provided cause.
264
215
  *
265
- * @tsplus fluent fncts.io.IO catchJustCause
216
+ * @tsplus pipeable fncts.io.IO catchJustCause
266
217
  */
267
- export function catchJustCause_<R, E, A, R1, E1, A1>(
268
- ma: IO<R, E, A>,
269
- f: (_: Cause<E>) => Maybe<IO<R1, E1, A1>>,
270
- __tsplusTrace?: string,
271
- ): IO<R | R1, E | E1, A | A1> {
272
- return ma.matchCauseIO((cause) => f(cause).getOrElse(IO.failCauseNow(cause)), IO.succeedNow);
218
+ export function catchJustCause<E, R1, E1, A1>(f: (_: Cause<E>) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string) {
219
+ return <R, A>(ma: IO<R, E, A>): IO<R | R1, E | E1, A | A1> => {
220
+ return ma.matchCauseIO((cause) => f(cause).getOrElse(IO.failCauseNow(cause)), IO.succeedNow);
221
+ };
273
222
  }
274
223
 
275
224
  /**
@@ -280,28 +229,54 @@ export function catchJustCause_<R, E, A, R1, E1, A1>(
280
229
  * system, to transmit information on a defect for diagnostic or explanatory
281
230
  * purposes.
282
231
  *
283
- * @tsplus fluent fncts.io.IO catchJustDefect
232
+ * @tsplus pipeable fncts.io.IO catchJustDefect
284
233
  */
285
- export function catchJustDefect_<R, E, A, R1, E1, A1>(
286
- ma: IO<R, E, A>,
287
- f: (_: unknown) => Maybe<IO<R1, E1, A1>>,
288
- __tsplusTrace?: string,
289
- ): IO<R | R1, E | E1, A | A1> {
290
- return ma.unrefineWith(f, IO.failNow).catchAll((a) => a as IO<R | R1, E | E1, A | A1>);
234
+ export function catchJustDefect<R1, E1, A1>(f: (_: unknown) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string) {
235
+ return <R, E, A>(ma: IO<R, E, A>): IO<R | R1, E | E1, A | A1> => {
236
+ return ma.unrefineWith(f, IO.failNow).catchAll((a) => a as IO<R | R1, E | E1, A | A1>);
237
+ };
291
238
  }
292
239
 
293
240
  /**
294
241
  * Recovers from the specified error
295
242
  *
296
- * @tsplus fluent IO catchTag
297
- */
298
- export function catchTag_<K extends E["_tag"] & string, R, E extends { _tag: string }, A, R1, E1, A1>(
299
- ma: IO<R, E, A>,
243
+ * @tsplus pipeable IO catchTag
244
+ */
245
+ export function catchTag<
246
+ K extends E["_tag"] & string,
247
+ E extends {
248
+ _tag: string;
249
+ },
250
+ R1,
251
+ E1,
252
+ A1,
253
+ >(
300
254
  k: K,
301
- f: (e: Extract<E, { _tag: K }>) => IO<R1, E1, A1>,
255
+ f: (
256
+ e: Extract<
257
+ E,
258
+ {
259
+ _tag: K;
260
+ }
261
+ >,
262
+ ) => IO<R1, E1, A1>,
302
263
  __tsplusTrace?: string,
303
- ): IO<R | R1, Exclude<E, { _tag: K }> | E1, A | A1> {
304
- return ma.catch("_tag", k, f);
264
+ ) {
265
+ return <R, A>(
266
+ ma: IO<R, E, A>,
267
+ ): IO<
268
+ R | R1,
269
+ | Exclude<
270
+ E,
271
+ {
272
+ _tag: K;
273
+ }
274
+ >
275
+ | E1,
276
+ A | A1
277
+ > => {
278
+ return ma.catch("_tag", k, f);
279
+ };
305
280
  }
306
281
 
307
282
  /**
@@ -312,79 +287,71 @@ export function cause<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, n
312
287
  }
313
288
 
314
289
  /**
315
- * @tsplus fluent fncts.io.IO causeAsError
290
+ * @tsplus pipeable fncts.io.IO causeAsError
316
291
  */
317
- export function causeAsError<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, Cause<E>, A> {
318
- return ma.matchCauseIO(IO.failNow, IO.succeedNow);
292
+ export function causeAsError(__tsplusTrace?: string) {
293
+ return <R, E, A>(ma: IO<R, E, A>): IO<R, Cause<E>, A> => {
294
+ return ma.matchCauseIO(IO.failNow, IO.succeedNow);
295
+ };
319
296
  }
320
297
 
321
298
  /**
322
- * Returns an IO that models the execution of this effect, followed by
323
- * the passing of its value to the specified continuation function `f`,
324
- * followed by the effect that it returns.
299
+ * Checks the interrupt status, and produces the IO returned by the
300
+ * specified callback.
325
301
  *
326
- * @tsplus fluent fncts.io.IO flatMap
302
+ * @tsplus static fncts.io.IOOps checkInterruptible
327
303
  */
328
- export function flatMap_<R, E, A, R1, E1, B>(
329
- ma: IO<R, E, A>,
330
- f: (a: A) => IO<R1, E1, B>,
304
+ export function checkInterruptible<R, E, A>(
305
+ f: (i: InterruptStatus) => IO<R, E, A>,
331
306
  __tsplusTrace?: string,
332
- ): IO<R | R1, E | E1, B> {
333
- return new Chain(ma, f, __tsplusTrace);
307
+ ): IO<R, E, A> {
308
+ return IO.withFiberRuntime((_, status) => f(InterruptStatus.fromBoolean(status.runtimeFlags.interruption)));
334
309
  }
335
310
 
336
311
  /**
337
- * @tsplus fluent fncts.io.IO flatMapError
312
+ * Returns an IO that models the execution of this effect, followed by
313
+ * the passing of its value to the specified continuation function `f`,
314
+ * followed by the effect that it returns.
315
+ *
316
+ * @tsplus pipeable fncts.io.IO flatMap
338
317
  */
339
- export function flatMapError_<R, R1, E, E1, A>(
340
- ma: IO<R, E, A>,
341
- f: (e: E) => IO<R1, never, E1>,
342
- __tsplusTrace?: string,
343
- ): IO<R | R1, E1, A> {
344
- return ma.swapWith((effect) => effect.flatMap(f));
318
+ export function flatMap<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string) {
319
+ return <R, E>(ma: IO<R, E, A>): IO<R | R1, E | E1, B> => {
320
+ return new OnSuccess(ma, f, __tsplusTrace);
321
+ };
345
322
  }
346
323
 
347
324
  /**
348
- * Checks the interrupt status, and produces the IO returned by the
349
- * specified callback.
350
- *
351
- * @tsplus static fncts.io.IOOps checkInterruptible
325
+ * @tsplus pipeable fncts.io.IO flatMapError
352
326
  */
353
- export function checkInterruptible<R, E, A>(
354
- f: (i: InterruptStatus) => IO<R, E, A>,
355
- __tsplusTrace?: string,
356
- ): IO<R, E, A> {
357
- return IO.withFiberContext((fiber) => f(InterruptStatus.fromBoolean(fiber.unsafeIsInterruptible)));
327
+ export function flatMapError<R1, E, E1>(f: (e: E) => IO<R1, never, E1>, __tsplusTrace?: string) {
328
+ return <R, A>(ma: IO<R, E, A>): IO<R | R1, E1, A> => {
329
+ return ma.swapWith((effect) => effect.flatMap(f));
330
+ };
358
331
  }
359
332
 
360
333
  /**
361
- * @tsplus fluent fncts.io.IO collect
334
+ * @tsplus pipeable fncts.io.IO collect
362
335
  */
363
- export function collect_<R, E, A, E1, A1>(
364
- ma: IO<R, E, A>,
365
- f: Lazy<E1>,
366
- pf: (a: A) => Maybe<A1>,
367
- __tsplusTrace?: string,
368
- ): IO<R, E | E1, A1> {
369
- return ma.collectIO(f, (a) => pf(a).map(IO.succeedNow));
336
+ export function collect<A, E1, A1>(f: Lazy<E1>, pf: (a: A) => Maybe<A1>, __tsplusTrace?: string) {
337
+ return <R, E>(ma: IO<R, E, A>): IO<R, E | E1, A1> => {
338
+ return ma.collectIO(f, (a) => pf(a).map(IO.succeedNow));
339
+ };
370
340
  }
371
341
 
372
342
  /**
373
- * @tsplus fluent fncts.io.IO collectIO
343
+ * @tsplus pipeable fncts.io.IO collectIO
374
344
  */
375
- export function collectIO_<R, E, A, R1, E1, A1, E2>(
376
- ma: IO<R, E, A>,
377
- f: Lazy<E2>,
378
- pf: (a: A) => Maybe<IO<R1, E1, A1>>,
379
- __tsplusTrace?: string,
380
- ): IO<R | R1, E | E1 | E2, A1> {
381
- return ma.flatMap((a) => pf(a).getOrElse(IO.fail(f)));
345
+ export function collectIO<A, R1, E1, A1, E2>(f: Lazy<E2>, pf: (a: A) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string) {
346
+ return <R, E>(ma: IO<R, E, A>): IO<R | R1, E | E1 | E2, A1> => {
347
+ return ma.flatMap((a) => pf(a).getOrElse(IO.fail(f)));
348
+ };
382
349
  }
383
350
 
384
351
  /**
385
352
  * @tsplus static fncts.io.IOOps condIO
386
353
  */
387
- export function condIO_<R, R1, E, A>(
354
+ export function condIO<R, R1, E, A>(
388
355
  b: boolean,
389
356
  onTrue: URIO<R, A>,
390
357
  onFalse: URIO<R1, E>,
@@ -402,22 +369,7 @@ export function condIO_<R, R1, E, A>(
402
369
  * @tsplus static fncts.io.IOOps defer
403
370
  */
404
371
  export function defer<R, E, A>(io: Lazy<IO<R, E, A>>, __tsplusTrace?: string): IO<R, E, A> {
405
- return new Defer(io, __tsplusTrace);
406
- }
407
-
408
- /**
409
- * Returns a lazily constructed effect, whose construction may itself require
410
- * effects. The effect must not throw any exceptions. When no environment is required (i.e., when R == unknown)
411
- * it is conceptually equivalent to `flatten(effectTotal(io))`. If you wonder if the effect throws exceptions,
412
- * do not use this method, use `IO.deferTryCatchWith`.
413
- *
414
- * @tsplus static fncts.io.IOOps deferWith
415
- */
416
- export function deferWith<R, E, A>(
417
- io: (runtimeConfig: RuntimeConfig, id: FiberId) => IO<R, E, A>,
418
- __tsplusTrace?: string,
419
- ): IO<R, E, A> {
420
- return new DeferWith(io, __tsplusTrace);
372
+ return IO.succeed(io).flatMap(identity);
421
373
  }
422
374
 
423
375
  /**
@@ -431,30 +383,11 @@ export function deferTry<R, E, A>(io: () => IO<R, E, A>, __tsplusTrace?: string)
431
383
  try {
432
384
  return io();
433
385
  } catch (u) {
434
- throw new IOError(Exit.fail(u));
386
+ throw new IOError(Cause.fail(u));
435
387
  }
436
388
  }, __tsplusTrace);
437
389
  }
438
390
 
439
- /**
440
- * Returns a lazily constructed effect, whose construction may itself require effects.
441
- * When no environment is required (i.e., when R == unknown) it is conceptually equivalent to `flatten(effect(io))`.
442
- *
443
- * @tsplus static IOOps deferTryWith
444
- */
445
- export function deferTryWith<R, E, A>(
446
- io: (runtimeConfig: RuntimeConfig, id: FiberId) => IO<R, E, A>,
447
- __tsplusTrace?: string,
448
- ): IO<R, unknown, A> {
449
- return IO.deferWith((runtimeConfig, id) => {
450
- try {
451
- return io(runtimeConfig, id);
452
- } catch (u) {
453
- throw new IOError(Exit.fail(u));
454
- }
455
- });
456
- }
457
-
458
391
  /**
459
392
  * Returns a lazily constructed effect, whose construction may itself require effects,
460
393
  * translating any thrown exceptions into typed failed effects and mapping the error.
@@ -472,48 +405,11 @@ export function deferTryCatch<R, E, A, E1>(
472
405
  try {
473
406
  return io();
474
407
  } catch (u) {
475
- throw new IOError(Exit.fail(onThrow(u)));
408
+ throw new IOError(Cause.fail(onThrow(u)));
476
409
  }
477
410
  });
478
411
  }
479
412
 
480
- /**
481
- * Returns a lazily constructed effect, whose construction may itself require effects,
482
- * translating any thrown exceptions into typed failed effects and mapping the error.
483
- *
484
- * When no environment is required (i.e., when R == unknown) it is conceptually equivalent to `flatten(effect(io))`.
485
- *
486
- * @tsplus static IOOps deferTryCatchWith
487
- */
488
- export function deferTryCatchWith<R, E, A, E1>(
489
- io: (runtimeConfig: RuntimeConfig, id: FiberId) => IO<R, E, A>,
490
- onThrow: (error: unknown) => E1,
491
- __tsplusTrace?: string,
492
- ): IO<R, E | E1, A> {
493
- return IO.deferWith((runtimeConfig, id) => {
494
- try {
495
- return io(runtimeConfig, id);
496
- } catch (u) {
497
- throw new IOError(Exit.fail(onThrow(u)));
498
- }
499
- });
500
- }
501
-
502
- /**
503
- * @tsplus static fncts.io.IOOps descriptor
504
- */
505
- export const descriptor = descriptorWith(IO.succeedNow);
506
-
507
- /**
508
- * Constructs an IO based on information about the current fiber, such as
509
- * its identity.
510
- *
511
- * @tsplus static fncts.io.IOOps descriptorWith
512
- */
513
- export function descriptorWith<R, E, A>(f: (d: FiberDescriptor) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A> {
514
- return IO.withFiberContext((fiber) => f(fiber.unsafeGetDescriptor()));
515
- }
516
-
517
413
  /**
518
414
  * Folds an `IO` that may fail with `E` or succeed with `A` into one that never fails but succeeds with `Either<E, A>`
519
415
  *
@@ -524,24 +420,12 @@ export function either<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): URIO<R
524
420
  }
525
421
 
526
422
  /**
527
- * @tsplus fluent fncts.io.IO ensuring
528
- */
529
- export function ensuring_<R, E, A, R1>(
530
- self: IO<R, E, A>,
531
- finalizer: IO<R1, never, any>,
532
- __tsplusTrace?: string,
533
- ): IO<R | R1, E, A> {
534
- return IO.withFiberContext((fiber) => {
535
- fiber.unsafeAddFinalizer(finalizer);
536
- return self;
537
- });
538
- }
539
-
540
- /**
541
- * @tsplus fluent fncts.io.IO errorAsCause
423
+ * @tsplus pipeable fncts.io.IO errorAsCause
542
424
  */
543
- export function errorAsCause<R, E, A>(ma: IO<R, Cause<E>, A>, __tsplusTrace?: string): IO<R, E, A> {
544
- return ma.matchIO(IO.failCauseNow, IO.succeedNow);
425
+ export function errorAsCause(__tsplusTrace?: string) {
426
+ return <R, E, A>(ma: IO<R, Cause<E>, A>): IO<R, E, A> => {
427
+ return ma.matchIO(IO.failCauseNow, IO.succeedNow);
428
+ };
545
429
  }
546
430
 
547
431
  /**
@@ -552,24 +436,33 @@ export function eventually<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO
552
436
  }
553
437
 
554
438
  /**
555
- * @tsplus fluent fncts.io.IO extend
439
+ * @tsplus pipeable fncts.io.IO extend
556
440
  */
557
- export function extend_<R, E, A, B>(wa: IO<R, E, A>, f: (wa: IO<R, E, A>) => B, __tsplusTrace?: string): IO<R, E, B> {
558
- return wa.matchIO(IO.failNow, (_) => IO.succeed(f(wa)));
441
+ export function extend<R, E, A, B>(f: (wa: IO<R, E, A>) => B, __tsplusTrace?: string) {
442
+ return (wa: IO<R, E, A>): IO<R, E, B> => {
443
+ return wa.matchIO(IO.failNow, (_) => IO.succeed(f(wa)));
444
+ };
559
445
  }
560
446
 
561
447
  /**
562
448
  * @tsplus static fncts.io.IOOps fail
563
449
  */
564
450
  export function fail<E>(e: Lazy<E>, __tsplusTrace?: string): FIO<E, never> {
565
- return new Fail(() => Cause.fail(e()), __tsplusTrace);
451
+ return IO.failCause(Cause.fail(e()));
566
452
  }
567
453
 
568
454
  /**
569
455
  * @tsplus static fncts.io.IOOps failNow
570
456
  */
571
457
  export function failNow<E>(e: E, __tsplusTrace?: string): FIO<E, never> {
572
- return new Fail(() => Cause.fail(e), __tsplusTrace);
458
+ return IO.failCause(Cause.fail(e));
459
+ }
460
+
461
+ /**
462
+ * @tsplus static fncts.io.IOOps refailCause
463
+ */
464
+ export function refailCause<E>(cause: Cause<E>, __tsplusTrace?: string): FIO<E, never> {
465
+ return new Fail(() => cause, __tsplusTrace);
573
466
  }
574
467
 
575
468
  /**
@@ -587,7 +480,7 @@ export function failCauseNow<E>(cause: Cause<E>, __tsplusTrace?: string): FIO<E,
587
480
  * @tsplus static fncts.io.IOOps failCause
588
481
  */
589
482
  export function failCause<E = never, A = never>(cause: Lazy<Cause<E>>, __tsplusTrace?: string): FIO<E, A> {
590
- return new Fail(cause, __tsplusTrace);
483
+ return IO.stackTrace(__tsplusTrace).flatMap((trace) => IO.refailCause(Cause.traced(cause(), trace)));
591
484
  }
592
485
 
593
486
  /**
@@ -595,14 +488,14 @@ export function failCause<E = never, A = never>(cause: Lazy<Cause<E>>, __tsplusT
595
488
  *
596
489
  * @tsplus static fncts.io.IOOps fiberId
597
490
  */
598
- export const fiberId: IO<never, never, FiberId> = IO.descriptorWith((d) => IO.succeedNow(d.id));
491
+ export const fiberId: IO<never, never, FiberId> = IO.withFiberRuntime((fiber) => IO.succeed(fiber.id));
599
492
 
600
493
  /**
601
494
  * Filters the collection using the specified effectual predicate.
602
495
  *
603
496
  * @tsplus static fncts.io.IOOps filter
604
497
  */
605
- export function filter_<A, R, E>(
498
+ export function filter<A, R, E>(
606
499
  as: Iterable<A>,
607
500
  f: (a: A) => IO<R, E, boolean>,
608
501
  __tsplusTrace?: string,
@@ -622,7 +515,7 @@ export function filter_<A, R, E>(
622
515
  /**
623
516
  * @tsplus static fncts.io.IOOps filterMap
624
517
  */
625
- export function filterMap_<A, R, E, B>(
518
+ export function filterMap<A, R, E, B>(
626
519
  as: Iterable<A>,
627
520
  f: (a: A) => IO<R, E, Maybe<B>>,
628
521
  __tsplusTrace?: string,
@@ -633,7 +526,7 @@ export function filterMap_<A, R, E, B>(
633
526
  /**
634
527
  * @tsplus static fncts.io.IOOps filterMapWithIndex
635
528
  */
636
- export function filterMapWithIndex_<A, R, E, B>(
529
+ export function filterMapWithIndex<A, R, E, B>(
637
530
  as: Iterable<A>,
638
531
  f: (i: number, a: A) => IO<R, E, Maybe<B>>,
639
532
  __tsplusTrace?: string,
@@ -656,7 +549,7 @@ export function filterMapWithIndex_<A, R, E, B>(
656
549
  *
657
550
  * @tsplus static fncts.io.IOOps filterNot
658
551
  */
659
- export function filterNot_<A, R, E>(
552
+ export function filterNot<A, R, E>(
660
553
  as: Iterable<A>,
661
554
  f: (a: A) => IO<R, E, boolean>,
662
555
  __tsplusTrace?: string,
@@ -667,54 +560,43 @@ export function filterNot_<A, R, E>(
667
560
  /**
668
561
  * Applies `or` if the predicate fails.
669
562
  *
670
- * @tsplus fluent fncts.io.IO filterOrElse
563
+ * @tsplus pipeable fncts.io.IO filterOrElse
671
564
  */
672
- export function filterOrElse_<R, E, A, B extends A, R1, E1, A1>(
673
- fa: IO<R, E, A>,
565
+ export function filterOrElse<A, B extends A, R1, E1, A1>(
674
566
  refinement: Refinement<A, B>,
675
567
  or: (a: Exclude<A, B>) => IO<R1, E1, A1>,
676
568
  __tsplusTrace?: string,
677
- ): IO<R | R1, E | E1, B | A1>;
678
- export function filterOrElse_<R, E, A, R1, E1, A1>(
679
- fa: IO<R, E, A>,
569
+ ): <R, E>(fa: IO<R, E, A>) => IO<R | R1, E | E1, B | A1>;
570
+ export function filterOrElse<A, R1, E1, A1>(
680
571
  predicate: Predicate<A>,
681
572
  or: (a: A) => IO<R1, E1, A1>,
682
573
  __tsplusTrace?: string,
683
- ): IO<R | R1, E | E1, A | A1>;
684
- export function filterOrElse_<R, E, A, R1, E1, A1>(
685
- fa: IO<R, E, A>,
686
- predicate: Predicate<A>,
687
- or: unknown,
688
- __tsplusTrace?: string,
689
- ): IO<R | R1, E | E1, A | A1> {
690
- return flatMap_(
691
- fa,
692
- (a): IO<R1, E1, A | A1> => (predicate(a) ? IO.succeedNow(a) : IO.defer((or as (a: A) => IO<R1, E1, A1>)(a))),
693
- );
574
+ ): <R, E>(fa: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
575
+ export function filterOrElse<A>(predicate: Predicate<A>, or: unknown, __tsplusTrace?: string) {
576
+ return <R, E, R1, E1, A1>(fa: IO<R, E, A>): IO<R | R1, E | E1, A | A1> => {
577
+ return fa.flatMap(
578
+ (a): IO<R1, E1, A | A1> => (predicate(a) ? IO.succeedNow(a) : IO.defer((or as (a: A) => IO<R1, E1, A1>)(a))),
579
+ );
580
+ };
694
581
  }
695
582
 
696
583
  /**
697
584
  * Fails with `failWith` if the predicate fails.
698
585
  *
699
- * @tsplus fluent fncts.io.IO filterOrFail
586
+ * @tsplus pipeable fncts.io.IO filterOrFail
700
587
  */
701
- export function filterOrFail_<R, E, A, B extends A, E1>(
702
- fa: IO<R, E, A>,
588
+ export function filterOrFail<A, B extends A, E1>(
703
589
  refinement: Refinement<A, B>,
704
590
  failWith: (a: Exclude<A, B>) => E1,
705
- ): IO<R, E | E1, B>;
706
- export function filterOrFail_<R, E, A, E1>(
707
- fa: IO<R, E, A>,
591
+ ): <R, E>(fa: IO<R, E, A>) => IO<R, E | E1, B>;
592
+ export function filterOrFail<A, E1>(
708
593
  predicate: Predicate<A>,
709
594
  failWith: (a: A) => E1,
710
- ): IO<R, E | E1, A>;
711
- export function filterOrFail_<R, E, A, E1>(
712
- fa: IO<R, E, A>,
713
- predicate: Predicate<A>,
714
- failWith: unknown,
715
- __tsplusTrace?: string,
716
- ): IO<R, E | E1, A> {
717
- return filterOrElse_(fa, predicate, (a) => IO.failNow((failWith as (a: A) => E1)(a)));
595
+ ): <R, E>(fa: IO<R, E, A>) => IO<R, E | E1, A>;
596
+ export function filterOrFail<A>(predicate: Predicate<A>, failWith: unknown, __tsplusTrace?: string) {
597
+ return <R, E, E1>(fa: IO<R, E, A>): IO<R, E | E1, A> => {
598
+ return fa.filterOrElse(predicate, (a) => IO.failNow((failWith as (a: A) => E1)(a)));
599
+ };
718
600
  }
719
601
 
720
602
  /**
@@ -730,27 +612,22 @@ export function firstSuccess<R, E, A>(mas: NonEmptyArray<IO<R, E, A>>, __tsplusT
730
612
  /**
731
613
  * Halts with specified `unknown` if the predicate fails.
732
614
  *
733
- * @tsplus fluent fncts.io.IO filterOrHalt
615
+ * @tsplus pipeable fncts.io.IO filterOrHalt
734
616
  */
735
- export function filterOrHalt_<R, E, A, B extends A>(
736
- fa: IO<R, E, A>,
617
+ export function filterOrHalt<A, B extends A>(
737
618
  refinement: Refinement<A, B>,
738
619
  haltWith: (a: Exclude<A, B>) => unknown,
739
620
  __tsplusTrace?: string,
740
- ): IO<R, E, A>;
741
- export function filterOrHalt_<R, E, A>(
742
- fa: IO<R, E, A>,
621
+ ): <R, E>(fa: IO<R, E, A>) => IO<R, E, A>;
622
+ export function filterOrHalt<A>(
743
623
  predicate: Predicate<A>,
744
624
  haltWith: (a: A) => unknown,
745
625
  __tsplusTrace?: string,
746
- ): IO<R, E, A>;
747
- export function filterOrHalt_<R, E, A>(
748
- fa: IO<R, E, A>,
749
- predicate: Predicate<A>,
750
- haltWith: unknown,
751
- __tsplusTrace?: string,
752
- ): IO<R, E, A> {
753
- return fa.filterOrElse(predicate, (a) => IO.haltNow((haltWith as (a: A) => unknown)(a)));
626
+ ): <R, E>(fa: IO<R, E, A>) => IO<R, E, A>;
627
+ export function filterOrHalt<A>(predicate: Predicate<A>, haltWith: unknown, __tsplusTrace?: string) {
628
+ return <R, E>(fa: IO<R, E, A>): IO<R, E, A> => {
629
+ return fa.filterOrElse(predicate, (a) => IO.haltNow((haltWith as (a: A) => unknown)(a)));
630
+ };
754
631
  }
755
632
 
756
633
  /**
@@ -765,7 +642,7 @@ export function flatten<R, E, R1, E1, A>(self: IO<R, E, IO<R1, E1, A>>, __tsplus
765
642
  *
766
643
  * @tsplus static fncts.io.IOOps foldLeft
767
644
  */
768
- export function foldLeft_<A, B, R, E>(
645
+ export function foldLeft<A, B, R, E>(
769
646
  as: Iterable<A>,
770
647
  b: B,
771
648
  f: (b: B, a: A) => IO<R, E, B>,
@@ -779,12 +656,12 @@ export function foldLeft_<A, B, R, E>(
779
656
  *
780
657
  * @tsplus static fncts.io.IOOps foldMap
781
658
  */
782
- export function foldMap_<R, E, A, M>(
659
+ export function foldMap<R, E, A, M>(
783
660
  as: Iterable<IO<R, E, A>>,
784
661
  f: (a: A) => M,
785
662
  /** @tsplus auto */ M: P.Monoid<M>,
786
663
  ): IO<R, E, M> {
787
- return IO.foldLeft(as, M.nat, (m, a) => a.map((a) => M.combine(m, f(a))));
664
+ return IO.foldLeft(as, M.nat, (m, a) => a.map((a) => M.combine(f(a))(m)));
788
665
  }
789
666
 
790
667
  function foldRightLoop<A, B, R, E>(
@@ -802,7 +679,7 @@ function foldRightLoop<A, B, R, E>(
802
679
  *
803
680
  * @tsplus static fncts.io.IOOps foldRight
804
681
  */
805
- export function foldRight_<A, B, R, E>(
682
+ export function foldRight<A, B, R, E>(
806
683
  as: Iterable<A>,
807
684
  b: UIO<B>,
808
685
  f: (a: A, b: IO<R, E, B>) => IO<R, E, B>,
@@ -830,7 +707,7 @@ function foreachWithIndexDiscardLoop<A, R, E, B>(
830
707
  *
831
708
  * @tsplus static fncts.io.IOOps foreach
832
709
  */
833
- export function foreach_<A, R, E, B>(
710
+ export function foreach<A, R, E, B>(
834
711
  as: Iterable<A>,
835
712
  f: (a: A) => IO<R, E, B>,
836
713
  __tsplusTrace?: string,
@@ -855,7 +732,7 @@ export function foreach_<A, R, E, B>(
855
732
  *
856
733
  * @tsplus static fncts.io.IOOps foreachWithIndex
857
734
  */
858
- export function foreachWithIndex_<A, R, E, B>(
735
+ export function foreachWithIndex<A, R, E, B>(
859
736
  as: Iterable<A>,
860
737
  f: (i: number, a: A) => IO<R, E, B>,
861
738
  __tsplusTrace?: string,
@@ -874,7 +751,7 @@ export function foreachWithIndex_<A, R, E, B>(
874
751
  /**
875
752
  * @tsplus static fncts.io.IOOps foreachWithIndexDiscard
876
753
  */
877
- export function foreachWithIndexDiscard_<A, R, E, B>(
754
+ export function foreachWithIndexDiscard<A, R, E, B>(
878
755
  as: Iterable<A>,
879
756
  f: (i: number, a: A) => IO<R, E, B>,
880
757
  __tsplusTrace?: string,
@@ -888,7 +765,7 @@ export function foreachWithIndexDiscard_<A, R, E, B>(
888
765
  *
889
766
  * @tsplus static fncts.io.IOOps foreachDiscard
890
767
  */
891
- export function foreachDiscard_<A, R, E, B>(
768
+ export function foreachDiscard<A, R, E, B>(
892
769
  as: Iterable<A>,
893
770
  f: (a: A) => IO<R, E, B>,
894
771
  __tsplusTrace?: string,
@@ -902,35 +779,7 @@ export function foreachDiscard_<A, R, E, B>(
902
779
  * @tsplus getter fncts.io.IO forever
903
780
  */
904
781
  export function forever<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, never> {
905
- return ma.apSecond(IO.yieldNow).flatMap(() => ma.forever);
906
- }
907
-
908
- /**
909
- * Returns an IO that forks this IO into its own separate fiber,
910
- * returning the fiber immediately, without waiting for it to begin executing
911
- * the IO.
912
- *
913
- * You can use the `fork` method whenever you want to execute an IO in a
914
- * new fiber, concurrently and without "blocking" the fiber executing other
915
- * IOs. Using fibers can be tricky, so instead of using this method
916
- * directly, consider other higher-level methods, such as `raceWith`,
917
- * `zipPar`, and so forth.
918
- *
919
- * The fiber returned by this method has methods interrupt the fiber and to
920
- * wait for it to finish executing the IO. See `Fiber` for more
921
- * information.
922
- *
923
- * Whenever you use this method to launch a new fiber, the new fiber is
924
- * attached to the parent fiber's scope. This means when the parent fiber
925
- * terminates, the child fiber will be terminated as well, ensuring that no
926
- * fibers leak. This behavior is called "None supervision", and if this
927
- * behavior is not desired, you may use the `forkDaemon` or `forkIn`
928
- * methods.
929
- *
930
- * @tsplus getter fncts.io.IO fork
931
- */
932
- export function fork<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): URIO<R, FiberContext<E, A>> {
933
- return new Fork(ma, Nothing(), __tsplusTrace);
782
+ return ma.zipRight(IO.yieldNow).flatMap(() => ma.forever);
934
783
  }
935
784
 
936
785
  /**
@@ -946,6 +795,7 @@ export function fromEither<E, A>(either: Lazy<Either<E, A>>, __tsplusTrace?: str
946
795
  * Lifts an `Either` into an `IO`
947
796
  *
948
797
  * @tsplus static fncts.io.IOOps fromEitherNow
798
+ * @tsplus getter fncts.Either toIO
949
799
  */
950
800
  export function fromEitherNow<E, A>(either: Either<E, A>, __tsplusTrace?: string): IO<never, E, A> {
951
801
  return either.match(IO.failNow, IO.succeedNow);
@@ -955,6 +805,7 @@ export function fromEitherNow<E, A>(either: Either<E, A>, __tsplusTrace?: string
955
805
  * Lifts an `Eval` into an `IO`
956
806
  *
957
807
  * @tsplus static fncts.io.IOOps fromEval
808
+ * @tsplus getter fncts.Eval toIO
958
809
  */
959
810
  export function fromEval<A>(computation: Eval<A>, __tsplusTrace?: string): IO<never, never, A> {
960
811
  return IO.succeed(computation.run);
@@ -973,6 +824,7 @@ export function fromExit<E, A>(exit: Lazy<Exit<E, A>>, __tsplusTrace?: string):
973
824
  * Creates a `IO` from an exit value
974
825
  *
975
826
  * @tsplus static fncts.io.IOOps fromExitNow
827
+ * @tsplus getter fncts.Exit toIO
976
828
  */
977
829
  export function fromExitNow<E, A>(exit: Exit<E, A>, __tsplusTrace?: string): FIO<E, A> {
978
830
  return exit.match(IO.failCauseNow, IO.succeedNow);
@@ -990,6 +842,7 @@ export function fromMaybe<A>(maybe: Lazy<Maybe<A>>, __tsplusTrace?: string): FIO
990
842
 
991
843
  /**
992
844
  * @tsplus static fncts.io.IOOps fromMaybeNow
845
+ * @tsplus getter fncts.Maybe toIO
993
846
  */
994
847
  export function fromMaybeNow<A = never>(maybe: Maybe<A>, __tsplusTrace?: string): IO<unknown, Maybe<never>, A> {
995
848
  return maybe.match(() => IO.failNow(Nothing()), IO.succeedNow);
@@ -1051,27 +904,23 @@ export function get<R, E, A>(ma: IO<R, E, Maybe<A>>, __tsplusTrace?: string): IO
1051
904
  /**
1052
905
  * Extracts the optional value, or returns the given 'orElse'.
1053
906
  *
1054
- * @tsplus fluent fncts.io.IO getOrElse
907
+ * @tsplus pipeable fncts.io.IO getOrElse
1055
908
  */
1056
- export function getOrElse_<R, E, A, B>(
1057
- ma: IO<R, E, Maybe<A>>,
1058
- orElse: Lazy<B>,
1059
- __tsplusTrace?: string,
1060
- ): IO<R, E, A | B> {
1061
- return ma.map((ma) => ma.getOrElse(orElse));
909
+ export function getOrElse<B>(orElse: Lazy<B>, __tsplusTrace?: string) {
910
+ return <R, E, A>(ma: IO<R, E, Maybe<A>>): IO<R, E, A | B> => {
911
+ return ma.map((ma) => ma.getOrElse(orElse));
912
+ };
1062
913
  }
1063
914
 
1064
915
  /**
1065
916
  * Extracts the optional value, or executes the effect 'orElse'.
1066
917
  *
1067
- * @tsplus fluent fncts.io.IO getOrElseIO
918
+ * @tsplus pipeable fncts.io.IO getOrElseIO
1068
919
  */
1069
- export function getOrElseIO_<R, E, A, R1, E1, B>(
1070
- ma: IO<R, E, Maybe<A>>,
1071
- orElse: Lazy<IO<R1, E1, B>>,
1072
- __tsplusTrace?: string,
1073
- ): IO<R | R1, E | E1, A | B> {
1074
- return (ma as IO<R, E, Maybe<A | B>>).flatMap((mab) => mab.map(IO.succeedNow).getOrElse(orElse));
920
+ export function getOrElseIO<R1, E1, B>(orElse: Lazy<IO<R1, E1, B>>, __tsplusTrace?: string) {
921
+ return <R, E, A>(ma: IO<R, E, Maybe<A>>): IO<R | R1, E | E1, A | B> => {
922
+ return (ma as IO<R, E, Maybe<A | B>>).flatMap((mab) => mab.map(IO.succeedNow).getOrElse(orElse));
923
+ };
1075
924
  }
1076
925
 
1077
926
  /**
@@ -1079,7 +928,7 @@ export function getOrElseIO_<R, E, A, R1, E1, B>(
1079
928
  *
1080
929
  * @tsplus static fncts.io.IOOps getOrFailWith
1081
930
  */
1082
- export function getOrFailWith_<E, A>(maybe: Maybe<A>, onNothing: Lazy<E>, __tsplusTrace?: string): FIO<E, A> {
931
+ export function getOrFailWith<E, A>(maybe: Maybe<A>, onNothing: Lazy<E>, __tsplusTrace?: string): FIO<E, A> {
1083
932
  return IO.defer(maybe.match(() => IO.fail(onNothing), IO.succeedNow));
1084
933
  }
1085
934
 
@@ -1113,23 +962,23 @@ export function halt(e: Lazy<unknown>, __tsplusTrace?: string): UIO<never> {
1113
962
  export function haltNow(e: unknown, __tsplusTrace?: string): UIO<never> {
1114
963
  return IO.failCauseNow(Cause.halt(e, Trace.none), __tsplusTrace);
1115
964
  }
1116
-
1117
965
  /**
1118
- * @tsplus fluent fncts.io.IO ifIO
966
+ * @tsplus pipeable fncts.io.IO ifIO
1119
967
  */
1120
- export function ifIO_<R, E, R1, E1, B, R2, E2, C>(
1121
- self: IO<R, E, boolean>,
968
+ export function ifIO<R1, E1, B, R2, E2, C>(
1122
969
  onFalse: Lazy<IO<R1, E1, B>>,
1123
970
  onTrue: Lazy<IO<R2, E2, C>>,
1124
971
  __tsplusTrace?: string,
1125
- ): IO<R | R1 | R2, E | E1 | E2, B | C> {
1126
- return self.flatMap((b) => (b ? onTrue() : onFalse()));
972
+ ) {
973
+ return <R, E>(self: IO<R, E, boolean>): IO<R | R1 | R2, E | E1 | E2, B | C> => {
974
+ return self.flatMap((b) => (b ? onTrue() : onFalse()));
975
+ };
1127
976
  }
1128
977
 
1129
978
  /**
1130
979
  * @tsplus static fncts.io.IOOps if
1131
980
  */
1132
- export function if_<R, E, A, R1, E1, A1>(
981
+ export function cond<R, E, A, R1, E1, A1>(
1133
982
  b: boolean,
1134
983
  onTrue: Lazy<IO<R, E, A>>,
1135
984
  onFalse: Lazy<IO<R1, E1, A1>>,
@@ -1171,6 +1020,7 @@ export function isSuccess<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<
1171
1020
  () => true,
1172
1021
  );
1173
1022
  }
1023
+
1174
1024
  /**
1175
1025
  * Iterates with the specified effectual function. The moral equivalent of:
1176
1026
  *
@@ -1186,7 +1036,7 @@ export function isSuccess<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<
1186
1036
  *
1187
1037
  * @tsplus static fncts.io.IOOps iterate
1188
1038
  */
1189
- export function iterate_<R, E, A>(
1039
+ export function iterate<R, E, A>(
1190
1040
  initial: A,
1191
1041
  cont: (a: A) => boolean,
1192
1042
  body: (a: A) => IO<R, E, A>,
@@ -1208,7 +1058,10 @@ export function left<A>(a: Lazy<A>, __tsplusTrace?: string): UIO<Either<A, never
1208
1058
  * @tsplus static fncts.io.IOOps log
1209
1059
  */
1210
1060
  export function log(message: Lazy<string>, __tsplusTrace?: string): UIO<void> {
1211
- return new Logged(message, Cause.empty(), Nothing(), __tsplusTrace);
1061
+ return IO.withFiberRuntime((fiber) => {
1062
+ fiber.log(message, Cause.empty(), Nothing(), __tsplusTrace);
1063
+ return IO.unit;
1064
+ });
1212
1065
  }
1213
1066
 
1214
1067
  /**
@@ -1229,7 +1082,7 @@ export function log(message: Lazy<string>, __tsplusTrace?: string): UIO<void> {
1229
1082
  *
1230
1083
  * @tsplus static fncts.io.IOOps loop
1231
1084
  */
1232
- export function loop_<A, R, E, B>(
1085
+ export function loop<A, R, E, B>(
1233
1086
  initial: A,
1234
1087
  cont: (a: A) => boolean,
1235
1088
  inc: (b: A) => A,
@@ -1258,7 +1111,7 @@ export function loop_<A, R, E, B>(
1258
1111
  *
1259
1112
  * @tsplus static fncts.io.IOOps loopUnit
1260
1113
  */
1261
- export function loopUnit_<A, R, E>(
1114
+ export function loopUnit<A, R, E>(
1262
1115
  initial: A,
1263
1116
  cont: (a: A) => boolean,
1264
1117
  inc: (a: A) => A,
@@ -1275,10 +1128,12 @@ export function loopUnit_<A, R, E>(
1275
1128
  /**
1276
1129
  * Returns an `IO` whose success is mapped by the specified function `f`.
1277
1130
  *
1278
- * @tsplus fluent fncts.io.IO map
1131
+ * @tsplus pipeable fncts.io.IO map
1279
1132
  */
1280
- export function map_<R, E, A, B>(fa: IO<R, E, A>, f: (a: A) => B, __tsplusTrace?: string): IO<R, E, B> {
1281
- return fa.flatMap((a) => IO.succeedNow(f(a)));
1133
+ export function map<A, B>(f: (a: A) => B, __tsplusTrace?: string) {
1134
+ return <R, E>(fa: IO<R, E, A>): IO<R, E, B> => {
1135
+ return fa.flatMap((a) => IO.succeedNow(f(a)));
1136
+ };
1282
1137
  }
1283
1138
 
1284
1139
  /**
@@ -1288,16 +1143,18 @@ export function map_<R, E, A, B>(fa: IO<R, E, A>, f: (a: A) => B, __tsplusTrace?
1288
1143
  * function. This can be used to lift a "smaller" error into a "larger"
1289
1144
  * error.
1290
1145
  *
1291
- * @tsplus fluent fncts.io.IO mapError
1146
+ * @tsplus pipeable fncts.io.IO mapError
1292
1147
  */
1293
- export function mapError_<R, E, A, E1>(fea: IO<R, E, A>, f: (e: E) => E1, __tsplusTrace?: string): IO<R, E1, A> {
1294
- return fea.matchCauseIO((cause) => IO.failCauseNow(cause.map(f)), IO.succeedNow);
1148
+ export function mapError<E, E1>(f: (e: E) => E1, __tsplusTrace?: string) {
1149
+ return <R, A>(fea: IO<R, E, A>): IO<R, E1, A> => {
1150
+ return fea.matchCauseIO((cause) => IO.failCauseNow(cause.map(f)), IO.succeedNow);
1151
+ };
1295
1152
  }
1296
1153
 
1297
1154
  /**
1298
1155
  * @tsplus static fncts.io.IOOps mapTryCatch
1299
1156
  */
1300
- export function mapTryCatch_<R, E, A, E1, B>(
1157
+ export function mapTryCatch<R, E, A, E1, B>(
1301
1158
  io: IO<R, E, A>,
1302
1159
  f: (a: A) => B,
1303
1160
  onThrow: (u: unknown) => E1,
@@ -1311,57 +1168,58 @@ export function mapTryCatch_<R, E, A, E1, B>(
1311
1168
  * the specified function. This can be used to transform errors
1312
1169
  * while preserving the original structure of Cause.
1313
1170
  *
1314
- * @tsplus fluent fncts.io.IO mapErrorCause
1171
+ * @tsplus pipeable fncts.io.IO mapErrorCause
1315
1172
  */
1316
- export function mapErrorCause_<R, E, A, E1>(
1317
- ma: IO<R, E, A>,
1318
- f: (cause: Cause<E>) => Cause<E1>,
1319
- __tsplusTrace?: string,
1320
- ): IO<R, E1, A> {
1321
- return ma.matchCauseIO((cause) => IO.failCauseNow(f(cause)), IO.succeedNow);
1173
+ export function mapErrorCause<E, E1>(f: (cause: Cause<E>) => Cause<E1>, __tsplusTrace?: string) {
1174
+ return <R, A>(ma: IO<R, E, A>): IO<R, E1, A> => {
1175
+ return ma.matchCauseIO((cause) => IO.failCauseNow(f(cause)), IO.succeedNow);
1176
+ };
1322
1177
  }
1323
1178
 
1324
1179
  /**
1325
1180
  * A more powerful version of `match_` that allows recovering from any kind of failure except interruptions.
1326
1181
  *
1327
- * @tsplus fluent fncts.io.IO matchCause
1182
+ * @tsplus pipeable fncts.io.IO matchCause
1328
1183
  */
1329
- export function matchCause_<R, E, A, A1, A2>(
1330
- self: IO<R, E, A>,
1184
+ export function matchCause<E, A, A1, A2>(
1331
1185
  onFailure: (cause: Cause<E>) => A1,
1332
1186
  onSuccess: (a: A) => A2,
1333
1187
  __tsplusTrace?: string,
1334
- ): IO<R, never, A1 | A2> {
1335
- return self.matchCauseIO(
1336
- (cause) => IO.succeedNow(onFailure(cause)),
1337
- (a) => IO.succeedNow(onSuccess(a)),
1338
- );
1188
+ ) {
1189
+ return <R>(self: IO<R, E, A>): IO<R, never, A1 | A2> => {
1190
+ return self.matchCauseIO(
1191
+ (cause) => IO.succeedNow(onFailure(cause)),
1192
+ (a) => IO.succeedNow(onSuccess(a)),
1193
+ );
1194
+ };
1339
1195
  }
1340
1196
 
1341
1197
  /**
1342
1198
  * A more powerful version of `matchIO` that allows recovering from any kind of failure except interruptions.
1343
1199
  *
1344
- * @tsplus fluent fncts.io.IO matchCauseIO
1200
+ * @tsplus pipeable fncts.io.IO matchCauseIO
1345
1201
  */
1346
- export function matchCauseIO_<R, E, A, R1, E1, A1, R2, E2, A2>(
1347
- self: IO<R, E, A>,
1202
+ export function matchCauseIO<E, A, R1, E1, A1, R2, E2, A2>(
1348
1203
  onFailure: (cause: Cause<E>) => IO<R1, E1, A1>,
1349
1204
  onSuccess: (a: A) => IO<R2, E2, A2>,
1350
1205
  __tsplusTrace?: string,
1351
- ): IO<R | R1 | R2, E1 | E2, A1 | A2> {
1352
- return new Match(self, onFailure, onSuccess, __tsplusTrace);
1206
+ ) {
1207
+ return <R>(self: IO<R, E, A>): IO<R | R1 | R2, E1 | E2, A1 | A2> => {
1208
+ return new OnSuccessAndFailure(self, onFailure, onSuccess, __tsplusTrace);
1209
+ };
1353
1210
  }
1354
1211
 
1355
1212
  /**
1356
- * @tsplus fluent fncts.io.IO matchIO
1213
+ * @tsplus pipeable fncts.io.IO matchIO
1357
1214
  */
1358
- export function matchIO_<R, R1, R2, E, E1, E2, A, A1, A2>(
1359
- self: IO<R, E, A>,
1215
+ export function matchIO<R1, R2, E, E1, E2, A, A1, A2>(
1360
1216
  onFailure: (e: E) => IO<R1, E1, A1>,
1361
1217
  onSuccess: (a: A) => IO<R2, E2, A2>,
1362
1218
  __tsplusTrace?: string,
1363
- ): IO<R | R1 | R2, E1 | E2, A1 | A2> {
1364
- return self.matchCauseIO((cause) => cause.failureOrCause.match(onFailure, IO.failCauseNow), onSuccess);
1219
+ ) {
1220
+ return <R>(self: IO<R, E, A>): IO<R | R1 | R2, E1 | E2, A1 | A2> => {
1221
+ return self.matchCauseIO((cause) => cause.failureOrCause.match(onFailure, IO.failCauseNow), onSuccess);
1222
+ };
1365
1223
  }
1366
1224
 
1367
1225
  /**
@@ -1369,35 +1227,33 @@ export function matchIO_<R, R1, R2, E, E1, E2, A, A1, A2>(
1369
1227
  * does not fail, but succeeds with the value returned by the left or right
1370
1228
  * function passed to `match_`.
1371
1229
  *
1372
- * @tsplus fluent fncts.io.IO match
1230
+ * @tsplus pipeable fncts.io.IO match
1373
1231
  */
1374
- export function match_<R, E, A, B, C>(
1375
- self: IO<R, E, A>,
1376
- onFailure: (e: E) => B,
1377
- onSuccess: (a: A) => C,
1378
- __tsplusTrace?: string,
1379
- ): IO<R, never, B | C> {
1380
- return self.matchIO(
1381
- (e) => IO.succeedNow(onFailure(e)),
1382
- (a) => IO.succeedNow(onSuccess(a)),
1383
- );
1232
+ export function match<E, A, B, C>(onFailure: (e: E) => B, onSuccess: (a: A) => C, __tsplusTrace?: string) {
1233
+ return <R>(self: IO<R, E, A>): IO<R, never, B | C> => {
1234
+ return self.matchIO(
1235
+ (e) => IO.succeedNow(onFailure(e)),
1236
+ (a) => IO.succeedNow(onSuccess(a)),
1237
+ );
1238
+ };
1384
1239
  }
1385
1240
 
1386
1241
  /**
1387
1242
  * A version of `matchIO` that gives you the (optional) trace of the error.
1388
1243
  *
1389
- * @tsplus fluent fncts.io.IO matchTraceIO
1244
+ * @tsplus pipeable fncts.io.IO matchTraceIO
1390
1245
  */
1391
- export function matchTraceIO_<R, E, A, R1, E1, A1, R2, E2, A2>(
1392
- ma: IO<R, E, A>,
1246
+ export function matchTraceIO<E, A, R1, E1, A1, R2, E2, A2>(
1393
1247
  onFailure: (e: E, trace: Trace) => IO<R1, E1, A1>,
1394
1248
  onSuccess: (a: A) => IO<R2, E2, A2>,
1395
1249
  __tsplusTrace?: string,
1396
- ): IO<R | R1 | R2, E1 | E2, A1 | A2> {
1397
- return ma.matchCauseIO(
1398
- (cause) => cause.failureTraceOrCause.match(([e, trace]) => onFailure(e, trace), IO.failCauseNow),
1399
- onSuccess,
1400
- );
1250
+ ) {
1251
+ return <R>(ma: IO<R, E, A>): IO<R | R1 | R2, E1 | E2, A1 | A2> => {
1252
+ return ma.matchCauseIO(
1253
+ (cause) => cause.failureTraceOrCause.match(([e, trace]) => onFailure(e, trace), IO.failCauseNow),
1254
+ onSuccess,
1255
+ );
1256
+ };
1401
1257
  }
1402
1258
 
1403
1259
  /**
@@ -1419,7 +1275,7 @@ export function merge<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string): IO<R, n
1419
1275
  *
1420
1276
  * @tsplus static fncts.io.IOOps mergeAll
1421
1277
  */
1422
- export function mergeAll_<R, E, A, B>(
1278
+ export function mergeAll<R, E, A, B>(
1423
1279
  fas: Iterable<IO<R, E, A>>,
1424
1280
  b: B,
1425
1281
  f: (b: B, a: A) => B,
@@ -1428,25 +1284,6 @@ export function mergeAll_<R, E, A, B>(
1428
1284
  return fas.foldLeft(IO.succeed(b) as IO<R, E, B>, (b, a) => b.zipWith(a, f));
1429
1285
  }
1430
1286
 
1431
- /**
1432
- * Returns a `IO` that will never produce anything. The moral equivalent of
1433
- * `while(true) {}`, only without the wasted CPU cycles.
1434
- *
1435
- * @tsplus static fncts.io.IOOps never
1436
- */
1437
- export const never: UIO<never> = defer(() =>
1438
- asyncInterrupt<never, never, never>(() => {
1439
- const interval = setInterval(() => {
1440
- //
1441
- }, 60000);
1442
- return Either.left(
1443
- IO.succeed(() => {
1444
- clearInterval(interval);
1445
- }),
1446
- );
1447
- }),
1448
- );
1449
-
1450
1287
  /**
1451
1288
  * Converts an option on errors into an option on values.
1452
1289
  *
@@ -1465,61 +1302,58 @@ export function optional<R, E, A>(ma: IO<R, Maybe<E>, A>, __tsplusTrace?: string
1465
1302
  * operator has "short circuiting" behavior so if the value returned by this
1466
1303
  * effect is true the specified effect will not be evaluated.
1467
1304
  *
1468
- * @tsplus fluent fncts.io.IO or
1305
+ * @tsplus pipeable fncts.io.IO or
1306
+ * @tsplus pipeable-operator fncts.io.IO ||
1469
1307
  */
1470
- export function or_<R, E, R1, E1>(
1471
- ma: IO<R, E, boolean>,
1472
- mb: IO<R1, E1, boolean>,
1473
- __tsplusTrace?: string,
1474
- ): IO<R | R1, E | E1, boolean> {
1475
- return ma.flatMap((b) => (b ? IO.succeedNow(true) : mb));
1308
+ export function or<R1, E1>(mb: IO<R1, E1, boolean>, __tsplusTrace?: string) {
1309
+ return <R, E>(ma: IO<R, E, boolean>): IO<R | R1, E | E1, boolean> => {
1310
+ return ma.flatMap((b) => (b ? IO.succeedNow(true) : mb));
1311
+ };
1476
1312
  }
1477
1313
 
1478
1314
  /**
1479
- * @tsplus fluent fncts.io.IO orElse
1315
+ * @tsplus pipeable fncts.io.IO orElse
1480
1316
  */
1481
- export function orElse_<R, E, A, R1, E1, A1>(
1482
- ma: IO<R, E, A>,
1483
- that: Lazy<IO<R1, E1, A1>>,
1484
- __tsplusTrace?: string,
1485
- ): IO<R | R1, E1, A | A1> {
1486
- return tryOrElse_(ma, that, IO.succeedNow);
1317
+ export function orElse<R1, E1, A1>(that: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string) {
1318
+ return <R, E, A>(ma: IO<R, E, A>): IO<R | R1, E1, A | A1> => {
1319
+ return ma.tryOrElse(that, IO.succeedNow);
1320
+ };
1487
1321
  }
1488
1322
 
1489
1323
  /**
1490
- * @tsplus fluent fncts.io.IO orElseEither
1324
+ * @tsplus pipeable fncts.io.IO orElseEither
1491
1325
  */
1492
- export function orElseEither_<R, E, A, R1, E1, A1>(
1493
- self: IO<R, E, A>,
1494
- that: Lazy<IO<R1, E1, A1>>,
1495
- __tsplusTrace?: string,
1496
- ): IO<R | R1, E1, Either<A, A1>> {
1497
- return self.tryOrElse(that().map(Either.right), (a) => IO.succeedNow(Either.left(a)));
1326
+ export function orElseEither<R1, E1, A1>(that: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string) {
1327
+ return <R, E, A>(self: IO<R, E, A>): IO<R | R1, E1, Either<A, A1>> => {
1328
+ return self.tryOrElse(that().map(Either.right), (a) => IO.succeedNow(Either.left(a)));
1329
+ };
1498
1330
  }
1499
1331
 
1500
1332
  /**
1501
- * @tsplus fluent fncts.io.IO orElseFail
1333
+ * @tsplus pipeable fncts.io.IO orElseFail
1502
1334
  */
1503
- export function orElseFail_<R, E, A, E1>(ma: IO<R, E, A>, e: Lazy<E1>, __tsplusTrace?: string): IO<R, E1, A> {
1504
- return ma.orElse(IO.fail(e));
1335
+ export function orElseFail<E1>(e: Lazy<E1>, __tsplusTrace?: string) {
1336
+ return <R, E, A>(ma: IO<R, E, A>): IO<R, E1, A> => {
1337
+ return ma.orElse(IO.fail(e));
1338
+ };
1505
1339
  }
1506
1340
 
1507
1341
  /**
1508
- * @tsplus fluent fncts.io.IO orElseMaybe
1342
+ * @tsplus pipeable fncts.io.IO orElseMaybe
1509
1343
  */
1510
- export function orElseMaybe_<R, E, A, R1, E1, A1>(
1511
- ma: IO<R, Maybe<E>, A>,
1512
- that: Lazy<IO<R1, Maybe<E1>, A1>>,
1513
- __tsplusTrace?: string,
1514
- ): IO<R | R1, Maybe<E | E1>, A | A1> {
1515
- return ma.catchAll((me) => me.match(that, (e) => IO.fail(Just(e))));
1344
+ export function orElseMaybe<R1, E1, A1>(that: Lazy<IO<R1, Maybe<E1>, A1>>, __tsplusTrace?: string) {
1345
+ return <R, E, A>(ma: IO<R, Maybe<E>, A>): IO<R | R1, Maybe<E | E1>, A | A1> => {
1346
+ return ma.catchAll((me) => me.match(that, (e) => IO.fail(Just(e))));
1347
+ };
1516
1348
  }
1517
1349
 
1518
1350
  /**
1519
- * @tsplus fluent fncts.io.IO orElseSucceed
1351
+ * @tsplus pipeable fncts.io.IO orElseSucceed
1520
1352
  */
1521
- export function orElseSucceed_<R, E, A, A1>(ma: IO<R, E, A>, a: Lazy<A1>, __tsplusTrace?: string): IO<R, E, A | A1> {
1522
- return ma.orElse(IO.succeed(a));
1353
+ export function orElseSucceed<A1>(a: Lazy<A1>, __tsplusTrace?: string) {
1354
+ return <R, E, A>(ma: IO<R, E, A>): IO<R, E, A | A1> => {
1355
+ return ma.orElse(IO.succeed(a));
1356
+ };
1523
1357
  }
1524
1358
 
1525
1359
  /**
@@ -1537,26 +1371,30 @@ export function orHaltKeep<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO
1537
1371
  }
1538
1372
 
1539
1373
  /**
1540
- * @tsplus fluent fncts.io.IO orHaltWith
1374
+ * @tsplus pipeable fncts.io.IO orHaltWith
1541
1375
  */
1542
- export function orHaltWith_<R, E, A>(ma: IO<R, E, A>, f: (e: E) => unknown, __tsplusTrace?: string): IO<R, never, A> {
1543
- return matchIO_(ma, (e) => IO.haltNow(f(e)), IO.succeedNow);
1376
+ export function orHaltWith<E>(f: (e: E) => unknown, __tsplusTrace?: string) {
1377
+ return <R, A>(ma: IO<R, E, A>): IO<R, never, A> => {
1378
+ return ma.matchIO((e) => IO.haltNow(f(e)), IO.succeedNow);
1379
+ };
1544
1380
  }
1545
1381
 
1546
1382
  /**
1547
1383
  * Exposes all parallel errors in a single call
1548
1384
  *
1549
- * @tsplus fluent fncts.io.IO parallelErrors
1385
+ * @tsplus pipeable fncts.io.IO concurrentErrors
1550
1386
  */
1551
- export function parallelErrors<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string): IO<R, List<E>, A> {
1552
- return io.matchCauseIO((cause) => {
1553
- const f = cause.failures;
1554
- if (f.length === 0) {
1555
- return IO.failCauseNow(cause as Cause<never>);
1556
- } else {
1557
- return IO.failNow(f);
1558
- }
1559
- }, IO.succeedNow);
1387
+ export function concurrentErrors(__tsplusTrace?: string) {
1388
+ return <R, E, A>(io: IO<R, E, A>): IO<R, List<E>, A> => {
1389
+ return io.matchCauseIO((cause) => {
1390
+ const f = cause.failures;
1391
+ if (f.length === 0) {
1392
+ return IO.failCauseNow(cause as Cause<never>);
1393
+ } else {
1394
+ return IO.failNow(f);
1395
+ }
1396
+ }, IO.succeedNow);
1397
+ };
1560
1398
  }
1561
1399
 
1562
1400
  /**
@@ -1565,7 +1403,7 @@ export function parallelErrors<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string)
1565
1403
  *
1566
1404
  * @tsplus static fncts.io.IOOps partition
1567
1405
  */
1568
- export function partition_<R, E, A, B>(
1406
+ export function partition<R, E, A, B>(
1569
1407
  as: Iterable<A>,
1570
1408
  f: (a: A) => IO<R, E, B>,
1571
1409
  __tsplusTrace?: string,
@@ -1576,43 +1414,36 @@ export function partition_<R, E, A, B>(
1576
1414
  /**
1577
1415
  * Keeps some of the errors, and terminates the fiber with the rest
1578
1416
  *
1579
- * @tsplus fluent fncts.io.IO refineOrHalt
1417
+ * @tsplus pipeable fncts.io.IO refineOrHalt
1580
1418
  */
1581
- export function refineOrHalt_<R, E, A, E1>(
1582
- fa: IO<R, E, A>,
1583
- pf: (e: E) => Maybe<E1>,
1584
- __tsplusTrace?: string,
1585
- ): IO<R, E1, A> {
1586
- return fa.refineOrHaltWith(pf, identity);
1419
+ export function refineOrHalt<E, E1>(pf: (e: E) => Maybe<E1>, __tsplusTrace?: string) {
1420
+ return <R, A>(fa: IO<R, E, A>): IO<R, E1, A> => {
1421
+ return fa.refineOrHaltWith(pf, identity);
1422
+ };
1587
1423
  }
1588
1424
 
1589
1425
  /**
1590
1426
  * Keeps some of the errors, and terminates the fiber with the rest, using
1591
1427
  * the specified function to convert the `E` into a `Throwable`.
1592
1428
  *
1593
- * @tsplus fluent fncts.io.IO refineOrHaltWith
1429
+ * @tsplus pipeable fncts.io.IO refineOrHaltWith
1594
1430
  */
1595
- export function refineOrHaltWith_<R, E, A, E1>(
1596
- fa: IO<R, E, A>,
1597
- pf: (e: E) => Maybe<E1>,
1598
- f: (e: E) => unknown,
1599
- __tsplusTrace?: string,
1600
- ): IO<R, E1, A> {
1601
- return fa.catchAll((e) => pf(e).match(() => IO.haltNow(f(e)), IO.failNow));
1431
+ export function refineOrHaltWith<E, E1>(pf: (e: E) => Maybe<E1>, f: (e: E) => unknown, __tsplusTrace?: string) {
1432
+ return <R, A>(fa: IO<R, E, A>): IO<R, E1, A> => {
1433
+ return fa.catchAll((e) => pf(e).match(() => IO.haltNow(f(e)), IO.failNow));
1434
+ };
1602
1435
  }
1603
1436
 
1604
1437
  /**
1605
1438
  * Fail with the returned value if the partial function `pf` matches, otherwise
1606
1439
  * continue with the held value.
1607
1440
  *
1608
- * @tsplus fluent fncts.io.IO reject
1441
+ * @tsplus pipeable fncts.io.IO reject
1609
1442
  */
1610
- export function reject_<R, E, A, E1>(
1611
- fa: IO<R, E, A>,
1612
- pf: (a: A) => Maybe<E1>,
1613
- __tsplusTrace?: string,
1614
- ): IO<R, E | E1, A> {
1615
- return fa.rejectIO((a) => pf(a).map(IO.failNow));
1443
+ export function reject<A, E1>(pf: (a: A) => Maybe<E1>, __tsplusTrace?: string) {
1444
+ return <R, E>(fa: IO<R, E, A>): IO<R, E | E1, A> => {
1445
+ return fa.rejectIO((a) => pf(a).map(IO.failNow));
1446
+ };
1616
1447
  }
1617
1448
 
1618
1449
  /**
@@ -1620,86 +1451,90 @@ export function reject_<R, E, A, E1>(
1620
1451
  * translating the successful match into a failure, otherwise continue with
1621
1452
  * the held value.
1622
1453
  *
1623
- * @tsplus fluent fncts.io.IO rejectIO
1454
+ * @tsplus pipeable fncts.io.IO rejectIO
1624
1455
  */
1625
- export function rejectIO_<R, E, A, R1, E1>(
1626
- fa: IO<R, E, A>,
1627
- pf: (a: A) => Maybe<IO<R1, E1, E1>>,
1628
- __tsplusTrace?: string,
1629
- ): IO<R | R1, E | E1, A> {
1630
- return fa.flatMap((a) =>
1631
- pf(a).match(
1632
- () => IO.succeedNow(a),
1633
- (io) => io.flatMap(IO.failNow),
1634
- ),
1635
- );
1456
+ export function rejectIO<A, R1, E1>(pf: (a: A) => Maybe<IO<R1, E1, E1>>, __tsplusTrace?: string) {
1457
+ return <R, E>(fa: IO<R, E, A>): IO<R | R1, E | E1, A> => {
1458
+ return fa.flatMap((a) =>
1459
+ pf(a).match(
1460
+ () => IO.succeedNow(a),
1461
+ (io) => io.flatMap(IO.failNow),
1462
+ ),
1463
+ );
1464
+ };
1636
1465
  }
1637
1466
 
1638
1467
  /**
1639
1468
  * Repeats this effect the specified number of times.
1640
1469
  *
1641
- * @tsplus fluent fncts.io.IO repeatN
1470
+ * @tsplus pipeable fncts.io.IO repeatN
1642
1471
  */
1643
- export function repeatN_<R, E, A>(ma: IO<R, E, A>, n: number, __tsplusTrace?: string): IO<R, E, A> {
1644
- return ma.flatMap((a) => (n <= 0 ? IO.succeed(a) : ma.repeatN(n - 1)));
1472
+ export function repeatN_(n: number, __tsplusTrace?: string) {
1473
+ return <R, E, A>(ma: IO<R, E, A>): IO<R, E, A> => {
1474
+ return ma.flatMap((a) => (n <= 0 ? IO.succeed(a) : ma.repeatN(n - 1)));
1475
+ };
1645
1476
  }
1646
1477
 
1647
1478
  /**
1648
1479
  * Repeats this effect until its result satisfies the specified predicate.
1649
1480
  *
1650
- * @tsplus fluent fncts.io.IO repeatUntil
1481
+ * @tsplus pipeable fncts.io.IO repeatUntil
1651
1482
  */
1652
- export function repeatUntil_<R, E, A>(ma: IO<R, E, A>, f: (a: A) => boolean, __tsplusTrace?: string): IO<R, E, A> {
1653
- return ma.repeatUntilIO((a) => IO.succeedNow(f(a)));
1483
+ export function repeatUntil<A>(f: (a: A) => boolean, __tsplusTrace?: string) {
1484
+ return <R, E>(ma: IO<R, E, A>): IO<R, E, A> => {
1485
+ return ma.repeatUntilIO((a) => IO.succeedNow(f(a)));
1486
+ };
1654
1487
  }
1655
1488
 
1656
1489
  /**
1657
1490
  * Repeats this effect until its error satisfies the specified effectful predicate.
1658
1491
  *
1659
- * @tsplus fluent fncts.io.IO repeatUntilIO
1492
+ * @tsplus pipeable fncts.io.IO repeatUntilIO
1660
1493
  */
1661
- export function repeatUntilIO_<R, E, A, R1, E1>(
1662
- ma: IO<R, E, A>,
1663
- f: (a: A) => IO<R1, E1, boolean>,
1664
- __tsplusTrace?: string,
1665
- ): IO<R | R1, E | E1, A> {
1666
- return ma.flatMap((a) => f(a).flatMap((b) => (b ? IO.succeed(a) : ma.repeatUntilIO(f))));
1494
+ export function repeatUntilIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string) {
1495
+ return <R, E>(ma: IO<R, E, A>): IO<R | R1, E | E1, A> => {
1496
+ return ma.flatMap((a) => f(a).flatMap((b) => (b ? IO.succeed(a) : ma.repeatUntilIO(f))));
1497
+ };
1667
1498
  }
1668
1499
 
1669
1500
  /**
1670
1501
  * Repeats this effect while its error satisfies the specified predicate.
1671
1502
  *
1672
- * @tsplus fluent fncts.io.IO repeatWhile
1503
+ * @tsplus pipeable fncts.io.IO repeatWhile
1673
1504
  */
1674
- export function repeatWhile_<R, E, A>(ma: IO<R, E, A>, f: (a: A) => boolean, __tsplusTrace?: string): IO<R, E, A> {
1675
- return ma.repeatWhileIO((a) => IO.succeedNow(f(a)));
1505
+ export function repeatWhile<A>(f: (a: A) => boolean, __tsplusTrace?: string) {
1506
+ return <R, E>(ma: IO<R, E, A>): IO<R, E, A> => {
1507
+ return ma.repeatWhileIO((a) => IO.succeedNow(f(a)));
1508
+ };
1676
1509
  }
1677
1510
 
1678
1511
  /**
1679
1512
  * Repeats this effect while its error satisfies the specified effectful predicate.
1680
1513
  *
1681
- * @tsplus fluent fncts.io.IO repeatWhileIO
1514
+ * @tsplus pipeable fncts.io.IO repeatWhileIO
1682
1515
  */
1683
- export function repeatWhileIO_<R, E, A, R1, E1>(
1684
- ma: IO<R, E, A>,
1685
- f: (a: A) => IO<R1, E1, boolean>,
1686
- __tsplusTrace?: string,
1687
- ): IO<R | R1, E | E1, A> {
1688
- return ma.flatMap((a) => f(a).flatMap((b) => (b ? ma.repeatWhileIO(f) : IO.succeed(a))));
1516
+ export function repeatWhileIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string) {
1517
+ return <R, E>(ma: IO<R, E, A>): IO<R | R1, E | E1, A> => {
1518
+ return ma.flatMap((a) => f(a).flatMap((b) => (b ? ma.repeatWhileIO(f) : IO.succeed(a))));
1519
+ };
1689
1520
  }
1690
1521
 
1691
1522
  /**
1692
- * @tsplus fluent fncts.io.IO replicate
1523
+ * @tsplus pipeable fncts.io.IO replicate
1693
1524
  */
1694
- export function replicate_<R, E, A>(self: IO<R, E, A>, n: number, __tsplusTrace?: string): ImmutableArray<IO<R, E, A>> {
1695
- return ImmutableArray.range(0, n).map(() => self);
1525
+ export function replicate(n: number, __tsplusTrace?: string) {
1526
+ return <R, E, A>(self: IO<R, E, A>): ImmutableArray<IO<R, E, A>> => {
1527
+ return ImmutableArray.range(0, n).map(() => self);
1528
+ };
1696
1529
  }
1697
1530
 
1698
1531
  /**
1699
- * @tsplus fluent fncts.io.IO require
1532
+ * @tsplus pipeable fncts.io.IO require
1700
1533
  */
1701
- export function require_<R, E, A>(ma: IO<R, E, Maybe<A>>, error: Lazy<E>, __tsplusTrace?: string): IO<R, E, A> {
1702
- return ma.flatMap((ma) => ma.match(() => IO.fail(error), IO.succeedNow));
1534
+ export function require<E>(error: Lazy<E>, __tsplusTrace?: string) {
1535
+ return <R, A>(ma: IO<R, E, Maybe<A>>): IO<R, E, A> => {
1536
+ return ma.flatMap((ma) => ma.match(() => IO.fail(error), IO.succeedNow));
1537
+ };
1703
1538
  }
1704
1539
 
1705
1540
  /**
@@ -1727,54 +1562,47 @@ export function resurrect<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string): IO<
1727
1562
  /**
1728
1563
  * Retries this effect until its error satisfies the specified predicate.
1729
1564
  *
1730
- * @tsplus fluent fncts.io.IO retryUntil
1565
+ * @tsplus pipeable fncts.io.IO retryUntil
1731
1566
  */
1732
- export function retryUntil_<R, E, A>(fa: IO<R, E, A>, f: (e: E) => boolean, __tsplusTrace?: string): IO<R, E, A> {
1733
- return fa.retryUntilIO((e) => IO.succeedNow(f(e)));
1567
+ export function retryUntil<E>(f: (e: E) => boolean, __tsplusTrace?: string) {
1568
+ return <R, A>(fa: IO<R, E, A>): IO<R, E, A> => {
1569
+ return fa.retryUntilIO((e) => IO.succeedNow(f(e)));
1570
+ };
1734
1571
  }
1735
1572
 
1736
1573
  /**
1737
1574
  * Retries this effect until its error satisfies the specified effectful predicate.
1738
1575
  *
1739
- * @tsplus fluent fncts.io.IO retryUntilIO
1576
+ * @tsplus pipeable fncts.io.IO retryUntilIO
1740
1577
  */
1741
- export function retryUntilIO_<R, E, A, R1, E1>(
1742
- fa: IO<R, E, A>,
1743
- f: (e: E) => IO<R1, E1, boolean>,
1744
- __tsplusTrace?: string,
1745
- ): IO<R | R1, E | E1, A> {
1746
- return fa.catchAll((e) => f(e).flatMap((b) => (b ? IO.failNow(e) : fa.retryUntilIO(f))));
1578
+ export function retryUntilIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string) {
1579
+ return <R, A>(fa: IO<R, E, A>): IO<R | R1, E | E1, A> => {
1580
+ return fa.catchAll((e) => f(e).flatMap((b) => (b ? IO.failNow(e) : fa.retryUntilIO(f))));
1581
+ };
1747
1582
  }
1748
1583
 
1749
1584
  /**
1750
1585
  * Retries this effect while its error satisfies the specified predicate.
1751
1586
  *
1752
- * @tsplus fluent fncts.io.IO retryWhile
1587
+ * @tsplus pipeable fncts.io.IO retryWhile
1753
1588
  */
1754
- export function retryWhile_<R, E, A>(fa: IO<R, E, A>, f: (e: E) => boolean, __tsplusTrace?: string): IO<R, E, A> {
1755
- return fa.retryWhileIO((e) => IO.succeedNow(f(e)));
1589
+ export function retryWhile<E>(f: (e: E) => boolean, __tsplusTrace?: string) {
1590
+ return <R, A>(fa: IO<R, E, A>): IO<R, E, A> => {
1591
+ return fa.retryWhileIO((e) => IO.succeedNow(f(e)));
1592
+ };
1756
1593
  }
1757
1594
 
1758
1595
  /**
1759
1596
  * Retries this effect while its error satisfies the specified effectful predicate.
1760
1597
  *
1761
- * @tsplus fluent fncts.io.IO retryWhileIO
1598
+ * @tsplus pipeable fncts.io.IO retryWhileIO
1762
1599
  */
1763
- export function retryWhileIO_<R, E, A, R1, E1>(
1764
- fa: IO<R, E, A>,
1765
- f: (e: E) => IO<R1, E1, boolean>,
1766
- __tsplusTrace?: string,
1767
- ): IO<R | R1, E | E1, A> {
1768
- return fa.catchAll((e) => f(e).flatMap((b) => (b ? fa.retryWhileIO(f) : IO.fail(e))));
1600
+ export function retryWhileIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string) {
1601
+ return <R, A>(fa: IO<R, E, A>): IO<R | R1, E | E1, A> => {
1602
+ return fa.catchAll((e) => f(e).flatMap((b) => (b ? fa.retryWhileIO(f) : IO.fail(e))));
1603
+ };
1769
1604
  }
1770
1605
 
1771
- /**
1772
- * Retrieves the runtimeConfig that this effect is running on.
1773
- *
1774
- * @tsplus static fncts.io.IOOps runtimeConfig
1775
- */
1776
- export const runtimeConfig: UIO<RuntimeConfig> = IO.deferWith((runtimeConfig) => IO.succeedNow(runtimeConfig));
1777
-
1778
1606
  /**
1779
1607
  * Exposes the full cause of failure of this effect.
1780
1608
  *
@@ -1785,22 +1613,12 @@ export function sandbox<R, E, A>(fa: IO<R, E, A>, __tsplusTrace?: string): IO<R,
1785
1613
  }
1786
1614
 
1787
1615
  /**
1788
- * @tsplus fluent fncts.io.IO sandboxWith
1789
- */
1790
- export function sandboxWith_<R, E, A, E1>(
1791
- ma: IO<R, E, A>,
1792
- f: (_: IO<R, Cause<E>, A>) => IO<R, Cause<E1>, A>,
1793
- __tsplusTrace?: string,
1794
- ): IO<R, E1, A> {
1795
- return f(ma.sandbox).unsandbox;
1796
- }
1797
-
1798
- /**
1799
- * Sets the runtime configuration to the specified value.
1800
- * @tsplus static fncts.io.IOOps setRuntimeConfig
1616
+ * @tsplus pipeable fncts.io.IO sandboxWith
1801
1617
  */
1802
- export function setRuntimeConfig(runtimeConfig: Lazy<RuntimeConfig>, __tsplusTrace?: string): UIO<void> {
1803
- return IO.withFiberContext((fiber) => IO((fiber.runtimeConfig = runtimeConfig())));
1618
+ export function sandboxWith<R, E, A, E1>(f: (_: IO<R, Cause<E>, A>) => IO<R, Cause<E1>, A>, __tsplusTrace?: string) {
1619
+ return (ma: IO<R, E, A>): IO<R, E1, A> => {
1620
+ return f(ma.sandbox).unsandbox;
1621
+ };
1804
1622
  }
1805
1623
 
1806
1624
  /**
@@ -1835,24 +1653,21 @@ export function succeedNow<A>(value: A, __tsplusTrace?: string): IO<never, never
1835
1653
  * @tsplus static fncts.io.IOOps __call
1836
1654
  */
1837
1655
  export function succeed<A>(effect: Lazy<A>, __tsplusTrace?: string): UIO<A> {
1838
- return new Succeed(effect, __tsplusTrace);
1656
+ return new Sync(effect, __tsplusTrace);
1839
1657
  }
1840
1658
 
1841
1659
  /**
1842
- * @tsplus fluent fncts.io.IO summarized
1660
+ * @tsplus pipeable fncts.io.IO summarized
1843
1661
  */
1844
- export function summarized_<R, E, A, R1, E1, B, C>(
1845
- ma: IO<R, E, A>,
1846
- summary: IO<R1, E1, B>,
1847
- f: (start: B, end: B) => C,
1848
- __tsplusTrace?: string,
1849
- ): IO<R | R1, E | E1, readonly [C, A]> {
1850
- return gen(function* (_) {
1851
- const start = yield* _(summary);
1852
- const value = yield* _(ma);
1853
- const end = yield* _(summary);
1854
- return tuple(f(start, end), value);
1855
- });
1662
+ export function summarized<R1, E1, B, C>(summary: IO<R1, E1, B>, f: (start: B, end: B) => C, __tsplusTrace?: string) {
1663
+ return <R, E, A>(ma: IO<R, E, A>): IO<R | R1, E | E1, readonly [C, A]> => {
1664
+ return gen(function* (_) {
1665
+ const start = yield* _(summary);
1666
+ const value = yield* _(ma);
1667
+ const end = yield* _(summary);
1668
+ return tuple(f(start, end), value);
1669
+ });
1670
+ };
1856
1671
  }
1857
1672
 
1858
1673
  /**
@@ -1867,23 +1682,20 @@ export function swap<R, E, A>(pab: IO<R, E, A>, __tsplusTrace?: string): IO<R, A
1867
1682
  /**
1868
1683
  * Swaps the error/value parameters, applies the function `f` and flips the parameters back
1869
1684
  *
1870
- * @tsplus fluent fncts.io.IO swapWith
1685
+ * @tsplus pipeable fncts.io.IO swapWith
1871
1686
  */
1872
- export function swapWith_<R, E, A, R1, E1, A1>(
1873
- fa: IO<R, E, A>,
1874
- f: (ma: IO<R, A, E>) => IO<R1, A1, E1>,
1875
- __tsplusTrace?: string,
1876
- ) {
1877
- return f(fa.swap).swap;
1687
+ export function swapWith<R, E, A, R1, E1, A1>(f: (ma: IO<R, A, E>) => IO<R1, A1, E1>, __tsplusTrace?: string) {
1688
+ return (fa: IO<R, E, A>): IO<R1, E1, A1> => f(fa.swap).swap;
1878
1689
  }
1879
1690
 
1880
1691
  /**
1881
1692
  * A more powerful variation of `timed` that allows specifying the clock.
1882
1693
  *
1883
- * @tsplus fluent fncts.io.IO timedWith
1694
+ * @tsplus pipeable fncts.io.IO timedWith
1884
1695
  */
1885
- export function timedWith_<R, E, A, R1, E1>(ma: IO<R, E, A>, msTime: IO<R1, E1, number>, __tsplusTrace?: string) {
1886
- return ma.summarized(msTime, (start, end) => end - start);
1696
+ export function timedWith<R1, E1>(msTime: IO<R1, E1, number>, __tsplusTrace?: string) {
1697
+ return <R, E, A>(ma: IO<R, E, A>): IO<R1 | R, E1 | E, readonly [number, A]> =>
1698
+ ma.summarized(msTime, (start, end) => end - start);
1887
1699
  }
1888
1700
 
1889
1701
  /**
@@ -1896,7 +1708,7 @@ export function tryCatch<E, A>(effect: Lazy<A>, onThrow: (error: unknown) => E,
1896
1708
  try {
1897
1709
  return effect();
1898
1710
  } catch (u) {
1899
- throw new IOError(Exit.fail(onThrow(u)));
1711
+ throw new IOError(Cause.fail(onThrow(u)));
1900
1712
  }
1901
1713
  });
1902
1714
  }
@@ -1916,70 +1728,66 @@ export function absolve<R, E, E1, A>(ma: IO<R, E, Either<E1, A>>, __tsplusTrace?
1916
1728
  *
1917
1729
  * Returns an IO that effectfully "peeks" at the success of this effect.
1918
1730
  *
1919
- * @tsplus fluent fncts.io.IO tap
1731
+ * @tsplus pipeable fncts.io.IO tap
1920
1732
  */
1921
- export function tap_<R, E, A, R1, E1, B>(
1922
- self: IO<R, E, A>,
1923
- f: (a: A) => IO<R1, E1, B>,
1924
- __tsplusTrace?: string,
1925
- ): IO<R1 | R, E1 | E, A> {
1926
- return self.flatMap((a) => f(a).map(() => a));
1733
+ export function tap<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string) {
1734
+ return <R, E>(self: IO<R, E, A>): IO<R1 | R, E1 | E, A> => {
1735
+ return self.flatMap((a) => f(a).map(() => a));
1736
+ };
1927
1737
  }
1928
1738
 
1929
1739
  /**
1930
1740
  * Returns an IO that effectually "peeks" at the cause of the failure of
1931
1741
  * this IO.
1932
1742
  *
1933
- * @tsplus fluent fncts.io.IO tapCause
1743
+ * @tsplus pipeable fncts.io.IO tapCause
1934
1744
  */
1935
- export function tapCause_<R2, A2, R, E, E2>(
1936
- ma: IO<R2, E2, A2>,
1937
- f: (e: Cause<E2>) => IO<R, E, any>,
1938
- __tsplusTrace?: string,
1939
- ): IO<R2 | R, E | E2, A2> {
1940
- return ma.matchCauseIO((c) => f(c).flatMap(() => IO.failCauseNow(c)), IO.succeedNow);
1745
+ export function tapCause<R, E, E2>(f: (e: Cause<E2>) => IO<R, E, any>, __tsplusTrace?: string) {
1746
+ return <R2, A2>(ma: IO<R2, E2, A2>): IO<R2 | R, E | E2, A2> => {
1747
+ return ma.matchCauseIO((c) => f(c).flatMap(() => IO.failCauseNow(c)), IO.succeedNow);
1748
+ };
1941
1749
  }
1942
1750
 
1943
1751
  /**
1944
1752
  * Returns an IO that effectfully "peeks" at the failure of this effect.
1945
1753
  *
1946
- * @tsplus fluent fncts.io.IO tapError
1947
- */
1948
- export function tapError_<R, E, A, R1, E1>(self: IO<R, E, A>, f: (e: E) => IO<R1, E1, any>, __tsplusTrace?: string) {
1949
- return self.matchCauseIO(
1950
- (cause) =>
1951
- cause.failureOrCause.match(
1952
- (e) => f(e).flatMap(() => IO.failCauseNow(cause)),
1953
- (_) => IO.failCauseNow(cause),
1954
- ),
1955
- IO.succeedNow,
1956
- );
1754
+ * @tsplus pipeable fncts.io.IO tapError
1755
+ */
1756
+ export function tapError<E, R1, E1>(f: (e: E) => IO<R1, E1, any>, __tsplusTrace?: string) {
1757
+ return <R, A>(self: IO<R, E, A>) =>
1758
+ self.matchCauseIO(
1759
+ (cause) =>
1760
+ cause.failureOrCause.match(
1761
+ (e) => f(e).flatMap(() => IO.failCauseNow(cause)),
1762
+ (_) => IO.failCauseNow(cause),
1763
+ ),
1764
+ IO.succeedNow,
1765
+ );
1957
1766
  }
1958
1767
 
1959
1768
  /**
1960
1769
  * Returns an effect that effectually "peeks" at the cause of the failure of
1961
1770
  * this effect.
1962
1771
  *
1963
- * @tsplus fluent fncts.io.IO tapErrorCause
1772
+ * @tsplus pipeable fncts.io.IO tapErrorCause
1964
1773
  */
1965
- export function tapErrorCause_<R, E, A, R1, E1>(
1966
- self: IO<R, E, A>,
1967
- f: (e: Cause<E>) => IO<R1, E1, any>,
1968
- __tsplusTrace?: string,
1969
- ): IO<R | R1, E | E1, A> {
1970
- return self.matchCauseIO((cause) => f(cause).apSecond(IO.failCauseNow(cause)), IO.succeedNow);
1774
+ export function tapErrorCause<E, R1, E1>(f: (e: Cause<E>) => IO<R1, E1, any>, __tsplusTrace?: string) {
1775
+ return <R, A>(self: IO<R, E, A>): IO<R | R1, E | E1, A> => {
1776
+ return self.matchCauseIO((cause) => f(cause).zipRight(IO.failCauseNow(cause)), IO.succeedNow);
1777
+ };
1971
1778
  }
1972
1779
 
1973
1780
  /**
1974
- * @tsplus fluent fncts.io.IO tryOrElse
1781
+ * @tsplus pipeable fncts.io.IO tryOrElse
1975
1782
  */
1976
- export function tryOrElse_<R, E, A, R1, E1, A1, R2, E2, A2>(
1977
- ma: IO<R, E, A>,
1783
+ export function tryOrElse<A, R1, E1, A1, R2, E2, A2>(
1978
1784
  that: Lazy<IO<R1, E1, A1>>,
1979
1785
  onSuccess: (a: A) => IO<R2, E2, A2>,
1980
1786
  __tsplusTrace?: string,
1981
- ): IO<R | R1 | R2, E1 | E2, A1 | A2> {
1982
- return ma.matchCauseIO((cause) => cause.keepDefects.match(that, IO.failCauseNow), onSuccess);
1787
+ ) {
1788
+ return <R, E>(ma: IO<R, E, A>): IO<R | R1 | R2, E1 | E2, A1 | A2> => {
1789
+ return ma.matchCauseIO((cause) => cause.keepDefects.match(that, IO.failCauseNow), onSuccess);
1790
+ };
1983
1791
  }
1984
1792
 
1985
1793
  /**
@@ -2003,17 +1811,14 @@ export function unjust<R, E, A>(self: IO<R, Maybe<E>, A>, __tsplusTrace?: string
2003
1811
  * Takes some fiber failures and converts them into errors, using the
2004
1812
  * specified function to convert the `E` into an `E1 | E2`.
2005
1813
  *
2006
- * @tsplus fluent fncts.io.IO unrefineWith
1814
+ * @tsplus pipeable fncts.io.IO unrefineWith
2007
1815
  */
2008
- export function unrefineWith_<R, E, A, E1, E2>(
2009
- fa: IO<R, E, A>,
2010
- pf: (u: unknown) => Maybe<E1>,
2011
- f: (e: E) => E2,
2012
- __tsplusTrace?: string,
2013
- ): IO<R, E1 | E2, A> {
2014
- return fa.catchAllCause((cause) =>
2015
- cause.find((c) => (c.isHalt() ? pf(c.value) : Nothing())).match(() => IO.failCauseNow(cause.map(f)), IO.failNow),
2016
- );
1816
+ export function unrefineWith<E, E1, E2>(pf: (u: unknown) => Maybe<E1>, f: (e: E) => E2, __tsplusTrace?: string) {
1817
+ return <R, A>(fa: IO<R, E, A>): IO<R, E1 | E2, A> => {
1818
+ return fa.catchAllCause((cause) =>
1819
+ cause.find((c) => (c.isHalt() ? pf(c.value) : Nothing())).match(() => IO.failCauseNow(cause.map(f)), IO.failNow),
1820
+ );
1821
+ };
2017
1822
  }
2018
1823
 
2019
1824
  /**
@@ -2035,22 +1840,10 @@ export function updateFiberRefs(
2035
1840
  f: (fiberId: FiberId.Runtime, fiberRefs: FiberRefs) => FiberRefs,
2036
1841
  __tsplusTrace?: string,
2037
1842
  ): UIO<void> {
2038
- return IO.withFiberContext((fiber) =>
2039
- IO(() => {
2040
- const newFiberRefs = f(fiber.fiberId, fiber.fiberRefs);
2041
- fiber.fiberRefLocals = newFiberRefs.fiberRefLocals;
2042
- }),
2043
- );
2044
- }
2045
-
2046
- /**
2047
- * @tsplus static fncts.io.IOOps withFiberContext
2048
- */
2049
- export function withFiberContext<R, E, A>(
2050
- onState: (fiber: FiberContext<E, A>, status: FiberStatus) => IO<R, E, A>,
2051
- __tsplusTrace?: string,
2052
- ): IO<R, E, A> {
2053
- return new Stateful(onState, __tsplusTrace);
1843
+ return IO.withFiberRuntime((state) => {
1844
+ state.setFiberRefs(f(state.id, state.getFiberRefs()));
1845
+ return IO.unit;
1846
+ });
2054
1847
  }
2055
1848
 
2056
1849
  /**
@@ -2059,23 +1852,47 @@ export function withFiberContext<R, E, A>(
2059
1852
  export const via: typeof pipe = pipe;
2060
1853
 
2061
1854
  /**
2062
- * @tsplus fluent fncts.io.IO when
1855
+ * @tsplus pipeable fncts.io.IO when
2063
1856
  */
2064
- export function when_<R, E, A>(ma: IO<R, E, A>, b: Lazy<boolean>, __tsplusTrace?: string): IO<R, E, void> {
2065
- return ma.whenIO(IO.succeed(b));
1857
+ export function when(b: Lazy<boolean>, __tsplusTrace?: string) {
1858
+ return <R, E, A>(ma: IO<R, E, A>): IO<R, E, void> => {
1859
+ return ma.whenIO(IO.succeed(b));
1860
+ };
2066
1861
  }
2067
1862
 
2068
1863
  /**
2069
1864
  * The moral equivalent of `if (p) exp` when `p` has side-effects
2070
1865
  *
2071
- * @tsplus fluent fncts.io.IO whenIO
1866
+ * @tsplus pipeable fncts.io.IO whenIO
2072
1867
  */
2073
- export function whenIO_<R, E, A, R1, E1>(
2074
- ma: IO<R, E, A>,
2075
- mb: IO<R1, E1, boolean>,
1868
+ export function whenIO<R1, E1>(mb: IO<R1, E1, boolean>, __tsplusTrace?: string) {
1869
+ return <R, E, A>(ma: IO<R, E, A>): IO<R1 | R, E | E1, void> => {
1870
+ return mb.flatMap((b) => (b ? ma.asUnit : IO.unit));
1871
+ };
1872
+ }
1873
+
1874
+ /**
1875
+ * @tsplus static fncts.io.IOOps withFiberRuntime
1876
+ */
1877
+ export function withFiberRuntime<R, E, A>(
1878
+ onState: (fiber: FiberRuntime<E, A>, status: Running) => IO<R, E, A>,
2076
1879
  __tsplusTrace?: string,
2077
- ): IO<R1 | R, E | E1, void> {
2078
- return mb.flatMap((b) => (b ? ma.asUnit : IO.unit));
1880
+ ): IO<R, E, A> {
1881
+ return new Stateful(onState, __tsplusTrace);
1882
+ }
1883
+
1884
+ /**
1885
+ * @tsplus static fncts.io.IOOps updateRuntimeFlags
1886
+ */
1887
+ export function updateRuntimeFlags(patch: RuntimeFlags.Patch, __tsplusTrace?: string): IO<never, never, void> {
1888
+ return new UpdateRuntimeFlags(patch, __tsplusTrace);
1889
+ }
1890
+
1891
+ /**
1892
+ * @tsplus static fncts.io.IOOps stackTrace
1893
+ */
1894
+ export function stackTrace(__tsplusTrace?: string): UIO<Trace> {
1895
+ return new GenerateStackTrace(__tsplusTrace);
2079
1896
  }
2080
1897
 
2081
1898
  /**
@@ -2085,29 +1902,24 @@ export function whenIO_<R, E, A, R1, E1>(
2085
1902
  *
2086
1903
  * @tsplus static fncts.io.IOOps yieldNow
2087
1904
  */
2088
- export const yieldNow: UIO<void> = new Yield();
1905
+ export const yieldNow: UIO<void> = new YieldNow();
2089
1906
 
2090
1907
  /**
2091
- * @tsplus fluent fncts.io.IO zip
1908
+ * @tsplus pipeable fncts.io.IO zip
2092
1909
  */
2093
- export function zip_<R, E, A, R1, E1, B>(
2094
- self: IO<R, E, A>,
2095
- that: IO<R1, E1, B>,
2096
- __tsplusTrace?: string,
2097
- ): IO<R | R1, E | E1, readonly [A, B]> {
2098
- return self.zipWith(that, tuple);
1910
+ export function zip<R1, E1, B>(that: IO<R1, E1, B>, __tsplusTrace?: string) {
1911
+ return <R, E, A>(self: IO<R, E, A>): IO<R | R1, E | E1, readonly [A, B]> => {
1912
+ return self.zipWith(that, tuple);
1913
+ };
2099
1914
  }
2100
1915
 
2101
1916
  /**
2102
- * @tsplus fluent fncts.io.IO zipWith
1917
+ * @tsplus pipeable fncts.io.IO zipWith
2103
1918
  */
2104
- export function zipWith_<R, E, A, R1, E1, B, C>(
2105
- self: IO<R, E, A>,
2106
- that: IO<R1, E1, B>,
2107
- f: (a: A, b: B) => C,
2108
- __tsplusTrace?: string,
2109
- ): IO<R | R1, E | E1, C> {
2110
- return self.flatMap((a) => that.map((b) => f(a, b)));
1919
+ export function zipWith<A, R1, E1, B, C>(that: IO<R1, E1, B>, f: (a: A, b: B) => C, __tsplusTrace?: string) {
1920
+ return <R, E>(self: IO<R, E, A>): IO<R | R1, E | E1, C> => {
1921
+ return self.flatMap((a) => that.map((b) => f(a, b)));
1922
+ };
2111
1923
  }
2112
1924
 
2113
1925
  export class GenIO<R, E, A> {
@@ -2126,22 +1938,6 @@ export class GenIO<R, E, A> {
2126
1938
  * @internal
2127
1939
  */
2128
1940
  export const __adapter = (_: any) => {
2129
- // if (Either.isEither(_)) {
2130
- // return IO.fromEither(_);
2131
- // }
2132
- // if (Maybe.isMaybe(_)) {
2133
- // return __
2134
- // ? _._tag === "Nothing"
2135
- // ? IO.failNow(__())
2136
- // : IO.succeed(_.value)
2137
- // : getOrFail(_);
2138
- // }
2139
- // if (isTag(_)) {
2140
- // return service(_);
2141
- // }
2142
- // if (S.isSync(_)) {
2143
- // return fromSync(_);
2144
- // }
2145
1941
  return _;
2146
1942
  };
2147
1943
 
@@ -2160,8 +1956,7 @@ export function gen<T extends GenIO<any, any, any>, A>(
2160
1956
  return IO.defer(() => {
2161
1957
  const iterator = f(adapter as any);
2162
1958
  const state = iterator.next();
2163
-
2164
- const run = (state: IteratorYieldResult<T> | IteratorReturnResult<A>): IO<any, any, A> => {
1959
+ const run = (state: IteratorYieldResult<T> | IteratorReturnResult<A>): IO<any, any, A> => {
2165
1960
  if (state.done) {
2166
1961
  return IO.succeed(state.value);
2167
1962
  }
@@ -2171,7 +1966,6 @@ export function gen<T extends GenIO<any, any, any>, A>(
2171
1966
  };
2172
1967
  return state.value.effect.flatMap(f);
2173
1968
  };
2174
-
2175
1969
  return run(state);
2176
1970
  });
2177
1971
  }