@fncts/io 0.0.48 → 0.0.49

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 (675) hide show
  1. package/Cached/api.d.ts +1 -1
  2. package/Channel/api.d.ts +80 -80
  3. package/Channel/core-api.d.ts +26 -26
  4. package/Console/definition.d.ts +1 -0
  5. package/CountdownLatch.d.ts +1 -0
  6. package/Fiber/FiberMessage.d.ts +6 -28
  7. package/Fiber/FiberRuntime.d.ts +108 -77
  8. package/Fiber/api/interruptAs.d.ts +2 -2
  9. package/Fiber/definition.d.ts +2 -0
  10. package/FiberScope/definition.d.ts +3 -0
  11. package/FiberSet.d.ts +2 -1
  12. package/Future/State.d.ts +59 -0
  13. package/Future/api.d.ts +8 -3
  14. package/Future/constructors.d.ts +1 -1
  15. package/Future/definition.d.ts +1 -17
  16. package/Future.d.ts +1 -0
  17. package/Hub/api.d.ts +15 -15
  18. package/IO/api/array.d.ts +22 -0
  19. package/IO/api/awaitAllChildren.d.ts +6 -0
  20. package/IO/api/cachedInvalidate.d.ts +15 -0
  21. package/IO/api/forkDaemon.d.ts +1 -1
  22. package/IO/api/onTermination.d.ts +1 -2
  23. package/IO/api/transplant.d.ts +11 -1
  24. package/IO/api.d.ts +247 -225
  25. package/IO/definition.d.ts +12 -25
  26. package/IO.d.ts +3 -1
  27. package/Random/definition.d.ts +1 -0
  28. package/Ref/Synchronized/api.d.ts +1 -1
  29. package/Semaphore/Reservation.d.ts +15 -0
  30. package/Semaphore/constructors.d.ts +13 -0
  31. package/Semaphore/definition.d.ts +29 -0
  32. package/Semaphore.d.ts +3 -40
  33. package/Stream/api.d.ts +164 -164
  34. package/_cjs/Cached/api.cjs +1 -2
  35. package/_cjs/Cached/api.cjs.map +1 -1
  36. package/_cjs/Cached/internal.cjs +1 -2
  37. package/_cjs/Cached/internal.cjs.map +1 -1
  38. package/_cjs/Channel/api/interruptWhen.cjs +1 -2
  39. package/_cjs/Channel/api/interruptWhen.cjs.map +1 -1
  40. package/_cjs/Channel/api/mapOutConcurrentIO.cjs +2 -3
  41. package/_cjs/Channel/api/mapOutConcurrentIO.cjs.map +1 -1
  42. package/_cjs/Channel/api/mergeAll.cjs +1 -2
  43. package/_cjs/Channel/api/mergeAll.cjs.map +1 -1
  44. package/_cjs/Channel/api/mergeAllUnboundedWith.cjs +1 -2
  45. package/_cjs/Channel/api/mergeAllUnboundedWith.cjs.map +1 -1
  46. package/_cjs/Channel/api/mergeAllWith.cjs +2 -3
  47. package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
  48. package/_cjs/Channel/api/mergeMap.cjs +1 -2
  49. package/_cjs/Channel/api/mergeMap.cjs.map +1 -1
  50. package/_cjs/Channel/api/mergeWith.cjs +1 -2
  51. package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
  52. package/_cjs/Channel/api/run.cjs +1 -2
  53. package/_cjs/Channel/api/run.cjs.map +1 -1
  54. package/_cjs/Channel/api/runCollect.cjs +1 -2
  55. package/_cjs/Channel/api/runCollect.cjs.map +1 -1
  56. package/_cjs/Channel/api/runDrain.cjs +1 -2
  57. package/_cjs/Channel/api/runDrain.cjs.map +1 -1
  58. package/_cjs/Channel/api/runScoped.cjs +3 -4
  59. package/_cjs/Channel/api/runScoped.cjs.map +1 -1
  60. package/_cjs/Channel/api/toPull.cjs +2 -3
  61. package/_cjs/Channel/api/toPull.cjs.map +1 -1
  62. package/_cjs/Channel/api/zipConcurrent.cjs +1 -2
  63. package/_cjs/Channel/api/zipConcurrent.cjs.map +1 -1
  64. package/_cjs/Channel/api.cjs +206 -207
  65. package/_cjs/Channel/api.cjs.map +1 -1
  66. package/_cjs/Channel/core-api.cjs +43 -42
  67. package/_cjs/Channel/core-api.cjs.map +1 -1
  68. package/_cjs/Channel/internal/ChannelExecutor.cjs +4 -5
  69. package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
  70. package/_cjs/Channel/internal/ChannelState.cjs +1 -2
  71. package/_cjs/Channel/internal/ChannelState.cjs.map +1 -1
  72. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +1 -2
  73. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
  74. package/_cjs/Clock/api.cjs +1 -2
  75. package/_cjs/Clock/api.cjs.map +1 -1
  76. package/_cjs/Clock/definition.cjs +1 -2
  77. package/_cjs/Clock/definition.cjs.map +1 -1
  78. package/_cjs/Clock/live.cjs +1 -2
  79. package/_cjs/Clock/live.cjs.map +1 -1
  80. package/_cjs/Console/api.cjs +1 -2
  81. package/_cjs/Console/api.cjs.map +1 -1
  82. package/_cjs/Console/definition.cjs +2 -2
  83. package/_cjs/Console/definition.cjs.map +1 -1
  84. package/_cjs/Console/live.cjs +1 -2
  85. package/_cjs/Console/live.cjs.map +1 -1
  86. package/_cjs/CountdownLatch.cjs +3 -3
  87. package/_cjs/CountdownLatch.cjs.map +1 -1
  88. package/_cjs/Differ/api.cjs +1 -2
  89. package/_cjs/Differ/api.cjs.map +1 -1
  90. package/_cjs/Fiber/FiberMessage.cjs +3 -24
  91. package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
  92. package/_cjs/Fiber/FiberRuntime.cjs +879 -636
  93. package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
  94. package/_cjs/Fiber/api/awaitAll.cjs +1 -2
  95. package/_cjs/Fiber/api/awaitAll.cjs.map +1 -1
  96. package/_cjs/Fiber/api/collectAll.cjs +2 -3
  97. package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
  98. package/_cjs/Fiber/api/fromIO.cjs +1 -2
  99. package/_cjs/Fiber/api/fromIO.cjs.map +1 -1
  100. package/_cjs/Fiber/api/interrupt.cjs +2 -3
  101. package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
  102. package/_cjs/Fiber/api/interruptAll.cjs +2 -3
  103. package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
  104. package/_cjs/Fiber/api/interruptAs.cjs +5 -10
  105. package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
  106. package/_cjs/Fiber/api/interruptFork.cjs +2 -3
  107. package/_cjs/Fiber/api/interruptFork.cjs.map +1 -1
  108. package/_cjs/Fiber/api/join.cjs +1 -2
  109. package/_cjs/Fiber/api/join.cjs.map +1 -1
  110. package/_cjs/Fiber/api/joinAll.cjs +1 -2
  111. package/_cjs/Fiber/api/joinAll.cjs.map +1 -1
  112. package/_cjs/Fiber/api/mapFiber.cjs +1 -2
  113. package/_cjs/Fiber/api/mapFiber.cjs.map +1 -1
  114. package/_cjs/Fiber/api/mapIO.cjs +2 -3
  115. package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
  116. package/_cjs/Fiber/api/zipWith.cjs +2 -3
  117. package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
  118. package/_cjs/Fiber/constructors.cjs +2 -3
  119. package/_cjs/Fiber/constructors.cjs.map +1 -1
  120. package/_cjs/Fiber/definition.cjs +6 -4
  121. package/_cjs/Fiber/definition.cjs.map +1 -1
  122. package/_cjs/FiberRef/api/locallyScoped.cjs +1 -2
  123. package/_cjs/FiberRef/api/locallyScoped.cjs.map +1 -1
  124. package/_cjs/FiberRef/api/locallyScopedWith.cjs +1 -2
  125. package/_cjs/FiberRef/api/locallyScopedWith.cjs.map +1 -1
  126. package/_cjs/FiberRef/constructors.cjs +1 -2
  127. package/_cjs/FiberRef/constructors.cjs.map +1 -1
  128. package/_cjs/FiberRef/definition.cjs +1 -2
  129. package/_cjs/FiberRef/definition.cjs.map +1 -1
  130. package/_cjs/FiberRef/operations.cjs +1 -2
  131. package/_cjs/FiberRef/operations.cjs.map +1 -1
  132. package/_cjs/FiberRef/unsafe.cjs +1 -2
  133. package/_cjs/FiberRef/unsafe.cjs.map +1 -1
  134. package/_cjs/FiberRefs/Patch.cjs +1 -2
  135. package/_cjs/FiberRefs/Patch.cjs.map +1 -1
  136. package/_cjs/FiberRefs/api.cjs +1 -2
  137. package/_cjs/FiberRefs/api.cjs.map +1 -1
  138. package/_cjs/FiberRefs/definition.cjs +1 -2
  139. package/_cjs/FiberRefs/definition.cjs.map +1 -1
  140. package/_cjs/FiberScope/definition.cjs +29 -6
  141. package/_cjs/FiberScope/definition.cjs.map +1 -1
  142. package/_cjs/FiberSet.cjs +16 -15
  143. package/_cjs/FiberSet.cjs.map +1 -1
  144. package/_cjs/FiberStatus/definition.cjs +1 -2
  145. package/_cjs/FiberStatus/definition.cjs.map +1 -1
  146. package/_cjs/Future/State.cjs +108 -0
  147. package/_cjs/Future/State.cjs.map +1 -0
  148. package/_cjs/Future/api.cjs +71 -64
  149. package/_cjs/Future/api.cjs.map +1 -1
  150. package/_cjs/Future/constructors.cjs +3 -4
  151. package/_cjs/Future/constructors.cjs.map +1 -1
  152. package/_cjs/Future/definition.cjs +1 -15
  153. package/_cjs/Future/definition.cjs.map +1 -1
  154. package/_cjs/Future.cjs +11 -0
  155. package/_cjs/Future.cjs.map +1 -1
  156. package/_cjs/Hub/api.cjs +56 -57
  157. package/_cjs/Hub/api.cjs.map +1 -1
  158. package/_cjs/Hub/internal.cjs +1 -2
  159. package/_cjs/Hub/internal.cjs.map +1 -1
  160. package/_cjs/IO/api/acquireRelease.cjs +1 -2
  161. package/_cjs/IO/api/acquireRelease.cjs.map +1 -1
  162. package/_cjs/IO/api/acquireReleaseExit.cjs +1 -2
  163. package/_cjs/IO/api/acquireReleaseExit.cjs.map +1 -1
  164. package/_cjs/IO/api/acquireReleaseInterruptible.cjs +1 -2
  165. package/_cjs/IO/api/acquireReleaseInterruptible.cjs.map +1 -1
  166. package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs +1 -2
  167. package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs.map +1 -1
  168. package/_cjs/IO/api/addFinalizer.cjs +1 -2
  169. package/_cjs/IO/api/addFinalizer.cjs.map +1 -1
  170. package/_cjs/IO/api/addFinalizerExit.cjs +1 -2
  171. package/_cjs/IO/api/addFinalizerExit.cjs.map +1 -1
  172. package/_cjs/IO/api/all.cjs +1 -2
  173. package/_cjs/IO/api/all.cjs.map +1 -1
  174. package/_cjs/IO/api/array.cjs +51 -0
  175. package/_cjs/IO/api/array.cjs.map +1 -0
  176. package/_cjs/IO/api/asyncIO.cjs +1 -2
  177. package/_cjs/IO/api/asyncIO.cjs.map +1 -1
  178. package/_cjs/IO/api/asyncInterrupt.cjs +1 -2
  179. package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -1
  180. package/_cjs/IO/api/awaitAllChildren.cjs +17 -0
  181. package/_cjs/IO/api/awaitAllChildren.cjs.map +1 -0
  182. package/_cjs/IO/api/blocking.cjs +1 -2
  183. package/_cjs/IO/api/blocking.cjs.map +1 -1
  184. package/_cjs/IO/api/bracket.cjs +1 -2
  185. package/_cjs/IO/api/bracket.cjs.map +1 -1
  186. package/_cjs/IO/api/bracketExit.cjs +1 -2
  187. package/_cjs/IO/api/bracketExit.cjs.map +1 -1
  188. package/_cjs/IO/api/cachedInvalidate.cjs +47 -0
  189. package/_cjs/IO/api/cachedInvalidate.cjs.map +1 -0
  190. package/_cjs/IO/api/clockWith.cjs +1 -2
  191. package/_cjs/IO/api/clockWith.cjs.map +1 -1
  192. package/_cjs/IO/api/concurrency.cjs +1 -2
  193. package/_cjs/IO/api/concurrency.cjs.map +1 -1
  194. package/_cjs/IO/api/concurrentFinalizers.cjs +1 -2
  195. package/_cjs/IO/api/concurrentFinalizers.cjs.map +1 -1
  196. package/_cjs/IO/api/consoleWith.cjs +1 -2
  197. package/_cjs/IO/api/consoleWith.cjs.map +1 -1
  198. package/_cjs/IO/api/daemonChildren.cjs +1 -2
  199. package/_cjs/IO/api/daemonChildren.cjs.map +1 -1
  200. package/_cjs/IO/api/delay.cjs +1 -2
  201. package/_cjs/IO/api/delay.cjs.map +1 -1
  202. package/_cjs/IO/api/descriptor.cjs +1 -2
  203. package/_cjs/IO/api/descriptor.cjs.map +1 -1
  204. package/_cjs/IO/api/diffFiberRefs.cjs +1 -2
  205. package/_cjs/IO/api/diffFiberRefs.cjs.map +1 -1
  206. package/_cjs/IO/api/disconnect.cjs +2 -3
  207. package/_cjs/IO/api/disconnect.cjs.map +1 -1
  208. package/_cjs/IO/api/ensuringChildren.cjs +1 -2
  209. package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
  210. package/_cjs/IO/api/environment.cjs +1 -2
  211. package/_cjs/IO/api/environment.cjs.map +1 -1
  212. package/_cjs/IO/api/foreachConcurrent.cjs +36 -30
  213. package/_cjs/IO/api/foreachConcurrent.cjs.map +1 -1
  214. package/_cjs/IO/api/foreachExec.cjs +1 -2
  215. package/_cjs/IO/api/foreachExec.cjs.map +1 -1
  216. package/_cjs/IO/api/fork.cjs +2 -3
  217. package/_cjs/IO/api/fork.cjs.map +1 -1
  218. package/_cjs/IO/api/forkAll.cjs +1 -2
  219. package/_cjs/IO/api/forkAll.cjs.map +1 -1
  220. package/_cjs/IO/api/forkDaemon.cjs +5 -6
  221. package/_cjs/IO/api/forkDaemon.cjs.map +1 -1
  222. package/_cjs/IO/api/forkIn.cjs +1 -2
  223. package/_cjs/IO/api/forkIn.cjs.map +1 -1
  224. package/_cjs/IO/api/forkScoped.cjs +1 -2
  225. package/_cjs/IO/api/forkScoped.cjs.map +1 -1
  226. package/_cjs/IO/api/fulfill.cjs +1 -2
  227. package/_cjs/IO/api/fulfill.cjs.map +1 -1
  228. package/_cjs/IO/api/interrupt.cjs +4 -5
  229. package/_cjs/IO/api/interrupt.cjs.map +1 -1
  230. package/_cjs/IO/api/memoize.cjs +1 -2
  231. package/_cjs/IO/api/memoize.cjs.map +1 -1
  232. package/_cjs/IO/api/onTermination.cjs +2 -3
  233. package/_cjs/IO/api/onTermination.cjs.map +1 -1
  234. package/_cjs/IO/api/once.cjs +1 -2
  235. package/_cjs/IO/api/once.cjs.map +1 -1
  236. package/_cjs/IO/api/patchFiberRefs.cjs +1 -2
  237. package/_cjs/IO/api/patchFiberRefs.cjs.map +1 -1
  238. package/_cjs/IO/api/provideLayer.cjs +1 -2
  239. package/_cjs/IO/api/provideLayer.cjs.map +1 -1
  240. package/_cjs/IO/api/provideScope.cjs +1 -2
  241. package/_cjs/IO/api/provideScope.cjs.map +1 -1
  242. package/_cjs/IO/api/provideSomeLayer.cjs +1 -2
  243. package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
  244. package/_cjs/IO/api/provideSomeRuntime.cjs +1 -2
  245. package/_cjs/IO/api/provideSomeRuntime.cjs.map +1 -1
  246. package/_cjs/IO/api/race.cjs +2 -3
  247. package/_cjs/IO/api/race.cjs.map +1 -1
  248. package/_cjs/IO/api/raceFirst.cjs +1 -2
  249. package/_cjs/IO/api/raceFirst.cjs.map +1 -1
  250. package/_cjs/IO/api/raceWith.cjs +1 -2
  251. package/_cjs/IO/api/raceWith.cjs.map +1 -1
  252. package/_cjs/IO/api/randomWith.cjs +1 -2
  253. package/_cjs/IO/api/randomWith.cjs.map +1 -1
  254. package/_cjs/IO/api/repeat.cjs +1 -2
  255. package/_cjs/IO/api/repeat.cjs.map +1 -1
  256. package/_cjs/IO/api/retry.cjs +1 -2
  257. package/_cjs/IO/api/retry.cjs.map +1 -1
  258. package/_cjs/IO/api/schedule.cjs +1 -2
  259. package/_cjs/IO/api/schedule.cjs.map +1 -1
  260. package/_cjs/IO/api/scope.cjs +1 -2
  261. package/_cjs/IO/api/scope.cjs.map +1 -1
  262. package/_cjs/IO/api/scopeWith.cjs +1 -2
  263. package/_cjs/IO/api/scopeWith.cjs.map +1 -1
  264. package/_cjs/IO/api/scoped.cjs +1 -2
  265. package/_cjs/IO/api/scoped.cjs.map +1 -1
  266. package/_cjs/IO/api/sleep.cjs +1 -2
  267. package/_cjs/IO/api/sleep.cjs.map +1 -1
  268. package/_cjs/IO/api/stateful.cjs +1 -2
  269. package/_cjs/IO/api/stateful.cjs.map +1 -1
  270. package/_cjs/IO/api/supervised.cjs +1 -2
  271. package/_cjs/IO/api/supervised.cjs.map +1 -1
  272. package/_cjs/IO/api/timeout.cjs +9 -11
  273. package/_cjs/IO/api/timeout.cjs.map +1 -1
  274. package/_cjs/IO/api/transplant.cjs +22 -7
  275. package/_cjs/IO/api/transplant.cjs.map +1 -1
  276. package/_cjs/IO/api/whenFiberRef.cjs +1 -2
  277. package/_cjs/IO/api/whenFiberRef.cjs.map +1 -1
  278. package/_cjs/IO/api/whenRef.cjs +1 -2
  279. package/_cjs/IO/api/whenRef.cjs.map +1 -1
  280. package/_cjs/IO/api/withChildren.cjs +1 -2
  281. package/_cjs/IO/api/withChildren.cjs.map +1 -1
  282. package/_cjs/IO/api/withEarlyRelease.cjs +1 -2
  283. package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
  284. package/_cjs/IO/api/withFinalizer.cjs +1 -2
  285. package/_cjs/IO/api/withFinalizer.cjs.map +1 -1
  286. package/_cjs/IO/api/withFinalizerExit.cjs +1 -2
  287. package/_cjs/IO/api/withFinalizerExit.cjs.map +1 -1
  288. package/_cjs/IO/api/zipConcurrent.cjs +5 -6
  289. package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
  290. package/_cjs/IO/api.cjs +522 -473
  291. package/_cjs/IO/api.cjs.map +1 -1
  292. package/_cjs/IO/definition.cjs +2 -3
  293. package/_cjs/IO/definition.cjs.map +1 -1
  294. package/_cjs/IO/runtime.cjs +9 -10
  295. package/_cjs/IO/runtime.cjs.map +1 -1
  296. package/_cjs/IO.cjs +33 -11
  297. package/_cjs/IO.cjs.map +1 -1
  298. package/_cjs/IOEnv/definition.cjs +1 -2
  299. package/_cjs/IOEnv/definition.cjs.map +1 -1
  300. package/_cjs/IOEnv/live.cjs +1 -2
  301. package/_cjs/IOEnv/live.cjs.map +1 -1
  302. package/_cjs/IOEnv/services.cjs +1 -2
  303. package/_cjs/IOEnv/services.cjs.map +1 -1
  304. package/_cjs/Layer/MemoMap.cjs +1 -2
  305. package/_cjs/Layer/MemoMap.cjs.map +1 -1
  306. package/_cjs/Layer/api.cjs +1 -2
  307. package/_cjs/Layer/api.cjs.map +1 -1
  308. package/_cjs/Logger/api.cjs +1 -2
  309. package/_cjs/Logger/api.cjs.map +1 -1
  310. package/_cjs/Logger/constructors.cjs +1 -2
  311. package/_cjs/Logger/constructors.cjs.map +1 -1
  312. package/_cjs/MVar/api.cjs +1 -2
  313. package/_cjs/MVar/api.cjs.map +1 -1
  314. package/_cjs/Push/api.cjs +2 -3
  315. package/_cjs/Push/api.cjs.map +1 -1
  316. package/_cjs/Push/internal.cjs +1 -2
  317. package/_cjs/Push/internal.cjs.map +1 -1
  318. package/_cjs/Queue/api/dimapIO.cjs +1 -2
  319. package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
  320. package/_cjs/Queue/api/filterInputIO.cjs +1 -2
  321. package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
  322. package/_cjs/Queue/api/filterOutputIO.cjs +1 -2
  323. package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
  324. package/_cjs/Queue/api/poll.cjs +1 -2
  325. package/_cjs/Queue/api/poll.cjs.map +1 -1
  326. package/_cjs/Queue/api/takeBetween.cjs +1 -2
  327. package/_cjs/Queue/api/takeBetween.cjs.map +1 -1
  328. package/_cjs/Queue/api/takeN.cjs +1 -2
  329. package/_cjs/Queue/api/takeN.cjs.map +1 -1
  330. package/_cjs/Queue/api/zipWithIO.cjs +1 -2
  331. package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
  332. package/_cjs/Queue/constructors.cjs +1 -2
  333. package/_cjs/Queue/constructors.cjs.map +1 -1
  334. package/_cjs/Queue/internal.cjs +1 -2
  335. package/_cjs/Queue/internal.cjs.map +1 -1
  336. package/_cjs/Queue/strategy.cjs +1 -2
  337. package/_cjs/Queue/strategy.cjs.map +1 -1
  338. package/_cjs/Random/api.cjs +1 -2
  339. package/_cjs/Random/api.cjs.map +1 -1
  340. package/_cjs/Random/definition.cjs +2 -2
  341. package/_cjs/Random/definition.cjs.map +1 -1
  342. package/_cjs/Random/live.cjs +1 -2
  343. package/_cjs/Random/live.cjs.map +1 -1
  344. package/_cjs/Ref/Atomic.cjs +1 -2
  345. package/_cjs/Ref/Atomic.cjs.map +1 -1
  346. package/_cjs/Ref/Derived.cjs +1 -2
  347. package/_cjs/Ref/Derived.cjs.map +1 -1
  348. package/_cjs/Ref/DerivedAll.cjs +1 -2
  349. package/_cjs/Ref/DerivedAll.cjs.map +1 -1
  350. package/_cjs/Ref/Synchronized/api.cjs +2 -3
  351. package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
  352. package/_cjs/Ref/Synchronized/constructors.cjs +2 -3
  353. package/_cjs/Ref/Synchronized/constructors.cjs.map +1 -1
  354. package/_cjs/Ref/Synchronized/definition.cjs +2 -3
  355. package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
  356. package/_cjs/Ref/api/collect.cjs +1 -2
  357. package/_cjs/Ref/api/collect.cjs.map +1 -1
  358. package/_cjs/Ref/api/dimap.cjs +1 -2
  359. package/_cjs/Ref/api/dimap.cjs.map +1 -1
  360. package/_cjs/Ref/api/filter.cjs +1 -2
  361. package/_cjs/Ref/api/filter.cjs.map +1 -1
  362. package/_cjs/Ref/api/modify.cjs +1 -2
  363. package/_cjs/Ref/api/modify.cjs.map +1 -1
  364. package/_cjs/Ref/api.cjs +1 -2
  365. package/_cjs/Ref/api.cjs.map +1 -1
  366. package/_cjs/Ref/constructors.cjs +1 -2
  367. package/_cjs/Ref/constructors.cjs.map +1 -1
  368. package/_cjs/RefSubject/Atomic.cjs +1 -2
  369. package/_cjs/RefSubject/Atomic.cjs.map +1 -1
  370. package/_cjs/RefSubject/Synchronized/api.cjs +1 -2
  371. package/_cjs/RefSubject/Synchronized/api.cjs.map +1 -1
  372. package/_cjs/RefSubject/Synchronized/definition.cjs +1 -2
  373. package/_cjs/RefSubject/Synchronized/definition.cjs.map +1 -1
  374. package/_cjs/RefSubject/api.cjs +1 -2
  375. package/_cjs/RefSubject/api.cjs.map +1 -1
  376. package/_cjs/Reloadable/api.cjs +1 -2
  377. package/_cjs/Reloadable/api.cjs.map +1 -1
  378. package/_cjs/Reloadable/constructors.cjs +1 -2
  379. package/_cjs/Reloadable/constructors.cjs.map +1 -1
  380. package/_cjs/Reloadable/definition.cjs +1 -2
  381. package/_cjs/Reloadable/definition.cjs.map +1 -1
  382. package/_cjs/RuntimeFlags/Patch.cjs +1 -2
  383. package/_cjs/RuntimeFlags/Patch.cjs.map +1 -1
  384. package/_cjs/RuntimeFlags/RuntimeFlags.cjs +1 -2
  385. package/_cjs/RuntimeFlags/RuntimeFlags.cjs.map +1 -1
  386. package/_cjs/STM/api/atomically.cjs +1 -2
  387. package/_cjs/STM/api/atomically.cjs.map +1 -1
  388. package/_cjs/STM/api/core-api.cjs +1 -2
  389. package/_cjs/STM/api/core-api.cjs.map +1 -1
  390. package/_cjs/STM/api.cjs +1 -2
  391. package/_cjs/STM/api.cjs.map +1 -1
  392. package/_cjs/STM/definition.cjs +2 -3
  393. package/_cjs/STM/definition.cjs.map +1 -1
  394. package/_cjs/STM/driver.cjs +1 -2
  395. package/_cjs/STM/driver.cjs.map +1 -1
  396. package/_cjs/STM/internal/CommitState.cjs +1 -2
  397. package/_cjs/STM/internal/CommitState.cjs.map +1 -1
  398. package/_cjs/STM/internal/Journal.cjs +1 -2
  399. package/_cjs/STM/internal/Journal.cjs.map +1 -1
  400. package/_cjs/Schedule/Decision.cjs +1 -2
  401. package/_cjs/Schedule/Decision.cjs.map +1 -1
  402. package/_cjs/Schedule/api/driver.cjs +1 -2
  403. package/_cjs/Schedule/api/driver.cjs.map +1 -1
  404. package/_cjs/Schedule/api.cjs +1 -2
  405. package/_cjs/Schedule/api.cjs.map +1 -1
  406. package/_cjs/Scope/Finalizer/definition.cjs +1 -2
  407. package/_cjs/Scope/Finalizer/definition.cjs.map +1 -1
  408. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +1 -2
  409. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
  410. package/_cjs/Scope/ReleaseMap/api.cjs +1 -2
  411. package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
  412. package/_cjs/Scope/ReleaseMap/constructors.cjs +1 -2
  413. package/_cjs/Scope/ReleaseMap/constructors.cjs.map +1 -1
  414. package/_cjs/Scope/ReleaseMap/definition.cjs +1 -2
  415. package/_cjs/Scope/ReleaseMap/definition.cjs.map +1 -1
  416. package/_cjs/Scope/api.cjs +1 -2
  417. package/_cjs/Scope/api.cjs.map +1 -1
  418. package/_cjs/Scope/definition.cjs +1 -2
  419. package/_cjs/Scope/definition.cjs.map +1 -1
  420. package/_cjs/ScopedRef/api.cjs +2 -3
  421. package/_cjs/ScopedRef/api.cjs.map +1 -1
  422. package/_cjs/Semaphore/Reservation.cjs +24 -0
  423. package/_cjs/Semaphore/Reservation.cjs.map +1 -0
  424. package/_cjs/Semaphore/constructors.cjs +25 -0
  425. package/_cjs/Semaphore/constructors.cjs.map +1 -0
  426. package/_cjs/Semaphore/definition.cjs +149 -0
  427. package/_cjs/Semaphore/definition.cjs.map +1 -0
  428. package/_cjs/Semaphore.cjs +31 -138
  429. package/_cjs/Semaphore.cjs.map +1 -1
  430. package/_cjs/Sink/api.cjs +1 -2
  431. package/_cjs/Sink/api.cjs.map +1 -1
  432. package/_cjs/State/api.cjs +1 -2
  433. package/_cjs/State/api.cjs.map +1 -1
  434. package/_cjs/Stream/api/zipAllWith.cjs +1 -2
  435. package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
  436. package/_cjs/Stream/api/zipWith.cjs +1 -2
  437. package/_cjs/Stream/api/zipWith.cjs.map +1 -1
  438. package/_cjs/Stream/api/zipWithChunks.cjs +1 -2
  439. package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
  440. package/_cjs/Stream/api.cjs +702 -703
  441. package/_cjs/Stream/api.cjs.map +1 -1
  442. package/_cjs/Stream/internal/Handoff.cjs +1 -2
  443. package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
  444. package/_cjs/Stream/internal/Pull.cjs +1 -2
  445. package/_cjs/Stream/internal/Pull.cjs.map +1 -1
  446. package/_cjs/Stream/internal/Take.cjs +1 -2
  447. package/_cjs/Stream/internal/Take.cjs.map +1 -1
  448. package/_cjs/Stream/internal/util.cjs +1 -2
  449. package/_cjs/Stream/internal/util.cjs.map +1 -1
  450. package/_cjs/Subject/Atomic.cjs +1 -2
  451. package/_cjs/Subject/Atomic.cjs.map +1 -1
  452. package/_cjs/Subject/api.cjs +1 -2
  453. package/_cjs/Subject/api.cjs.map +1 -1
  454. package/_cjs/SubscriptionRef.cjs +2 -3
  455. package/_cjs/SubscriptionRef.cjs.map +1 -1
  456. package/_cjs/Supervisor/api.cjs +1 -2
  457. package/_cjs/Supervisor/api.cjs.map +1 -1
  458. package/_cjs/Supervisor/constructors.cjs +1 -2
  459. package/_cjs/Supervisor/constructors.cjs.map +1 -1
  460. package/_cjs/Supervisor/definition.cjs +1 -2
  461. package/_cjs/Supervisor/definition.cjs.map +1 -1
  462. package/_cjs/SupervisorPatch.cjs +1 -2
  463. package/_cjs/SupervisorPatch.cjs.map +1 -1
  464. package/_cjs/TExit/definition.cjs +1 -2
  465. package/_cjs/TExit/definition.cjs.map +1 -1
  466. package/_cjs/TFuture/api.cjs +1 -2
  467. package/_cjs/TFuture/api.cjs.map +1 -1
  468. package/_cjs/TFuture/constructors.cjs +1 -2
  469. package/_cjs/TFuture/constructors.cjs.map +1 -1
  470. package/_cjs/TFuture/definition.cjs +1 -2
  471. package/_cjs/TFuture/definition.cjs.map +1 -1
  472. package/_cjs/TReentrantLock/api.cjs +1 -2
  473. package/_cjs/TReentrantLock/api.cjs.map +1 -1
  474. package/_cjs/TReentrantLock/definition.cjs +1 -2
  475. package/_cjs/TReentrantLock/definition.cjs.map +1 -1
  476. package/_cjs/TRef/api.cjs +1 -2
  477. package/_cjs/TRef/api.cjs.map +1 -1
  478. package/_cjs/TRef/constructors.cjs +1 -2
  479. package/_cjs/TRef/constructors.cjs.map +1 -1
  480. package/_cjs/TRef/definition.cjs +1 -2
  481. package/_cjs/TRef/definition.cjs.map +1 -1
  482. package/_cjs/TSemaphore/api.cjs +1 -2
  483. package/_cjs/TSemaphore/api.cjs.map +1 -1
  484. package/_cjs/TSemaphore/constructors.cjs +1 -2
  485. package/_cjs/TSemaphore/constructors.cjs.map +1 -1
  486. package/_cjs/TSemaphore/definition.cjs +1 -2
  487. package/_cjs/TSemaphore/definition.cjs.map +1 -1
  488. package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +1 -2
  489. package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -1
  490. package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +1 -2
  491. package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -1
  492. package/_cjs/collection/immutable/Conc/filterIO.cjs +1 -2
  493. package/_cjs/collection/immutable/Conc/filterIO.cjs.map +1 -1
  494. package/_cjs/collection/immutable/Conc/findIO.cjs +1 -2
  495. package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
  496. package/_cjs/collection/immutable/Conc/mapIO.cjs +1 -2
  497. package/_cjs/collection/immutable/Conc/mapIO.cjs.map +1 -1
  498. package/_cjs/collection/immutable/Conc/takeWhileIO.cjs +1 -2
  499. package/_cjs/collection/immutable/Conc/takeWhileIO.cjs.map +1 -1
  500. package/_cjs/data/Exit/foreachIO.cjs +1 -2
  501. package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
  502. package/_cjs/internal/HashedPair.cjs +1 -2
  503. package/_cjs/internal/HashedPair.cjs.map +1 -1
  504. package/_cjs/internal/Hub.cjs +1 -2
  505. package/_cjs/internal/Hub.cjs.map +1 -1
  506. package/_cjs/internal/MutableQueue.cjs +1 -2
  507. package/_cjs/internal/MutableQueue.cjs.map +1 -1
  508. package/_cjs/internal/Scheduler.cjs +1 -2
  509. package/_cjs/internal/Scheduler.cjs.map +1 -1
  510. package/_cjs/internal/StackTraceBuilder.cjs +1 -2
  511. package/_cjs/internal/StackTraceBuilder.cjs.map +1 -1
  512. package/_mjs/Cached/api.mjs.map +1 -1
  513. package/_mjs/Channel/api/mapOutConcurrentIO.mjs +1 -1
  514. package/_mjs/Channel/api/mergeAllWith.mjs +1 -1
  515. package/_mjs/Channel/api/runScoped.mjs +2 -2
  516. package/_mjs/Channel/api/runScoped.mjs.map +1 -1
  517. package/_mjs/Channel/api/toPull.mjs +1 -1
  518. package/_mjs/Channel/api/toPull.mjs.map +1 -1
  519. package/_mjs/Channel/api.mjs +205 -205
  520. package/_mjs/Channel/api.mjs.map +1 -1
  521. package/_mjs/Channel/core-api.mjs +43 -42
  522. package/_mjs/Channel/core-api.mjs.map +1 -1
  523. package/_mjs/Channel/internal/ChannelExecutor.mjs +3 -3
  524. package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
  525. package/_mjs/Console/definition.mjs +1 -0
  526. package/_mjs/Console/definition.mjs.map +1 -1
  527. package/_mjs/CountdownLatch.mjs +2 -1
  528. package/_mjs/CountdownLatch.mjs.map +1 -1
  529. package/_mjs/Fiber/FiberMessage.mjs +2 -20
  530. package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
  531. package/_mjs/Fiber/FiberRuntime.mjs +877 -633
  532. package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
  533. package/_mjs/Fiber/api/collectAll.mjs +1 -1
  534. package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
  535. package/_mjs/Fiber/api/interrupt.mjs +1 -1
  536. package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
  537. package/_mjs/Fiber/api/interruptAll.mjs +1 -1
  538. package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
  539. package/_mjs/Fiber/api/interruptAs.mjs +4 -7
  540. package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
  541. package/_mjs/Fiber/api/interruptFork.mjs +1 -1
  542. package/_mjs/Fiber/api/interruptFork.mjs.map +1 -1
  543. package/_mjs/Fiber/api/mapIO.mjs +1 -1
  544. package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
  545. package/_mjs/Fiber/api/zipWith.mjs +1 -1
  546. package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
  547. package/_mjs/Fiber/constructors.mjs +1 -1
  548. package/_mjs/Fiber/constructors.mjs.map +1 -1
  549. package/_mjs/Fiber/definition.mjs +5 -2
  550. package/_mjs/Fiber/definition.mjs.map +1 -1
  551. package/_mjs/FiberScope/definition.mjs +28 -4
  552. package/_mjs/FiberScope/definition.mjs.map +1 -1
  553. package/_mjs/FiberSet.mjs +14 -12
  554. package/_mjs/FiberSet.mjs.map +1 -1
  555. package/_mjs/Future/State.mjs +96 -0
  556. package/_mjs/Future/State.mjs.map +1 -0
  557. package/_mjs/Future/api.mjs +67 -61
  558. package/_mjs/Future/api.mjs.map +1 -1
  559. package/_mjs/Future/constructors.mjs +3 -3
  560. package/_mjs/Future/constructors.mjs.map +1 -1
  561. package/_mjs/Future/definition.mjs +0 -12
  562. package/_mjs/Future/definition.mjs.map +1 -1
  563. package/_mjs/Future.mjs +1 -0
  564. package/_mjs/Future.mjs.map +1 -1
  565. package/_mjs/Hub/api.mjs +55 -55
  566. package/_mjs/Hub/api.mjs.map +1 -1
  567. package/_mjs/IO/api/array.mjs +42 -0
  568. package/_mjs/IO/api/array.mjs.map +1 -0
  569. package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -1
  570. package/_mjs/IO/api/awaitAllChildren.mjs +10 -0
  571. package/_mjs/IO/api/awaitAllChildren.mjs.map +1 -0
  572. package/_mjs/IO/api/cachedInvalidate.mjs +39 -0
  573. package/_mjs/IO/api/cachedInvalidate.mjs.map +1 -0
  574. package/_mjs/IO/api/disconnect.mjs +1 -1
  575. package/_mjs/IO/api/disconnect.mjs.map +1 -1
  576. package/_mjs/IO/api/foreachConcurrent.mjs +35 -28
  577. package/_mjs/IO/api/foreachConcurrent.mjs.map +1 -1
  578. package/_mjs/IO/api/fork.mjs +1 -1
  579. package/_mjs/IO/api/fork.mjs.map +1 -1
  580. package/_mjs/IO/api/forkDaemon.mjs +4 -4
  581. package/_mjs/IO/api/forkDaemon.mjs.map +1 -1
  582. package/_mjs/IO/api/interrupt.mjs +3 -3
  583. package/_mjs/IO/api/onTermination.mjs +1 -1
  584. package/_mjs/IO/api/onTermination.mjs.map +1 -1
  585. package/_mjs/IO/api/race.mjs +1 -1
  586. package/_mjs/IO/api/race.mjs.map +1 -1
  587. package/_mjs/IO/api/timeout.mjs +8 -9
  588. package/_mjs/IO/api/timeout.mjs.map +1 -1
  589. package/_mjs/IO/api/transplant.mjs +19 -5
  590. package/_mjs/IO/api/transplant.mjs.map +1 -1
  591. package/_mjs/IO/api/zipConcurrent.mjs +4 -4
  592. package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
  593. package/_mjs/IO/api.mjs +515 -468
  594. package/_mjs/IO/api.mjs.map +1 -1
  595. package/_mjs/IO/definition.mjs +1 -1
  596. package/_mjs/IO/definition.mjs.map +1 -1
  597. package/_mjs/IO/runtime.mjs +8 -8
  598. package/_mjs/IO/runtime.mjs.map +1 -1
  599. package/_mjs/IO.mjs +3 -1
  600. package/_mjs/IO.mjs.map +1 -1
  601. package/_mjs/IOEnv/definition.mjs.map +1 -1
  602. package/_mjs/Push/api.mjs +1 -1
  603. package/_mjs/Random/definition.mjs +1 -0
  604. package/_mjs/Random/definition.mjs.map +1 -1
  605. package/_mjs/Ref/Synchronized/api.mjs +1 -1
  606. package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
  607. package/_mjs/Ref/Synchronized/constructors.mjs +1 -1
  608. package/_mjs/Ref/Synchronized/definition.mjs +1 -1
  609. package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
  610. package/_mjs/STM/definition.mjs +1 -1
  611. package/_mjs/ScopedRef/api.mjs +1 -1
  612. package/_mjs/ScopedRef/api.mjs.map +1 -1
  613. package/_mjs/Semaphore/Reservation.mjs +16 -0
  614. package/_mjs/Semaphore/Reservation.mjs.map +1 -0
  615. package/_mjs/Semaphore/constructors.mjs +17 -0
  616. package/_mjs/Semaphore/constructors.mjs.map +1 -0
  617. package/_mjs/Semaphore/definition.mjs +141 -0
  618. package/_mjs/Semaphore/definition.mjs.map +1 -0
  619. package/_mjs/Semaphore.mjs +4 -133
  620. package/_mjs/Semaphore.mjs.map +1 -1
  621. package/_mjs/Stream/api.mjs +701 -701
  622. package/_mjs/Stream/api.mjs.map +1 -1
  623. package/_mjs/SubscriptionRef.mjs +1 -1
  624. package/_src/Cached/api.ts +3 -3
  625. package/_src/Channel/api/toPull.ts +1 -1
  626. package/_src/Channel/api.ts +273 -272
  627. package/_src/Channel/core-api.ts +57 -55
  628. package/_src/Channel/internal/ChannelExecutor.ts +3 -3
  629. package/_src/Console/definition.ts +1 -0
  630. package/_src/CountdownLatch.ts +2 -0
  631. package/_src/Fiber/FiberMessage.ts +3 -28
  632. package/_src/Fiber/FiberRuntime.ts +988 -616
  633. package/_src/Fiber/api/interruptAs.ts +4 -3
  634. package/_src/Fiber/constructors.ts +1 -1
  635. package/_src/Fiber/definition.ts +4 -0
  636. package/_src/FiberScope/definition.ts +40 -2
  637. package/_src/FiberSet.ts +6 -2
  638. package/_src/Future/State.ts +128 -0
  639. package/_src/Future/api.ts +62 -51
  640. package/_src/Future/constructors.ts +4 -2
  641. package/_src/Future/definition.ts +2 -17
  642. package/_src/Future.ts +4 -3
  643. package/_src/Hub/api.ts +61 -61
  644. package/_src/IO/api/addFinalizerExit.ts +4 -4
  645. package/_src/IO/api/array.ts +49 -0
  646. package/_src/IO/api/asyncInterrupt.ts +1 -1
  647. package/_src/IO/api/awaitAllChildren.ts +6 -0
  648. package/_src/IO/api/cachedInvalidate.ts +42 -0
  649. package/_src/IO/api/foreachConcurrent.ts +39 -23
  650. package/_src/IO/api/fork.ts +1 -1
  651. package/_src/IO/api/forkDaemon.ts +2 -2
  652. package/_src/IO/api/memoize.ts +3 -3
  653. package/_src/IO/api/onTermination.ts +2 -2
  654. package/_src/IO/api/transplant.ts +26 -3
  655. package/_src/IO/api/zipConcurrent.ts +2 -2
  656. package/_src/IO/api.ts +547 -525
  657. package/_src/IO/definition.ts +4 -28
  658. package/_src/IO/runtime.ts +0 -1
  659. package/_src/IO.ts +65 -63
  660. package/_src/IOEnv/definition.ts +1 -4
  661. package/_src/Random/definition.ts +1 -0
  662. package/_src/Ref/Synchronized/api.ts +2 -2
  663. package/_src/Ref/Synchronized/definition.ts +1 -1
  664. package/_src/Semaphore/Reservation.ts +15 -0
  665. package/_src/Semaphore/constructors.ts +14 -0
  666. package/_src/Semaphore/definition.ts +180 -0
  667. package/_src/Semaphore.ts +5 -159
  668. package/_src/Stream/api.ts +679 -679
  669. package/package.json +4 -4
  670. package/IO/api/sequenceT.d.ts +0 -26
  671. package/_cjs/IO/api/sequenceT.cjs +0 -18
  672. package/_cjs/IO/api/sequenceT.cjs.map +0 -1
  673. package/_mjs/IO/api/sequenceT.mjs +0 -10
  674. package/_mjs/IO/api/sequenceT.mjs.map +0 -1
  675. package/_src/IO/api/sequenceT.ts +0 -16
package/IO/api.d.ts CHANGED
@@ -1,21 +1,20 @@
1
- import { FiberId } from "@fncts/base/data/FiberId/definition";
2
1
  import { Lazy } from "@fncts/base/data/function/definition";
3
2
  import { Maybe } from "@fncts/base/data/Maybe/definition";
3
+ import { FiberId } from "@fncts/base/data/FiberId/definition";
4
4
  import { Cause } from "@fncts/base/data/Cause/definition";
5
5
  import { InterruptStatus } from "@fncts/io/InterruptStatus";
6
6
  import { URIO, FIO, UIO } from "@fncts/io/IO/definition";
7
7
  import { Either } from "@fncts/base/data/Either/definition";
8
+ import { Exit } from "@fncts/base/data/Exit/definition";
8
9
  import { Conc, ConcBuilder } from "@fncts/base/collection/immutable/Conc";
9
10
  import { Refinement } from "@fncts/base/data/Refinement/definition";
10
11
  import { Predicate } from "@fncts/base/data/Predicate/definition";
11
- import { NonEmptyArray } from "@fncts/base/collection/immutable/ImmutableNonEmptyArray/definition";
12
+ import { ReadonlyNonEmptyArray } from "@fncts/base/collection/immutable/ReadonlyNonEmptyArray/definition";
12
13
  import { Eval } from "@fncts/base/control/Eval/definition";
13
- import { Exit } from "@fncts/base/data/Exit/definition";
14
14
  import { NoSuchElementError } from "@fncts/base/data/exceptions";
15
15
  import { FiberRefs } from "@fncts/io/FiberRefs";
16
16
  import { Trace } from "@fncts/base/data/Trace/definition";
17
17
  import { List } from "@fncts/base/collection/immutable/List/definition";
18
- import { ImmutableArray } from "@fncts/base/collection/immutable/ImmutableArray/definition";
19
18
  import type { Running } from "../FiberStatus.js";
20
19
  import type { ShowOptions } from "@fncts/base/data/Showable.js";
21
20
  import type * as P from "@fncts/base/typeclass";
@@ -24,12 +23,6 @@ import type { FiberRuntime } from "@fncts/io/Fiber/FiberRuntime";
24
23
  import type { RuntimeFlags } from "@fncts/io/RuntimeFlags";
25
24
  import { pipe } from "@fncts/base/data/function";
26
25
  import { IO } from "@fncts/io/IO/definition";
27
- /**
28
- * Imports an asynchronous side-effect into a `IO`
29
- * @tsplus static fncts.io.IOOps async
30
- * @tsplus location "@fncts/io/IO/api"
31
- */
32
- export declare function async<R, E, A>(register: (resolve: (_: IO<R, E, A>) => void) => void, blockingOn?: FiberId, __tsplusTrace?: string): IO<R, E, A>;
33
26
  /**
34
27
  * Attempts to convert defects into a failure, throwing away all information
35
28
  * about the cause of the failure.
@@ -37,19 +30,6 @@ export declare function async<R, E, A>(register: (resolve: (_: IO<R, E, A>) => v
37
30
  * @tsplus location "@fncts/io/IO/api"
38
31
  */
39
32
  export declare function absorbWith<R, E, A>(f: (e: E) => unknown, __tsplusTrace?: string): (ma: IO<R, E, A>) => IO<R, unknown, A>;
40
- /**
41
- * @tsplus pipeable fncts.io.IO zipLeft
42
- * @tsplus pipeable-operator fncts.io.IO <
43
- * @tsplus location "@fncts/io/IO/api"
44
- */
45
- export declare function zipLeft<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, A>;
46
- /**
47
- * Combine two effectful actions, keeping only the result of the second
48
- * @tsplus pipeable fncts.io.IO zipRight
49
- * @tsplus pipeable-operator fncts.io.IO >
50
- * @tsplus location "@fncts/io/IO/api"
51
- */
52
- export declare function zipRight<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, B>;
53
33
  /**
54
34
  * @tsplus pipeable fncts.io.IO as
55
35
  * @tsplus location "@fncts/io/IO/api"
@@ -60,25 +40,31 @@ export declare function as<B>(b: Lazy<B>, __tsplusTrace?: string): <R, E, A>(sel
60
40
  * @tsplus getter fncts.io.IO asJust
61
41
  * @tsplus location "@fncts/io/IO/api"
62
42
  */
63
- export declare function asJust<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, Maybe<A>>;
43
+ export declare function asJust<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, Maybe<A>>;
64
44
  /**
65
45
  * Maps the error value of this IO to an optional value.
66
46
  * @tsplus getter fncts.io.IO asJustError
67
47
  * @tsplus location "@fncts/io/IO/api"
68
48
  */
69
- export declare function asJustError<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, Maybe<E>, A>;
49
+ export declare function asJustError<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, Maybe<E>, A>;
70
50
  /**
71
51
  * @tsplus getter fncts.io.IO asUnit
72
52
  * @tsplus location "@fncts/io/IO/api"
73
53
  */
74
54
  export declare function asUnit<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, void>;
55
+ /**
56
+ * Imports an asynchronous side-effect into a `IO`
57
+ * @tsplus static fncts.io.IOOps async
58
+ * @tsplus location "@fncts/io/IO/api"
59
+ */
60
+ export declare function async<R, E, A>(register: (resolve: (_: IO<R, E, A>) => void) => void, blockingOn?: FiberId, __tsplusTrace?: string): IO<R, E, A>;
75
61
  /**
76
62
  * Returns an IO whose failure and success channels have been mapped by
77
63
  * the specified pair of functions, `f` and `g`.
78
64
  * @tsplus pipeable fncts.io.IO bimap
79
65
  * @tsplus location "@fncts/io/IO/api"
80
66
  */
81
- export declare function bimap<E, A, E1, B>(f: (e: E) => E1, g: (a: A) => B, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R, E1, B>;
67
+ export declare function bimap<E, A, E1, B>(onFailure: (e: E) => E1, onSuccess: (a: A) => B, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R, E1, B>;
82
68
  /**
83
69
  * Returns an IO that effectfully "peeks" at the failure or success of
84
70
  * this effect.
@@ -86,39 +72,31 @@ export declare function bimap<E, A, E1, B>(f: (e: E) => E1, g: (a: A) => B, __ts
86
72
  * @tsplus location "@fncts/io/IO/api"
87
73
  */
88
74
  export declare function bitap<E, A, R1, E1, R2, E2>(onFailure: (e: E) => IO<R1, E1, any>, onSuccess: (a: A) => IO<R2, E2, any>, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R | R1 | R2, E | E1 | E2, A>;
89
- /**
90
- * Recovers from the specified error
91
- * @tsplus pipeable fncts.io.IO catch
92
- * @tsplus location "@fncts/io/IO/api"
93
- */
94
- export declare function catchTagWith<N extends keyof E, K extends E[N] & string, E, R1, E1, A1>(tag: N, k: K, f: (e: Extract<E, {
95
- [n in N]: K;
96
- }>) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(ma: IO<R, E, A>) => IO<R | R1, Exclude<E, { [n in N]: K; }> | E1, A | A1>;
97
75
  /**
98
76
  * Recovers from all errors
99
77
  * @tsplus pipeable fncts.io.IO catchAll
100
78
  * @tsplus location "@fncts/io/IO/api"
101
79
  */
102
- export declare function catchAll<E, R1, E1, A1>(f: (e: E) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(ma: IO<R, E, A>) => IO<R | R1, E1, A | A1>;
80
+ export declare function catchAll<E, R1, E1, A1>(onFailure: (e: E) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E1, A | A1>;
103
81
  /**
104
82
  *
105
83
  * Recovers from all errors with provided cause.
106
84
  * @tsplus pipeable fncts.io.IO catchAllCause
107
85
  * @tsplus location "@fncts/io/IO/api"
108
86
  */
109
- export declare function catchAllCause<R, E, A, R1, E1, A1>(f: (_: Cause<E>) => IO<R1, E1, A1>, __tsplusTrace?: string): (ma: IO<R, E, A>) => IO<R | R1, E1, A | A1>;
87
+ export declare function catchAllCause<R, E, A, R1, E1, A1>(onFailure: (_: Cause<E>) => IO<R1, E1, A1>, __tsplusTrace?: string): (self: IO<R, E, A>) => IO<R | R1, E1, A | A1>;
110
88
  /**
111
89
  * Recovers from some or all of the error cases.
112
90
  * @tsplus pipeable fncts.io.IO catchJust
113
91
  * @tsplus location "@fncts/io/IO/api"
114
92
  */
115
- export declare function catchJust<E, R1, E1, A1>(f: (e: E) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, A>(ma: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
93
+ export declare function catchJust<E, R1, E1, A1>(onFailure: (e: E) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
116
94
  /**
117
95
  * Recovers from some or all of the error cases with provided cause.
118
96
  * @tsplus pipeable fncts.io.IO catchJustCause
119
97
  * @tsplus location "@fncts/io/IO/api"
120
98
  */
121
- export declare function catchJustCause<E, R1, E1, A1>(f: (_: Cause<E>) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, A>(ma: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
99
+ export declare function catchJustCause<E, R1, E1, A1>(onFailure: (_: Cause<E>) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
122
100
  /**
123
101
  * Recovers from some or all of the defects with provided partial function.
124
102
  *
@@ -129,29 +107,37 @@ export declare function catchJustCause<E, R1, E1, A1>(f: (_: Cause<E>) => Maybe<
129
107
  * @tsplus pipeable fncts.io.IO catchJustDefect
130
108
  * @tsplus location "@fncts/io/IO/api"
131
109
  */
132
- export declare function catchJustDefect<R1, E1, A1>(f: (_: unknown) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
110
+ export declare function catchJustDefect<R1, E1, A1>(onFailure: (_: unknown) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
133
111
  /**
134
112
  * Recovers from the specified error
135
113
  * @tsplus pipeable IO catchTag
136
114
  * @tsplus location "@fncts/io/IO/api"
137
115
  */
138
- export declare function catchTag<K extends E["_tag"] & string, E extends {
116
+ export declare function catchTag<T extends E["_tag"] & string, E extends {
139
117
  _tag: string;
140
- }, R1, E1, A1>(k: K, f: (e: Extract<E, {
141
- _tag: K;
142
- }>) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(ma: IO<R, E, A>) => IO<R | R1, Exclude<E, {
143
- _tag: K;
118
+ }, R1, E1, A1>(tag: T, onFailure: (e: Extract<E, {
119
+ _tag: T;
120
+ }>) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, Exclude<E, {
121
+ _tag: T;
144
122
  }> | E1, A | A1>;
123
+ /**
124
+ * Recovers from the specified error
125
+ * @tsplus pipeable fncts.io.IO catch
126
+ * @tsplus location "@fncts/io/IO/api"
127
+ */
128
+ export declare function catchTagWith<K extends keyof E, T extends E[K] & string, E, R1, E1, A1>(tagKey: K, tag: T, onFailure: (e: Extract<E, {
129
+ [n in K]: T;
130
+ }>) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, Exclude<E, { [n in K]: T; }> | E1, A | A1>;
145
131
  /**
146
132
  * @tsplus getter fncts.io.IO cause
147
133
  * @tsplus location "@fncts/io/IO/api"
148
134
  */
149
- export declare function cause<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, Cause<E>>;
135
+ export declare function cause<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, Cause<E>>;
150
136
  /**
151
137
  * @tsplus pipeable fncts.io.IO causeAsError
152
138
  * @tsplus location "@fncts/io/IO/api"
153
139
  */
154
- export declare function causeAsError(__tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R, Cause<E>, A>;
140
+ export declare function causeAsError(__tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, Cause<E>, A>;
155
141
  /**
156
142
  * Checks the interrupt status, and produces the IO returned by the
157
143
  * specified callback.
@@ -160,28 +146,20 @@ export declare function causeAsError(__tsplusTrace?: string): <R, E, A>(ma: IO<R
160
146
  */
161
147
  export declare function checkInterruptible<R, E, A>(f: (i: InterruptStatus) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
162
148
  /**
163
- * Returns an IO that models the execution of this effect, followed by
164
- * the passing of its value to the specified continuation function `f`,
165
- * followed by the effect that it returns.
166
- * @tsplus pipeable fncts.io.IO flatMap
167
- * @tsplus location "@fncts/io/IO/api"
168
- */
169
- export declare function flatMap<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string): <R, E>(ma: IO<R, E, A>) => IO<R | R1, E | E1, B>;
170
- /**
171
- * @tsplus pipeable fncts.io.IO flatMapError
149
+ * @tsplus pipeable fncts.io.IO collect
172
150
  * @tsplus location "@fncts/io/IO/api"
173
151
  */
174
- export declare function flatMapError<R1, E, E1>(f: (e: E) => IO<R1, never, E1>, __tsplusTrace?: string): <R, A>(ma: IO<R, E, A>) => IO<R | R1, E1, A>;
152
+ export declare function collect<A, E1, A1>(f: Lazy<E1>, pf: (a: A) => Maybe<A1>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E | E1, A1>;
175
153
  /**
176
- * @tsplus pipeable fncts.io.IO collect
154
+ * @tsplus pipeable fncts.io.IO collectIO
177
155
  * @tsplus location "@fncts/io/IO/api"
178
156
  */
179
- export declare function collect<A, E1, A1>(f: Lazy<E1>, pf: (a: A) => Maybe<A1>, __tsplusTrace?: string): <R, E>(ma: IO<R, E, A>) => IO<R, E | E1, A1>;
157
+ export declare function collectIO<A, R1, E1, A1, E2>(onNothing: Lazy<E2>, pf: (a: A) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1 | E2, A1>;
180
158
  /**
181
- * @tsplus pipeable fncts.io.IO collectIO
159
+ * @tsplus static fncts.io.IOOps if
182
160
  * @tsplus location "@fncts/io/IO/api"
183
161
  */
184
- export declare function collectIO<A, R1, E1, A1, E2>(f: Lazy<E2>, pf: (a: A) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E>(ma: IO<R, E, A>) => IO<R | R1, E | E1 | E2, A1>;
162
+ export declare function cond<R, E, A, R1, E1, A1>(b: boolean, onTrue: Lazy<IO<R, E, A>>, onFalse: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string): IO<R | R1, E | E1, A | A1>;
185
163
  /**
186
164
  * @tsplus static fncts.io.IOOps condIO
187
165
  * @tsplus location "@fncts/io/IO/api"
@@ -202,7 +180,7 @@ export declare function defer<R = never, E = never, A = never>(io: Lazy<IO<R, E,
202
180
  * @tsplus static fncts.io.IOOps deferTry
203
181
  * @tsplus location "@fncts/io/IO/api"
204
182
  */
205
- export declare function deferTry<R = never, E = never, A = never>(io: () => IO<R, E, A>, __tsplusTrace?: string): IO<R, unknown, A>;
183
+ export declare function deferTry<R = never, E = never, A = never>(io: Lazy<IO<R, E, A>>, __tsplusTrace?: string): IO<R, unknown, A>;
206
184
  /**
207
185
  * Returns a lazily constructed effect, whose construction may itself require effects,
208
186
  * translating any thrown exceptions into typed failed effects and mapping the error.
@@ -211,43 +189,44 @@ export declare function deferTry<R = never, E = never, A = never>(io: () => IO<R
211
189
  * @tsplus static IOOps deferTryCatch
212
190
  * @tsplus location "@fncts/io/IO/api"
213
191
  */
214
- export declare function deferTryCatch<R, E, A, E1>(io: () => IO<R, E, A>, onThrow: (error: unknown) => E1, __tsplusTrace?: string): IO<R, E | E1, A>;
192
+ export declare function deferTryCatch<R, E, A, E1>(io: Lazy<IO<R, E, A>>, onThrow: (error: unknown) => E1, __tsplusTrace?: string): IO<R, E | E1, A>;
215
193
  /**
216
194
  * Folds an `IO` that may fail with `E` or succeed with `A` into one that never fails but succeeds with `Either<E, A>`
217
195
  * @tsplus getter fncts.io.IO either
218
196
  * @tsplus location "@fncts/io/IO/api"
219
197
  */
220
- export declare function either<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): URIO<R, Either<E, A>>;
198
+ export declare function either<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): URIO<R, Either<E, A>>;
221
199
  /**
222
200
  * @tsplus pipeable fncts.io.IO errorAsCause
223
201
  * @tsplus location "@fncts/io/IO/api"
224
202
  */
225
- export declare function errorAsCause(__tsplusTrace?: string): <R, E, A>(ma: IO<R, Cause<E>, A>) => IO<R, E, A>;
203
+ export declare function errorAsCause(__tsplusTrace?: string): <R, E, A>(self: IO<R, Cause<E>, A>) => IO<R, E, A>;
226
204
  /**
227
205
  * @tsplus getter fncts.io.IO eventually
228
206
  * @tsplus location "@fncts/io/IO/api"
229
207
  */
230
- export declare function eventually<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A>;
208
+ export declare function eventually<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A>;
231
209
  /**
232
- * @tsplus pipeable fncts.io.IO extend
210
+ * @tsplus pipeable fncts.io.IO exitWith
233
211
  * @tsplus location "@fncts/io/IO/api"
234
212
  */
235
- export declare function extend<R, E, A, B>(f: (wa: IO<R, E, A>) => B, __tsplusTrace?: string): (wa: IO<R, E, A>) => IO<R, E, B>;
213
+ export declare function exitWith<E, A, R1, E1, B>(f: (exit: Exit<E, A>) => IO<R1, E1, B>, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R | R1, E1, B>;
236
214
  /**
237
- * @tsplus static fncts.io.IOOps fail
215
+ * @tsplus pipeable fncts.io.IO extend
238
216
  * @tsplus location "@fncts/io/IO/api"
239
217
  */
240
- export declare function fail<E>(e: Lazy<E>, __tsplusTrace?: string): FIO<E, never>;
218
+ export declare function extend<R, E, A, B>(f: (io: IO<R, E, A>) => B, __tsplusTrace?: string): (self: IO<R, E, A>) => IO<R, E, B>;
241
219
  /**
242
- * @tsplus static fncts.io.IOOps failNow
220
+ * @tsplus static fncts.io.IOOps fail
243
221
  * @tsplus location "@fncts/io/IO/api"
244
222
  */
245
- export declare function failNow<E>(e: E, __tsplusTrace?: string): FIO<E, never>;
223
+ export declare function fail<E>(e: Lazy<E>, __tsplusTrace?: string): FIO<E, never>;
246
224
  /**
247
- * @tsplus static fncts.io.IOOps refailCause
225
+ * Returns an effect that models failure with the specified lazily-evaluated `Cause`.
226
+ * @tsplus static fncts.io.IOOps failCause
248
227
  * @tsplus location "@fncts/io/IO/api"
249
228
  */
250
- export declare function refailCause<E>(cause: Cause<E>, __tsplusTrace?: string): FIO<E, never>;
229
+ export declare function failCause<E = never, A = never>(cause: Lazy<Cause<E>>, __tsplusTrace?: string): FIO<E, A>;
251
230
  /**
252
231
  * Creates a `IO` that has failed with the specified `Cause`
253
232
  * @tsplus static fncts.io.IOOps failCauseNow
@@ -255,11 +234,10 @@ export declare function refailCause<E>(cause: Cause<E>, __tsplusTrace?: string):
255
234
  */
256
235
  export declare function failCauseNow<E>(cause: Cause<E>, __tsplusTrace?: string): FIO<E, never>;
257
236
  /**
258
- * Returns an effect that models failure with the specified lazily-evaluated `Cause`.
259
- * @tsplus static fncts.io.IOOps failCause
237
+ * @tsplus static fncts.io.IOOps failNow
260
238
  * @tsplus location "@fncts/io/IO/api"
261
239
  */
262
- export declare function failCause<E = never, A = never>(cause: Lazy<Cause<E>>, __tsplusTrace?: string): FIO<E, A>;
240
+ export declare function failNow<E>(e: E, __tsplusTrace?: string): FIO<E, never>;
263
241
  /**
264
242
  * Returns the `FiberId` of the `Fiber` on which this `IO` is running
265
243
  * @tsplus static fncts.io.IOOps fiberId
@@ -308,20 +286,33 @@ export declare function filterOrElse<A, R1, E1, A1>(predicate: Predicate<A>, or:
308
286
  */
309
287
  export declare function filterOrFail<A, B extends A, E1>(refinement: Refinement<A, B>, failWith: (a: Exclude<A, B>) => E1): <R, E>(fa: IO<R, E, A>) => IO<R, E | E1, B>;
310
288
  export declare function filterOrFail<A, E1>(predicate: Predicate<A>, failWith: (a: A) => E1): <R, E>(fa: IO<R, E, A>) => IO<R, E | E1, A>;
289
+ /**
290
+ * Halts with specified `unknown` if the predicate fails.
291
+ * @tsplus pipeable fncts.io.IO filterOrHalt
292
+ * @tsplus location "@fncts/io/IO/api"
293
+ */
294
+ export declare function filterOrHalt<A, B extends A>(refinement: Refinement<A, B>, haltWith: (a: Exclude<A, B>) => unknown, __tsplusTrace?: string): <R, E>(fa: IO<R, E, A>) => IO<R, E, A>;
295
+ export declare function filterOrHalt<A>(predicate: Predicate<A>, haltWith: (a: A) => unknown, __tsplusTrace?: string): <R, E>(fa: IO<R, E, A>) => IO<R, E, A>;
311
296
  /**
312
297
  * Returns an `IO` that yields the value of the first
313
298
  * `IO` to succeed.
314
299
  * @tsplus static fncts.io.IOOps firstSuccess
315
300
  * @tsplus location "@fncts/io/IO/api"
316
301
  */
317
- export declare function firstSuccess<R, E, A>(mas: NonEmptyArray<IO<R, E, A>>, __tsplusTrace?: string): IO<R, E, A>;
302
+ export declare function firstSuccess<R, E, A>(ios: ReadonlyNonEmptyArray<IO<R, E, A>>, __tsplusTrace?: string): IO<R, E, A>;
318
303
  /**
319
- * Halts with specified `unknown` if the predicate fails.
320
- * @tsplus pipeable fncts.io.IO filterOrHalt
304
+ * Returns an IO that models the execution of this effect, followed by
305
+ * the passing of its value to the specified continuation function `f`,
306
+ * followed by the effect that it returns.
307
+ * @tsplus pipeable fncts.io.IO flatMap
321
308
  * @tsplus location "@fncts/io/IO/api"
322
309
  */
323
- export declare function filterOrHalt<A, B extends A>(refinement: Refinement<A, B>, haltWith: (a: Exclude<A, B>) => unknown, __tsplusTrace?: string): <R, E>(fa: IO<R, E, A>) => IO<R, E, A>;
324
- export declare function filterOrHalt<A>(predicate: Predicate<A>, haltWith: (a: A) => unknown, __tsplusTrace?: string): <R, E>(fa: IO<R, E, A>) => IO<R, E, A>;
310
+ export declare function flatMap<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, B>;
311
+ /**
312
+ * @tsplus pipeable fncts.io.IO flatMapError
313
+ * @tsplus location "@fncts/io/IO/api"
314
+ */
315
+ export declare function flatMapError<R1, E, E1>(f: (e: E) => IO<R1, never, E1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E1, A>;
325
316
  /**
326
317
  * @tsplus getter fncts.io.IO flatten
327
318
  * @tsplus location "@fncts/io/IO/api"
@@ -330,19 +321,22 @@ export declare function flatten<R, E, R1, E1, A>(self: IO<R, E, IO<R1, E1, A>>,
330
321
  /**
331
322
  * Folds an `Iterable<A>` using an effectful function f, working sequentially from left to right.
332
323
  * @tsplus static fncts.io.IOOps foldLeft
324
+ * @tsplus fluent fncts.Iterable foldLeftIO
333
325
  * @tsplus location "@fncts/io/IO/api"
334
326
  */
335
327
  export declare function foldLeft<A, B, R, E>(as: Iterable<A>, b: B, f: (b: B, a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, B>;
336
328
  /**
337
329
  * Combines an array of `IO`s using a `Monoid`
338
330
  * @tsplus static fncts.io.IOOps foldMap
331
+ * @tsplus fluent fncts.Iterable foldMapIO
339
332
  * @tsplus location "@fncts/io/IO/api"
340
333
  */
341
- export declare function foldMap<R, E, A, M>(as: Iterable<IO<R, E, A>>, f: (a: A) => M,
334
+ export declare function foldMap<R, E, A, M>(ios: Iterable<IO<R, E, A>>, f: (a: A) => M,
342
335
  /** @tsplus auto */ M: P.Monoid<M>): IO<R, E, M>;
343
336
  /**
344
337
  * Performs a right-associative fold of an `Iterable<A>`
345
338
  * @tsplus static fncts.io.IOOps foldRight
339
+ * @tsplus fluent fncts.Iterable foldRightIO
346
340
  * @tsplus location "@fncts/io/IO/api"
347
341
  */
348
342
  export declare function foldRight<A, B, R, E>(as: Iterable<A>, b: UIO<B>, f: (a: A, b: IO<R, E, B>) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, B>;
@@ -353,9 +347,18 @@ export declare function foldRight<A, B, R, E>(as: Iterable<A>, b: UIO<B>, f: (a:
353
347
  * For a parallel version of this method, see `foreachC`.
354
348
  * If you do not need the results, see `foreachUnit` for a more efficient implementation.
355
349
  * @tsplus static fncts.io.IOOps foreach
350
+ * @tsplus fluent fncts.Iterable foreachIO
356
351
  * @tsplus location "@fncts/io/IO/api"
357
352
  */
358
353
  export declare function foreach<A, R, E, B>(as: Iterable<A>, f: (a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, Conc<B>>;
354
+ /**
355
+ * Applies the function `f` to each element of the `Iterable<A>` and runs
356
+ * produced IOs sequentially.
357
+ * @tsplus static fncts.io.IOOps foreachDiscard
358
+ * @tsplus fluent fncts.Iterable foreachDiscardIO
359
+ * @tsplus location "@fncts/io/IO/api"
360
+ */
361
+ export declare function foreachDiscard<A, R, E, B>(as: Iterable<A>, f: (a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, void>;
359
362
  /**
360
363
  * Applies the function `f` to each element of the `Iterable<A>` and
361
364
  * returns the results in a new `Conc<B>`.
@@ -363,21 +366,16 @@ export declare function foreach<A, R, E, B>(as: Iterable<A>, f: (a: A) => IO<R,
363
366
  * For a parallel version of this method, see `foreachC`.
364
367
  * If you do not need the results, see `foreachUnit` for a more efficient implementation.
365
368
  * @tsplus static fncts.io.IOOps foreachWithIndex
369
+ * @tsplus fluent fncts.Iterable foreachWithIndexIO
366
370
  * @tsplus location "@fncts/io/IO/api"
367
371
  */
368
372
  export declare function foreachWithIndex<A, R, E, B>(as: Iterable<A>, f: (i: number, a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, Conc<B>>;
369
373
  /**
370
374
  * @tsplus static fncts.io.IOOps foreachWithIndexDiscard
375
+ * @tsplus fluent fncts.Iterable foreachWithIndexDiscardIO
371
376
  * @tsplus location "@fncts/io/IO/api"
372
377
  */
373
378
  export declare function foreachWithIndexDiscard<A, R, E, B>(as: Iterable<A>, f: (i: number, a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, void>;
374
- /**
375
- * Applies the function `f` to each element of the `Iterable<A>` and runs
376
- * produced IOs sequentially.
377
- * @tsplus static fncts.io.IOOps foreachDiscard
378
- * @tsplus location "@fncts/io/IO/api"
379
- */
380
- export declare function foreachDiscard<A, R, E, B>(as: Iterable<A>, f: (a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, void>;
381
379
  /**
382
380
  * Repeats this effect forever (until the first failure).
383
381
  * @tsplus getter fncts.io.IO forever
@@ -432,18 +430,18 @@ export declare function fromMaybe<A>(maybe: Lazy<Maybe<A>>, __tsplusTrace?: stri
432
430
  export declare function fromMaybeNow<A = never>(maybe: Maybe<A>, __tsplusTrace?: string): IO<never, NoSuchElementError, A>;
433
431
  /**
434
432
  * Create an IO that when executed will construct `promise` and wait for its result,
435
- * errors will be handled using `onReject`
436
- * @tsplus static fncts.io.IOOps fromPromiseCatch
433
+ * errors will produce failure as `unknown`
434
+ * @tsplus static fncts.io.IOOps fromPromise
437
435
  * @tsplus location "@fncts/io/IO/api"
438
436
  */
439
- export declare function fromPromiseCatch<E, A>(promise: Lazy<Promise<A>>, onReject: (reason: unknown) => E, __tsplusTrace?: string): FIO<E, A>;
437
+ export declare function fromPromise<A>(promise: Lazy<Promise<A>>, __tsplusTrace?: string): FIO<unknown, A>;
440
438
  /**
441
439
  * Create an IO that when executed will construct `promise` and wait for its result,
442
- * errors will produce failure as `unknown`
443
- * @tsplus static fncts.io.IOOps fromPromise
440
+ * errors will be handled using `onReject`
441
+ * @tsplus static fncts.io.IOOps fromPromiseCatch
444
442
  * @tsplus location "@fncts/io/IO/api"
445
443
  */
446
- export declare function fromPromise<A>(promise: Lazy<Promise<A>>, __tsplusTrace?: string): FIO<unknown, A>;
444
+ export declare function fromPromiseCatch<E, A>(promise: Lazy<Promise<A>>, onReject: (reason: unknown) => E, __tsplusTrace?: string): FIO<E, A>;
447
445
  /**
448
446
  * Like fromPromise but produces a defect in case of errors
449
447
  * @tsplus static fncts.io.IOOps fromPromiseHalt
@@ -456,6 +454,11 @@ export declare function fromPromiseHalt<A>(promise: Lazy<Promise<A>>, __tsplusTr
456
454
  * @tsplus location "@fncts/io/IO/api"
457
455
  */
458
456
  export declare function get<R, E, A>(ma: IO<R, E, Maybe<A>>, __tsplusTrace?: string): IO<R, Maybe<E>, A>;
457
+ /**
458
+ * @tsplus static fncts.io.IOOps getFiberRefs
459
+ * @tsplus location "@fncts/io/IO/api"
460
+ */
461
+ export declare function getFiberRefs(__tsplusTrace?: string): UIO<FiberRefs>;
459
462
  /**
460
463
  * Extracts the optional value, or returns the given 'orElse'.
461
464
  * @tsplus pipeable fncts.io.IO getOrElse
@@ -468,12 +471,6 @@ export declare function getOrElse<B>(orElse: Lazy<B>, __tsplusTrace?: string): <
468
471
  * @tsplus location "@fncts/io/IO/api"
469
472
  */
470
473
  export declare function getOrElseIO<R1, E1, B>(orElse: Lazy<IO<R1, E1, B>>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, Maybe<A>>) => IO<R | R1, E | E1, A | B>;
471
- /**
472
- * Lifts a Maybe into an IO. If the option is `Nothing`, fail with `onNothing`.
473
- * @tsplus static fncts.io.IOOps getOrFailWith
474
- * @tsplus location "@fncts/io/IO/api"
475
- */
476
- export declare function getOrFailWith<E, A>(maybe: Maybe<A>, onNothing: Lazy<E>, __tsplusTrace?: string): FIO<E, A>;
477
474
  /**
478
475
  * Lifts a Maybe into a IO, if the Maybe is `Nothing` it fails with Unit.
479
476
  * @tsplus static fncts.io.IOOps getOrFailUnit
@@ -481,10 +478,11 @@ export declare function getOrFailWith<E, A>(maybe: Maybe<A>, onNothing: Lazy<E>,
481
478
  */
482
479
  export declare function getOrFailUnit<A>(option: Maybe<A>, __tsplusTrace?: string): FIO<void, A>;
483
480
  /**
484
- * @tsplus static fncts.io.IOOps getFiberRefs
481
+ * Lifts a Maybe into an IO. If the option is `Nothing`, fail with `onNothing`.
482
+ * @tsplus static fncts.io.IOOps getOrFailWith
485
483
  * @tsplus location "@fncts/io/IO/api"
486
484
  */
487
- export declare function getFiberRefs(__tsplusTrace?: string): UIO<FiberRefs>;
485
+ export declare function getOrFailWith<E, A>(maybe: Maybe<A>, onNothing: Lazy<E>, __tsplusTrace?: string): FIO<E, A>;
488
486
  /**
489
487
  * Creates an `IO` that halts with the specified lazily-evaluated defect.
490
488
  * This method can be used for terminating a fiber because a defect has been
@@ -506,28 +504,23 @@ export declare function haltNow(e: unknown, __tsplusTrace?: string): UIO<never>;
506
504
  * @tsplus location "@fncts/io/IO/api"
507
505
  */
508
506
  export declare function ifIO<R1, E1, B, R2, E2, C>(onFalse: Lazy<IO<R1, E1, B>>, onTrue: Lazy<IO<R2, E2, C>>, __tsplusTrace?: string): <R, E>(self: IO<R, E, boolean>) => IO<R | R1 | R2, E | E1 | E2, B | C>;
509
- /**
510
- * @tsplus static fncts.io.IOOps if
511
- * @tsplus location "@fncts/io/IO/api"
512
- */
513
- export declare function cond<R, E, A, R1, E1, A1>(b: boolean, onTrue: Lazy<IO<R, E, A>>, onFalse: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string): IO<R | R1, E | E1, A | A1>;
514
507
  /**
515
508
  * @tsplus getter fncts.io.IO ignore
516
509
  * @tsplus location "@fncts/io/IO/api"
517
510
  */
518
- export declare function ignore<R, E, A>(fa: IO<R, E, A>, __tsplusTrace?: string): URIO<R, void>;
511
+ export declare function ignore<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): URIO<R, void>;
519
512
  /**
520
513
  * Folds a `IO` to a boolean describing whether or not it is a failure
521
514
  * @tsplus getter fncts.io.IO isFailure
522
515
  * @tsplus location "@fncts/io/IO/api"
523
516
  */
524
- export declare function isFailure<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, boolean>;
517
+ export declare function isFailure<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, boolean>;
525
518
  /**
526
519
  * Folds a `IO` to a boolean describing whether or not it is a success
527
520
  * @tsplus getter fncts.io.IO isSuccess
528
521
  * @tsplus location "@fncts/io/IO/api"
529
522
  */
530
- export declare function isSuccess<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, boolean>;
523
+ export declare function isSuccess<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, boolean>;
531
524
  /**
532
525
  * Iterates with the specified effectual function. The moral equivalent of:
533
526
  *
@@ -544,27 +537,22 @@ export declare function isSuccess<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: stri
544
537
  * @tsplus location "@fncts/io/IO/api"
545
538
  */
546
539
  export declare function iterate<R, E, A>(initial: A, cont: (a: A) => boolean, body: (a: A) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
547
- /**
548
- * Returns an IO with the value on the left part.
549
- * @tsplus static fncts.io.IOOps left
550
- * @tsplus location "@fncts/io/IO/api"
551
- */
552
- export declare function left<A>(a: Lazy<A>, __tsplusTrace?: string): UIO<Either<A, never>>;
553
540
  /**
554
541
  * @tsplus getter fncts.io.IO just
555
542
  * @tsplus location "@fncts/io/IO/api"
556
543
  */
557
544
  export declare function just<R, E, A>(self: IO<R, E, Maybe<A>>): IO<R, Maybe<E>, A>;
558
545
  /**
559
- * @tsplus static fncts.io.IOOps log
546
+ * Returns an IO with the value on the left part.
547
+ * @tsplus static fncts.io.IOOps left
560
548
  * @tsplus location "@fncts/io/IO/api"
561
549
  */
562
- export declare function log(message: Lazy<string>, __tsplusTrace?: string): UIO<void>;
550
+ export declare function left<A>(a: Lazy<A>, __tsplusTrace?: string): UIO<Either<A, never>>;
563
551
  /**
564
- * @tsplus static fncts.io.IOOps show
552
+ * @tsplus static fncts.io.IOOps log
565
553
  * @tsplus location "@fncts/io/IO/api"
566
554
  */
567
- export declare function show(message: Lazy<unknown>, options?: Partial<ShowOptions>, __tsplusTrace?: string): UIO<void>;
555
+ export declare function log(message: Lazy<string>, __tsplusTrace?: string): UIO<void>;
568
556
  /**
569
557
  * Loops with the specified effectual function, collecting the results into a
570
558
  * list. The moral equivalent of:
@@ -605,7 +593,7 @@ export declare function loopUnit<A, R, E>(initial: A, cont: (a: A) => boolean, i
605
593
  * @tsplus pipeable fncts.io.IO map
606
594
  * @tsplus location "@fncts/io/IO/api"
607
595
  */
608
- export declare function map<A, B>(f: (a: A) => B, __tsplusTrace?: string): <R, E>(fa: IO<R, E, A>) => IO<R, E, B>;
596
+ export declare function map<A, B>(f: (a: A) => B, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E, B>;
609
597
  /**
610
598
  * Map covariantly over the first argument.
611
599
  *
@@ -615,12 +603,7 @@ export declare function map<A, B>(f: (a: A) => B, __tsplusTrace?: string): <R, E
615
603
  * @tsplus pipeable fncts.io.IO mapError
616
604
  * @tsplus location "@fncts/io/IO/api"
617
605
  */
618
- export declare function mapError<E, E1>(f: (e: E) => E1, __tsplusTrace?: string): <R, A>(fea: IO<R, E, A>) => IO<R, E1, A>;
619
- /**
620
- * @tsplus static fncts.io.IOOps mapTryCatch
621
- * @tsplus location "@fncts/io/IO/api"
622
- */
623
- export declare function mapTryCatch<R, E, A, E1, B>(io: IO<R, E, A>, f: (a: A) => B, onThrow: (u: unknown) => E1, __tsplusTrace?: string): IO<R, E | E1, B>;
606
+ export declare function mapError<E, E1>(f: (e: E) => E1, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1, A>;
624
607
  /**
625
608
  * Returns an IO with its full cause of failure mapped using
626
609
  * the specified function. This can be used to transform errors
@@ -628,7 +611,21 @@ export declare function mapTryCatch<R, E, A, E1, B>(io: IO<R, E, A>, f: (a: A) =
628
611
  * @tsplus pipeable fncts.io.IO mapErrorCause
629
612
  * @tsplus location "@fncts/io/IO/api"
630
613
  */
631
- export declare function mapErrorCause<E, E1>(f: (cause: Cause<E>) => Cause<E1>, __tsplusTrace?: string): <R, A>(ma: IO<R, E, A>) => IO<R, E1, A>;
614
+ export declare function mapErrorCause<E, E1>(f: (cause: Cause<E>) => Cause<E1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1, A>;
615
+ /**
616
+ * @tsplus static fncts.io.IOOps mapTryCatch
617
+ * @tsplus pipeable fncts.io.IO mapTryCatch
618
+ * @tsplus location "@fncts/io/IO/api"
619
+ */
620
+ export declare function mapTryCatch<A, E1, B>(f: (a: A) => B, onThrow: (u: unknown) => E1, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E | E1, B>;
621
+ /**
622
+ * Folds over the failure value or the success value to yield an IO that
623
+ * does not fail, but succeeds with the value returned by the left or right
624
+ * function passed to `match_`.
625
+ * @tsplus pipeable fncts.io.IO match
626
+ * @tsplus location "@fncts/io/IO/api"
627
+ */
628
+ export declare function match<E, A, B, C>(onFailure: (e: E) => B, onSuccess: (a: A) => C, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R, never, B | C>;
632
629
  /**
633
630
  * A more powerful version of `match_` that allows recovering from any kind of failure except interruptions.
634
631
  * @tsplus pipeable fncts.io.IO matchCause
@@ -646,47 +643,71 @@ export declare function matchCauseIO<E, A, R1, E1, A1, R2, E2, A2>(onFailure: (c
646
643
  * @tsplus location "@fncts/io/IO/api"
647
644
  */
648
645
  export declare function matchIO<R1, R2, E, E1, E2, A, A1, A2>(onFailure: (e: E) => IO<R1, E1, A1>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R | R1 | R2, E1 | E2, A1 | A2>;
649
- /**
650
- * Folds over the failure value or the success value to yield an IO that
651
- * does not fail, but succeeds with the value returned by the left or right
652
- * function passed to `match_`.
653
- * @tsplus pipeable fncts.io.IO match
654
- * @tsplus location "@fncts/io/IO/api"
655
- */
656
- export declare function match<E, A, B, C>(onFailure: (e: E) => B, onSuccess: (a: A) => C, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R, never, B | C>;
657
646
  /**
658
647
  * A version of `matchIO` that gives you the (optional) trace of the error.
659
648
  * @tsplus pipeable fncts.io.IO matchTraceIO
660
649
  * @tsplus location "@fncts/io/IO/api"
661
650
  */
662
- export declare function matchTraceIO<E, A, R1, E1, A1, R2, E2, A2>(onFailure: (e: E, trace: Trace) => IO<R1, E1, A1>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R>(ma: IO<R, E, A>) => IO<R | R1 | R2, E1 | E2, A1 | A2>;
651
+ export declare function matchTraceIO<E, A, R1, E1, A1, R2, E2, A2>(onFailure: (e: E, trace: Trace) => IO<R1, E1, A1>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R | R1 | R2, E1 | E2, A1 | A2>;
663
652
  /**
664
653
  * @tsplus getter fncts.io.IO maybe
665
654
  * @tsplus location "@fncts/io/IO/api"
666
655
  */
667
- export declare function maybe<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string): URIO<R, Maybe<A>>;
656
+ export declare function maybe<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): URIO<R, Maybe<A>>;
668
657
  /**
669
658
  * @tsplus getter fncts.io.IO merge
670
659
  * @tsplus location "@fncts/io/IO/api"
671
660
  */
672
- export declare function merge<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A | E>;
661
+ export declare function merge<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A | E>;
673
662
  /**
674
663
  * Merges an `Iterable<IO>` to a single IO, working sequentially.
675
664
  * @tsplus static fncts.io.IOOps mergeAll
676
665
  * @tsplus location "@fncts/io/IO/api"
677
666
  */
678
- export declare function mergeAll<R, E, A, B>(fas: Iterable<IO<R, E, A>>, b: B, f: (b: B, a: A) => B, __tsplusTrace?: string): IO<R, E, B>;
667
+ export declare function mergeAll<R, E, A, B>(ios: Iterable<IO<R, E, A>>, b: B, f: (b: B, a: A) => B, __tsplusTrace?: string): IO<R, E, B>;
668
+ /**
669
+ * @tsplus static fncts.io.IOOps refailCause
670
+ * @tsplus location "@fncts/io/IO/api"
671
+ */
672
+ export declare function refailCause<E>(cause: Lazy<Cause<E>>, __tsplusTrace?: string): FIO<E, never>;
673
+ /**
674
+ * @tsplus static fncts.io.IOOps refailCauseNow
675
+ * @tsplus location "@fncts/io/IO/api"
676
+ */
677
+ export declare function refailCauseNow<E>(cause: Cause<E>, __tsplusTrace?: string): FIO<E, never>;
678
+ /**
679
+ * @tsplus static fncts.io.IOOps show
680
+ * @tsplus location "@fncts/io/IO/api"
681
+ */
682
+ export declare function show(message: Lazy<unknown>, options?: Partial<ShowOptions>, __tsplusTrace?: string): UIO<void>;
679
683
  /**
680
684
  * @tsplus static fncts.io.IOOps nothing
681
685
  * @tsplus location "@fncts/io/IO/api"
682
686
  */
683
687
  export declare const nothing: IO<never, never, import("@fncts/base/data/Maybe.js").Maybe<never>>;
688
+ /**
689
+ * Returns an `IO` that submerges an `Either` into the `IO`.
690
+ * @tsplus getter fncts.io.IO absolve
691
+ * @tsplus location "@fncts/io/IO/api"
692
+ */
693
+ export declare function absolve<R, E, E1, A>(self: IO<R, E, Either<E1, A>>, __tsplusTrace?: string): IO<R, E | E1, A>;
694
+ /**
695
+ * @tsplus static fncts.io.IOOps attempt
696
+ * @tsplus location "@fncts/io/IO/api"
697
+ */
698
+ export declare function attempt<A>(effect: Lazy<A>, __tsplusTrace?: string): FIO<unknown, A>;
699
+ /**
700
+ * Exposes all parallel errors in a single call
701
+ * @tsplus pipeable fncts.io.IO concurrentErrors
702
+ * @tsplus location "@fncts/io/IO/api"
703
+ */
704
+ export declare function concurrentErrors(__tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, List<E>, A>;
684
705
  /**
685
706
  * Converts an option on errors into an option on values.
686
707
  * @tsplus getter fncts.io.IO optional
687
708
  * @tsplus location "@fncts/io/IO/api"
688
709
  */
689
- export declare function optional<R, E, A>(ma: IO<R, Maybe<E>, A>, __tsplusTrace?: string): IO<R, E, Maybe<A>>;
710
+ export declare function optional<R, E, A>(self: IO<R, Maybe<E>, A>, __tsplusTrace?: string): IO<R, E, Maybe<A>>;
690
711
  /**
691
712
  * Returns the logical disjunction of the `Boolean` value returned by this
692
713
  * effect and the `Boolean` value returned by the specified effect. This
@@ -696,12 +717,12 @@ export declare function optional<R, E, A>(ma: IO<R, Maybe<E>, A>, __tsplusTrace?
696
717
  * @tsplus pipeable-operator fncts.io.IO ||
697
718
  * @tsplus location "@fncts/io/IO/api"
698
719
  */
699
- export declare function or<R1, E1>(mb: IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(ma: IO<R, E, boolean>) => IO<R | R1, E | E1, boolean>;
720
+ export declare function or<R1, E1>(or: IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(self: IO<R, E, boolean>) => IO<R | R1, E | E1, boolean>;
700
721
  /**
701
722
  * @tsplus pipeable fncts.io.IO orElse
702
723
  * @tsplus location "@fncts/io/IO/api"
703
724
  */
704
- export declare function orElse<R1, E1, A1>(that: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R | R1, E1, A | A1>;
725
+ export declare function orElse<R1, E1, A1>(that: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R | R1, E1, A | A1>;
705
726
  /**
706
727
  * @tsplus pipeable fncts.io.IO orElseEither
707
728
  * @tsplus location "@fncts/io/IO/api"
@@ -711,38 +732,32 @@ export declare function orElseEither<R1, E1, A1>(that: Lazy<IO<R1, E1, A1>>, __t
711
732
  * @tsplus pipeable fncts.io.IO orElseFail
712
733
  * @tsplus location "@fncts/io/IO/api"
713
734
  */
714
- export declare function orElseFail<E1>(e: Lazy<E1>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R, E1, A>;
735
+ export declare function orElseFail<E1>(e: Lazy<E1>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, E1, A>;
715
736
  /**
716
737
  * @tsplus pipeable fncts.io.IO orElseMaybe
717
738
  * @tsplus location "@fncts/io/IO/api"
718
739
  */
719
- export declare function orElseMaybe<R1, E1, A1>(that: Lazy<IO<R1, Maybe<E1>, A1>>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, Maybe<E>, A>) => IO<R | R1, Maybe<E | E1>, A | A1>;
740
+ export declare function orElseMaybe<R1, E1, A1>(that: Lazy<IO<R1, Maybe<E1>, A1>>, __tsplusTrace?: string): <R, E, A>(self: IO<R, Maybe<E>, A>) => IO<R | R1, Maybe<E | E1>, A | A1>;
720
741
  /**
721
742
  * @tsplus pipeable fncts.io.IO orElseSucceed
722
743
  * @tsplus location "@fncts/io/IO/api"
723
744
  */
724
- export declare function orElseSucceed<A1>(a: Lazy<A1>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R, E, A | A1>;
745
+ export declare function orElseSucceed<A1>(a: Lazy<A1>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, E, A | A1>;
725
746
  /**
726
747
  * @tsplus getter fncts.io.IO orHalt
727
748
  * @tsplus location "@fncts/io/IO/api"
728
749
  */
729
- export declare function orHalt<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A>;
750
+ export declare function orHalt<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A>;
730
751
  /**
731
752
  * @tsplus getter fncts.io.IO orHaltKeep
732
753
  * @tsplus location "@fncts/io/IO/api"
733
754
  */
734
- export declare function orHaltKeep<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A>;
755
+ export declare function orHaltKeep<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A>;
735
756
  /**
736
757
  * @tsplus pipeable fncts.io.IO orHaltWith
737
758
  * @tsplus location "@fncts/io/IO/api"
738
759
  */
739
- export declare function orHaltWith<E>(f: (e: E) => unknown, __tsplusTrace?: string): <R, A>(ma: IO<R, E, A>) => IO<R, never, A>;
740
- /**
741
- * Exposes all parallel errors in a single call
742
- * @tsplus pipeable fncts.io.IO concurrentErrors
743
- * @tsplus location "@fncts/io/IO/api"
744
- */
745
- export declare function concurrentErrors(__tsplusTrace?: string): <R, E, A>(io: IO<R, E, A>) => IO<R, List<E>, A>;
760
+ export declare function orHaltWith<E>(f: (e: E) => unknown, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, never, A>;
746
761
  /**
747
762
  * Feeds elements of type `A` to a function `f` that returns an IO.
748
763
  * Collects all successes and failures in a separated fashion.
@@ -755,21 +770,21 @@ export declare function partition<R, E, A, B>(as: Iterable<A>, f: (a: A) => IO<R
755
770
  * @tsplus pipeable fncts.io.IO refineOrHalt
756
771
  * @tsplus location "@fncts/io/IO/api"
757
772
  */
758
- export declare function refineOrHalt<E, E1>(pf: (e: E) => Maybe<E1>, __tsplusTrace?: string): <R, A>(fa: IO<R, E, A>) => IO<R, E1, A>;
773
+ export declare function refineOrHalt<E, E1>(pf: (e: E) => Maybe<E1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1, A>;
759
774
  /**
760
775
  * Keeps some of the errors, and terminates the fiber with the rest, using
761
776
  * the specified function to convert the `E` into a `Throwable`.
762
777
  * @tsplus pipeable fncts.io.IO refineOrHaltWith
763
778
  * @tsplus location "@fncts/io/IO/api"
764
779
  */
765
- export declare function refineOrHaltWith<E, E1>(pf: (e: E) => Maybe<E1>, f: (e: E) => unknown, __tsplusTrace?: string): <R, A>(fa: IO<R, E, A>) => IO<R, E1, A>;
780
+ export declare function refineOrHaltWith<E, E1>(pf: (e: E) => Maybe<E1>, f: (e: E) => unknown, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1, A>;
766
781
  /**
767
782
  * Fail with the returned value if the partial function `pf` matches, otherwise
768
783
  * continue with the held value.
769
784
  * @tsplus pipeable fncts.io.IO reject
770
785
  * @tsplus location "@fncts/io/IO/api"
771
786
  */
772
- export declare function reject<A, E1>(pf: (a: A) => Maybe<E1>, __tsplusTrace?: string): <R, E>(fa: IO<R, E, A>) => IO<R, E | E1, A>;
787
+ export declare function reject<A, E1>(pf: (a: A) => Maybe<E1>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E | E1, A>;
773
788
  /**
774
789
  * Continue with the returned computation if the partial function `pf` matches,
775
790
  * translating the successful match into a failure, otherwise continue with
@@ -777,95 +792,95 @@ export declare function reject<A, E1>(pf: (a: A) => Maybe<E1>, __tsplusTrace?: s
777
792
  * @tsplus pipeable fncts.io.IO rejectIO
778
793
  * @tsplus location "@fncts/io/IO/api"
779
794
  */
780
- export declare function rejectIO<A, R1, E1>(pf: (a: A) => Maybe<IO<R1, E1, E1>>, __tsplusTrace?: string): <R, E>(fa: IO<R, E, A>) => IO<R | R1, E | E1, A>;
795
+ export declare function rejectIO<A, R1, E1>(pf: (a: A) => Maybe<IO<R1, E1, E1>>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
781
796
  /**
782
797
  * Repeats this effect the specified number of times.
783
798
  * @tsplus pipeable fncts.io.IO repeatN
784
799
  * @tsplus location "@fncts/io/IO/api"
785
800
  */
786
- export declare function repeatN_(n: number, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R, E, A>;
801
+ export declare function repeatN_(n: number, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, E, A>;
787
802
  /**
788
803
  * Repeats this effect until its result satisfies the specified predicate.
789
804
  * @tsplus pipeable fncts.io.IO repeatUntil
790
805
  * @tsplus location "@fncts/io/IO/api"
791
806
  */
792
- export declare function repeatUntil<A>(f: (a: A) => boolean, __tsplusTrace?: string): <R, E>(ma: IO<R, E, A>) => IO<R, E, A>;
807
+ export declare function repeatUntil<A>(f: (a: A) => boolean, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E, A>;
793
808
  /**
794
809
  * Repeats this effect until its error satisfies the specified effectful predicate.
795
810
  * @tsplus pipeable fncts.io.IO repeatUntilIO
796
811
  * @tsplus location "@fncts/io/IO/api"
797
812
  */
798
- export declare function repeatUntilIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(ma: IO<R, E, A>) => IO<R | R1, E | E1, A>;
813
+ export declare function repeatUntilIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
799
814
  /**
800
815
  * Repeats this effect while its error satisfies the specified predicate.
801
816
  * @tsplus pipeable fncts.io.IO repeatWhile
802
817
  * @tsplus location "@fncts/io/IO/api"
803
818
  */
804
- export declare function repeatWhile<A>(f: (a: A) => boolean, __tsplusTrace?: string): <R, E>(ma: IO<R, E, A>) => IO<R, E, A>;
819
+ export declare function repeatWhile<A>(f: (a: A) => boolean, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E, A>;
805
820
  /**
806
821
  * Repeats this effect while its error satisfies the specified effectful predicate.
807
822
  * @tsplus pipeable fncts.io.IO repeatWhileIO
808
823
  * @tsplus location "@fncts/io/IO/api"
809
824
  */
810
- export declare function repeatWhileIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(ma: IO<R, E, A>) => IO<R | R1, E | E1, A>;
825
+ export declare function repeatWhileIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
811
826
  /**
812
827
  * @tsplus pipeable fncts.io.IO replicate
813
828
  * @tsplus location "@fncts/io/IO/api"
814
829
  */
815
- export declare function replicate(n: number, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => ImmutableArray<IO<R, E, A>>;
830
+ export declare function replicate(n: number, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => ReadonlyArray<IO<R, E, A>>;
816
831
  /**
817
832
  * @tsplus pipeable fncts.io.IO require
818
833
  * @tsplus location "@fncts/io/IO/api"
819
834
  */
820
- export declare function require<E>(error: Lazy<E>, __tsplusTrace?: string): <R, A>(ma: IO<R, E, Maybe<A>>) => IO<R, E, A>;
835
+ export declare function require<E>(error: Lazy<E>, __tsplusTrace?: string): <R, A>(self: IO<R, E, Maybe<A>>) => IO<R, E, A>;
821
836
  /**
822
837
  * Returns an IO that semantically runs the IO on a fiber,
823
838
  * producing an `Exit` for the completion value of the fiber.
824
839
  * @tsplus getter fncts.io.IO result
825
840
  * @tsplus location "@fncts/io/IO/api"
826
841
  */
827
- export declare function result<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, Exit<E, A>>;
842
+ export declare function result<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, Exit<E, A>>;
828
843
  /**
829
844
  * Recover from the unchecked failure of the `IO`. (opposite of `orHalt`)
830
845
  * @tsplus getter fncts.io.IO resurrect
831
846
  * @tsplus location "@fncts/io/IO/api"
832
847
  */
833
- export declare function resurrect<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string): IO<R, unknown, A>;
848
+ export declare function resurrect<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, unknown, A>;
834
849
  /**
835
850
  * Retries this effect until its error satisfies the specified predicate.
836
851
  * @tsplus pipeable fncts.io.IO retryUntil
837
852
  * @tsplus location "@fncts/io/IO/api"
838
853
  */
839
- export declare function retryUntil<E>(f: (e: E) => boolean, __tsplusTrace?: string): <R, A>(fa: IO<R, E, A>) => IO<R, E, A>;
854
+ export declare function retryUntil<E>(f: (e: E) => boolean, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E, A>;
840
855
  /**
841
856
  * Retries this effect until its error satisfies the specified effectful predicate.
842
857
  * @tsplus pipeable fncts.io.IO retryUntilIO
843
858
  * @tsplus location "@fncts/io/IO/api"
844
859
  */
845
- export declare function retryUntilIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, A>(fa: IO<R, E, A>) => IO<R | R1, E | E1, A>;
860
+ export declare function retryUntilIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
846
861
  /**
847
862
  * Retries this effect while its error satisfies the specified predicate.
848
863
  * @tsplus pipeable fncts.io.IO retryWhile
849
864
  * @tsplus location "@fncts/io/IO/api"
850
865
  */
851
- export declare function retryWhile<E>(f: (e: E) => boolean, __tsplusTrace?: string): <R, A>(fa: IO<R, E, A>) => IO<R, E, A>;
866
+ export declare function retryWhile<E>(f: (e: E) => boolean, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E, A>;
852
867
  /**
853
868
  * Retries this effect while its error satisfies the specified effectful predicate.
854
869
  * @tsplus pipeable fncts.io.IO retryWhileIO
855
870
  * @tsplus location "@fncts/io/IO/api"
856
871
  */
857
- export declare function retryWhileIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, A>(fa: IO<R, E, A>) => IO<R | R1, E | E1, A>;
872
+ export declare function retryWhileIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
858
873
  /**
859
874
  * Exposes the full cause of failure of this effect.
860
875
  * @tsplus getter fncts.io.IO sandbox
861
876
  * @tsplus location "@fncts/io/IO/api"
862
877
  */
863
- export declare function sandbox<R, E, A>(fa: IO<R, E, A>, __tsplusTrace?: string): IO<R, Cause<E>, A>;
878
+ export declare function sandbox<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, Cause<E>, A>;
864
879
  /**
865
880
  * @tsplus pipeable fncts.io.IO sandboxWith
866
881
  * @tsplus location "@fncts/io/IO/api"
867
882
  */
868
- export declare function sandboxWith<R, E, A, E1>(f: (_: IO<R, Cause<E>, A>) => IO<R, Cause<E1>, A>, __tsplusTrace?: string): (ma: IO<R, E, A>) => IO<R, E1, A>;
883
+ export declare function sandboxWith<R, E, A, E1>(f: (_: IO<R, Cause<E>, A>) => IO<R, Cause<E1>, A>, __tsplusTrace?: string): (self: IO<R, E, A>) => IO<R, E1, A>;
869
884
  /**
870
885
  * @tsplus static fncts.io.IOOps sequenceIterable
871
886
  * @tsplus location "@fncts/io/IO/api"
@@ -876,12 +891,6 @@ export declare function sequenceIterable<R, E, A>(as: Iterable<IO<R, E, A>>, __t
876
891
  * @tsplus location "@fncts/io/IO/api"
877
892
  */
878
893
  export declare function sequenceIterableDiscard<R, E, A>(as: Iterable<IO<R, E, A>>, __tsplusTrace?: string): IO<R, E, void>;
879
- /**
880
- * Creates a `IO` that has succeeded with a pure value
881
- * @tsplus static fncts.io.IOOps succeedNow
882
- * @tsplus location "@fncts/io/IO/api"
883
- */
884
- export declare function succeedNow<A>(value: A, __tsplusTrace?: string): IO<never, never, A>;
885
894
  /**
886
895
  * Imports a total synchronous effect into a pure `IO` value.
887
896
  * The effect must not throw any exceptions. If you wonder if the effect
@@ -891,6 +900,12 @@ export declare function succeedNow<A>(value: A, __tsplusTrace?: string): IO<neve
891
900
  * @tsplus location "@fncts/io/IO/api"
892
901
  */
893
902
  export declare function succeed<A>(effect: Lazy<A>, __tsplusTrace?: string): UIO<A>;
903
+ /**
904
+ * Creates a `IO` that has succeeded with a pure value
905
+ * @tsplus static fncts.io.IOOps succeedNow
906
+ * @tsplus location "@fncts/io/IO/api"
907
+ */
908
+ export declare function succeedNow<A>(value: A, __tsplusTrace?: string): IO<never, never, A>;
894
909
  /**
895
910
  * @tsplus pipeable fncts.io.IO summarized
896
911
  * @tsplus location "@fncts/io/IO/api"
@@ -901,36 +916,13 @@ export declare function summarized<R1, E1, B, C>(summary: IO<R1, E1, B>, f: (sta
901
916
  * @tsplus getter fncts.io.IO swap
902
917
  * @tsplus location "@fncts/io/IO/api"
903
918
  */
904
- export declare function swap<R, E, A>(pab: IO<R, E, A>, __tsplusTrace?: string): IO<R, A, E>;
919
+ export declare function swap<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, A, E>;
905
920
  /**
906
921
  * Swaps the error/value parameters, applies the function `f` and flips the parameters back
907
922
  * @tsplus pipeable fncts.io.IO swapWith
908
923
  * @tsplus location "@fncts/io/IO/api"
909
924
  */
910
- export declare function swapWith<R, E, A, R1, E1, A1>(f: (ma: IO<R, A, E>) => IO<R1, A1, E1>, __tsplusTrace?: string): (fa: IO<R, E, A>) => IO<R1, E1, A1>;
911
- /**
912
- * A more powerful variation of `timed` that allows specifying the clock.
913
- * @tsplus pipeable fncts.io.IO timedWith
914
- * @tsplus location "@fncts/io/IO/api"
915
- */
916
- export declare function timedWith<R1, E1>(msTime: IO<R1, E1, number>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R1 | R, E1 | E, readonly [number, A]>;
917
- /**
918
- * @tsplus static fncts.io.IOOps attempt
919
- * @tsplus location "@fncts/io/IO/api"
920
- */
921
- export declare function attempt<A>(effect: Lazy<A>, __tsplusTrace?: string): FIO<unknown, A>;
922
- /**
923
- * Creates a `IO` that has succeeded with a pure value
924
- * @tsplus static fncts.io.IOOps tryCatch
925
- * @tsplus location "@fncts/io/IO/api"
926
- */
927
- export declare function tryCatch<E, A>(effect: Lazy<A>, onThrow: (error: unknown) => E, __tsplusTrace?: string): FIO<E, A>;
928
- /**
929
- * Returns an `IO` that submerges an `Either` into the `IO`.
930
- * @tsplus getter fncts.io.IO absolve
931
- * @tsplus location "@fncts/io/IO/api"
932
- */
933
- export declare function absolve<R, E, E1, A>(ma: IO<R, E, Either<E1, A>>, __tsplusTrace?: string): IO<R, E | E1, A>;
925
+ export declare function swapWith<R, E, A, R1, E1, A1>(f: (ma: IO<R, A, E>) => IO<R1, A1, E1>, __tsplusTrace?: string): (self: IO<R, E, A>) => IO<R1, E1, A1>;
934
926
  /**
935
927
  * Composes computations in sequence, using the return value of one computation as input for the next
936
928
  * and keeping only the result of the first
@@ -946,7 +938,7 @@ export declare function tap<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, __tsplusTr
946
938
  * @tsplus pipeable fncts.io.IO tapCause
947
939
  * @tsplus location "@fncts/io/IO/api"
948
940
  */
949
- export declare function tapCause<R, E, E2>(f: (e: Cause<E2>) => IO<R, E, any>, __tsplusTrace?: string): <R2, A2>(ma: IO<R2, E2, A2>) => IO<R2 | R, E | E2, A2>;
941
+ export declare function tapCause<R, E, E2>(f: (e: Cause<E2>) => IO<R, E, any>, __tsplusTrace?: string): <R2, A2>(self: IO<R2, E2, A2>) => IO<R2 | R, E | E2, A2>;
950
942
  /**
951
943
  * Returns an IO that effectfully "peeks" at the failure of this effect.
952
944
  * @tsplus pipeable fncts.io.IO tapError
@@ -960,11 +952,23 @@ export declare function tapError<E, R1, E1>(f: (e: E) => IO<R1, E1, any>, __tspl
960
952
  * @tsplus location "@fncts/io/IO/api"
961
953
  */
962
954
  export declare function tapErrorCause<E, R1, E1>(f: (e: Cause<E>) => IO<R1, E1, any>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
955
+ /**
956
+ * A more powerful variation of `timed` that allows specifying the clock.
957
+ * @tsplus pipeable fncts.io.IO timedWith
958
+ * @tsplus location "@fncts/io/IO/api"
959
+ */
960
+ export declare function timedWith<R1, E1>(msTime: IO<R1, E1, number>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, readonly [number, A]>;
961
+ /**
962
+ * Creates a `IO` that has succeeded with a pure value
963
+ * @tsplus static fncts.io.IOOps tryCatch
964
+ * @tsplus location "@fncts/io/IO/api"
965
+ */
966
+ export declare function tryCatch<E, A>(effect: Lazy<A>, onThrow: (error: unknown) => E, __tsplusTrace?: string): FIO<E, A>;
963
967
  /**
964
968
  * @tsplus pipeable fncts.io.IO tryOrElse
965
969
  * @tsplus location "@fncts/io/IO/api"
966
970
  */
967
- export declare function tryOrElse<A, R1, E1, A1, R2, E2, A2>(that: Lazy<IO<R1, E1, A1>>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R, E>(ma: IO<R, E, A>) => IO<R | R1 | R2, E1 | E2, A1 | A2>;
971
+ export declare function tryOrElse<A, R1, E1, A1, R2, E2, A2>(that: Lazy<IO<R1, E1, A1>>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1 | R2, E1 | E2, A1 | A2>;
968
972
  /**
969
973
  * @tsplus static fncts.io.IOOps unit
970
974
  * @tsplus location "@fncts/io/IO/api"
@@ -982,13 +986,13 @@ export declare function unjust<R, E, A>(self: IO<R, Maybe<E>, A>, __tsplusTrace?
982
986
  * @tsplus pipeable fncts.io.IO unrefineWith
983
987
  * @tsplus location "@fncts/io/IO/api"
984
988
  */
985
- export declare function unrefineWith<E, E1, E2>(pf: (u: unknown) => Maybe<E1>, f: (e: E) => E2, __tsplusTrace?: string): <R, A>(fa: IO<R, E, A>) => IO<R, E1 | E2, A>;
989
+ export declare function unrefineWith<E, E1, E2>(pf: (u: unknown) => Maybe<E1>, f: (e: E) => E2, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1 | E2, A>;
986
990
  /**
987
991
  * The inverse operation `sandbox`
988
992
  * @tsplus getter fncts.io.IO unsandbox
989
993
  * @tsplus location "@fncts/io/IO/api"
990
994
  */
991
- export declare function unsandbox<R, E, A>(ma: IO<R, Cause<E>, A>, __tsplusTrace?: string): IO<R, E, A>;
995
+ export declare function unsandbox<R, E, A>(self: IO<R, Cause<E>, A>, __tsplusTrace?: string): IO<R, E, A>;
992
996
  /**
993
997
  * Updates the `FiberRef` values for the fiber running this effect using the
994
998
  * specified function
@@ -1001,33 +1005,38 @@ export declare function updateFiberRefs(f: (fiberId: FiberId.Runtime, fiberRefs:
1001
1005
  * @tsplus location "@fncts/io/IO/api"
1002
1006
  */
1003
1007
  export declare const via: typeof pipe;
1008
+ /**
1009
+ * @tsplus static fncts.io.IOOps stackTrace
1010
+ * @tsplus location "@fncts/io/IO/api"
1011
+ */
1012
+ export declare function stackTrace(__tsplusTrace?: string): UIO<Trace>;
1013
+ /**
1014
+ * @tsplus static fncts.io.IOOps updateRuntimeFlags
1015
+ * @tsplus location "@fncts/io/IO/api"
1016
+ */
1017
+ export declare function updateRuntimeFlags(patch: RuntimeFlags.Patch, __tsplusTrace?: string): IO<never, never, void>;
1004
1018
  /**
1005
1019
  * @tsplus pipeable fncts.io.IO when
1006
1020
  * @tsplus location "@fncts/io/IO/api"
1007
1021
  */
1008
- export declare function when(b: Lazy<boolean>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R, E, void>;
1022
+ export declare function when(b: Lazy<boolean>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, E, void>;
1009
1023
  /**
1010
1024
  * The moral equivalent of `if (p) exp` when `p` has side-effects
1011
1025
  * @tsplus pipeable fncts.io.IO whenIO
1012
1026
  * @tsplus static fncts.io.IOOps whenIO
1013
1027
  * @tsplus location "@fncts/io/IO/api"
1014
1028
  */
1015
- export declare function whenIO<R1, E1>(mb: IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R1 | R, E | E1, Maybe<A>>;
1016
- /**
1017
- * @tsplus static fncts.io.IOOps withFiberRuntime
1018
- * @tsplus location "@fncts/io/IO/api"
1019
- */
1020
- export declare function withFiberRuntime<R, E, A>(onState: (fiber: FiberRuntime<E, A>, status: Running) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
1029
+ export declare function whenIO<R1, E1>(mb: IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E | E1, Maybe<A>>;
1021
1030
  /**
1022
- * @tsplus static fncts.io.IOOps updateRuntimeFlags
1031
+ * @tsplus static fncts.io.IOOps whileLoop
1023
1032
  * @tsplus location "@fncts/io/IO/api"
1024
1033
  */
1025
- export declare function updateRuntimeFlags(patch: RuntimeFlags.Patch, __tsplusTrace?: string): IO<never, never, void>;
1034
+ export declare function whileLoop<R, E, A>(check: Lazy<boolean>, body: Lazy<IO<R, E, A>>, process: (a: A) => any, __tsPlusTrace?: string): IO<R, E, void>;
1026
1035
  /**
1027
- * @tsplus static fncts.io.IOOps stackTrace
1036
+ * @tsplus static fncts.io.IOOps withFiberRuntime
1028
1037
  * @tsplus location "@fncts/io/IO/api"
1029
1038
  */
1030
- export declare function stackTrace(__tsplusTrace?: string): UIO<Trace>;
1039
+ export declare function withFiberRuntime<R, E, A>(onState: (fiber: FiberRuntime<E, A>, status: Running) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
1031
1040
  /**
1032
1041
  * Returns an effect that yields to the runtime system, starting on a fresh
1033
1042
  * stack. Manual use of this method can improve fairness, at the cost of
@@ -1041,11 +1050,28 @@ export declare const yieldNow: UIO<void>;
1041
1050
  * @tsplus location "@fncts/io/IO/api"
1042
1051
  */
1043
1052
  export declare function zip<R1, E1, B>(that: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, readonly [A, B]>;
1053
+ /**
1054
+ * @tsplus pipeable fncts.io.IO zipLeft
1055
+ * @tsplus pipeable-operator fncts.io.IO <
1056
+ * @tsplus location "@fncts/io/IO/api"
1057
+ */
1058
+ export declare function zipLeft<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, A>;
1059
+ /**
1060
+ * Combine two effectful actions, keeping only the result of the second
1061
+ * @tsplus pipeable fncts.io.IO zipRight
1062
+ * @tsplus pipeable-operator fncts.io.IO >
1063
+ * @tsplus location "@fncts/io/IO/api"
1064
+ */
1065
+ export declare function zipRight<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, B>;
1044
1066
  /**
1045
1067
  * @tsplus pipeable fncts.io.IO zipWith
1046
1068
  * @tsplus location "@fncts/io/IO/api"
1047
1069
  */
1048
1070
  export declare function zipWith<A, R1, E1, B, C>(that: IO<R1, E1, B>, f: (a: A, b: B) => C, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, C>;
1071
+ /**
1072
+ * @internal
1073
+ */
1074
+ export declare const __adapter: (_: any) => any;
1049
1075
  export declare class GenIO<R, E, A> {
1050
1076
  readonly effect: IO<R, E, A>;
1051
1077
  readonly _trace?: string | undefined;
@@ -1055,10 +1081,6 @@ export declare class GenIO<R, E, A> {
1055
1081
  constructor(effect: IO<R, E, A>, _trace?: string | undefined);
1056
1082
  [Symbol.iterator](): Generator<GenIO<R, E, A>, A, any>;
1057
1083
  }
1058
- /**
1059
- * @internal
1060
- */
1061
- export declare const __adapter: (_: any) => any;
1062
1084
  /**
1063
1085
  * @tsplus static fncts.io.IOOps gen
1064
1086
  * @gen