@fncts/io 0.0.13 → 0.0.16

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 (928) hide show
  1. package/Cached/api.d.ts +2 -2
  2. package/Channel/UpstreamPullStrategy/definition.d.ts +1 -1
  3. package/Channel/api/mapOutIOC.d.ts +1 -1
  4. package/Channel/api/mergeAllWith.d.ts +2 -2
  5. package/Channel/api/mergeWith.d.ts +2 -2
  6. package/Channel/api/toPull.d.ts +1 -1
  7. package/Channel/api.d.ts +8 -8
  8. package/Channel/core-api.d.ts +2 -2
  9. package/Channel/definition.d.ts +24 -10
  10. package/Channel/internal/AsyncInputConsumer.d.ts +1 -1
  11. package/Channel/internal/AsyncInputProducer.d.ts +1 -1
  12. package/Channel/internal/ChannelExecutor.d.ts +5 -5
  13. package/Channel/internal/ChannelState.d.ts +1 -1
  14. package/Channel/internal/MergeDecision.d.ts +1 -1
  15. package/Channel/internal/MergeState.d.ts +2 -2
  16. package/Channel/internal/SingleProducerAsyncInput.d.ts +4 -4
  17. package/Clock/api.d.ts +2 -2
  18. package/Clock/definition.d.ts +2 -2
  19. package/Clock/live.d.ts +3 -3
  20. package/Console/api.d.ts +1 -1
  21. package/Fiber/FiberContext.d.ts +10 -10
  22. package/Fiber/api/await.d.ts +2 -2
  23. package/Fiber/api/awaitAll.d.ts +2 -2
  24. package/Fiber/api/children.d.ts +1 -1
  25. package/Fiber/api/collectAll.d.ts +3 -3
  26. package/Fiber/api/evalOn.d.ts +1 -1
  27. package/Fiber/api/evalOnIO.d.ts +1 -1
  28. package/Fiber/api/fromIO.d.ts +1 -1
  29. package/Fiber/api/id.d.ts +2 -2
  30. package/Fiber/api/inheritRefs.d.ts +1 -1
  31. package/Fiber/api/interrupt.d.ts +2 -2
  32. package/Fiber/api/interruptAll.d.ts +3 -3
  33. package/Fiber/api/interruptAs.d.ts +3 -3
  34. package/Fiber/api/join.d.ts +1 -1
  35. package/Fiber/api/joinAll.d.ts +1 -1
  36. package/Fiber/api/mapFiber.d.ts +1 -1
  37. package/Fiber/api/mapIO.d.ts +2 -2
  38. package/Fiber/api/poll.d.ts +3 -3
  39. package/Fiber/api/zipWith.d.ts +1 -1
  40. package/Fiber/constructors.d.ts +8 -8
  41. package/Fiber/definition.d.ts +3 -3
  42. package/FiberRef/api/locallyScoped.d.ts +1 -1
  43. package/FiberRef/api/locallyScopedWith.d.ts +1 -1
  44. package/FiberRef/api.d.ts +8 -8
  45. package/FiberRef/constructors.d.ts +2 -2
  46. package/FiberRef/unsafe.d.ts +5 -5
  47. package/FiberRefs/api.d.ts +4 -4
  48. package/FiberRefs/definition.d.ts +3 -3
  49. package/FiberRefs/join.d.ts +2 -2
  50. package/FiberScope/constructors.d.ts +1 -1
  51. package/FiberScope/definition.d.ts +1 -1
  52. package/FiberState/api.d.ts +1 -1
  53. package/FiberState/constructors.d.ts +3 -3
  54. package/FiberState/definition.d.ts +3 -3
  55. package/FiberStatus/constructors.d.ts +1 -1
  56. package/FiberStatus/definition.d.ts +1 -1
  57. package/Future/api.d.ts +18 -18
  58. package/Future/constructors.d.ts +3 -3
  59. package/Future/definition.d.ts +2 -2
  60. package/Hub/api.d.ts +22 -22
  61. package/Hub/internal.d.ts +1 -1
  62. package/IO/api/acquireRelease.d.ts +2 -2
  63. package/IO/api/acquireReleaseExit.d.ts +2 -2
  64. package/IO/api/acquireReleaseInterruptible.d.ts +1 -1
  65. package/IO/api/acquireReleaseInterruptibleExit.d.ts +2 -2
  66. package/IO/api/addFinalizer.d.ts +1 -1
  67. package/IO/api/addFinalizerExit.d.ts +2 -2
  68. package/IO/api/asyncIO.d.ts +1 -1
  69. package/IO/api/bracket.d.ts +2 -2
  70. package/IO/api/bracketExit.d.ts +3 -3
  71. package/IO/api/concurrency.d.ts +4 -4
  72. package/IO/api/concurrentFinalizers.d.ts +1 -1
  73. package/IO/api/consoleWith.d.ts +1 -1
  74. package/IO/api/core-scope.d.ts +3 -3
  75. package/IO/api/ensuringChildren.d.ts +1 -1
  76. package/IO/api/environment.d.ts +3 -3
  77. package/IO/api/foreachC.d.ts +2 -2
  78. package/IO/api/foreachExec.d.ts +1 -1
  79. package/IO/api/fulfill.d.ts +1 -1
  80. package/IO/api/interrupt.d.ts +7 -7
  81. package/IO/api/onExit.d.ts +2 -2
  82. package/IO/api/onTermination.d.ts +4 -4
  83. package/IO/api/provideLayer.d.ts +1 -1
  84. package/IO/api/race.d.ts +1 -1
  85. package/IO/api/raceFirst.d.ts +1 -1
  86. package/IO/api/randomWith.d.ts +1 -1
  87. package/IO/api/repeat.d.ts +6 -6
  88. package/IO/api/retry.d.ts +5 -5
  89. package/IO/api/schedule.d.ts +2 -2
  90. package/IO/api/scopeWith.d.ts +1 -1
  91. package/IO/api/scoped.d.ts +3 -3
  92. package/IO/api/sequenceT.d.ts +1 -1
  93. package/IO/api/sleep.d.ts +2 -2
  94. package/IO/api/stateful.d.ts +2 -2
  95. package/IO/api/timeout.d.ts +4 -4
  96. package/IO/api/withEarlyRelease.d.ts +1 -1
  97. package/IO/api/withFinalizer.d.ts +1 -1
  98. package/IO/api/withFinalizerExit.d.ts +2 -2
  99. package/IO/api/withRuntimeConfig.d.ts +2 -2
  100. package/IO/api/zipC.d.ts +4 -4
  101. package/IO/api.d.ts +53 -53
  102. package/IO/definition.d.ts +16 -10
  103. package/IO/runtime.d.ts +7 -7
  104. package/IOEnv/services.d.ts +1 -1
  105. package/IOSpec.d.ts +6 -6
  106. package/Layer/MemoMap.d.ts +8 -8
  107. package/Layer/api.d.ts +39 -39
  108. package/Layer/definition.d.ts +16 -9
  109. package/Logger/api.d.ts +2 -2
  110. package/Logger/definition.d.ts +4 -4
  111. package/Queue/api/dimapIO.d.ts +6 -6
  112. package/Queue/api/filterInputIO.d.ts +3 -3
  113. package/Queue/api/filterOutputIO.d.ts +3 -3
  114. package/Queue/api/operations.d.ts +10 -10
  115. package/Queue/api/poll.d.ts +2 -2
  116. package/Queue/api/takeBetween.d.ts +1 -1
  117. package/Queue/api/zipWithIO.d.ts +3 -3
  118. package/Queue/constructors.d.ts +4 -4
  119. package/Queue/definition.d.ts +3 -3
  120. package/Queue/strategy.d.ts +10 -10
  121. package/Random/api.d.ts +5 -5
  122. package/Random/definition.d.ts +5 -5
  123. package/Random/live.d.ts +4 -4
  124. package/Ref/Atomic/Atomic.d.ts +1 -1
  125. package/Ref/Atomic/api.d.ts +11 -11
  126. package/Ref/Derived.d.ts +1 -1
  127. package/Ref/DerivedAll.d.ts +1 -1
  128. package/Ref/Synchronized/api.d.ts +13 -13
  129. package/Ref/Synchronized/constructors.d.ts +2 -2
  130. package/Ref/Synchronized/definition.d.ts +1 -1
  131. package/Ref/api/collect.d.ts +2 -2
  132. package/Ref/api/dimap.d.ts +8 -8
  133. package/Ref/api/filter.d.ts +3 -3
  134. package/Ref/api/get.d.ts +1 -1
  135. package/Ref/api/match.d.ts +1 -1
  136. package/Ref/api/matchAll.d.ts +1 -1
  137. package/Ref/api/modify.d.ts +10 -10
  138. package/Ref/api/set.d.ts +1 -1
  139. package/Ref/constructors.d.ts +3 -3
  140. package/Ref/definition.d.ts +2 -2
  141. package/RuntimeConfig.d.ts +2 -2
  142. package/STM/api/core-api.d.ts +5 -5
  143. package/STM/api/core-constructors.d.ts +7 -7
  144. package/STM/api.d.ts +56 -56
  145. package/STM/definition.d.ts +2 -2
  146. package/STM/driver.d.ts +2 -2
  147. package/STM/internal/CommitState.d.ts +1 -1
  148. package/STM/internal/Journal.d.ts +3 -3
  149. package/STM/internal/TryCommit.d.ts +1 -1
  150. package/Schedule/Driver.d.ts +1 -1
  151. package/Schedule/api/driver.d.ts +1 -1
  152. package/Schedule/api.d.ts +73 -73
  153. package/Scope/Finalizer/definition.d.ts +1 -1
  154. package/Scope/ReleaseMap/api/releaseAll.d.ts +2 -2
  155. package/Scope/ReleaseMap/api.d.ts +7 -7
  156. package/Scope/ReleaseMap/definition.d.ts +2 -2
  157. package/Scope/api.d.ts +9 -9
  158. package/Scope/definition.d.ts +2 -2
  159. package/ScopedRef/api.d.ts +1 -1
  160. package/Sink/api.d.ts +18 -18
  161. package/State/api.d.ts +2 -2
  162. package/Stream/api/zipAllWith.d.ts +3 -3
  163. package/Stream/api/zipWith.d.ts +1 -1
  164. package/Stream/api/zipWithChunks.d.ts +4 -4
  165. package/Stream/api.d.ts +169 -162
  166. package/Stream/internal/Handoff.d.ts +2 -2
  167. package/Stream/internal/Pull.d.ts +2 -2
  168. package/Stream/internal/Take.d.ts +3 -3
  169. package/Stream/internal/util.d.ts +1 -1
  170. package/Supervisor/api.d.ts +3 -3
  171. package/Supervisor/constructors.d.ts +4 -4
  172. package/Supervisor/definition.d.ts +3 -3
  173. package/TExit/constructors.d.ts +1 -1
  174. package/TExit/definition.d.ts +1 -1
  175. package/TFuture/api.d.ts +7 -7
  176. package/TFuture/constructors.d.ts +4 -4
  177. package/TFuture/definition.d.ts +2 -2
  178. package/TReentrantLock/api.d.ts +16 -16
  179. package/TReentrantLock/definition.d.ts +2 -2
  180. package/TRef/api.d.ts +15 -15
  181. package/TRef/constructors.d.ts +5 -5
  182. package/TRef/definition.d.ts +2 -2
  183. package/TSemaphore/api.d.ts +7 -7
  184. package/TSemaphore/constructors.d.ts +1 -1
  185. package/_cjs/Cached/api.cjs +5 -5
  186. package/_cjs/Cached/api.cjs.map +1 -1
  187. package/_cjs/Channel/api/interruptWhen.cjs +1 -1
  188. package/_cjs/Channel/api/interruptWhen.cjs.map +1 -1
  189. package/_cjs/Channel/api/mapOutIOC.cjs +2 -2
  190. package/_cjs/Channel/api/mapOutIOC.cjs.map +1 -1
  191. package/_cjs/Channel/api/mergeAllWith.cjs +11 -11
  192. package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
  193. package/_cjs/Channel/api/mergeWith.cjs +5 -5
  194. package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
  195. package/_cjs/Channel/api/run.cjs +3 -1
  196. package/_cjs/Channel/api/run.cjs.map +1 -1
  197. package/_cjs/Channel/api.cjs +7 -7
  198. package/_cjs/Channel/api.cjs.map +1 -1
  199. package/_cjs/Channel/core-api.cjs.map +1 -1
  200. package/_cjs/Channel/internal/ChannelExecutor.cjs +6 -6
  201. package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
  202. package/_cjs/Channel/internal/ChannelState.cjs +2 -1
  203. package/_cjs/Channel/internal/ChannelState.cjs.map +1 -1
  204. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +16 -16
  205. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
  206. package/_cjs/Clock/definition.cjs +1 -1
  207. package/_cjs/Clock/definition.cjs.map +1 -1
  208. package/_cjs/Console/api.cjs +5 -3
  209. package/_cjs/Console/api.cjs.map +1 -1
  210. package/_cjs/Console/definition.cjs +1 -1
  211. package/_cjs/Console/definition.cjs.map +1 -1
  212. package/_cjs/Fiber/FiberContext.cjs +3 -3
  213. package/_cjs/Fiber/FiberContext.cjs.map +1 -1
  214. package/_cjs/Fiber/api/await.cjs +1 -1
  215. package/_cjs/Fiber/api/await.cjs.map +1 -1
  216. package/_cjs/Fiber/api/awaitAll.cjs +2 -4
  217. package/_cjs/Fiber/api/awaitAll.cjs.map +1 -1
  218. package/_cjs/Fiber/api/children.cjs +1 -1
  219. package/_cjs/Fiber/api/children.cjs.map +1 -1
  220. package/_cjs/Fiber/api/collectAll.cjs +2 -4
  221. package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
  222. package/_cjs/Fiber/api/evalOn.cjs +1 -1
  223. package/_cjs/Fiber/api/evalOn.cjs.map +1 -1
  224. package/_cjs/Fiber/api/evalOnIO.cjs +2 -4
  225. package/_cjs/Fiber/api/evalOnIO.cjs.map +1 -1
  226. package/_cjs/Fiber/api/fromIO.cjs +2 -4
  227. package/_cjs/Fiber/api/fromIO.cjs.map +1 -1
  228. package/_cjs/Fiber/api/id.cjs +1 -1
  229. package/_cjs/Fiber/api/id.cjs.map +1 -1
  230. package/_cjs/Fiber/api/inheritRefs.cjs +1 -1
  231. package/_cjs/Fiber/api/inheritRefs.cjs.map +1 -1
  232. package/_cjs/Fiber/api/interrupt.cjs +2 -4
  233. package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
  234. package/_cjs/Fiber/api/interruptAll.cjs +4 -5
  235. package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
  236. package/_cjs/Fiber/api/interruptAs.cjs +1 -1
  237. package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
  238. package/_cjs/Fiber/api/interruptFork.cjs +1 -1
  239. package/_cjs/Fiber/api/interruptFork.cjs.map +1 -1
  240. package/_cjs/Fiber/api/join.cjs +2 -4
  241. package/_cjs/Fiber/api/join.cjs.map +1 -1
  242. package/_cjs/Fiber/api/joinAll.cjs +2 -4
  243. package/_cjs/Fiber/api/joinAll.cjs.map +1 -1
  244. package/_cjs/Fiber/api/mapFiber.cjs +2 -4
  245. package/_cjs/Fiber/api/mapFiber.cjs.map +1 -1
  246. package/_cjs/Fiber/api/mapIO.cjs +4 -5
  247. package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
  248. package/_cjs/Fiber/api/poll.cjs +1 -1
  249. package/_cjs/Fiber/api/poll.cjs.map +1 -1
  250. package/_cjs/Fiber/api/zipWith.cjs +2 -4
  251. package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
  252. package/_cjs/Fiber/constructors.cjs +10 -11
  253. package/_cjs/Fiber/constructors.cjs.map +1 -1
  254. package/_cjs/FiberRef/api/locallyScoped.cjs +2 -4
  255. package/_cjs/FiberRef/api/locallyScoped.cjs.map +1 -1
  256. package/_cjs/FiberRef/api/locallyScopedWith.cjs +2 -4
  257. package/_cjs/FiberRef/api/locallyScopedWith.cjs.map +1 -1
  258. package/_cjs/FiberRef/api.cjs +13 -14
  259. package/_cjs/FiberRef/api.cjs.map +1 -1
  260. package/_cjs/FiberRef/constructors.cjs +4 -6
  261. package/_cjs/FiberRef/constructors.cjs.map +1 -1
  262. package/_cjs/Future/api.cjs +30 -31
  263. package/_cjs/Future/api.cjs.map +1 -1
  264. package/_cjs/Future/constructors.cjs +4 -5
  265. package/_cjs/Future/constructors.cjs.map +1 -1
  266. package/_cjs/Hub/api.cjs +44 -44
  267. package/_cjs/Hub/api.cjs.map +1 -1
  268. package/_cjs/Hub/internal.cjs +14 -14
  269. package/_cjs/Hub/internal.cjs.map +1 -1
  270. package/_cjs/IO/api/acquireRelease.cjs +2 -4
  271. package/_cjs/IO/api/acquireRelease.cjs.map +1 -1
  272. package/_cjs/IO/api/acquireReleaseExit.cjs +1 -1
  273. package/_cjs/IO/api/acquireReleaseExit.cjs.map +1 -1
  274. package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs +1 -1
  275. package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs.map +1 -1
  276. package/_cjs/IO/api/addFinalizer.cjs +1 -1
  277. package/_cjs/IO/api/addFinalizer.cjs.map +1 -1
  278. package/_cjs/IO/api/addFinalizerExit.cjs +2 -4
  279. package/_cjs/IO/api/addFinalizerExit.cjs.map +1 -1
  280. package/_cjs/IO/api/asyncIO.cjs +5 -7
  281. package/_cjs/IO/api/asyncIO.cjs.map +1 -1
  282. package/_cjs/IO/api/bracket.cjs +2 -2
  283. package/_cjs/IO/api/bracket.cjs.map +1 -1
  284. package/_cjs/IO/api/bracketExit.cjs +2 -4
  285. package/_cjs/IO/api/bracketExit.cjs.map +1 -1
  286. package/_cjs/IO/api/concurrency.cjs +7 -7
  287. package/_cjs/IO/api/concurrency.cjs.map +1 -1
  288. package/_cjs/IO/api/concurrentFinalizers.cjs +2 -4
  289. package/_cjs/IO/api/concurrentFinalizers.cjs.map +1 -1
  290. package/_cjs/IO/api/consoleWith.cjs +3 -3
  291. package/_cjs/IO/api/consoleWith.cjs.map +1 -1
  292. package/_cjs/IO/api/core-scope.cjs +4 -4
  293. package/_cjs/IO/api/core-scope.cjs.map +1 -1
  294. package/_cjs/IO/api/ensuringChildren.cjs +2 -4
  295. package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
  296. package/_cjs/IO/api/environment.cjs +5 -6
  297. package/_cjs/IO/api/environment.cjs.map +1 -1
  298. package/_cjs/IO/api/foreachC.cjs +25 -27
  299. package/_cjs/IO/api/foreachC.cjs.map +1 -1
  300. package/_cjs/IO/api/foreachExec.cjs +2 -4
  301. package/_cjs/IO/api/foreachExec.cjs.map +1 -1
  302. package/_cjs/IO/api/forkIn.cjs +1 -1
  303. package/_cjs/IO/api/forkIn.cjs.map +1 -1
  304. package/_cjs/IO/api/forkScoped.cjs +1 -1
  305. package/_cjs/IO/api/forkScoped.cjs.map +1 -1
  306. package/_cjs/IO/api/fulfill.cjs +2 -4
  307. package/_cjs/IO/api/fulfill.cjs.map +1 -1
  308. package/_cjs/IO/api/interrupt.cjs +12 -12
  309. package/_cjs/IO/api/interrupt.cjs.map +1 -1
  310. package/_cjs/IO/api/memoize.cjs +1 -1
  311. package/_cjs/IO/api/memoize.cjs.map +1 -1
  312. package/_cjs/IO/api/onExit.cjs +2 -2
  313. package/_cjs/IO/api/onExit.cjs.map +1 -1
  314. package/_cjs/IO/api/onTermination.cjs +2 -2
  315. package/_cjs/IO/api/onTermination.cjs.map +1 -1
  316. package/_cjs/IO/api/once.cjs +1 -1
  317. package/_cjs/IO/api/once.cjs.map +1 -1
  318. package/_cjs/IO/api/provideLayer.cjs +2 -4
  319. package/_cjs/IO/api/provideLayer.cjs.map +1 -1
  320. package/_cjs/IO/api/provideSomeLayer.cjs +1 -1
  321. package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
  322. package/_cjs/IO/api/race.cjs +4 -6
  323. package/_cjs/IO/api/race.cjs.map +1 -1
  324. package/_cjs/IO/api/raceFirst.cjs +2 -4
  325. package/_cjs/IO/api/raceFirst.cjs.map +1 -1
  326. package/_cjs/IO/api/randomWith.cjs +3 -3
  327. package/_cjs/IO/api/randomWith.cjs.map +1 -1
  328. package/_cjs/IO/api/repeat.cjs +10 -11
  329. package/_cjs/IO/api/repeat.cjs.map +1 -1
  330. package/_cjs/IO/api/retry.cjs +8 -9
  331. package/_cjs/IO/api/retry.cjs.map +1 -1
  332. package/_cjs/IO/api/schedule.cjs +6 -7
  333. package/_cjs/IO/api/schedule.cjs.map +1 -1
  334. package/_cjs/IO/api/scopeWith.cjs +2 -4
  335. package/_cjs/IO/api/scopeWith.cjs.map +1 -1
  336. package/_cjs/IO/api/scoped.cjs +4 -5
  337. package/_cjs/IO/api/scoped.cjs.map +1 -1
  338. package/_cjs/IO/api/stateful.cjs +1 -1
  339. package/_cjs/IO/api/stateful.cjs.map +1 -1
  340. package/_cjs/IO/api/timeout.cjs +3 -4
  341. package/_cjs/IO/api/timeout.cjs.map +1 -1
  342. package/_cjs/IO/api/withEarlyRelease.cjs +2 -4
  343. package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
  344. package/_cjs/IO/api/withFinalizer.cjs +2 -2
  345. package/_cjs/IO/api/withFinalizer.cjs.map +1 -1
  346. package/_cjs/IO/api/withFinalizerExit.cjs +2 -4
  347. package/_cjs/IO/api/withFinalizerExit.cjs.map +1 -1
  348. package/_cjs/IO/api/withRuntimeConfig.cjs +2 -4
  349. package/_cjs/IO/api/withRuntimeConfig.cjs.map +1 -1
  350. package/_cjs/IO/api/zipC.cjs +5 -6
  351. package/_cjs/IO/api/zipC.cjs.map +1 -1
  352. package/_cjs/IO/api.cjs +112 -112
  353. package/_cjs/IO/api.cjs.map +1 -1
  354. package/_cjs/IOEnv/live.cjs +3 -1
  355. package/_cjs/IOEnv/live.cjs.map +1 -1
  356. package/_cjs/Layer/MemoMap.cjs +39 -40
  357. package/_cjs/Layer/MemoMap.cjs.map +1 -1
  358. package/_cjs/Layer/api.cjs +81 -82
  359. package/_cjs/Layer/api.cjs.map +1 -1
  360. package/_cjs/Layer/definition.cjs +14 -7
  361. package/_cjs/Layer/definition.cjs.map +1 -1
  362. package/_cjs/Queue/api/dimapIO.cjs +14 -14
  363. package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
  364. package/_cjs/Queue/api/filterInputIO.cjs +6 -6
  365. package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
  366. package/_cjs/Queue/api/filterOutputIO.cjs +6 -6
  367. package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
  368. package/_cjs/Queue/api/operations.cjs +13 -13
  369. package/_cjs/Queue/api/operations.cjs.map +1 -1
  370. package/_cjs/Queue/api/poll.cjs +2 -4
  371. package/_cjs/Queue/api/poll.cjs.map +1 -1
  372. package/_cjs/Queue/api/takeBetween.cjs +10 -12
  373. package/_cjs/Queue/api/takeBetween.cjs.map +1 -1
  374. package/_cjs/Queue/api/zipWithIO.cjs +12 -12
  375. package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
  376. package/_cjs/Queue/constructors.cjs +8 -10
  377. package/_cjs/Queue/constructors.cjs.map +1 -1
  378. package/_cjs/Queue/internal.cjs +15 -15
  379. package/_cjs/Queue/internal.cjs.map +1 -1
  380. package/_cjs/Queue/strategy.cjs +16 -16
  381. package/_cjs/Queue/strategy.cjs.map +1 -1
  382. package/_cjs/Random/api.cjs +15 -13
  383. package/_cjs/Random/api.cjs.map +1 -1
  384. package/_cjs/Random/definition.cjs +1 -1
  385. package/_cjs/Random/definition.cjs.map +1 -1
  386. package/_cjs/Random/live.cjs +4 -4
  387. package/_cjs/Random/live.cjs.map +1 -1
  388. package/_cjs/Ref/Atomic/api.cjs +19 -21
  389. package/_cjs/Ref/Atomic/api.cjs.map +1 -1
  390. package/_cjs/Ref/DerivedAll.cjs +1 -1
  391. package/_cjs/Ref/DerivedAll.cjs.map +1 -1
  392. package/_cjs/Ref/Synchronized/api.cjs +25 -26
  393. package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
  394. package/_cjs/Ref/Synchronized/constructors.cjs +2 -4
  395. package/_cjs/Ref/Synchronized/constructors.cjs.map +1 -1
  396. package/_cjs/Ref/Synchronized/definition.cjs +1 -1
  397. package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
  398. package/_cjs/Ref/api/collect.cjs +1 -1
  399. package/_cjs/Ref/api/collect.cjs.map +1 -1
  400. package/_cjs/Ref/api/dimap.cjs +12 -12
  401. package/_cjs/Ref/api/dimap.cjs.map +1 -1
  402. package/_cjs/Ref/api/filter.cjs +2 -2
  403. package/_cjs/Ref/api/filter.cjs.map +1 -1
  404. package/_cjs/Ref/api/get.cjs +1 -1
  405. package/_cjs/Ref/api/get.cjs.map +1 -1
  406. package/_cjs/Ref/api/modify.cjs +29 -30
  407. package/_cjs/Ref/api/modify.cjs.map +1 -1
  408. package/_cjs/Ref/api/set.cjs +1 -1
  409. package/_cjs/Ref/api/set.cjs.map +1 -1
  410. package/_cjs/Ref/constructors.cjs +3 -4
  411. package/_cjs/Ref/constructors.cjs.map +1 -1
  412. package/_cjs/STM/api/core-api.cjs +8 -8
  413. package/_cjs/STM/api/core-api.cjs.map +1 -1
  414. package/_cjs/STM/api/core-constructors.cjs +6 -6
  415. package/_cjs/STM/api/core-constructors.cjs.map +1 -1
  416. package/_cjs/STM/api.cjs +110 -110
  417. package/_cjs/STM/api.cjs.map +1 -1
  418. package/_cjs/STM/driver.cjs +3 -1
  419. package/_cjs/STM/driver.cjs.map +1 -1
  420. package/_cjs/Schedule/api/driver.cjs +5 -9
  421. package/_cjs/Schedule/api/driver.cjs.map +1 -1
  422. package/_cjs/Schedule/api.cjs +156 -156
  423. package/_cjs/Schedule/api.cjs.map +1 -1
  424. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +3 -5
  425. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
  426. package/_cjs/Scope/ReleaseMap/api.cjs +14 -15
  427. package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
  428. package/_cjs/Scope/ReleaseMap/constructors.cjs +1 -1
  429. package/_cjs/Scope/ReleaseMap/constructors.cjs.map +1 -1
  430. package/_cjs/Scope/api.cjs +20 -20
  431. package/_cjs/Scope/api.cjs.map +1 -1
  432. package/_cjs/Scope/definition.cjs +1 -1
  433. package/_cjs/Scope/definition.cjs.map +1 -1
  434. package/_cjs/ScopedRef/api.cjs +5 -5
  435. package/_cjs/ScopedRef/api.cjs.map +1 -1
  436. package/_cjs/Sink/api.cjs +92 -88
  437. package/_cjs/Sink/api.cjs.map +1 -1
  438. package/_cjs/State/api.cjs +5 -7
  439. package/_cjs/State/api.cjs.map +1 -1
  440. package/_cjs/Stream/api/zipAllWith.cjs +22 -24
  441. package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
  442. package/_cjs/Stream/api/zipWith.cjs +2 -2
  443. package/_cjs/Stream/api/zipWith.cjs.map +1 -1
  444. package/_cjs/Stream/api/zipWithChunks.cjs +20 -22
  445. package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
  446. package/_cjs/Stream/api.cjs +436 -419
  447. package/_cjs/Stream/api.cjs.map +1 -1
  448. package/_cjs/Stream/internal/Handoff.cjs +12 -12
  449. package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
  450. package/_cjs/Stream/internal/Pull.cjs +1 -1
  451. package/_cjs/Stream/internal/Pull.cjs.map +1 -1
  452. package/_cjs/Stream/internal/Take.cjs +1 -1
  453. package/_cjs/Stream/internal/Take.cjs.map +1 -1
  454. package/_cjs/Supervisor/api.cjs +3 -1
  455. package/_cjs/Supervisor/api.cjs.map +1 -1
  456. package/_cjs/TFuture/api.cjs +10 -10
  457. package/_cjs/TFuture/api.cjs.map +1 -1
  458. package/_cjs/TFuture/constructors.cjs +4 -4
  459. package/_cjs/TFuture/constructors.cjs.map +1 -1
  460. package/_cjs/TReentrantLock/api.cjs +41 -42
  461. package/_cjs/TReentrantLock/api.cjs.map +1 -1
  462. package/_cjs/TRef/api.cjs +40 -40
  463. package/_cjs/TRef/api.cjs.map +1 -1
  464. package/_cjs/TRef/constructors.cjs +6 -6
  465. package/_cjs/TRef/constructors.cjs.map +1 -1
  466. package/_cjs/TSemaphore/api.cjs +16 -17
  467. package/_cjs/TSemaphore/api.cjs.map +1 -1
  468. package/_cjs/TSemaphore/constructors.cjs +2 -2
  469. package/_cjs/TSemaphore/constructors.cjs.map +1 -1
  470. package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +1 -1
  471. package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -1
  472. package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +1 -1
  473. package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -1
  474. package/_cjs/collection/immutable/Conc/filterIO.cjs +5 -7
  475. package/_cjs/collection/immutable/Conc/filterIO.cjs.map +1 -1
  476. package/_cjs/collection/immutable/Conc/findIO.cjs +7 -9
  477. package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
  478. package/_cjs/collection/immutable/Conc/mapIO.cjs +3 -5
  479. package/_cjs/collection/immutable/Conc/mapIO.cjs.map +1 -1
  480. package/_cjs/collection/immutable/Conc/takeWhileIO.cjs +7 -9
  481. package/_cjs/collection/immutable/Conc/takeWhileIO.cjs.map +1 -1
  482. package/_cjs/collection/immutable/Conc.cjs +26 -0
  483. package/_cjs/collection/immutable/Conc.cjs.map +1 -1
  484. package/_cjs/data/Exit/foreachIO.cjs +2 -4
  485. package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
  486. package/_cjs/global.cjs +6 -0
  487. package/_cjs/global.cjs.map +1 -0
  488. package/_cjs/index.cjs +6 -0
  489. package/_cjs/index.cjs.map +1 -0
  490. package/_mjs/Cached/api.mjs +5 -5
  491. package/_mjs/Cached/api.mjs.map +1 -1
  492. package/_mjs/Channel/api/interruptWhen.mjs +1 -1
  493. package/_mjs/Channel/api/interruptWhen.mjs.map +1 -1
  494. package/_mjs/Channel/api/mapOutIOC.mjs +2 -2
  495. package/_mjs/Channel/api/mapOutIOC.mjs.map +1 -1
  496. package/_mjs/Channel/api/mergeAllWith.mjs +11 -11
  497. package/_mjs/Channel/api/mergeAllWith.mjs.map +1 -1
  498. package/_mjs/Channel/api/mergeWith.mjs +6 -5
  499. package/_mjs/Channel/api/mergeWith.mjs.map +1 -1
  500. package/_mjs/Channel/api/run.mjs +2 -1
  501. package/_mjs/Channel/api/run.mjs.map +1 -1
  502. package/_mjs/Channel/api.mjs +7 -7
  503. package/_mjs/Channel/api.mjs.map +1 -1
  504. package/_mjs/Channel/core-api.mjs.map +1 -1
  505. package/_mjs/Channel/internal/ChannelExecutor.mjs +6 -6
  506. package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
  507. package/_mjs/Channel/internal/ChannelState.mjs +2 -1
  508. package/_mjs/Channel/internal/ChannelState.mjs.map +1 -1
  509. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +16 -16
  510. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
  511. package/_mjs/Clock/definition.mjs +1 -1
  512. package/_mjs/Clock/definition.mjs.map +1 -1
  513. package/_mjs/Console/api.mjs +4 -3
  514. package/_mjs/Console/api.mjs.map +1 -1
  515. package/_mjs/Console/definition.mjs +1 -1
  516. package/_mjs/Console/definition.mjs.map +1 -1
  517. package/_mjs/Fiber/FiberContext.mjs +4 -3
  518. package/_mjs/Fiber/FiberContext.mjs.map +1 -1
  519. package/_mjs/Fiber/api/await.mjs +1 -1
  520. package/_mjs/Fiber/api/await.mjs.map +1 -1
  521. package/_mjs/Fiber/api/awaitAll.mjs +2 -3
  522. package/_mjs/Fiber/api/awaitAll.mjs.map +1 -1
  523. package/_mjs/Fiber/api/children.mjs +1 -1
  524. package/_mjs/Fiber/api/children.mjs.map +1 -1
  525. package/_mjs/Fiber/api/collectAll.mjs +2 -3
  526. package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
  527. package/_mjs/Fiber/api/evalOn.mjs +1 -1
  528. package/_mjs/Fiber/api/evalOn.mjs.map +1 -1
  529. package/_mjs/Fiber/api/evalOnIO.mjs +2 -3
  530. package/_mjs/Fiber/api/evalOnIO.mjs.map +1 -1
  531. package/_mjs/Fiber/api/fromIO.mjs +2 -3
  532. package/_mjs/Fiber/api/fromIO.mjs.map +1 -1
  533. package/_mjs/Fiber/api/id.mjs +1 -1
  534. package/_mjs/Fiber/api/id.mjs.map +1 -1
  535. package/_mjs/Fiber/api/inheritRefs.mjs +1 -1
  536. package/_mjs/Fiber/api/inheritRefs.mjs.map +1 -1
  537. package/_mjs/Fiber/api/interrupt.mjs +2 -3
  538. package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
  539. package/_mjs/Fiber/api/interruptAll.mjs +4 -5
  540. package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
  541. package/_mjs/Fiber/api/interruptAs.mjs +1 -1
  542. package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
  543. package/_mjs/Fiber/api/interruptFork.mjs +1 -1
  544. package/_mjs/Fiber/api/interruptFork.mjs.map +1 -1
  545. package/_mjs/Fiber/api/join.mjs +2 -3
  546. package/_mjs/Fiber/api/join.mjs.map +1 -1
  547. package/_mjs/Fiber/api/joinAll.mjs +2 -3
  548. package/_mjs/Fiber/api/joinAll.mjs.map +1 -1
  549. package/_mjs/Fiber/api/mapFiber.mjs +2 -3
  550. package/_mjs/Fiber/api/mapFiber.mjs.map +1 -1
  551. package/_mjs/Fiber/api/mapIO.mjs +4 -5
  552. package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
  553. package/_mjs/Fiber/api/poll.mjs +1 -1
  554. package/_mjs/Fiber/api/poll.mjs.map +1 -1
  555. package/_mjs/Fiber/api/zipWith.mjs +2 -3
  556. package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
  557. package/_mjs/Fiber/constructors.mjs +10 -11
  558. package/_mjs/Fiber/constructors.mjs.map +1 -1
  559. package/_mjs/FiberRef/api/locallyScoped.mjs +2 -3
  560. package/_mjs/FiberRef/api/locallyScoped.mjs.map +1 -1
  561. package/_mjs/FiberRef/api/locallyScopedWith.mjs +2 -3
  562. package/_mjs/FiberRef/api/locallyScopedWith.mjs.map +1 -1
  563. package/_mjs/FiberRef/api.mjs +13 -14
  564. package/_mjs/FiberRef/api.mjs.map +1 -1
  565. package/_mjs/FiberRef/constructors.mjs +4 -5
  566. package/_mjs/FiberRef/constructors.mjs.map +1 -1
  567. package/_mjs/Future/api.mjs +30 -31
  568. package/_mjs/Future/api.mjs.map +1 -1
  569. package/_mjs/Future/constructors.mjs +4 -5
  570. package/_mjs/Future/constructors.mjs.map +1 -1
  571. package/_mjs/Hub/api.mjs +44 -44
  572. package/_mjs/Hub/api.mjs.map +1 -1
  573. package/_mjs/Hub/internal.mjs +14 -14
  574. package/_mjs/Hub/internal.mjs.map +1 -1
  575. package/_mjs/IO/api/acquireRelease.mjs +2 -3
  576. package/_mjs/IO/api/acquireRelease.mjs.map +1 -1
  577. package/_mjs/IO/api/acquireReleaseExit.mjs +1 -1
  578. package/_mjs/IO/api/acquireReleaseExit.mjs.map +1 -1
  579. package/_mjs/IO/api/acquireReleaseInterruptibleExit.mjs +1 -1
  580. package/_mjs/IO/api/acquireReleaseInterruptibleExit.mjs.map +1 -1
  581. package/_mjs/IO/api/addFinalizer.mjs +1 -1
  582. package/_mjs/IO/api/addFinalizer.mjs.map +1 -1
  583. package/_mjs/IO/api/addFinalizerExit.mjs +2 -3
  584. package/_mjs/IO/api/addFinalizerExit.mjs.map +1 -1
  585. package/_mjs/IO/api/asyncIO.mjs +5 -6
  586. package/_mjs/IO/api/asyncIO.mjs.map +1 -1
  587. package/_mjs/IO/api/bracket.mjs +2 -2
  588. package/_mjs/IO/api/bracket.mjs.map +1 -1
  589. package/_mjs/IO/api/bracketExit.mjs +2 -3
  590. package/_mjs/IO/api/bracketExit.mjs.map +1 -1
  591. package/_mjs/IO/api/concurrency.mjs +7 -7
  592. package/_mjs/IO/api/concurrency.mjs.map +1 -1
  593. package/_mjs/IO/api/concurrentFinalizers.mjs +2 -3
  594. package/_mjs/IO/api/concurrentFinalizers.mjs.map +1 -1
  595. package/_mjs/IO/api/consoleWith.mjs +3 -3
  596. package/_mjs/IO/api/consoleWith.mjs.map +1 -1
  597. package/_mjs/IO/api/core-scope.mjs +4 -4
  598. package/_mjs/IO/api/core-scope.mjs.map +1 -1
  599. package/_mjs/IO/api/ensuringChildren.mjs +2 -3
  600. package/_mjs/IO/api/ensuringChildren.mjs.map +1 -1
  601. package/_mjs/IO/api/environment.mjs +5 -6
  602. package/_mjs/IO/api/environment.mjs.map +1 -1
  603. package/_mjs/IO/api/foreachC.mjs +25 -26
  604. package/_mjs/IO/api/foreachC.mjs.map +1 -1
  605. package/_mjs/IO/api/foreachExec.mjs +2 -3
  606. package/_mjs/IO/api/foreachExec.mjs.map +1 -1
  607. package/_mjs/IO/api/forkIn.mjs +1 -1
  608. package/_mjs/IO/api/forkIn.mjs.map +1 -1
  609. package/_mjs/IO/api/forkScoped.mjs +1 -1
  610. package/_mjs/IO/api/forkScoped.mjs.map +1 -1
  611. package/_mjs/IO/api/fulfill.mjs +2 -3
  612. package/_mjs/IO/api/fulfill.mjs.map +1 -1
  613. package/_mjs/IO/api/interrupt.mjs +12 -12
  614. package/_mjs/IO/api/interrupt.mjs.map +1 -1
  615. package/_mjs/IO/api/memoize.mjs +1 -1
  616. package/_mjs/IO/api/memoize.mjs.map +1 -1
  617. package/_mjs/IO/api/onExit.mjs +2 -2
  618. package/_mjs/IO/api/onExit.mjs.map +1 -1
  619. package/_mjs/IO/api/onTermination.mjs +2 -2
  620. package/_mjs/IO/api/onTermination.mjs.map +1 -1
  621. package/_mjs/IO/api/once.mjs +1 -1
  622. package/_mjs/IO/api/once.mjs.map +1 -1
  623. package/_mjs/IO/api/provideLayer.mjs +2 -3
  624. package/_mjs/IO/api/provideLayer.mjs.map +1 -1
  625. package/_mjs/IO/api/provideSomeLayer.mjs +1 -1
  626. package/_mjs/IO/api/provideSomeLayer.mjs.map +1 -1
  627. package/_mjs/IO/api/race.mjs +4 -5
  628. package/_mjs/IO/api/race.mjs.map +1 -1
  629. package/_mjs/IO/api/raceFirst.mjs +2 -3
  630. package/_mjs/IO/api/raceFirst.mjs.map +1 -1
  631. package/_mjs/IO/api/randomWith.mjs +3 -3
  632. package/_mjs/IO/api/randomWith.mjs.map +1 -1
  633. package/_mjs/IO/api/repeat.mjs +10 -11
  634. package/_mjs/IO/api/repeat.mjs.map +1 -1
  635. package/_mjs/IO/api/retry.mjs +8 -9
  636. package/_mjs/IO/api/retry.mjs.map +1 -1
  637. package/_mjs/IO/api/schedule.mjs +6 -7
  638. package/_mjs/IO/api/schedule.mjs.map +1 -1
  639. package/_mjs/IO/api/scopeWith.mjs +2 -3
  640. package/_mjs/IO/api/scopeWith.mjs.map +1 -1
  641. package/_mjs/IO/api/scoped.mjs +4 -5
  642. package/_mjs/IO/api/scoped.mjs.map +1 -1
  643. package/_mjs/IO/api/stateful.mjs +1 -1
  644. package/_mjs/IO/api/stateful.mjs.map +1 -1
  645. package/_mjs/IO/api/timeout.mjs +3 -4
  646. package/_mjs/IO/api/timeout.mjs.map +1 -1
  647. package/_mjs/IO/api/withEarlyRelease.mjs +2 -3
  648. package/_mjs/IO/api/withEarlyRelease.mjs.map +1 -1
  649. package/_mjs/IO/api/withFinalizer.mjs +2 -2
  650. package/_mjs/IO/api/withFinalizer.mjs.map +1 -1
  651. package/_mjs/IO/api/withFinalizerExit.mjs +2 -3
  652. package/_mjs/IO/api/withFinalizerExit.mjs.map +1 -1
  653. package/_mjs/IO/api/withRuntimeConfig.mjs +2 -3
  654. package/_mjs/IO/api/withRuntimeConfig.mjs.map +1 -1
  655. package/_mjs/IO/api/zipC.mjs +5 -6
  656. package/_mjs/IO/api/zipC.mjs.map +1 -1
  657. package/_mjs/IO/api.mjs +112 -112
  658. package/_mjs/IO/api.mjs.map +1 -1
  659. package/_mjs/IOEnv/live.mjs +2 -1
  660. package/_mjs/IOEnv/live.mjs.map +1 -1
  661. package/_mjs/Layer/MemoMap.mjs +37 -38
  662. package/_mjs/Layer/MemoMap.mjs.map +1 -1
  663. package/_mjs/Layer/api.mjs +82 -83
  664. package/_mjs/Layer/api.mjs.map +1 -1
  665. package/_mjs/Layer/definition.mjs +14 -7
  666. package/_mjs/Layer/definition.mjs.map +1 -1
  667. package/_mjs/Queue/api/dimapIO.mjs +14 -14
  668. package/_mjs/Queue/api/dimapIO.mjs.map +1 -1
  669. package/_mjs/Queue/api/filterInputIO.mjs +6 -6
  670. package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
  671. package/_mjs/Queue/api/filterOutputIO.mjs +6 -6
  672. package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
  673. package/_mjs/Queue/api/operations.mjs +13 -13
  674. package/_mjs/Queue/api/operations.mjs.map +1 -1
  675. package/_mjs/Queue/api/poll.mjs +2 -3
  676. package/_mjs/Queue/api/poll.mjs.map +1 -1
  677. package/_mjs/Queue/api/takeBetween.mjs +10 -11
  678. package/_mjs/Queue/api/takeBetween.mjs.map +1 -1
  679. package/_mjs/Queue/api/zipWithIO.mjs +12 -12
  680. package/_mjs/Queue/api/zipWithIO.mjs.map +1 -1
  681. package/_mjs/Queue/constructors.mjs +8 -9
  682. package/_mjs/Queue/constructors.mjs.map +1 -1
  683. package/_mjs/Queue/internal.mjs +15 -15
  684. package/_mjs/Queue/internal.mjs.map +1 -1
  685. package/_mjs/Queue/strategy.mjs +16 -16
  686. package/_mjs/Queue/strategy.mjs.map +1 -1
  687. package/_mjs/Random/api.mjs +14 -13
  688. package/_mjs/Random/api.mjs.map +1 -1
  689. package/_mjs/Random/definition.mjs +1 -1
  690. package/_mjs/Random/definition.mjs.map +1 -1
  691. package/_mjs/Random/live.mjs +4 -4
  692. package/_mjs/Random/live.mjs.map +1 -1
  693. package/_mjs/Ref/Atomic/api.mjs +19 -20
  694. package/_mjs/Ref/Atomic/api.mjs.map +1 -1
  695. package/_mjs/Ref/DerivedAll.mjs +1 -1
  696. package/_mjs/Ref/DerivedAll.mjs.map +1 -1
  697. package/_mjs/Ref/Synchronized/api.mjs +25 -26
  698. package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
  699. package/_mjs/Ref/Synchronized/constructors.mjs +2 -3
  700. package/_mjs/Ref/Synchronized/constructors.mjs.map +1 -1
  701. package/_mjs/Ref/Synchronized/definition.mjs +1 -1
  702. package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
  703. package/_mjs/Ref/api/collect.mjs +1 -1
  704. package/_mjs/Ref/api/collect.mjs.map +1 -1
  705. package/_mjs/Ref/api/dimap.mjs +12 -12
  706. package/_mjs/Ref/api/dimap.mjs.map +1 -1
  707. package/_mjs/Ref/api/filter.mjs +2 -2
  708. package/_mjs/Ref/api/filter.mjs.map +1 -1
  709. package/_mjs/Ref/api/get.mjs +1 -1
  710. package/_mjs/Ref/api/get.mjs.map +1 -1
  711. package/_mjs/Ref/api/modify.mjs +29 -30
  712. package/_mjs/Ref/api/modify.mjs.map +1 -1
  713. package/_mjs/Ref/api/set.mjs +1 -1
  714. package/_mjs/Ref/api/set.mjs.map +1 -1
  715. package/_mjs/Ref/constructors.mjs +3 -4
  716. package/_mjs/Ref/constructors.mjs.map +1 -1
  717. package/_mjs/STM/api/core-api.mjs +8 -8
  718. package/_mjs/STM/api/core-api.mjs.map +1 -1
  719. package/_mjs/STM/api/core-constructors.mjs +6 -6
  720. package/_mjs/STM/api/core-constructors.mjs.map +1 -1
  721. package/_mjs/STM/api.mjs +110 -110
  722. package/_mjs/STM/api.mjs.map +1 -1
  723. package/_mjs/STM/driver.mjs +3 -1
  724. package/_mjs/STM/driver.mjs.map +1 -1
  725. package/_mjs/Schedule/api/driver.mjs +6 -9
  726. package/_mjs/Schedule/api/driver.mjs.map +1 -1
  727. package/_mjs/Schedule/api.mjs +156 -156
  728. package/_mjs/Schedule/api.mjs.map +1 -1
  729. package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs +3 -4
  730. package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs.map +1 -1
  731. package/_mjs/Scope/ReleaseMap/api.mjs +14 -15
  732. package/_mjs/Scope/ReleaseMap/api.mjs.map +1 -1
  733. package/_mjs/Scope/ReleaseMap/constructors.mjs +1 -1
  734. package/_mjs/Scope/ReleaseMap/constructors.mjs.map +1 -1
  735. package/_mjs/Scope/api.mjs +20 -20
  736. package/_mjs/Scope/api.mjs.map +1 -1
  737. package/_mjs/Scope/definition.mjs +1 -1
  738. package/_mjs/Scope/definition.mjs.map +1 -1
  739. package/_mjs/ScopedRef/api.mjs +5 -5
  740. package/_mjs/ScopedRef/api.mjs.map +1 -1
  741. package/_mjs/Sink/api.mjs +92 -88
  742. package/_mjs/Sink/api.mjs.map +1 -1
  743. package/_mjs/State/api.mjs +5 -6
  744. package/_mjs/State/api.mjs.map +1 -1
  745. package/_mjs/Stream/api/zipAllWith.mjs +22 -23
  746. package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
  747. package/_mjs/Stream/api/zipWith.mjs +2 -2
  748. package/_mjs/Stream/api/zipWith.mjs.map +1 -1
  749. package/_mjs/Stream/api/zipWithChunks.mjs +20 -21
  750. package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
  751. package/_mjs/Stream/api.mjs +430 -417
  752. package/_mjs/Stream/api.mjs.map +1 -1
  753. package/_mjs/Stream/internal/Handoff.mjs +12 -12
  754. package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
  755. package/_mjs/Stream/internal/Pull.mjs +1 -1
  756. package/_mjs/Stream/internal/Pull.mjs.map +1 -1
  757. package/_mjs/Stream/internal/Take.mjs +1 -1
  758. package/_mjs/Stream/internal/Take.mjs.map +1 -1
  759. package/_mjs/Supervisor/api.mjs +2 -1
  760. package/_mjs/Supervisor/api.mjs.map +1 -1
  761. package/_mjs/TFuture/api.mjs +10 -10
  762. package/_mjs/TFuture/api.mjs.map +1 -1
  763. package/_mjs/TFuture/constructors.mjs +4 -4
  764. package/_mjs/TFuture/constructors.mjs.map +1 -1
  765. package/_mjs/TReentrantLock/api.mjs +41 -42
  766. package/_mjs/TReentrantLock/api.mjs.map +1 -1
  767. package/_mjs/TRef/api.mjs +40 -40
  768. package/_mjs/TRef/api.mjs.map +1 -1
  769. package/_mjs/TRef/constructors.mjs +6 -6
  770. package/_mjs/TRef/constructors.mjs.map +1 -1
  771. package/_mjs/TSemaphore/api.mjs +16 -17
  772. package/_mjs/TSemaphore/api.mjs.map +1 -1
  773. package/_mjs/TSemaphore/constructors.mjs +2 -2
  774. package/_mjs/TSemaphore/constructors.mjs.map +1 -1
  775. package/_mjs/collection/immutable/Conc/dropUntilIO.mjs +1 -1
  776. package/_mjs/collection/immutable/Conc/dropUntilIO.mjs.map +1 -1
  777. package/_mjs/collection/immutable/Conc/dropWhileIO.mjs +1 -1
  778. package/_mjs/collection/immutable/Conc/dropWhileIO.mjs.map +1 -1
  779. package/_mjs/collection/immutable/Conc/filterIO.mjs +5 -6
  780. package/_mjs/collection/immutable/Conc/filterIO.mjs.map +1 -1
  781. package/_mjs/collection/immutable/Conc/findIO.mjs +7 -8
  782. package/_mjs/collection/immutable/Conc/findIO.mjs.map +1 -1
  783. package/_mjs/collection/immutable/Conc/mapIO.mjs +3 -4
  784. package/_mjs/collection/immutable/Conc/mapIO.mjs.map +1 -1
  785. package/_mjs/collection/immutable/Conc/takeWhileIO.mjs +7 -8
  786. package/_mjs/collection/immutable/Conc/takeWhileIO.mjs.map +1 -1
  787. package/_mjs/collection/immutable/Conc.mjs +2 -0
  788. package/_mjs/collection/immutable/Conc.mjs.map +1 -1
  789. package/_mjs/data/Exit/foreachIO.mjs +2 -3
  790. package/_mjs/data/Exit/foreachIO.mjs.map +1 -1
  791. package/_mjs/global.mjs +2 -0
  792. package/_mjs/global.mjs.map +1 -0
  793. package/_mjs/index.mjs +2 -0
  794. package/_mjs/index.mjs.map +1 -0
  795. package/_src/Cached/api.ts +1 -0
  796. package/_src/Channel/api.ts +4 -4
  797. package/_src/Channel/core-api.ts +1 -3
  798. package/_src/Channel/definition.ts +7 -7
  799. package/_src/Clock/definition.ts +1 -1
  800. package/_src/Console/api.ts +1 -1
  801. package/_src/Console/definition.ts +1 -1
  802. package/_src/Fiber/api/await.ts +1 -1
  803. package/_src/Fiber/api/awaitAll.ts +1 -1
  804. package/_src/Fiber/api/children.ts +1 -1
  805. package/_src/Fiber/api/collectAll.ts +4 -1
  806. package/_src/Fiber/api/evalOn.ts +6 -1
  807. package/_src/Fiber/api/evalOnIO.ts +1 -0
  808. package/_src/Fiber/api/fromIO.ts +1 -1
  809. package/_src/Fiber/api/id.ts +1 -1
  810. package/_src/Fiber/api/inheritRefs.ts +1 -1
  811. package/_src/Fiber/api/interrupt.ts +1 -1
  812. package/_src/Fiber/api/interruptAll.ts +2 -2
  813. package/_src/Fiber/api/interruptAs.ts +1 -1
  814. package/_src/Fiber/api/join.ts +1 -1
  815. package/_src/Fiber/api/joinAll.ts +1 -1
  816. package/_src/Fiber/api/mapFiber.ts +5 -1
  817. package/_src/Fiber/api/mapIO.ts +6 -2
  818. package/_src/Fiber/api/poll.ts +1 -1
  819. package/_src/Fiber/api/zipWith.ts +1 -0
  820. package/_src/Fiber/constructors.ts +5 -5
  821. package/_src/FiberRef/api/locallyScoped.ts +1 -1
  822. package/_src/FiberRef/api/locallyScopedWith.ts +5 -1
  823. package/_src/FiberRef/api.ts +7 -7
  824. package/_src/FiberRef/constructors.ts +2 -0
  825. package/_src/Future/api.ts +23 -15
  826. package/_src/Future/constructors.ts +2 -2
  827. package/_src/Hub/api.ts +39 -12
  828. package/_src/IO/api/acquireRelease.ts +1 -0
  829. package/_src/IO/api/addFinalizer.ts +1 -4
  830. package/_src/IO/api/addFinalizerExit.ts +4 -1
  831. package/_src/IO/api/asyncIO.ts +4 -1
  832. package/_src/IO/api/bracket.ts +1 -0
  833. package/_src/IO/api/bracketExit.ts +1 -0
  834. package/_src/IO/api/concurrency.ts +6 -3
  835. package/_src/IO/api/concurrentFinalizers.ts +1 -1
  836. package/_src/IO/api/consoleWith.ts +1 -1
  837. package/_src/IO/api/ensuringChildren.ts +1 -0
  838. package/_src/IO/api/environment.ts +1 -1
  839. package/_src/IO/api/foreachC.ts +33 -6
  840. package/_src/IO/api/foreachExec.ts +1 -0
  841. package/_src/IO/api/fulfill.ts +1 -1
  842. package/_src/IO/api/interrupt.ts +10 -2
  843. package/_src/IO/api/onExit.ts +1 -0
  844. package/_src/IO/api/onTermination.ts +1 -1
  845. package/_src/IO/api/provideLayer.ts +1 -0
  846. package/_src/IO/api/provideSomeLayer.ts +1 -2
  847. package/_src/IO/api/race.ts +6 -2
  848. package/_src/IO/api/raceFirst.ts +6 -2
  849. package/_src/IO/api/randomWith.ts +1 -1
  850. package/_src/IO/api/repeat.ts +3 -3
  851. package/_src/IO/api/retry.ts +3 -3
  852. package/_src/IO/api/schedule.ts +1 -0
  853. package/_src/IO/api/scopeWith.ts +1 -1
  854. package/_src/IO/api/scoped.ts +2 -2
  855. package/_src/IO/api/timeout.ts +5 -1
  856. package/_src/IO/api/withEarlyRelease.ts +4 -1
  857. package/_src/IO/api/withFinalizer.ts +1 -0
  858. package/_src/IO/api/withFinalizerExit.ts +1 -0
  859. package/_src/IO/api/withRuntimeConfig.ts +5 -1
  860. package/_src/IO/api/zipC.ts +6 -1
  861. package/_src/IO/api.ts +82 -32
  862. package/_src/IO/definition.ts +3 -3
  863. package/_src/Layer/MemoMap.ts +25 -18
  864. package/_src/Layer/api.ts +61 -28
  865. package/_src/Layer/definition.ts +7 -4
  866. package/_src/Queue/api/dimapIO.ts +11 -1
  867. package/_src/Queue/api/filterInputIO.ts +2 -0
  868. package/_src/Queue/api/filterOutputIO.ts +2 -0
  869. package/_src/Queue/api/operations.ts +28 -10
  870. package/_src/Queue/api/poll.ts +4 -1
  871. package/_src/Queue/api/takeBetween.ts +6 -1
  872. package/_src/Queue/api/zipWithIO.ts +3 -0
  873. package/_src/Queue/constructors.ts +4 -4
  874. package/_src/Queue/definition.ts +3 -3
  875. package/_src/Queue/internal.ts +3 -3
  876. package/_src/Queue/strategy.ts +14 -6
  877. package/_src/Random/api.ts +5 -5
  878. package/_src/Random/definition.ts +6 -6
  879. package/_src/Random/live.ts +4 -4
  880. package/_src/Ref/Atomic/api.ts +10 -10
  881. package/_src/Ref/Synchronized/api.ts +18 -3
  882. package/_src/Ref/Synchronized/constructors.ts +1 -1
  883. package/_src/Ref/api/collect.ts +1 -0
  884. package/_src/Ref/api/dimap.ts +7 -0
  885. package/_src/Ref/api/filter.ts +2 -0
  886. package/_src/Ref/api/get.ts +4 -1
  887. package/_src/Ref/api/modify.ts +13 -1
  888. package/_src/Ref/api/set.ts +5 -1
  889. package/_src/Ref/constructors.ts +2 -2
  890. package/_src/Ref/definition.ts +1 -1
  891. package/_src/STM/api/core-api.ts +17 -4
  892. package/_src/STM/api/core-constructors.ts +5 -5
  893. package/_src/STM/api.ts +106 -41
  894. package/_src/Schedule/api.ts +98 -18
  895. package/_src/Scope/ReleaseMap/api/releaseAll.ts +6 -1
  896. package/_src/Scope/ReleaseMap/api.ts +15 -5
  897. package/_src/Scope/api.ts +15 -7
  898. package/_src/Scope/definition.ts +1 -1
  899. package/_src/Sink/api.ts +39 -10
  900. package/_src/State/api.ts +1 -1
  901. package/_src/Stream/api/zipAllWith.ts +3 -0
  902. package/_src/Stream/api/zipWith.ts +1 -0
  903. package/_src/Stream/api/zipWithChunks.ts +3 -0
  904. package/_src/Stream/api.ts +363 -96
  905. package/_src/TFuture/api.ts +5 -5
  906. package/_src/TFuture/constructors.ts +2 -2
  907. package/_src/TReentrantLock/api.ts +16 -16
  908. package/_src/TRef/api.ts +35 -13
  909. package/_src/TRef/constructors.ts +4 -4
  910. package/_src/TSemaphore/api.ts +7 -7
  911. package/_src/TSemaphore/constructors.ts +1 -1
  912. package/_src/collection/immutable/Conc/filterIO.ts +5 -1
  913. package/_src/collection/immutable/Conc/findIO.ts +6 -1
  914. package/_src/collection/immutable/Conc/mapIO.ts +1 -1
  915. package/_src/collection/immutable/Conc/takeWhileIO.ts +5 -1
  916. package/_src/collection/immutable/Conc.ts +2 -0
  917. package/_src/data/Exit/foreachIO.ts +1 -0
  918. package/_src/global.ts +149 -0
  919. package/_src/index.ts +42 -0
  920. package/collection/immutable/Conc/filterIO.d.ts +1 -1
  921. package/collection/immutable/Conc/findIO.d.ts +2 -2
  922. package/collection/immutable/Conc/mapIO.d.ts +1 -1
  923. package/collection/immutable/Conc/takeWhileIO.d.ts +1 -1
  924. package/collection/immutable/Conc.d.ts +2 -0
  925. package/data/Exit/foreachIO.d.ts +2 -2
  926. package/global.d.ts +149 -0
  927. package/index.d.ts +40 -0
  928. package/package.json +7 -3
@@ -21,7 +21,7 @@ import { Take } from "./internal/Take.js";
21
21
  *
22
22
  * @tsplus getter fncts.io.Stream absolve
23
23
  */
24
- export function absolve<R, E, E2, A>(self: Stream<R, E, Either<E2, A>>): Stream<R, E | E2, A> {
24
+ export function absolve<R, E, E2, A>(self: Stream<R, E, Either<E2, A>>, __tsplusTrace?: string): Stream<R, E | E2, A> {
25
25
  return self.mapIO((either) => IO.fromEither(either));
26
26
  }
27
27
 
@@ -42,6 +42,7 @@ export function absolve<R, E, E2, A>(self: Stream<R, E, Either<E2, A>>): Stream<
42
42
  export function aggregateAsync_<R, E, A extends A1, R1, E1, A1, B>(
43
43
  stream: Stream<R, E, A>,
44
44
  sink: Sink<R1, E1, A1, A1, B>,
45
+ __tsplusTrace?: string,
45
46
  ): Stream<R | R1, E | E1, B> {
46
47
  return stream.aggregateAsyncWithin(sink, Schedule.forever);
47
48
  }
@@ -55,6 +56,7 @@ export function aggregateAsyncWithin_<R, E, A extends A1, R1, E1, A1, B, R2, C>(
55
56
  stream: Stream<R, E, A>,
56
57
  sink: Sink<R1, E1, A1, A1, B>,
57
58
  schedule: Schedule<R2, Maybe<B>, C>,
59
+ __tsplusTrace?: string,
58
60
  ): Stream<R | R1 | R2, E | E1, B> {
59
61
  return stream.aggregateAsyncWithinEither(sink, schedule).filterMap((cb) => cb.match(() => Nothing(), Maybe.just));
60
62
  }
@@ -77,6 +79,7 @@ export function aggregateAsyncWithinEither_<R, E, A extends A1, R1, E1, A1, B, R
77
79
  stream: Stream<R, E, A>,
78
80
  sink: Sink<R1, E1, A1, A1, B>,
79
81
  schedule: Schedule<R2, Maybe<B>, C>,
82
+ __tsplusTrace?: string,
80
83
  ): Stream<R | R1 | R2, E | E1, Either<C, B>> {
81
84
  type LocalHandoffSignal = HandoffSignal<E | E1, A1>;
82
85
 
@@ -123,7 +126,7 @@ export function aggregateAsyncWithinEither_<R, E, A extends A1, R1, E1, A1, B, R
123
126
  }),
124
127
  );
125
128
 
126
- function timeout(lastB: Maybe<B>): IO<R2, Nothing, C> {
129
+ function timeout(lastB: Maybe<B>, __tsplusTrace?: string): IO<R2, Nothing, C> {
127
130
  return scheduleDriver.next(lastB);
128
131
  }
129
132
 
@@ -134,7 +137,7 @@ export function aggregateAsyncWithinEither_<R, E, A extends A1, R1, E1, A1, B, R
134
137
  const forkSink =
135
138
  consumed.set(false) > handoffConsumer.pipeToOrFail(sink.channel).doneCollect.runScoped.forkScoped;
136
139
 
137
- function handleSide(leftovers: Conc<Conc<A1>>, b: B, c: Maybe<C>) {
140
+ function handleSide(leftovers: Conc<Conc<A1>>, b: B, c: Maybe<C>, __tsplusTrace?: string) {
138
141
  return Channel.unwrap(
139
142
  sinkLeftovers.set(leftovers.flatten) >
140
143
  sinkEndReason.get.map((reason) =>
@@ -207,6 +210,7 @@ export function aggregateAsyncWithinEither_<R, E, A extends A1, R1, E1, A1, B, R
207
210
  export function apFirst_<R, R1, E, E1, A, A1>(
208
211
  stream: Stream<R, E, A>,
209
212
  that: Stream<R1, E1, A1>,
213
+ __tsplusTrace?: string,
210
214
  ): Stream<R | R1, E | E1, A> {
211
215
  return stream.crossWith(that, (a, _) => a);
212
216
  }
@@ -221,6 +225,7 @@ export function apFirst_<R, R1, E, E1, A, A1>(
221
225
  export function apSecond_<R, R1, E, E1, A, A1>(
222
226
  stream: Stream<R, E, A>,
223
227
  that: Stream<R1, E1, A1>,
228
+ __tsplusTrace?: string,
224
229
  ): Stream<R | R1, E | E1, A1> {
225
230
  return stream.crossWith(that, (_, b) => b);
226
231
  }
@@ -230,7 +235,7 @@ export function apSecond_<R, R1, E, E1, A, A1>(
230
235
  *
231
236
  * @tsplus fluent fncts.io.Stream as
232
237
  */
233
- export function as_<R, E, A, B>(stream: Stream<R, E, A>, b: Lazy<B>): Stream<R, E, B> {
238
+ export function as_<R, E, A, B>(stream: Stream<R, E, A>, b: Lazy<B>, __tsplusTrace?: string): Stream<R, E, B> {
234
239
  return stream.map(() => b());
235
240
  }
236
241
 
@@ -242,6 +247,7 @@ export function asyncInterrupt<R, E, A>(
242
247
  resolve: (next: IO<R, Maybe<E>, Conc<A>>, offerCb?: (e: Exit<never, boolean>) => void) => void,
243
248
  ) => Either<Canceler<R>, Stream<R, E, A>>,
244
249
  outputBuffer = 16,
250
+ __tsplusTrace?: string,
245
251
  ): Stream<R, E, A> {
246
252
  return Stream.unwrapScoped(
247
253
  Do((Δ) => {
@@ -286,6 +292,7 @@ export function asyncMaybe<R, E, A>(
286
292
  resolve: (next: IO<R, Maybe<E>, Conc<A>>, offerCb?: (e: Exit<never, boolean>) => void) => void,
287
293
  ) => Maybe<Stream<R, E, A>>,
288
294
  outputBuffer = 16,
295
+ __tsplusTrace?: string,
289
296
  ): Stream<R, E, A> {
290
297
  return Stream.asyncInterrupt((k) => register(k).match(() => Either.left(IO.unit), Either.right), outputBuffer);
291
298
  }
@@ -296,6 +303,7 @@ export function asyncMaybe<R, E, A>(
296
303
  export function async<R, E, A>(
297
304
  register: (resolve: (next: IO<R, Maybe<E>, Conc<A>>, offerCb?: (e: Exit<never, boolean>) => void) => void) => void,
298
305
  outputBuffer = 16,
306
+ __tsplusTrace?: string,
299
307
  ): Stream<R, E, A> {
300
308
  return Stream.asyncMaybe((cb) => {
301
309
  register(cb);
@@ -311,6 +319,7 @@ export function asyncIO<R, E, A, R1 = R, E1 = E>(
311
319
  resolve: (next: IO<R, Maybe<E>, Conc<A>>, offerCb?: (e: Exit<never, boolean>) => void) => void,
312
320
  ) => IO<R1, E1, unknown>,
313
321
  outputBuffer = 16,
322
+ __tsplusTrace?: string,
314
323
  ): Stream<R | R1, E | E1, A> {
315
324
  return new Stream(
316
325
  Channel.unwrapScoped(
@@ -349,7 +358,12 @@ export function asyncIO<R, E, A, R1 = R, E1 = E>(
349
358
  * Returns a stream whose failure and success channels have been mapped by
350
359
  * the specified pair of functions, `f` and `g`.
351
360
  */
352
- export function bimap_<R, E, E1, A, A1>(stream: Stream<R, E, A>, f: (e: E) => E1, g: (a: A) => A1): Stream<R, E1, A1> {
361
+ export function bimap_<R, E, E1, A, A1>(
362
+ stream: Stream<R, E, A>,
363
+ f: (e: E) => E1,
364
+ g: (a: A) => A1,
365
+ __tsplusTrace?: string,
366
+ ): Stream<R, E1, A1> {
353
367
  return stream.mapError(f).map(g);
354
368
  }
355
369
 
@@ -362,6 +376,7 @@ export function bimap_<R, E, E1, A, A1>(stream: Stream<R, E, A>, f: (e: E) => E1
362
376
  export function acquireRelease_<R, E, A, R1>(
363
377
  acquire: IO<R, E, A>,
364
378
  release: (a: A) => IO<R1, never, unknown>,
379
+ __tsplusTrace?: string,
365
380
  ): Stream<R | R1, E, A> {
366
381
  return Stream.scoped(IO.acquireRelease(acquire, release));
367
382
  }
@@ -375,6 +390,7 @@ export function acquireRelease_<R, E, A, R1>(
375
390
  export function acquireReleaseExit_<R, E, A, R1>(
376
391
  acquire: IO<R, E, A>,
377
392
  release: (a: A, exit: Exit<any, any>) => IO<R1, never, unknown>,
393
+ __tsplusTrace?: string,
378
394
  ): Stream<R | R1, E, A> {
379
395
  return Stream.scoped(IO.acquireReleaseExit(acquire, release));
380
396
  }
@@ -390,6 +406,7 @@ export function broadcast_<R, E, A>(
390
406
  stream: Stream<R, E, A>,
391
407
  n: number,
392
408
  maximumLag: number,
409
+ __tsplusTrace?: string,
393
410
  ): IO<R | Scope, never, Conc<Stream<unknown, E, A>>> {
394
411
  return stream
395
412
  .broadcastedQueues(n, maximumLag)
@@ -406,6 +423,7 @@ export function broadcast_<R, E, A>(
406
423
  export function broadcastDynamic_<R, E, A>(
407
424
  stream: Stream<R, E, A>,
408
425
  maximumLag: number,
426
+ __tsplusTrace?: string,
409
427
  ): IO<R | Scope, never, Stream<unknown, E, A>> {
410
428
  return stream
411
429
  .broadcastedQueuesDynamic(maximumLag)
@@ -424,6 +442,7 @@ export function broadcastedQueues_<R, E, A>(
424
442
  stream: Stream<R, E, A>,
425
443
  n: number,
426
444
  maximumLag: number,
445
+ __tsplusTrace?: string,
427
446
  ): IO<R | Scope, never, Conc<Hub.Dequeue<unknown, never, Take<E, A>>>> {
428
447
  return Do((Δ) => {
429
448
  const hub = Δ(Hub.makeBounded<Take<E, A>>(maximumLag));
@@ -444,6 +463,7 @@ export function broadcastedQueues_<R, E, A>(
444
463
  export function broadcastedQueuesDynamic_<R, E, A>(
445
464
  stream: Stream<R, E, A>,
446
465
  maximumLag: number,
466
+ __tsplusTrace?: string,
447
467
  ): IO<R | Scope, never, IO<Scope, never, Hub.Dequeue<never, never, Take<E, A>>>> {
448
468
  return stream.toHub(maximumLag).map((hub) => hub.subscribe);
449
469
  }
@@ -454,7 +474,7 @@ export function broadcastedQueuesDynamic_<R, E, A>(
454
474
  *
455
475
  * @tsplus fluent fncts.io.Stream buffer
456
476
  */
457
- export function buffer_<R, E, A>(stream: Stream<R, E, A>, capacity: number): Stream<R, E, A> {
477
+ export function buffer_<R, E, A>(stream: Stream<R, E, A>, capacity: number, __tsplusTrace?: string): Stream<R, E, A> {
458
478
  const queue = toQueueOfElements_(stream, capacity);
459
479
  return new Stream(
460
480
  Channel.unwrapScoped(
@@ -475,7 +495,11 @@ export function buffer_<R, E, A>(stream: Stream<R, E, A>, capacity: number): Str
475
495
  /**
476
496
  * @tsplus fluent fncts.io.Stream bufferChunks
477
497
  */
478
- export function bufferChunks_<R, E, A>(stream: Stream<R, E, A>, capacity: number): Stream<R, E, A> {
498
+ export function bufferChunks_<R, E, A>(
499
+ stream: Stream<R, E, A>,
500
+ capacity: number,
501
+ __tsplusTrace?: string,
502
+ ): Stream<R, E, A> {
479
503
  const queue = stream.toQueue(capacity);
480
504
  return new Stream(
481
505
  Channel.unwrapScoped(
@@ -498,7 +522,7 @@ export function bufferChunks_<R, E, A>(stream: Stream<R, E, A>, capacity: number
498
522
  *
499
523
  * @tsplus getter fncts.io.Stream bufferUnbounded
500
524
  */
501
- export function bufferUnbounded<R, E, A>(stream: Stream<R, E, A>): Stream<R, E, A> {
525
+ export function bufferUnbounded<R, E, A>(stream: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E, A> {
502
526
  const queue = stream.toQueueUnbounded;
503
527
 
504
528
  return new Stream(
@@ -520,6 +544,7 @@ export function bufferUnbounded<R, E, A>(stream: Stream<R, E, A>): Stream<R, E,
520
544
  function bufferSignalProducer<E, A>(
521
545
  queue: Queue<readonly [Take<E, A>, Future<never, void>]>,
522
546
  ref: Ref<Future<never, void>>,
547
+ __tsplusTrace?: string,
523
548
  ): Channel<never, E, Conc<A>, unknown, never, never, unknown> {
524
549
  const terminate = (take: Take<E, A>): Channel<never, E, Conc<A>, unknown, never, never, unknown> =>
525
550
  Channel.fromIO(
@@ -548,6 +573,7 @@ function bufferSignalProducer<E, A>(
548
573
 
549
574
  function bufferSignalConsumer<R, E, A>(
550
575
  queue: Queue<readonly [Take<E, A>, Future<never, void>]>,
576
+ __tsplusTrace?: string,
551
577
  ): Channel<R, unknown, unknown, unknown, E, Conc<A>, void> {
552
578
  const process: Channel<never, unknown, unknown, unknown, E, Conc<A>, void> = Channel.fromIO(queue.take).flatMap(
553
579
  ([take, promise]) =>
@@ -569,6 +595,7 @@ function bufferSignalConsumer<R, E, A>(
569
595
  export function catchAll_<R, R1, E, E1, A, A1>(
570
596
  stream: Stream<R, E, A>,
571
597
  f: (e: E) => Stream<R1, E1, A1>,
598
+ __tsplusTrace?: string,
572
599
  ): Stream<R | R1, E1, A | A1> {
573
600
  return stream.catchAllCause((cause) => cause.failureOrCause.match(f, Stream.failCauseNow));
574
601
  }
@@ -583,6 +610,7 @@ export function catchAll_<R, R1, E, E1, A, A1>(
583
610
  export function catchAllCause_<R, R1, E, E1, A, A1>(
584
611
  stream: Stream<R, E, A>,
585
612
  f: (cause: Cause<E>) => Stream<R1, E1, A1>,
613
+ __tsplusTrace?: string,
586
614
  ): Stream<R | R1, E1, A | A1> {
587
615
  const channel: Channel<R | R1, unknown, unknown, unknown, E1, Conc<A | A1>, unknown> = stream.channel.catchAllCause(
588
616
  (cause) => f(cause).channel,
@@ -599,6 +627,7 @@ export function catchAllCause_<R, R1, E, E1, A, A1>(
599
627
  export function catchJust_<R, R1, E, E1, A, A1>(
600
628
  stream: Stream<R, E, A>,
601
629
  pf: (e: E) => Maybe<Stream<R1, E1, A1>>,
630
+ __tsplusTrace?: string,
602
631
  ): Stream<R | R1, E | E1, A | A1> {
603
632
  return stream.catchAll((e) => pf(e).getOrElse(Stream.failNow(e)));
604
633
  }
@@ -613,6 +642,7 @@ export function catchJust_<R, R1, E, E1, A, A1>(
613
642
  export function catchJustCause_<R, R1, E, E1, A, A1>(
614
643
  stream: Stream<R, E, A>,
615
644
  pf: (e: Cause<E>) => Maybe<Stream<R1, E1, A1>>,
645
+ __tsplusTrace?: string,
616
646
  ): Stream<R | R1, E | E1, A | A1> {
617
647
  return stream.catchAllCause((cause) => pf(cause).getOrElse(Stream.failCauseNow(cause)));
618
648
  }
@@ -626,6 +656,7 @@ export function catchJustCause_<R, R1, E, E1, A, A1>(
626
656
  export function flatMap_<R, E, A, R1, E1, B>(
627
657
  stream: Stream<R, E, A>,
628
658
  f: (a: A) => Stream<R1, E1, B>,
659
+ __tsplusTrace?: string,
629
660
  ): Stream<R | R1, E | E1, B> {
630
661
  return new Stream(
631
662
  stream.channel.concatMap((as) =>
@@ -643,13 +674,28 @@ export function flatMap_<R, E, A, R1, E1, B>(
643
674
  *
644
675
  * @tsplus getter fncts.io.Stream chunks
645
676
  */
646
- export function chunks<R, E, A>(stream: Stream<R, E, A>): Stream<R, E, Conc<A>> {
677
+ export function chunks<R, E, A>(stream: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E, Conc<A>> {
647
678
  return stream.mapChunks(Conc.single);
648
679
  }
649
680
 
681
+ /**
682
+ * Performs the specified stream transformation with the chunk structure of
683
+ * the stream exposed.
684
+ *
685
+ * @tsplus fluent fncts.io.Stream chunksWith
686
+ */
687
+ export function chunksWith<R, E, A, R1, E1, B>(
688
+ self: Stream<R, E, A>,
689
+ f: (_: Stream<R, E, Conc<A>>) => Stream<R1, E1, Conc<B>>,
690
+ __tsplusTrace?: string,
691
+ ): Stream<R1, E1, B> {
692
+ return f(self.chunks).flattenChunks;
693
+ }
694
+
650
695
  function changesWithWriter<R, E, A>(
651
696
  f: (x: A, y: A) => boolean,
652
697
  last: Maybe<A>,
698
+ __tsplusTrace?: string,
653
699
  ): Channel<R, E, Conc<A>, unknown, E, Conc<A>, void> {
654
700
  return Channel.readWithCause(
655
701
  (chunk: Conc<A>) => {
@@ -673,7 +719,11 @@ function changesWithWriter<R, E, A>(
673
719
  *
674
720
  * @tsplus fluent fncts.io.Stream changesWith
675
721
  */
676
- export function changesWith_<R, E, A>(stream: Stream<R, E, A>, f: (x: A, y: A) => boolean): Stream<R, E, A> {
722
+ export function changesWith_<R, E, A>(
723
+ stream: Stream<R, E, A>,
724
+ f: (x: A, y: A) => boolean,
725
+ __tsplusTrace?: string,
726
+ ): Stream<R, E, A> {
677
727
  return new Stream(stream.channel.pipeTo(changesWithWriter<R, E, A>(f, Nothing())));
678
728
  }
679
729
 
@@ -682,7 +732,11 @@ export function changesWith_<R, E, A>(stream: Stream<R, E, A>, f: (x: A, y: A) =
682
732
  *
683
733
  * @tsplus fluent fncts.io.Stream collectWhile
684
734
  */
685
- export function collectWhile_<R, E, A, A1>(stream: Stream<R, E, A>, pf: (a: A) => Maybe<A1>): Stream<R, E, A1> {
735
+ export function collectWhile_<R, E, A, A1>(
736
+ stream: Stream<R, E, A>,
737
+ pf: (a: A) => Maybe<A1>,
738
+ __tsplusTrace?: string,
739
+ ): Stream<R, E, A1> {
686
740
  const loop: Channel<R, E, Conc<A>, unknown, E, Conc<A1>, any> = Channel.readWith(
687
741
  (inp) => {
688
742
  const mapped = inp.collectWhile(pf);
@@ -706,6 +760,7 @@ export function collectWhile_<R, E, A, A1>(stream: Stream<R, E, A>, pf: (a: A) =
706
760
  export function collectWhileIO_<R, E, A, R1, E1, B>(
707
761
  stream: Stream<R, E, A>,
708
762
  pf: (a: A) => Maybe<IO<R1, E1, B>>,
763
+ __tsplusTrace?: string,
709
764
  ): Stream<R | R1, E | E1, B> {
710
765
  return new Stream(stream.channel.pipeTo(collectWhileIOLoop(Iterable.empty<A>()[Symbol.iterator](), pf)));
711
766
  }
@@ -713,6 +768,7 @@ export function collectWhileIO_<R, E, A, R1, E1, B>(
713
768
  function collectWhileIOLoop<R, E, A, R1, E1, B>(
714
769
  iterator: Iterator<A>,
715
770
  pf: (a: A) => Maybe<IO<R1, E1, B>>,
771
+ __tsplusTrace?: string,
716
772
  ): Channel<R | R1, E, Conc<A>, unknown, E | E1, Conc<B>, unknown> {
717
773
  const next = iterator.next();
718
774
  if (next.done) {
@@ -734,6 +790,7 @@ function collectWhileIOLoop<R, E, A, R1, E1, B>(
734
790
  function combineProducer<Err, Elem>(
735
791
  handoff: Handoff<Exit<Maybe<Err>, Elem>>,
736
792
  latch: Handoff<void>,
793
+ __tsplusTrace?: string,
737
794
  ): Channel<never, Err, Elem, unknown, never, never, any> {
738
795
  return Channel.fromIO(latch.take).apSecond(
739
796
  Channel.readWithCause(
@@ -763,6 +820,7 @@ export function combine_<R, E, A, R1, E1, A1, S, R2, A2>(
763
820
  eff1: IO<R, Maybe<E>, A>,
764
821
  eff2: IO<R1, Maybe<E1>, A1>,
765
822
  ) => IO<R2, never, Exit<Maybe<E | E1>, readonly [A2, S]>>,
823
+ __tsplusTrace?: string,
766
824
  ): Stream<R | R1 | R2, E | E1, A2> {
767
825
  return new Stream(
768
826
  Channel.unwrapScoped(
@@ -787,6 +845,7 @@ export function combine_<R, E, A, R1, E1, A1, S, R2, A2>(
787
845
  function combineChunksProducer<Err, Elem>(
788
846
  handoff: Handoff<Take<Err, Elem>>,
789
847
  latch: Handoff<void>,
848
+ __tsplusTrace?: string,
790
849
  ): Channel<never, Err, Conc<Elem>, unknown, never, never, any> {
791
850
  return Channel.fromIO(latch.take).apSecond(
792
851
  Channel.readWithCause(
@@ -814,6 +873,7 @@ export function combineChunks_<R, E, A, R1, E1, A1, S, R2, A2>(
814
873
  l: IO<R, Maybe<E>, Conc<A>>,
815
874
  r: IO<R1, Maybe<E1>, Conc<A1>>,
816
875
  ) => IO<R2, never, Exit<Maybe<E | E1>, readonly [Conc<A2>, S]>>,
876
+ __tsplusTrace?: string,
817
877
  ): Stream<R1 | R | R2, E | E1, A2> {
818
878
  return new Stream(
819
879
  Channel.unwrapScoped(
@@ -850,6 +910,7 @@ export function combineChunks_<R, E, A, R1, E1, A1, S, R2, A2>(
850
910
  export function concat_<R, R1, E, E1, A, A1>(
851
911
  stream: Stream<R, E, A>,
852
912
  that: Stream<R1, E1, A1>,
913
+ __tsplusTrace?: string,
853
914
  ): Stream<R | R1, E | E1, A | A1> {
854
915
  return new Stream<R | R1, E | E1, A | A1>(stream.channel.apSecond(that.channel));
855
916
  }
@@ -863,6 +924,7 @@ export function concat_<R, R1, E, E1, A, A1>(
863
924
  export function cross_<R, E, A, R1, E1, B>(
864
925
  stream: Stream<R, E, A>,
865
926
  that: Stream<R1, E1, B>,
927
+ __tsplusTrace?: string,
866
928
  ): Stream<R | R1, E | E1, readonly [A, B]> {
867
929
  return new Stream(
868
930
  stream.channel.concatMap((as) => that.channel.mapOut((bs) => as.flatMap((a) => bs.map((b) => tuple(a, b))))),
@@ -880,6 +942,7 @@ export function crossWith_<R, E, A, R1, E1, B, C>(
880
942
  fa: Stream<R, E, A>,
881
943
  fb: Stream<R1, E1, B>,
882
944
  f: (a: A, b: B) => C,
945
+ __tsplusTrace?: string,
883
946
  ): Stream<R | R1, E | E1, C> {
884
947
  return fa.flatMap((a) => fb.map((b) => f(a, b)));
885
948
  }
@@ -893,6 +956,7 @@ export function crossWith_<R, E, A, R1, E1, B, C>(
893
956
  export function contramapEnvironment_<R, E, A, R0>(
894
957
  ra: Stream<R, E, A>,
895
958
  f: (r0: Environment<R0>) => Environment<R>,
959
+ __tsplusTrace?: string,
896
960
  ): Stream<R0, E, A> {
897
961
  return Stream.environment<R0>().flatMap((r0) => ra.provideEnvironment(f(r0)));
898
962
  }
@@ -900,12 +964,16 @@ export function contramapEnvironment_<R, E, A, R0>(
900
964
  /**
901
965
  * @tsplus fluent fncts.io.Stream debounce
902
966
  */
903
- export function debounce_<R, E, A>(stream: Stream<R, E, A>, duration: Lazy<Duration>): Stream<R, E, A> {
967
+ export function debounce_<R, E, A>(
968
+ stream: Stream<R, E, A>,
969
+ duration: Lazy<Duration>,
970
+ __tsplusTrace?: string,
971
+ ): Stream<R, E, A> {
904
972
  return Stream.unwrap(
905
973
  IO.transplant((grafter) =>
906
974
  Do((Δ) => {
907
975
  const handoff = Δ(Handoff<HandoffSignal<E, A>>());
908
- function enqueue(last: Conc<A>) {
976
+ function enqueue(last: Conc<A>, __tsplusTrace?: string) {
909
977
  return grafter(Clock.sleep(duration).as(last).fork).map((f) => consumer(DebounceState.Previous(f)));
910
978
  }
911
979
  const producer: Channel<R, E, Conc<A>, unknown, E, never, unknown> = Channel.readWithCause(
@@ -917,7 +985,10 @@ export function debounce_<R, E, A>(stream: Stream<R, E, A>, duration: Lazy<Durat
917
985
  (cause: Cause<E>) => Channel.fromIO(handoff.offer(HandoffSignal.Halt(cause))),
918
986
  () => Channel.fromIO(handoff.offer(HandoffSignal.End(new UpstreamEnd()))),
919
987
  );
920
- function consumer(state: DebounceState<E, A>): Channel<R, unknown, unknown, unknown, E, Conc<A>, unknown> {
988
+ function consumer(
989
+ state: DebounceState<E, A>,
990
+ __tsplusTrace?: string,
991
+ ): Channel<R, unknown, unknown, unknown, E, Conc<A>, unknown> {
921
992
  return Channel.unwrap(
922
993
  state.match({
923
994
  NotStarted: () =>
@@ -970,6 +1041,7 @@ export function debounce_<R, E, A>(stream: Stream<R, E, A>, duration: Lazy<Durat
970
1041
 
971
1042
  function defaultIfEmptyWriter<R, E, A, R1, E1, B>(
972
1043
  fb: Stream<R1, E1, B>,
1044
+ __tsplusTrace?: string,
973
1045
  ): Channel<R | R1, E, Conc<A>, unknown, E | E1, Conc<A | B>, unknown> {
974
1046
  return Channel.readWith(
975
1047
  (i: Conc<A>) =>
@@ -987,6 +1059,7 @@ function defaultIfEmptyWriter<R, E, A, R1, E1, B>(
987
1059
  export function defaultIfEmpty_<R, E, A, R1, E1, B>(
988
1060
  fa: Stream<R, E, A>,
989
1061
  fb: Stream<R1, E1, B>,
1062
+ __tsplusTrace?: string,
990
1063
  ): Stream<R | R1, E | E1, A | B> {
991
1064
  return new Stream(fa.channel.pipeTo(defaultIfEmptyWriter(fb)));
992
1065
  }
@@ -1003,6 +1076,7 @@ export function distributedWith_<R, E, A>(
1003
1076
  n: number,
1004
1077
  maximumLag: number,
1005
1078
  decide: (_: A) => UIO<(_: number) => boolean>,
1079
+ __tsplusTrace?: string,
1006
1080
  ): IO<R | Scope, never, Conc<Queue.Dequeue<Exit<Maybe<E>, A>>>> {
1007
1081
  return Future.make<never, (a: A) => UIO<(_: symbol) => boolean>>().flatMap((p) =>
1008
1082
  self
@@ -1040,6 +1114,7 @@ export function distributedWithDynamic_<R, E, A>(
1040
1114
  maximumLag: number,
1041
1115
  decide: (a: A) => UIO<(_: symbol) => boolean>,
1042
1116
  done: (exit: Exit<Maybe<E>, never>) => UIO<any> = () => IO.unit,
1117
+ __tsplusTrace?: string,
1043
1118
  ): IO<R | Scope, never, UIO<readonly [symbol, Queue.Dequeue<Exit<Maybe<E>, A>>]>> {
1044
1119
  const offer = (queuesRef: Ref<HashMap<symbol, Queue<Exit<Maybe<E>, A>>>>) => (a: A) =>
1045
1120
  Do((Δ) => {
@@ -1127,11 +1202,11 @@ export function distributedWithDynamic_<R, E, A>(
1127
1202
  *
1128
1203
  * @tsplus getter fncts.io.Stream drain
1129
1204
  */
1130
- export function drain<R, E, A>(fa: Stream<R, E, A>): Stream<R, E, void> {
1205
+ export function drain<R, E, A>(fa: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E, void> {
1131
1206
  return new Stream(fa.channel.drain);
1132
1207
  }
1133
1208
 
1134
- function dropLoop<R, E, A>(r: number): Channel<R, E, Conc<A>, unknown, E, Conc<A>, unknown> {
1209
+ function dropLoop<R, E, A>(r: number, __tsplusTrace?: string): Channel<R, E, Conc<A>, unknown, E, Conc<A>, unknown> {
1135
1210
  return Channel.readWith(
1136
1211
  (inp: Conc<A>) => {
1137
1212
  const dropped = inp.drop(r);
@@ -1149,7 +1224,7 @@ function dropLoop<R, E, A>(r: number): Channel<R, E, Conc<A>, unknown, E, Conc<A
1149
1224
  *
1150
1225
  * @tsplus fluent fncts.io.Stream drop
1151
1226
  */
1152
- export function drop_<R, E, A>(stream: Stream<R, E, A>, n: number): Stream<R, E, A> {
1227
+ export function drop_<R, E, A>(stream: Stream<R, E, A>, n: number, __tsplusTrace?: string): Stream<R, E, A> {
1153
1228
  return new Stream(stream.channel.pipeTo(dropLoop(n)));
1154
1229
  }
1155
1230
 
@@ -1159,7 +1234,7 @@ export function drop_<R, E, A>(stream: Stream<R, E, A>, n: number): Stream<R, E,
1159
1234
  *
1160
1235
  * @tsplus fluent fncts.io.Stream dropWhile
1161
1236
  */
1162
- export function dropWhile_<R, E, A>(stream: Stream<R, E, A>, p: Predicate<A>): Stream<R, E, A> {
1237
+ export function dropWhile_<R, E, A>(stream: Stream<R, E, A>, p: Predicate<A>, __tsplusTrace?: string): Stream<R, E, A> {
1163
1238
  return stream.pipeThrough(Sink.dropWhile(p));
1164
1239
  }
1165
1240
 
@@ -1169,7 +1244,7 @@ export function dropWhile_<R, E, A>(stream: Stream<R, E, A>, p: Predicate<A>): S
1169
1244
  *
1170
1245
  * @tsplus fluent fncts.io.Stream dropUntil
1171
1246
  */
1172
- export function dropUntil_<R, E, A>(stream: Stream<R, E, A>, p: Predicate<A>): Stream<R, E, A> {
1247
+ export function dropUntil_<R, E, A>(stream: Stream<R, E, A>, p: Predicate<A>, __tsplusTrace?: string): Stream<R, E, A> {
1173
1248
  return stream.dropWhile(p.invert).drop(1);
1174
1249
  }
1175
1250
 
@@ -1182,7 +1257,7 @@ export function dropUntil_<R, E, A>(stream: Stream<R, E, A>, p: Predicate<A>): S
1182
1257
  *
1183
1258
  * @tsplus getter fncts.io.Stream either
1184
1259
  */
1185
- export function either<R, E, A>(stream: Stream<R, E, A>): Stream<R, never, Either<E, A>> {
1260
+ export function either<R, E, A>(stream: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, never, Either<E, A>> {
1186
1261
  return stream.map(Either.right).catchAll((e) => Stream.succeedNow(Either.left(e)));
1187
1262
  }
1188
1263
 
@@ -1193,13 +1268,14 @@ export const empty: Stream<never, never, never> = Stream.fromChunkNow(Conc.empty
1193
1268
 
1194
1269
  function endWhenWriter<E, A, E1>(
1195
1270
  fiber: Fiber<E1, any>,
1271
+ __tsplusTrace?: string,
1196
1272
  ): Channel<never, E | E1, Conc<A>, unknown, E | E1, Conc<A>, void> {
1197
1273
  return Channel.unwrap(
1198
1274
  fiber.poll.map((maybeExit) =>
1199
1275
  maybeExit.match(
1200
1276
  () =>
1201
1277
  Channel.readWith(
1202
- (inp: Conc<A>) => Channel.writeNow(inp).apSecond(endWhenWriter(fiber)),
1278
+ (inp: Conc<A>) => Channel.writeNow(inp).apSecond(endWhenWriter<E, A, E1>(fiber)),
1203
1279
  Channel.failNow,
1204
1280
  () => Channel.unit,
1205
1281
  ),
@@ -1220,21 +1296,29 @@ function endWhenWriter<E, A, E1>(
1220
1296
  *
1221
1297
  * @tsplus fluent fncts.io.Stream endWhen
1222
1298
  */
1223
- export function endWhen_<R, E, A, R1, E1>(stream: Stream<R, E, A>, io: IO<R1, E1, any>): Stream<R | R1, E | E1, A> {
1299
+ export function endWhen_<R, E, A, R1, E1>(
1300
+ stream: Stream<R, E, A>,
1301
+ io: IO<R1, E1, any>,
1302
+ __tsplusTrace?: string,
1303
+ ): Stream<R | R1, E | E1, A> {
1224
1304
  return new Stream(Channel.unwrapScoped(io.forkScoped.map((fiber) => stream.channel.pipeTo(endWhenWriter(fiber)))));
1225
1305
  }
1226
1306
 
1227
1307
  /**
1228
1308
  * @tsplus fluent fncts.io.Stream ensuring
1229
1309
  */
1230
- export function ensuring_<R, E, A, R1>(self: Stream<R, E, A>, finalizer: IO<R1, never, any>): Stream<R | R1, E, A> {
1310
+ export function ensuring_<R, E, A, R1>(
1311
+ self: Stream<R, E, A>,
1312
+ finalizer: IO<R1, never, any>,
1313
+ __tsplusTrace?: string,
1314
+ ): Stream<R | R1, E, A> {
1231
1315
  return new Stream(self.channel.ensuring(finalizer));
1232
1316
  }
1233
1317
 
1234
1318
  /**
1235
1319
  * @tsplus static fncts.io.StreamOps environment
1236
1320
  */
1237
- export function environment<R>(): Stream<R, never, Environment<R>> {
1321
+ export function environment<R>(__tsplusTrace?: string): Stream<R, never, Environment<R>> {
1238
1322
  return Stream.fromIO(IO.environment<R>());
1239
1323
  }
1240
1324
 
@@ -1243,7 +1327,7 @@ export function environment<R>(): Stream<R, never, Environment<R>> {
1243
1327
  *
1244
1328
  * @tsplus static fncts.io.StreamOps environmentWith
1245
1329
  */
1246
- export function environmentWith<R, A>(f: (r: Environment<R>) => A): Stream<R, never, A> {
1330
+ export function environmentWith<R, A>(f: (r: Environment<R>) => A, __tsplusTrace?: string): Stream<R, never, A> {
1247
1331
  return Stream.environment<R>().map(f);
1248
1332
  }
1249
1333
 
@@ -1252,7 +1336,10 @@ export function environmentWith<R, A>(f: (r: Environment<R>) => A): Stream<R, ne
1252
1336
  *
1253
1337
  * @tsplus static fncts.io.StreamOps environmentWithIO
1254
1338
  */
1255
- export function environmentWithIO<R0, R, E, A>(f: (r0: Environment<R0>) => IO<R, E, A>): Stream<R0 | R, E, A> {
1339
+ export function environmentWithIO<R0, R, E, A>(
1340
+ f: (r0: Environment<R0>) => IO<R, E, A>,
1341
+ __tsplusTrace?: string,
1342
+ ): Stream<R0 | R, E, A> {
1256
1343
  return Stream.environment<R0>().mapIO(f);
1257
1344
  }
1258
1345
 
@@ -1261,7 +1348,10 @@ export function environmentWithIO<R0, R, E, A>(f: (r0: Environment<R0>) => IO<R,
1261
1348
  *
1262
1349
  * @tsplus static fncts.io.StreamOps environmentWithStream
1263
1350
  */
1264
- export function environmentWithStream<R0, R, E, A>(f: (r0: Environment<R0>) => Stream<R, E, A>): Stream<R0 | R, E, A> {
1351
+ export function environmentWithStream<R0, R, E, A>(
1352
+ f: (r0: Environment<R0>) => Stream<R, E, A>,
1353
+ __tsplusTrace?: string,
1354
+ ): Stream<R0 | R, E, A> {
1265
1355
  return Stream.environment<R0>().flatMap(f);
1266
1356
  }
1267
1357
 
@@ -1270,7 +1360,7 @@ export function environmentWithStream<R0, R, E, A>(f: (r0: Environment<R0>) => S
1270
1360
  *
1271
1361
  * @tsplus static fncts.io.StreamOps failNow
1272
1362
  */
1273
- export function failNow<E>(error: E): Stream<never, E, never> {
1363
+ export function failNow<E>(error: E, __tsplusTrace?: string): Stream<never, E, never> {
1274
1364
  return new Stream(Channel.failNow(error));
1275
1365
  }
1276
1366
 
@@ -1279,7 +1369,7 @@ export function failNow<E>(error: E): Stream<never, E, never> {
1279
1369
  *
1280
1370
  * @tsplus static fncts.io.StreamOps fail
1281
1371
  */
1282
- export function fail<E>(error: Lazy<E>): Stream<never, E, never> {
1372
+ export function fail<E>(error: Lazy<E>, __tsplusTrace?: string): Stream<never, E, never> {
1283
1373
  return new Stream(Channel.fail(error));
1284
1374
  }
1285
1375
 
@@ -1288,7 +1378,7 @@ export function fail<E>(error: Lazy<E>): Stream<never, E, never> {
1288
1378
  *
1289
1379
  * @tsplus static fncts.io.StreamOps failCauseNow
1290
1380
  */
1291
- export function failCauseNow<E>(cause: Cause<E>): Stream<never, E, never> {
1381
+ export function failCauseNow<E>(cause: Cause<E>, __tsplusTrace?: string): Stream<never, E, never> {
1292
1382
  return Stream.fromIO(IO.failCauseNow(cause));
1293
1383
  }
1294
1384
 
@@ -1297,7 +1387,7 @@ export function failCauseNow<E>(cause: Cause<E>): Stream<never, E, never> {
1297
1387
  *
1298
1388
  * @tsplus static fncts.io.StreamOps failCause
1299
1389
  */
1300
- export function failCause<E>(cause: Lazy<Cause<E>>): Stream<never, E, never> {
1390
+ export function failCause<E>(cause: Lazy<Cause<E>>, __tsplusTrace?: string): Stream<never, E, never> {
1301
1391
  return Stream.fromIO(IO.failCause(cause));
1302
1392
  }
1303
1393
 
@@ -1306,7 +1396,11 @@ export function failCause<E>(cause: Lazy<Cause<E>>): Stream<never, E, never> {
1306
1396
  */
1307
1397
  export function filter_<R, E, A, B extends A>(fa: Stream<R, E, A>, refinement: Refinement<A, B>): Stream<R, E, B>;
1308
1398
  export function filter_<R, E, A>(fa: Stream<R, E, A>, predicate: Predicate<A>): Stream<R, E, A>;
1309
- export function filter_<R, E, A>(fa: Stream<R, E, A>, predicate: Predicate<A>): Stream<R, E, A> {
1399
+ export function filter_<R, E, A>(
1400
+ fa: Stream<R, E, A>,
1401
+ predicate: Predicate<A>,
1402
+ __tsplusTrace?: string,
1403
+ ): Stream<R, E, A> {
1310
1404
  return fa.mapChunks((chunk) => chunk.filter(predicate));
1311
1405
  }
1312
1406
 
@@ -1316,6 +1410,7 @@ export function filter_<R, E, A>(fa: Stream<R, E, A>, predicate: Predicate<A>):
1316
1410
  export function filterIO_<R, E, A, R1, E1>(
1317
1411
  fa: Stream<R, E, A>,
1318
1412
  f: (a: A) => IO<R1, E1, boolean>,
1413
+ __tsplusTrace?: string,
1319
1414
  ): Stream<R | R1, E | E1, A> {
1320
1415
  return new Stream(fa.channel.pipeTo(filterIOLoop(Iterable.empty<A>()[Symbol.iterator](), f)));
1321
1416
  }
@@ -1323,6 +1418,7 @@ export function filterIO_<R, E, A, R1, E1>(
1323
1418
  function filterIOLoop<R, E, A, R1, E1>(
1324
1419
  iterator: Iterator<A>,
1325
1420
  f: (a: A) => IO<R1, E1, boolean>,
1421
+ __tsplusTrace?: string,
1326
1422
  ): Channel<R | R1, E, Conc<A>, unknown, E | E1, Conc<A>, unknown> {
1327
1423
  const next = iterator.next();
1328
1424
  if (next.done) {
@@ -1345,7 +1441,11 @@ function filterIOLoop<R, E, A, R1, E1>(
1345
1441
  /**
1346
1442
  * @tsplus fluent fncts.io.Stream filterMap
1347
1443
  */
1348
- export function filterMap_<R, E, A, B>(fa: Stream<R, E, A>, f: (a: A) => Maybe<B>): Stream<R, E, B> {
1444
+ export function filterMap_<R, E, A, B>(
1445
+ fa: Stream<R, E, A>,
1446
+ f: (a: A) => Maybe<B>,
1447
+ __tsplusTrace?: string,
1448
+ ): Stream<R, E, B> {
1349
1449
  return fa.mapChunks((chunk) => chunk.filterMap(f));
1350
1450
  }
1351
1451
 
@@ -1355,6 +1455,7 @@ export function filterMap_<R, E, A, B>(fa: Stream<R, E, A>, f: (a: A) => Maybe<B
1355
1455
  export function filterMapIO_<R, E, A, R1, E1, B>(
1356
1456
  fa: Stream<R, E, A>,
1357
1457
  f: (a: A) => IO<R1, E1, Maybe<B>>,
1458
+ __tsplusTrace?: string,
1358
1459
  ): Stream<R | R1, E | E1, B> {
1359
1460
  return new Stream(fa.channel.pipeTo(filterMapIOLoop<R, E, A, R1, E1, B>(Iterable.empty<A>()[Symbol.iterator](), f)));
1360
1461
  }
@@ -1362,6 +1463,7 @@ export function filterMapIO_<R, E, A, R1, E1, B>(
1362
1463
  function filterMapIOLoop<R, E, A, R1, E1, B>(
1363
1464
  iterator: Iterator<A>,
1364
1465
  f: (a: A) => IO<R1, E1, Maybe<B>>,
1466
+ __tsplusTrace?: string,
1365
1467
  ): Channel<R | R1, E, Conc<A>, unknown, E | E1, Conc<B>, unknown> {
1366
1468
  const next = iterator.next();
1367
1469
  if (next.done) {
@@ -1374,7 +1476,7 @@ function filterMapIOLoop<R, E, A, R1, E1, B>(
1374
1476
  return Channel.unwrap(
1375
1477
  f(next.value).map((b) =>
1376
1478
  b.match(
1377
- () => filterMapIOLoop(iterator, f),
1479
+ () => filterMapIOLoop<R, E, A, R1, E1, B>(iterator, f),
1378
1480
  (b) => Channel.writeNow(Conc.single(b)) > filterMapIOLoop<R, E, A, R1, E1, B>(iterator, f),
1379
1481
  ),
1380
1482
  ),
@@ -1387,7 +1489,7 @@ function filterMapIOLoop<R, E, A, R1, E1, B>(
1387
1489
  *
1388
1490
  * @tsplus fluent fncts.io.Stream find
1389
1491
  */
1390
- export function find_<R, E, A>(stream: Stream<R, E, A>, p: Predicate<A>): Stream<R, E, A> {
1492
+ export function find_<R, E, A>(stream: Stream<R, E, A>, p: Predicate<A>, __tsplusTrace?: string): Stream<R, E, A> {
1391
1493
  const loop: Channel<R, E, Conc<A>, unknown, E, Conc<A>, unknown> = Channel.readWith(
1392
1494
  (inp: Conc<A>) =>
1393
1495
  inp.find(p).match(
@@ -1408,6 +1510,7 @@ export function find_<R, E, A>(stream: Stream<R, E, A>, p: Predicate<A>): Stream
1408
1510
  export function findIO_<R, E, A, R1, E1>(
1409
1511
  stream: Stream<R, E, A>,
1410
1512
  f: (a: A) => IO<R1, E1, boolean>,
1513
+ __tsplusTrace?: string,
1411
1514
  ): Stream<R | R1, E | E1, A> {
1412
1515
  const loop: Channel<R | R1, E, Conc<A>, unknown, E | E1, Conc<A>, unknown> = Channel.readWith(
1413
1516
  (inp: Conc<A>) =>
@@ -1431,7 +1534,10 @@ export function findIO_<R, E, A, R1, E1>(
1431
1534
  *
1432
1535
  * @tsplus getter fncts.io.Stream flatten
1433
1536
  */
1434
- export function flatten<R, E, R1, E1, A>(self: Stream<R, E, Stream<R1, E1, A>>): Stream<R | R1, E | E1, A> {
1537
+ export function flatten<R, E, R1, E1, A>(
1538
+ self: Stream<R, E, Stream<R1, E1, A>>,
1539
+ __tsplusTrace?: string,
1540
+ ): Stream<R | R1, E | E1, A> {
1435
1541
  return self.flatMap(identity);
1436
1542
  }
1437
1543
 
@@ -1442,7 +1548,10 @@ export function flatten<R, E, R1, E1, A>(self: Stream<R, E, Stream<R1, E1, A>>):
1442
1548
  *
1443
1549
  * @tsplus getter fncts.io.Stream flattenExitOption
1444
1550
  */
1445
- export function flattenExitOption<R, E, E1, A>(stream: Stream<R, E, Exit<Maybe<E1>, A>>): Stream<R, E | E1, A> {
1551
+ export function flattenExitOption<R, E, E1, A>(
1552
+ stream: Stream<R, E, Exit<Maybe<E1>, A>>,
1553
+ __tsplusTrace?: string,
1554
+ ): Stream<R, E | E1, A> {
1446
1555
  const processChunk = (
1447
1556
  chunk: Conc<Exit<Maybe<E1>, A>>,
1448
1557
  cont: Channel<R, E, Conc<Exit<Maybe<E1>, A>>, unknown, E | E1, Conc<A>, any>,
@@ -1474,7 +1583,10 @@ export function flattenExitOption<R, E, E1, A>(stream: Stream<R, E, Exit<Maybe<E
1474
1583
  *
1475
1584
  * @tsplus getter fncts.io.Stream flattenTake
1476
1585
  */
1477
- export function flattenTake<R, E, E1, A>(stream: Stream<R, E, Take<E1, A>>): Stream<R, E | E1, A> {
1586
+ export function flattenTake<R, E, E1, A>(
1587
+ stream: Stream<R, E, Take<E1, A>>,
1588
+ __tsplusTrace?: string,
1589
+ ): Stream<R, E | E1, A> {
1478
1590
  return stream.map((take) => take.exit).flattenExitOption.flattenChunks;
1479
1591
  }
1480
1592
 
@@ -1484,7 +1596,7 @@ export function flattenTake<R, E, E1, A>(stream: Stream<R, E, Take<E1, A>>): Str
1484
1596
  *
1485
1597
  * @tsplus getter fncts.io.Stream flattenChunks
1486
1598
  */
1487
- export function flattenChunks<R, E, A>(stream: Stream<R, E, Conc<A>>): Stream<R, E, A> {
1599
+ export function flattenChunks<R, E, A>(stream: Stream<R, E, Conc<A>>, __tsplusTrace?: string): Stream<R, E, A> {
1488
1600
  return new Stream(stream.channel.mapOut((c) => c.flatten));
1489
1601
  }
1490
1602
 
@@ -1493,7 +1605,7 @@ export function flattenChunks<R, E, A>(stream: Stream<R, E, Conc<A>>): Stream<R,
1493
1605
  *
1494
1606
  * @tsplus getter fncts.io.Stream forever
1495
1607
  */
1496
- export function forever<R, E, A>(stream: Stream<R, E, A>): Stream<R, E, A> {
1608
+ export function forever<R, E, A>(stream: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E, A> {
1497
1609
  return new Stream(stream.channel.repeated);
1498
1610
  }
1499
1611
 
@@ -1502,7 +1614,7 @@ export function forever<R, E, A>(stream: Stream<R, E, A>): Stream<R, E, A> {
1502
1614
  *
1503
1615
  * @tsplus static fncts.io.StreamOps fromChunkNow
1504
1616
  */
1505
- export function fromChunkNow<O>(c: Conc<O>): Stream<never, never, O> {
1617
+ export function fromChunkNow<O>(c: Conc<O>, __tsplusTrace?: string): Stream<never, never, O> {
1506
1618
  return new Stream(Channel.defer(() => (c.isEmpty ? Channel.unit : Channel.writeNow(c))));
1507
1619
  }
1508
1620
 
@@ -1511,7 +1623,7 @@ export function fromChunkNow<O>(c: Conc<O>): Stream<never, never, O> {
1511
1623
  *
1512
1624
  * @tsplus static fncts.io.StreamOps fromChunk
1513
1625
  */
1514
- export function fromChunk<O>(c: Lazy<Conc<O>>): Stream<never, never, O> {
1626
+ export function fromChunk<O>(c: Lazy<Conc<O>>, __tsplusTrace?: string): Stream<never, never, O> {
1515
1627
  return new Stream(Channel.unwrap(IO.succeedNow(Channel.write(c))));
1516
1628
  }
1517
1629
 
@@ -1520,7 +1632,7 @@ export function fromChunk<O>(c: Lazy<Conc<O>>): Stream<never, never, O> {
1520
1632
  *
1521
1633
  * @tsplus static fncts.io.StreamOps scoped
1522
1634
  */
1523
- export function scoped<R, E, A>(stream: IO<R, E, A>): Stream<Exclude<R, Scope>, E, A> {
1635
+ export function scoped<R, E, A>(stream: IO<R, E, A>, __tsplusTrace?: string): Stream<Exclude<R, Scope>, E, A> {
1524
1636
  return new Stream(Channel.scoped(stream.map(Conc.single)));
1525
1637
  }
1526
1638
 
@@ -1529,7 +1641,7 @@ export function scoped<R, E, A>(stream: IO<R, E, A>): Stream<Exclude<R, Scope>,
1529
1641
  *
1530
1642
  * @tsplus static fncts.io.StreamOps fromIO
1531
1643
  */
1532
- export function fromIO<R, E, A>(fa: IO<R, E, A>): Stream<R, E, A> {
1644
+ export function fromIO<R, E, A>(fa: IO<R, E, A>, __tsplusTrace?: string): Stream<R, E, A> {
1533
1645
  return Stream.fromIOMaybe(fa.mapError(Maybe.just));
1534
1646
  }
1535
1647
 
@@ -1538,7 +1650,7 @@ export function fromIO<R, E, A>(fa: IO<R, E, A>): Stream<R, E, A> {
1538
1650
  *
1539
1651
  * @tsplus static fncts.io.StreamOps fromIOMaybe
1540
1652
  */
1541
- export function fromIOMaybe<R, E, A>(fa: IO<R, Maybe<E>, A>): Stream<R, E, A> {
1653
+ export function fromIOMaybe<R, E, A>(fa: IO<R, Maybe<E>, A>, __tsplusTrace?: string): Stream<R, E, A> {
1542
1654
  return new Stream(
1543
1655
  Channel.unwrap(
1544
1656
  fa.match(
@@ -1551,6 +1663,7 @@ export function fromIOMaybe<R, E, A>(fa: IO<R, Maybe<E>, A>): Stream<R, E, A> {
1551
1663
 
1552
1664
  function fromAsyncIterableLoop<A>(
1553
1665
  iterator: AsyncIterator<A>,
1666
+ __tsplusTrace?: string,
1554
1667
  ): Channel<unknown, unknown, unknown, unknown, never, Conc<A>, unknown> {
1555
1668
  return Channel.unwrap(
1556
1669
  IO.async<unknown, never, Channel<unknown, unknown, unknown, unknown, never, Conc<A>, unknown>>((k) => {
@@ -1568,14 +1681,18 @@ function fromAsyncIterableLoop<A>(
1568
1681
  /**
1569
1682
  * @tsplus static fncts.io.StreamOps fromAsyncIterable
1570
1683
  */
1571
- export function fromAsyncIterable<A>(iterable: AsyncIterable<A>): Stream<unknown, never, A> {
1684
+ export function fromAsyncIterable<A>(iterable: AsyncIterable<A>, __tsplusTrace?: string): Stream<unknown, never, A> {
1572
1685
  return new Stream(fromAsyncIterableLoop(iterable[Symbol.asyncIterator]()));
1573
1686
  }
1574
1687
 
1575
1688
  /**
1576
1689
  * @tsplus static fncts.io.StreamOps fromIterable
1577
1690
  */
1578
- export function fromIterable<A>(iterable: Iterable<A>, maxChunkSize = DEFAULT_CHUNK_SIZE): Stream<unknown, never, A> {
1691
+ export function fromIterable<A>(
1692
+ iterable: Iterable<A>,
1693
+ maxChunkSize = DEFAULT_CHUNK_SIZE,
1694
+ __tsplusTrace?: string,
1695
+ ): Stream<unknown, never, A> {
1579
1696
  return Stream.unwrap(
1580
1697
  IO.succeed(() => {
1581
1698
  const loop = (iterator: Iterator<A>): Channel<unknown, unknown, unknown, unknown, never, Conc<A>, unknown> =>
@@ -1607,7 +1724,7 @@ export function fromIterable<A>(iterable: Iterable<A>, maxChunkSize = DEFAULT_CH
1607
1724
  /**
1608
1725
  * @tsplus static fncts.io.StreamOps fromIterableSingle
1609
1726
  */
1610
- export function fromIterableSingle<A>(iterable: Iterable<A>): Stream<unknown, never, A> {
1727
+ export function fromIterableSingle<A>(iterable: Iterable<A>, __tsplusTrace?: string): Stream<unknown, never, A> {
1611
1728
  return Stream.fromIO(IO.succeed(iterable[Symbol.iterator]())).flatMap((iterator) =>
1612
1729
  Stream.repeatIOMaybe(
1613
1730
  IO.defer(() => {
@@ -1625,7 +1742,10 @@ export function fromIterableSingle<A>(iterable: Iterable<A>): Stream<unknown, ne
1625
1742
  /**
1626
1743
  * @tsplus static fncts.io.StreamOps fromPull
1627
1744
  */
1628
- export function fromPull<R, E, A>(scopedPull: IO<R, never, IO<R, Maybe<E>, Conc<A>>>): Stream<Exclude<R, Scope>, E, A> {
1745
+ export function fromPull<R, E, A>(
1746
+ scopedPull: IO<R, never, IO<R, Maybe<E>, Conc<A>>>,
1747
+ __tsplusTrace?: string,
1748
+ ): Stream<Exclude<R, Scope>, E, A> {
1629
1749
  return Stream.unwrapScoped(scopedPull.map((pull) => Stream.repeatIOChunkMaybe(pull))) as Stream<
1630
1750
  Exclude<R, Scope>,
1631
1751
  E,
@@ -1641,6 +1761,7 @@ export function fromPull<R, E, A>(scopedPull: IO<R, never, IO<R, Maybe<E>, Conc<
1641
1761
  export function fromQueue_<R, E, O>(
1642
1762
  queue: PQueue<never, R, unknown, E, never, O>,
1643
1763
  maxChunkSize: number = DEFAULT_CHUNK_SIZE,
1764
+ __tsplusTrace?: string,
1644
1765
  ): Stream<R, E, O> {
1645
1766
  return repeatIOChunkMaybe(
1646
1767
  queue
@@ -1664,6 +1785,7 @@ export function fromQueue_<R, E, O>(
1664
1785
  export function fromQueueWithShutdown<R, E, A>(
1665
1786
  queue: PQueue<never, R, unknown, E, never, A>,
1666
1787
  maxChunkSize: number = DEFAULT_CHUNK_SIZE,
1788
+ __tsplusTrace?: string,
1667
1789
  ): Stream<R, E, A> {
1668
1790
  return Stream.fromQueue(queue, maxChunkSize).ensuring(queue.shutdown);
1669
1791
  }
@@ -1673,7 +1795,7 @@ export function fromQueueWithShutdown<R, E, A>(
1673
1795
  *
1674
1796
  * @tsplus static fncts.io.StreamOps haltNow
1675
1797
  */
1676
- export function haltNow(u: unknown): Stream<never, never, never> {
1798
+ export function haltNow(u: unknown, __tsplusTrace?: string): Stream<never, never, never> {
1677
1799
  return new Stream(Channel.halt(u));
1678
1800
  }
1679
1801
 
@@ -1682,12 +1804,13 @@ export function haltNow(u: unknown): Stream<never, never, never> {
1682
1804
  *
1683
1805
  * @tsplus static fncts.io.StreamOps halt
1684
1806
  */
1685
- export function halt(u: Lazy<unknown>): Stream<never, never, never> {
1807
+ export function halt(u: Lazy<unknown>, __tsplusTrace?: string): Stream<never, never, never> {
1686
1808
  return new Stream(Channel.halt(u));
1687
1809
  }
1688
1810
 
1689
1811
  function haltWhenWriter<E, A, E1>(
1690
1812
  fiber: Fiber<E1, any>,
1813
+ __tsplusTrace?: string,
1691
1814
  ): Channel<never, E | E1, Conc<A>, unknown, E | E1, Conc<A>, void> {
1692
1815
  return Channel.unwrap(
1693
1816
  fiber.poll.map((maybeExit) =>
@@ -1716,12 +1839,17 @@ function haltWhenWriter<E, A, E1>(
1716
1839
  *
1717
1840
  * @tsplus fluent fncts.io.Stream haltWhen
1718
1841
  */
1719
- export function haltWhen_<R, E, A, R1, E1>(fa: Stream<R, E, A>, io: IO<R1, E1, any>): Stream<R | R1, E | E1, A> {
1842
+ export function haltWhen_<R, E, A, R1, E1>(
1843
+ fa: Stream<R, E, A>,
1844
+ io: IO<R1, E1, any>,
1845
+ __tsplusTrace?: string,
1846
+ ): Stream<R | R1, E | E1, A> {
1720
1847
  return new Stream(Channel.unwrapScoped(io.forkScoped.map((fiber) => fa.channel.pipeTo(haltWhenWriter(fiber)))));
1721
1848
  }
1722
1849
 
1723
1850
  function haltWhenFutureWriter<R, E, A, E1>(
1724
1851
  future: Future<E1, unknown>,
1852
+ __tsplusTrace?: string,
1725
1853
  ): Channel<R, E | E1, Conc<A>, unknown, E | E1, Conc<A>, void> {
1726
1854
  return Channel.unwrap(
1727
1855
  future.poll.map((maybeIO) =>
@@ -1745,7 +1873,11 @@ function haltWhenFutureWriter<R, E, A, E1>(
1745
1873
  *
1746
1874
  * @tsplus fluent fncts.io.Stream haltWhen
1747
1875
  */
1748
- export function haltWhenFuture_<R, E, A, E1>(fa: Stream<R, E, A>, future: Future<E1, any>): Stream<R, E | E1, A> {
1876
+ export function haltWhenFuture_<R, E, A, E1>(
1877
+ fa: Stream<R, E, A>,
1878
+ future: Future<E1, any>,
1879
+ __tsplusTrace?: string,
1880
+ ): Stream<R, E | E1, A> {
1749
1881
  return new Stream(fa.channel.pipeTo(haltWhenFutureWriter(future)));
1750
1882
  }
1751
1883
 
@@ -1755,11 +1887,15 @@ export function haltWhenFuture_<R, E, A, E1>(fa: Stream<R, E, A>, future: Future
1755
1887
  export function interleave_<R, E, A, R1, E1, B>(
1756
1888
  sa: Stream<R, E, A>,
1757
1889
  sb: Stream<R1, E1, B>,
1890
+ __tsplusTrace?: string,
1758
1891
  ): Stream<R | R1, E | E1, A | B> {
1759
1892
  return sa.interleaveWith(sb, Stream.fromChunk(Conc(true, false)).forever);
1760
1893
  }
1761
1894
 
1762
- function interleaveWithProducer<E, A>(handoff: Handoff<Take<E, A>>): Channel<never, E, A, unknown, never, never, void> {
1895
+ function interleaveWithProducer<E, A>(
1896
+ handoff: Handoff<Take<E, A>>,
1897
+ __tsplusTrace?: string,
1898
+ ): Channel<never, E, A, unknown, never, never, void> {
1763
1899
  return Channel.readWithCause(
1764
1900
  (value: A) => Channel.fromIO(handoff.offer(Take.single(value))).apSecond(interleaveWithProducer(handoff)),
1765
1901
  (cause) => Channel.fromIO(handoff.offer(Take.failCause(cause))),
@@ -1781,6 +1917,7 @@ export function interleaveWith_<R, E, A, R1, E1, B, R2, E2>(
1781
1917
  sa: Stream<R, E, A>,
1782
1918
  sb: Stream<R1, E1, B>,
1783
1919
  b: Stream<R2, E2, boolean>,
1920
+ __tsplusTrace?: string,
1784
1921
  ): Stream<R | R1 | R2, E | E1 | E2, A | B> {
1785
1922
  return new Stream(
1786
1923
  Channel.unwrapScoped(
@@ -1825,6 +1962,7 @@ export function interleaveWith_<R, E, A, R1, E1, B, R2, E2>(
1825
1962
  function intersperseWriter<R, E, A, A1>(
1826
1963
  middle: A1,
1827
1964
  isFirst: boolean,
1965
+ __tsplusTrace?: string,
1828
1966
  ): Channel<R, E, Conc<A>, unknown, E, Conc<A | A1>, void> {
1829
1967
  return Channel.readWith(
1830
1968
  (inp: Conc<A>) => {
@@ -1849,7 +1987,11 @@ function intersperseWriter<R, E, A, A1>(
1849
1987
  /**
1850
1988
  * Intersperse stream with provided element
1851
1989
  */
1852
- export function intersperse_<R, E, A, A1>(stream: Stream<R, E, A>, middle: A1): Stream<R, E, A | A1> {
1990
+ export function intersperse_<R, E, A, A1>(
1991
+ stream: Stream<R, E, A>,
1992
+ middle: A1,
1993
+ __tsplusTrace?: string,
1994
+ ): Stream<R, E, A | A1> {
1853
1995
  return new Stream(stream.channel.pipeTo(intersperseWriter(middle, true)));
1854
1996
  }
1855
1997
 
@@ -1866,6 +2008,7 @@ export function intersperse_<R, E, A, A1>(stream: Stream<R, E, A>, middle: A1):
1866
2008
  export function interruptWhen_<R, E, A, R1, E1>(
1867
2009
  stream: Stream<R, E, A>,
1868
2010
  io: IO<R1, E1, any>,
2011
+ __tsplusTrace?: string,
1869
2012
  ): Stream<R | R1, E | E1, A> {
1870
2013
  return new Stream(stream.channel.interruptWhen(io));
1871
2014
  }
@@ -1876,6 +2019,7 @@ export function interruptWhen_<R, E, A, R1, E1>(
1876
2019
  export function interruptWhenFuture_<R, E, A, E1>(
1877
2020
  fa: Stream<R, E, A>,
1878
2021
  future: Future<E1, unknown>,
2022
+ __tsplusTrace?: string,
1879
2023
  ): Stream<R, E | E1, A> {
1880
2024
  return new Stream(fa.channel.interruptWhen(future));
1881
2025
  }
@@ -1885,13 +2029,14 @@ export function interruptWhenFuture_<R, E, A, E1>(
1885
2029
  *
1886
2030
  * @tsplus fluent fncts.io.Stream map
1887
2031
  */
1888
- export function map_<R, E, A, B>(stream: Stream<R, E, A>, f: (o: A) => B): Stream<R, E, B> {
2032
+ export function map_<R, E, A, B>(stream: Stream<R, E, A>, f: (o: A) => B, __tsplusTrace?: string): Stream<R, E, B> {
1889
2033
  return new Stream(stream.channel.mapOut((as) => as.map(f)));
1890
2034
  }
1891
2035
 
1892
2036
  function mapAccumAccumulator<S, E = never, A = never, B = never>(
1893
2037
  currS: S,
1894
2038
  f: (s: S, a: A) => readonly [S, B],
2039
+ __tsplusTrace?: string,
1895
2040
  ): Channel<never, E, Conc<A>, unknown, E, Conc<B>, void> {
1896
2041
  return Channel.readWith(
1897
2042
  (inp: Conc<A>) => {
@@ -1912,6 +2057,7 @@ export function mapAccum_<R, E, A, S, B>(
1912
2057
  stream: Stream<R, E, A>,
1913
2058
  s: S,
1914
2059
  f: (s: S, a: A) => readonly [S, B],
2060
+ __tsplusTrace?: string,
1915
2061
  ): Stream<R, E, B> {
1916
2062
  return new Stream(stream.channel.pipeTo(mapAccumAccumulator(s, f)));
1917
2063
  }
@@ -1919,6 +2065,7 @@ export function mapAccum_<R, E, A, S, B>(
1919
2065
  function mapAccumIOAccumulator<R, E, A, R1, E1, S, B>(
1920
2066
  s: S,
1921
2067
  f: (s: S, a: A) => IO<R1, E1, readonly [B, S]>,
2068
+ __tsplusTrace?: string,
1922
2069
  ): Channel<R | R1, E, Conc<A>, unknown, E | E1, Conc<B>, void> {
1923
2070
  return Channel.readWith(
1924
2071
  (inp: Conc<A>) =>
@@ -1936,7 +2083,7 @@ function mapAccumIOAccumulator<R, E, A, R1, E1, S, B>(
1936
2083
  ? Channel.writeNow(partialResult).apSecond(Channel.failNow(e))
1937
2084
  : Channel.failNow(e);
1938
2085
  },
1939
- (s) => Channel.writeNow(outputChunk.result()).apSecond(mapAccumIOAccumulator(s, f)),
2086
+ (s) => Channel.writeNow(outputChunk.result()).apSecond(mapAccumIOAccumulator<R, E, A, R1, E1, S, B>(s, f)),
1940
2087
  );
1941
2088
  }),
1942
2089
  ),
@@ -1955,6 +2102,7 @@ export function mapAccumIO_<R, E, A, R1, E1, S, B>(
1955
2102
  stream: Stream<R, E, A>,
1956
2103
  s: S,
1957
2104
  f: (s: S, a: A) => IO<R1, E1, readonly [B, S]>,
2105
+ __tsplusTrace?: string,
1958
2106
  ): Stream<R | R1, E | E1, B> {
1959
2107
  return new Stream(stream.channel.pipeTo(mapAccumIOAccumulator(s, f)));
1960
2108
  }
@@ -1964,7 +2112,11 @@ export function mapAccumIO_<R, E, A, R1, E1, S, B>(
1964
2112
  *
1965
2113
  * @tsplus fluent fncts.io.Stream mapChunks
1966
2114
  */
1967
- export function mapChunks_<R, E, A, A1>(stream: Stream<R, E, A>, f: (chunk: Conc<A>) => Conc<A1>): Stream<R, E, A1> {
2115
+ export function mapChunks_<R, E, A, A1>(
2116
+ stream: Stream<R, E, A>,
2117
+ f: (chunk: Conc<A>) => Conc<A1>,
2118
+ __tsplusTrace?: string,
2119
+ ): Stream<R, E, A1> {
1968
2120
  return new Stream(stream.channel.mapOut(f));
1969
2121
  }
1970
2122
 
@@ -1976,6 +2128,7 @@ export function mapChunks_<R, E, A, A1>(stream: Stream<R, E, A>, f: (chunk: Conc
1976
2128
  export function mapChunksIO_<R, E, A, R1, E1, B>(
1977
2129
  stream: Stream<R, E, A>,
1978
2130
  f: (chunk: Conc<A>) => IO<R1, E1, Conc<B>>,
2131
+ __tsplusTrace?: string,
1979
2132
  ): Stream<R | R1, E | E1, B> {
1980
2133
  return new Stream(stream.channel.mapOutIO(f));
1981
2134
  }
@@ -1986,7 +2139,11 @@ export function mapChunksIO_<R, E, A, R1, E1, B>(
1986
2139
  *
1987
2140
  * @tsplus fluent fncts.io.Stream mapConcat
1988
2141
  */
1989
- export function mapConcat_<R, E, A, B>(stream: Stream<R, E, A>, f: (a: A) => Iterable<B>): Stream<R, E, B> {
2142
+ export function mapConcat_<R, E, A, B>(
2143
+ stream: Stream<R, E, A>,
2144
+ f: (a: A) => Iterable<B>,
2145
+ __tsplusTrace?: string,
2146
+ ): Stream<R, E, B> {
1990
2147
  return stream.mapConcatChunk((a) => Conc.from(f(a)));
1991
2148
  }
1992
2149
 
@@ -1996,7 +2153,11 @@ export function mapConcat_<R, E, A, B>(stream: Stream<R, E, A>, f: (a: A) => Ite
1996
2153
  *
1997
2154
  * @tsplus fluent fncts.io.Stream mapConcatChunk
1998
2155
  */
1999
- export function mapConcatChunk_<R, E, A, B>(stream: Stream<R, E, A>, f: (a: A) => Conc<B>): Stream<R, E, B> {
2156
+ export function mapConcatChunk_<R, E, A, B>(
2157
+ stream: Stream<R, E, A>,
2158
+ f: (a: A) => Conc<B>,
2159
+ __tsplusTrace?: string,
2160
+ ): Stream<R, E, B> {
2000
2161
  return stream.mapChunks((c) => c.flatMap(f));
2001
2162
  }
2002
2163
 
@@ -2009,6 +2170,7 @@ export function mapConcatChunk_<R, E, A, B>(stream: Stream<R, E, A>, f: (a: A) =
2009
2170
  export function mapConcatChunkIO_<R, E, A, R1, E1, B>(
2010
2171
  stream: Stream<R, E, A>,
2011
2172
  f: (a: A) => IO<R1, E1, Conc<B>>,
2173
+ __tsplusTrace?: string,
2012
2174
  ): Stream<R | R1, E | E1, B> {
2013
2175
  return stream.mapIO(f).mapConcatChunk(identity);
2014
2176
  }
@@ -2022,6 +2184,7 @@ export function mapConcatChunkIO_<R, E, A, R1, E1, B>(
2022
2184
  export function mapConcatIO_<R, E, A, R1, E1, B>(
2023
2185
  stream: Stream<R, E, A>,
2024
2186
  f: (a: A) => IO<R1, E1, Iterable<B>>,
2187
+ __tsplusTrace?: string,
2025
2188
  ): Stream<R | R1, E | E1, B> {
2026
2189
  return stream.mapIO((a) => f(a).map(Conc.from)).mapConcatChunk(identity);
2027
2190
  }
@@ -2031,7 +2194,11 @@ export function mapConcatIO_<R, E, A, R1, E1, B>(
2031
2194
  *
2032
2195
  * @tsplus fluent fncts.io.Stream mapError
2033
2196
  */
2034
- export function mapError_<R, E, E1, A>(stream: Stream<R, E, A>, f: (e: E) => E1): Stream<R, E1, A> {
2197
+ export function mapError_<R, E, E1, A>(
2198
+ stream: Stream<R, E, A>,
2199
+ f: (e: E) => E1,
2200
+ __tsplusTrace?: string,
2201
+ ): Stream<R, E1, A> {
2035
2202
  return new Stream(stream.channel.mapError(f));
2036
2203
  }
2037
2204
 
@@ -2040,7 +2207,11 @@ export function mapError_<R, E, E1, A>(stream: Stream<R, E, A>, f: (e: E) => E1)
2040
2207
  *
2041
2208
  * @tsplus fluent fncts.io.Stream mapErrorCause
2042
2209
  */
2043
- export function mapErrorCause_<R, E, A, E1>(fa: Stream<R, E, A>, f: (e: Cause<E>) => Cause<E1>): Stream<R, E1, A> {
2210
+ export function mapErrorCause_<R, E, A, E1>(
2211
+ fa: Stream<R, E, A>,
2212
+ f: (e: Cause<E>) => Cause<E1>,
2213
+ __tsplusTrace?: string,
2214
+ ): Stream<R, E1, A> {
2044
2215
  return new Stream(fa.channel.mapErrorCause(f));
2045
2216
  }
2046
2217
 
@@ -2052,6 +2223,7 @@ export function mapErrorCause_<R, E, A, E1>(fa: Stream<R, E, A>, f: (e: Cause<E>
2052
2223
  export function mapIO_<R, E, A, R1, E1, B>(
2053
2224
  stream: Stream<R, E, A>,
2054
2225
  f: (a: A) => IO<R1, E1, B>,
2226
+ __tsplusTrace?: string,
2055
2227
  ): Stream<R | R1, E | E1, B> {
2056
2228
  return new Stream(stream.channel.pipeTo(mapIOLoop(Iterable.empty<A>()[Symbol.iterator](), f)));
2057
2229
  }
@@ -2059,6 +2231,7 @@ export function mapIO_<R, E, A, R1, E1, B>(
2059
2231
  function mapIOLoop<R, E, A, R1, E1, B>(
2060
2232
  iterator: Iterator<A>,
2061
2233
  f: (a: A) => IO<R1, E1, B>,
2234
+ __tsplusTrace?: string,
2062
2235
  ): Channel<R | R1, E, Conc<A>, unknown, E | E1, Conc<B>, unknown> {
2063
2236
  const next = iterator.next();
2064
2237
  if (next.done) {
@@ -2087,6 +2260,7 @@ export function mapIOC_<R, E, A, R1, E1, B>(
2087
2260
  stream: Stream<R, E, A>,
2088
2261
  n: number,
2089
2262
  f: (a: A) => IO<R1, E1, B>,
2263
+ __tsplusTrace?: string,
2090
2264
  ): Stream<R | R1, E | E1, B> {
2091
2265
  return new Stream(stream.channel.concatMap(Channel.writeChunk).mapOutIOC(n, f).mapOut(Conc.single));
2092
2266
  }
@@ -2104,6 +2278,7 @@ export function mergeMap_<R, E, A, R1, E1, B>(
2104
2278
  f: (a: A) => Stream<R1, E1, B>,
2105
2279
  n: number,
2106
2280
  bufferSize = 16,
2281
+ __tsplusTrace?: string,
2107
2282
  ): Stream<R | R1, E | E1, B> {
2108
2283
  return new Stream(ma.channel.concatMap(Channel.writeChunk).mergeMap((a) => f(a).channel, n, bufferSize));
2109
2284
  }
@@ -2120,6 +2295,7 @@ export function mergeMapIO_<R, E, A, R1, E1, B>(
2120
2295
  f: (a: A) => IO<R1, E1, B>,
2121
2296
  n: number,
2122
2297
  bufferSize = 16,
2298
+ __tsplusTrace?: string,
2123
2299
  ): Stream<R | R1, E | E1, B> {
2124
2300
  return stream.mergeMap((a) => Stream.fromIO(f(a)), n, bufferSize);
2125
2301
  }
@@ -2130,12 +2306,14 @@ export function mergeMapIO_<R, E, A, R1, E1, B>(
2130
2306
  export function mergeEither_<R, E, A, R1, E1, B>(
2131
2307
  fa: Stream<R, E, A>,
2132
2308
  fb: Stream<R1, E1, B>,
2309
+ __tsplusTrace?: string,
2133
2310
  ): Stream<R | R1, E | E1, Either<A, B>> {
2134
2311
  return fa.mergeWith(fb, Either.left, Either.right);
2135
2312
  }
2136
2313
 
2137
2314
  export function mergeWithHandler<R, E>(
2138
2315
  terminate: boolean,
2316
+ __tsplusTrace?: string,
2139
2317
  ): (exit: Exit<E, unknown>) => MergeDecision<R, E, unknown, E, unknown> {
2140
2318
  return (exit) =>
2141
2319
  terminate || !exit.isSuccess() ? MergeDecision.Done(IO.fromExitNow(exit)) : MergeDecision.Await(IO.fromExitNow);
@@ -2152,6 +2330,7 @@ export function mergeWith_<R, E, A, R1, E1, A1, B, C>(
2152
2330
  l: (a: A) => B,
2153
2331
  r: (b: A1) => C,
2154
2332
  strategy: TerminationStrategy = "Both",
2333
+ __tsplusTrace?: string,
2155
2334
  ): Stream<R | R1, E | E1, B | C> {
2156
2335
  return new Stream<R | R1, E | E1, B | C>(
2157
2336
  sa
@@ -2174,6 +2353,7 @@ export function mergeWith_<R, E, A, R1, E1, A1, B, C>(
2174
2353
  export function onError_<R, E, A, R1>(
2175
2354
  stream: Stream<R, E, A>,
2176
2355
  cleanup: (e: Cause<E>) => IO<R1, never, any>,
2356
+ __tsplusTrace?: string,
2177
2357
  ): Stream<R | R1, E, A> {
2178
2358
  return stream.catchAllCause((cause) => fromIO(cleanup(cause).apSecond(IO.failCauseNow(cause))));
2179
2359
  }
@@ -2188,6 +2368,7 @@ export function onError_<R, E, A, R1>(
2188
2368
  export function orElse_<R, E, A, R1, E1, A1>(
2189
2369
  stream: Stream<R, E, A>,
2190
2370
  that: Lazy<Stream<R1, E1, A1>>,
2371
+ __tsplusTrace?: string,
2191
2372
  ): Stream<R | R1, E1, A | A1> {
2192
2373
  return new Stream<R | R1, E1, A | A1>(stream.channel.orElse(that().channel));
2193
2374
  }
@@ -2202,6 +2383,7 @@ export function orElse_<R, E, A, R1, E1, A1>(
2202
2383
  export function orElseEither_<R, E, A, R1, E1, A1>(
2203
2384
  stream: Stream<R, E, A>,
2204
2385
  that: Lazy<Stream<R1, E1, A1>>,
2386
+ __tsplusTrace?: string,
2205
2387
  ): Stream<R | R1, E1, Either<A, A1>> {
2206
2388
  return stream.map(Either.left).orElse(that().map(Either.right));
2207
2389
  }
@@ -2213,7 +2395,11 @@ export function orElseEither_<R, E, A, R1, E1, A1>(
2213
2395
  *
2214
2396
  * @tsplus fluent fncts.io.Stream orElseFail
2215
2397
  */
2216
- export function orElseFail_<R, E, A, E1>(stream: Stream<R, E, A>, e: Lazy<E1>): Stream<R, E1, A> {
2398
+ export function orElseFail_<R, E, A, E1>(
2399
+ stream: Stream<R, E, A>,
2400
+ e: Lazy<E1>,
2401
+ __tsplusTrace?: string,
2402
+ ): Stream<R, E1, A> {
2217
2403
  return stream.orElse(Stream.failNow(e()));
2218
2404
  }
2219
2405
 
@@ -2225,6 +2411,7 @@ export function orElseFail_<R, E, A, E1>(stream: Stream<R, E, A>, e: Lazy<E1>):
2225
2411
  export function orElseOptional_<R, E, A, R1, E1, A1>(
2226
2412
  stream: Stream<R, Maybe<E>, A>,
2227
2413
  that: Lazy<Stream<R1, Maybe<E1>, A1>>,
2414
+ __tsplusTrace?: string,
2228
2415
  ): Stream<R | R1, Maybe<E | E1>, A | A1> {
2229
2416
  return stream.catchAll((maybeError) =>
2230
2417
  maybeError.match(
@@ -2239,7 +2426,11 @@ export function orElseOptional_<R, E, A, R1, E1, A1>(
2239
2426
  *
2240
2427
  * @tsplus fluent fncts.io.Stream orElseSucceed
2241
2428
  */
2242
- export function orElseSucceed_<R, E, A, A1>(stream: Stream<R, E, A>, a: Lazy<A1>): Stream<R, never, A | A1> {
2429
+ export function orElseSucceed_<R, E, A, A1>(
2430
+ stream: Stream<R, E, A>,
2431
+ a: Lazy<A1>,
2432
+ __tsplusTrace?: string,
2433
+ ): Stream<R, never, A | A1> {
2243
2434
  return stream.orElse(Stream.succeedNow(a()));
2244
2435
  }
2245
2436
 
@@ -2249,6 +2440,7 @@ export function orElseSucceed_<R, E, A, A1>(stream: Stream<R, E, A>, a: Lazy<A1>
2249
2440
  export function pipeThrough_<R, E, A, R1, E1, L, Z>(
2250
2441
  ma: Stream<R, E, A>,
2251
2442
  sa: Sink<R1, E1, A, L, Z>,
2443
+ __tsplusTrace?: string,
2252
2444
  ): Stream<R | R1, E | E1, L> {
2253
2445
  return new Stream(ma.channel.pipeToOrFail(sa.channel));
2254
2446
  }
@@ -2259,7 +2451,11 @@ export function pipeThrough_<R, E, A, R1, E1, L, Z>(
2259
2451
  *
2260
2452
  * @tsplus fluent fncts.io.Stream provideEnvironment
2261
2453
  */
2262
- export function provideEnvironment_<R, E, A>(ra: Stream<R, E, A>, r: Environment<R>): Stream<never, E, A> {
2454
+ export function provideEnvironment_<R, E, A>(
2455
+ ra: Stream<R, E, A>,
2456
+ r: Environment<R>,
2457
+ __tsplusTrace?: string,
2458
+ ): Stream<never, E, A> {
2263
2459
  return new Stream(ra.channel.provideEnvironment(r));
2264
2460
  }
2265
2461
 
@@ -2324,6 +2520,7 @@ class Rechunker<A> {
2324
2520
  function rechunkProcess<E, In>(
2325
2521
  rechunker: Rechunker<In>,
2326
2522
  target: number,
2523
+ __tsplusTrace?: string,
2327
2524
  ): Channel<never, E, Conc<In>, unknown, E, Conc<In>, unknown> {
2328
2525
  return Channel.readWithCause(
2329
2526
  (chunk: Conc<In>) => {
@@ -2361,7 +2558,7 @@ function rechunkProcess<E, In>(
2361
2558
  *
2362
2559
  * @tsplus fluent fncts.io.Stream rechunk
2363
2560
  */
2364
- export function rechunk_<R, E, A>(stream: Stream<R, E, A>, n: number): Stream<R, E, A> {
2561
+ export function rechunk_<R, E, A>(stream: Stream<R, E, A>, n: number, __tsplusTrace?: string): Stream<R, E, A> {
2365
2562
  return new Stream(stream.channel.pipeTo(rechunkProcess(new Rechunker(n), n)));
2366
2563
  }
2367
2564
 
@@ -2370,7 +2567,7 @@ export function rechunk_<R, E, A>(stream: Stream<R, E, A>, n: number): Stream<R,
2370
2567
  *
2371
2568
  * @tsplus static fncts.io.StreamOps repeatValue
2372
2569
  */
2373
- export function repeatValue<A>(a: A): Stream<unknown, never, A> {
2570
+ export function repeatValue<A>(a: A, __tsplusTrace?: string): Stream<unknown, never, A> {
2374
2571
  return new Stream(Channel.writeNow(Conc.single(a)).repeated);
2375
2572
  }
2376
2573
 
@@ -2379,7 +2576,7 @@ export function repeatValue<A>(a: A): Stream<unknown, never, A> {
2379
2576
  *
2380
2577
  * @tsplus static fncts.io.StreamOps repeatIO
2381
2578
  */
2382
- export function repeatIO<R, E, A>(fa: IO<R, E, A>): Stream<R, E, A> {
2579
+ export function repeatIO<R, E, A>(fa: IO<R, E, A>, __tsplusTrace?: string): Stream<R, E, A> {
2383
2580
  return Stream.repeatIOMaybe(fa.mapError(Maybe.just));
2384
2581
  }
2385
2582
 
@@ -2388,7 +2585,7 @@ export function repeatIO<R, E, A>(fa: IO<R, E, A>): Stream<R, E, A> {
2388
2585
  *
2389
2586
  * @tsplus static fncts.io.StreamOps repeatIOMaybe
2390
2587
  */
2391
- export function repeatIOMaybe<R, E, A>(fa: IO<R, Maybe<E>, A>): Stream<R, E, A> {
2588
+ export function repeatIOMaybe<R, E, A>(fa: IO<R, Maybe<E>, A>, __tsplusTrace?: string): Stream<R, E, A> {
2392
2589
  return repeatIOChunkMaybe(fa.map(Conc.single));
2393
2590
  }
2394
2591
 
@@ -2397,7 +2594,7 @@ export function repeatIOMaybe<R, E, A>(fa: IO<R, Maybe<E>, A>): Stream<R, E, A>
2397
2594
  *
2398
2595
  * @tsplus static fncts.io.StreamOps repeatIOChunk
2399
2596
  */
2400
- export function repeatIOChunk<R, E, A>(fa: IO<R, E, Conc<A>>): Stream<R, E, A> {
2597
+ export function repeatIOChunk<R, E, A>(fa: IO<R, E, Conc<A>>, __tsplusTrace?: string): Stream<R, E, A> {
2401
2598
  return repeatIOChunkMaybe(fa.mapError(Maybe.just));
2402
2599
  }
2403
2600
 
@@ -2406,7 +2603,7 @@ export function repeatIOChunk<R, E, A>(fa: IO<R, E, Conc<A>>): Stream<R, E, A> {
2406
2603
  *
2407
2604
  * @tsplus static fncts.io.StreamOps repeatIOChunkMaybe
2408
2605
  */
2409
- export function repeatIOChunkMaybe<R, E, A>(fa: IO<R, Maybe<E>, Conc<A>>): Stream<R, E, A> {
2606
+ export function repeatIOChunkMaybe<R, E, A>(fa: IO<R, Maybe<E>, Conc<A>>, __tsplusTrace?: string): Stream<R, E, A> {
2410
2607
  return Stream.unfoldChunkIO(undefined, (_) =>
2411
2608
  fa
2412
2609
  .map((chunk) => Maybe.just(tuple(chunk, undefined)))
@@ -2422,6 +2619,7 @@ export function repeatIOChunkMaybe<R, E, A>(fa: IO<R, Maybe<E>, Conc<A>>): Strea
2422
2619
  export function run_<R, E, A, R2, E2, Z>(
2423
2620
  stream: Stream<R, E, A>,
2424
2621
  sink: Sink<R2, E2, A, unknown, Z>,
2622
+ __tsplusTrace?: string,
2425
2623
  ): IO<R | R2, E | E2, Z> {
2426
2624
  return stream.channel.pipeToOrFail(sink.channel).runDrain;
2427
2625
  }
@@ -2431,7 +2629,7 @@ export function run_<R, E, A, R2, E2, Z>(
2431
2629
  *
2432
2630
  * @tsplus getter fncts.io.Stream runCollect
2433
2631
  */
2434
- export function runCollect<R, E, A>(stream: Stream<R, E, A>): IO<R, E, Conc<A>> {
2632
+ export function runCollect<R, E, A>(stream: Stream<R, E, A>, __tsplusTrace?: string): IO<R, E, Conc<A>> {
2435
2633
  return stream.run(Sink.collectAll());
2436
2634
  }
2437
2635
 
@@ -2440,7 +2638,7 @@ export function runCollect<R, E, A>(stream: Stream<R, E, A>): IO<R, E, Conc<A>>
2440
2638
  *
2441
2639
  * @tsplus getter fncts.io.Stream runDrain
2442
2640
  */
2443
- export function runDrain<R, E, A>(stream: Stream<R, E, A>): IO<R, E, void> {
2641
+ export function runDrain<R, E, A>(stream: Stream<R, E, A>, __tsplusTrace?: string): IO<R, E, void> {
2444
2642
  return stream.run(Sink.drain);
2445
2643
  }
2446
2644
 
@@ -2450,6 +2648,7 @@ export function runDrain<R, E, A>(stream: Stream<R, E, A>): IO<R, E, void> {
2450
2648
  export function runForeachScoped_<R, E, A, R2, E2>(
2451
2649
  self: Stream<R, E, A>,
2452
2650
  f: (a: A) => IO<R2, E2, any>,
2651
+ __tsplusTrace?: string,
2453
2652
  ): IO<R | R2 | Scope, E | E2, void> {
2454
2653
  return self.runScoped(Sink.foreach(f));
2455
2654
  }
@@ -2463,6 +2662,7 @@ export function runForeachScoped_<R, E, A, R2, E2>(
2463
2662
  export function runIntoElementsScoped_<R, E, A, R1, E1>(
2464
2663
  stream: Stream<R, E, A>,
2465
2664
  queue: PQueue<R1, unknown, never, never, Exit<Maybe<E | E1>, A>, unknown>,
2665
+ __tsplusTrace?: string,
2466
2666
  ): IO<R | R1 | Scope, E | E1, void> {
2467
2667
  const writer: Channel<R | R1, E, Conc<A>, unknown, never, Exit<Maybe<E | E1>, A>, unknown> = Channel.readWith(
2468
2668
  (inp: Conc<A>) =>
@@ -2487,6 +2687,7 @@ export function runIntoElementsScoped_<R, E, A, R1, E1>(
2487
2687
  export function runIntoQueueScoped_<R, R1, E extends E1, E1, A>(
2488
2688
  stream: Stream<R, E, A>,
2489
2689
  queue: PQueue<R1, never, never, unknown, Take<E1, A>, any>,
2690
+ __tsplusTrace?: string,
2490
2691
  ): IO<R | R1 | Scope, E | E1, void> {
2491
2692
  const writer: Channel<R, E, Conc<A>, unknown, E, Take<E | E1, A>, any> = Channel.readWithCause(
2492
2693
  (inp) => Channel.writeNow(Take.chunk(inp)).apSecond(writer),
@@ -2506,6 +2707,7 @@ export function runIntoQueueScoped_<R, R1, E extends E1, E1, A>(
2506
2707
  export function runIntoHubScoped_<R, R1, E extends E1, E1, A>(
2507
2708
  stream: Stream<R, E, A>,
2508
2709
  hub: PHub<R1, never, never, unknown, Take<E1, A>, any>,
2710
+ __tsplusTrace?: string,
2509
2711
  ): IO<R | R1 | Scope, E | E1, void> {
2510
2712
  return stream.runIntoQueueScoped(hub.toQueue);
2511
2713
  }
@@ -2518,6 +2720,7 @@ export function runIntoHubScoped_<R, R1, E extends E1, E1, A>(
2518
2720
  export function runScoped_<R, E, A, R2, E2, Z>(
2519
2721
  stream: Stream<R, E, A>,
2520
2722
  sink: Sink<R2, E2, A, unknown, Z>,
2723
+ __tsplusTrace?: string,
2521
2724
  ): IO<R | R2 | Scope, E | E2, Z> {
2522
2725
  return stream.channel.pipeToOrFail(sink.channel).drain.runScoped;
2523
2726
  }
@@ -2528,7 +2731,12 @@ export function runScoped_<R, E, A, R2, E2, Z>(
2528
2731
  *
2529
2732
  * @tsplus fluent fncts.io.Stream scan
2530
2733
  */
2531
- export function scan_<R, E, A, B>(sa: Stream<R, E, A>, b: B, f: (b: B, a: A) => B): Stream<R, E, B> {
2734
+ export function scan_<R, E, A, B>(
2735
+ sa: Stream<R, E, A>,
2736
+ b: B,
2737
+ f: (b: B, a: A) => B,
2738
+ __tsplusTrace?: string,
2739
+ ): Stream<R, E, B> {
2532
2740
  return sa.scanIO(b, (b, a) => IO.succeedNow(f(b, a)));
2533
2741
  }
2534
2742
 
@@ -2542,6 +2750,7 @@ export function scanIO_<R, E, A, R1, E1, B>(
2542
2750
  sa: Stream<R, E, A>,
2543
2751
  b: B,
2544
2752
  f: (b: B, a: A) => IO<R1, E1, B>,
2753
+ __tsplusTrace?: string,
2545
2754
  ): Stream<R | R1, E | E1, B> {
2546
2755
  return Stream.succeedNow(b).concat(sa.mapAccumIO(b, (b, a) => f(b, a).map((b) => [b, b])));
2547
2756
  }
@@ -2552,7 +2761,11 @@ export function scanIO_<R, E, A, R1, E1, B>(
2552
2761
  *
2553
2762
  * @tsplus fluent fncts.io.Stream scanReduce
2554
2763
  */
2555
- export function scanReduce_<R, E, A extends B, B>(fa: Stream<R, E, A>, f: (b: B, a: A) => B): Stream<R, E, B> {
2764
+ export function scanReduce_<R, E, A extends B, B>(
2765
+ fa: Stream<R, E, A>,
2766
+ f: (b: B, a: A) => B,
2767
+ __tsplusTrace?: string,
2768
+ ): Stream<R, E, B> {
2556
2769
  return fa.scanReduceIO((b, a) => IO.succeedNow(f(b, a)));
2557
2770
  }
2558
2771
 
@@ -2565,6 +2778,7 @@ export function scanReduce_<R, E, A extends B, B>(fa: Stream<R, E, A>, f: (b: B,
2565
2778
  export function scanReduceIO_<R, E, A extends B, R1, E1, B>(
2566
2779
  fa: Stream<R, E, A>,
2567
2780
  f: (b: B, a: A) => IO<R1, E1, B>,
2781
+ __tsplusTrace?: string,
2568
2782
  ): Stream<R | R1, E | E1, B> {
2569
2783
  return fa.mapAccumIO(Nothing<B>(), (s, a) =>
2570
2784
  s.match(
@@ -2579,7 +2793,7 @@ export function scanReduceIO_<R, E, A extends B, R1, E1, B>(
2579
2793
  *
2580
2794
  * @tsplus static fncts.io.StreamOps succeedNow
2581
2795
  */
2582
- export function succeedNow<O>(o: O): Stream<never, never, O> {
2796
+ export function succeedNow<O>(o: O, __tsplusTrace?: string): Stream<never, never, O> {
2583
2797
  return fromChunkNow(Conc.single(o));
2584
2798
  }
2585
2799
 
@@ -2588,11 +2802,11 @@ export function succeedNow<O>(o: O): Stream<never, never, O> {
2588
2802
  *
2589
2803
  * @tsplus static fncts.io.StreamOps succeed
2590
2804
  */
2591
- export function succeed<A>(a: Lazy<A>): Stream<never, never, A> {
2805
+ export function succeed<A>(a: Lazy<A>, __tsplusTrace?: string): Stream<never, never, A> {
2592
2806
  return fromChunk(Conc.single(a()));
2593
2807
  }
2594
2808
 
2595
- function takeLoop<E, A>(n: number): Channel<never, E, Conc<A>, unknown, E, Conc<A>, unknown> {
2809
+ function takeLoop<E, A>(n: number, __tsplusTrace?: string): Channel<never, E, Conc<A>, unknown, E, Conc<A>, unknown> {
2596
2810
  return Channel.readWithCause(
2597
2811
  (inp) => {
2598
2812
  const taken = inp.take(n);
@@ -2613,7 +2827,7 @@ function takeLoop<E, A>(n: number): Channel<never, E, Conc<A>, unknown, E, Conc<
2613
2827
  *
2614
2828
  * @tsplus fluent fncts.io.Stream take
2615
2829
  */
2616
- export function take_<R, E, A>(stream: Stream<R, E, A>, n: number): Stream<R, E, A> {
2830
+ export function take_<R, E, A>(stream: Stream<R, E, A>, n: number, __tsplusTrace?: string): Stream<R, E, A> {
2617
2831
  if (n <= 0) {
2618
2832
  return empty;
2619
2833
  }
@@ -2629,6 +2843,7 @@ export function take_<R, E, A>(stream: Stream<R, E, A>, n: number): Stream<R, E,
2629
2843
  export function takeUntilIO_<R, E, A, R1, E1>(
2630
2844
  ma: Stream<R, E, A>,
2631
2845
  f: (a: A) => IO<R1, E1, boolean>,
2846
+ __tsplusTrace?: string,
2632
2847
  ): Stream<R | R1, E | E1, A> {
2633
2848
  return new Stream(ma.channel.pipeTo(takeUntilIOLoop(Iterable.empty<A>()[Symbol.iterator](), f)));
2634
2849
  }
@@ -2636,6 +2851,7 @@ export function takeUntilIO_<R, E, A, R1, E1>(
2636
2851
  function takeUntilIOLoop<E, A, R1, E1>(
2637
2852
  iterator: Iterator<A>,
2638
2853
  f: (a: A) => IO<R1, E1, boolean>,
2854
+ __tsplusTrace?: string,
2639
2855
  ): Channel<R1, E, Conc<A>, unknown, E | E1, Conc<A>, unknown> {
2640
2856
  const next = iterator.next();
2641
2857
  if (next.done) {
@@ -2655,7 +2871,10 @@ function takeUntilIOLoop<E, A, R1, E1>(
2655
2871
  }
2656
2872
  }
2657
2873
 
2658
- function takeUntilLoop<R, E, A>(p: Predicate<A>): Channel<R, E, Conc<A>, unknown, E, Conc<A>, unknown> {
2874
+ function takeUntilLoop<R, E, A>(
2875
+ p: Predicate<A>,
2876
+ __tsplusTrace?: string,
2877
+ ): Channel<R, E, Conc<A>, unknown, E, Conc<A>, unknown> {
2659
2878
  return Channel.readWith(
2660
2879
  (chunk: Conc<A>) => {
2661
2880
  const taken = chunk.takeWhile(p.invert);
@@ -2677,14 +2896,18 @@ function takeUntilLoop<R, E, A>(p: Predicate<A>): Channel<R, E, Conc<A>, unknown
2677
2896
  *
2678
2897
  * @tsplus fluent fncts.io.Stream takeUntil
2679
2898
  */
2680
- export function takeUntil_<R, E, A>(fa: Stream<R, E, A>, p: Predicate<A>): Stream<R, E, A> {
2899
+ export function takeUntil_<R, E, A>(fa: Stream<R, E, A>, p: Predicate<A>, __tsplusTrace?: string): Stream<R, E, A> {
2681
2900
  return new Stream(fa.channel.pipeTo(takeUntilLoop(p)));
2682
2901
  }
2683
2902
 
2684
2903
  /**
2685
2904
  * @tsplus fluent fncts.io.Stream tap
2686
2905
  */
2687
- export function tap_<R, E, A, R1, E1>(ma: Stream<R, E, A>, f: (a: A) => IO<R1, E1, any>): Stream<R | R1, E | E1, A> {
2906
+ export function tap_<R, E, A, R1, E1>(
2907
+ ma: Stream<R, E, A>,
2908
+ f: (a: A) => IO<R1, E1, any>,
2909
+ __tsplusTrace?: string,
2910
+ ): Stream<R | R1, E | E1, A> {
2688
2911
  return ma.mapIO((a) => f(a).as(a));
2689
2912
  }
2690
2913
 
@@ -2702,6 +2925,7 @@ export function throttleEnforce_<R, E, A>(
2702
2925
  units: number,
2703
2926
  duration: number,
2704
2927
  burst = 0,
2928
+ __tsplusTrace?: string,
2705
2929
  ): Stream<R, E, A> {
2706
2930
  return sa.throttleEnforceIO((chunk) => IO.succeedNow(costFn(chunk)), units, duration, burst);
2707
2931
  }
@@ -2713,6 +2937,7 @@ function throttleEnforceIOLoop<E, A, R1, E1>(
2713
2937
  burst: number,
2714
2938
  tokens: number,
2715
2939
  timestamp: number,
2940
+ __tsplusTrace?: string,
2716
2941
  ): Channel<R1, E | E1, Conc<A>, unknown, E | E1, Conc<A>, void> {
2717
2942
  return Channel.readWith(
2718
2943
  (inp: Conc<A>) =>
@@ -2729,9 +2954,9 @@ function throttleEnforceIOLoop<E, A, R1, E1>(
2729
2954
 
2730
2955
  return weight <= available
2731
2956
  ? Channel.writeNow(inp).apSecond(
2732
- throttleEnforceIOLoop(costFn, units, duration, burst, available - weight, current),
2957
+ throttleEnforceIOLoop<E, A, R1, E1>(costFn, units, duration, burst, available - weight, current),
2733
2958
  )
2734
- : throttleEnforceIOLoop(costFn, units, duration, burst, available - weight, current);
2959
+ : throttleEnforceIOLoop<E, A, R1, E1>(costFn, units, duration, burst, available - weight, current);
2735
2960
  }),
2736
2961
  ),
2737
2962
  Channel.failNow,
@@ -2753,6 +2978,7 @@ export function throttleEnforceIO_<R, E, A, R1, E1>(
2753
2978
  units: number,
2754
2979
  duration: number,
2755
2980
  burst = 0,
2981
+ __tsplusTrace?: string,
2756
2982
  ): Stream<R | R1, E | E1, A> {
2757
2983
  return new Stream(
2758
2984
  Channel.fromIO(Clock.currentTime).flatMap((current) =>
@@ -2767,7 +2993,11 @@ export function throttleEnforceIO_<R, E, A, R1, E1>(
2767
2993
  *
2768
2994
  * @tsplus fluent fncts.io.Stream toHub
2769
2995
  */
2770
- export function toHub_<R, E, A>(stream: Stream<R, E, A>, capacity: number): IO<R | Scope, never, Hub<Take<E, A>>> {
2996
+ export function toHub_<R, E, A>(
2997
+ stream: Stream<R, E, A>,
2998
+ capacity: number,
2999
+ __tsplusTrace?: string,
3000
+ ): IO<R | Scope, never, Hub<Take<E, A>>> {
2771
3001
  return Do((Δ) => {
2772
3002
  const hub = Δ(IO.acquireRelease(Hub.makeBounded<Take<E, A>>(capacity), (_) => _.shutdown));
2773
3003
  Δ(stream.runIntoHubScoped(hub).fork);
@@ -2780,7 +3010,10 @@ export function toHub_<R, E, A>(stream: Stream<R, E, A>, capacity: number): IO<R
2780
3010
  *
2781
3011
  * @tsplus getter fncts.io.Stream toPull
2782
3012
  */
2783
- export function toPull<R, E, A>(stream: Stream<R, E, A>): IO<R | Scope, never, IO<R, Maybe<E>, Conc<A>>> {
3013
+ export function toPull<R, E, A>(
3014
+ stream: Stream<R, E, A>,
3015
+ __tsplusTrace?: string,
3016
+ ): IO<R | Scope, never, IO<R, Maybe<E>, Conc<A>>> {
2784
3017
  return stream.channel.toPull.map((io) =>
2785
3018
  io.mapError(Maybe.just).flatMap((r) => r.match(() => IO.failNow(Nothing()), IO.succeedNow)),
2786
3019
  );
@@ -2792,7 +3025,11 @@ export function toPull<R, E, A>(stream: Stream<R, E, A>): IO<R | Scope, never, I
2792
3025
  *
2793
3026
  * @tsplus fluent fncts.io.Stream toQueue
2794
3027
  */
2795
- export function toQueue_<R, E, A>(stream: Stream<R, E, A>, capacity = 2): IO<R | Scope, never, Queue<Take<E, A>>> {
3028
+ export function toQueue_<R, E, A>(
3029
+ stream: Stream<R, E, A>,
3030
+ capacity = 2,
3031
+ __tsplusTrace?: string,
3032
+ ): IO<R | Scope, never, Queue<Take<E, A>>> {
2796
3033
  return Do((Δ) => {
2797
3034
  const queue = Δ(IO.acquireRelease(Queue.makeBounded<Take<E, A>>(capacity), (_) => _.shutdown));
2798
3035
  Δ(stream.runIntoQueueScoped(queue).fork);
@@ -2806,6 +3043,7 @@ export function toQueue_<R, E, A>(stream: Stream<R, E, A>, capacity = 2): IO<R |
2806
3043
  export function toQueueDropping_<R, E, A>(
2807
3044
  stream: Stream<R, E, A>,
2808
3045
  capacity = 2,
3046
+ __tsplusTrace?: string,
2809
3047
  ): IO<R | Scope, never, Queue.Dequeue<Take<E, A>>> {
2810
3048
  return Do((Δ) => {
2811
3049
  const queue = Δ(IO.acquireRelease(Queue.makeDropping<Take<E, A>>(capacity), (_) => _.shutdown));
@@ -2820,6 +3058,7 @@ export function toQueueDropping_<R, E, A>(
2820
3058
  export function toQueueOfElements_<R, E, A>(
2821
3059
  stream: Stream<R, E, A>,
2822
3060
  capacity = 2,
3061
+ __tsplusTrace?: string,
2823
3062
  ): IO<R | Scope, never, Queue.Dequeue<Exit<Maybe<E>, A>>> {
2824
3063
  return Do((Δ) => {
2825
3064
  const queue = Δ(IO.acquireRelease(Queue.makeBounded<Exit<Maybe<E>, A>>(capacity), (_) => _.shutdown));
@@ -2834,6 +3073,7 @@ export function toQueueOfElements_<R, E, A>(
2834
3073
  export function toQueueSliding_<R, E, A>(
2835
3074
  stream: Stream<R, E, A>,
2836
3075
  capacity = 2,
3076
+ __tsplusTrace?: string,
2837
3077
  ): IO<R | Scope, never, Queue.Dequeue<Take<E, A>>> {
2838
3078
  return Do((Δ) => {
2839
3079
  const queue = Δ(IO.acquireRelease(Queue.makeSliding<Take<E, A>>(capacity), (_) => _.shutdown));
@@ -2848,7 +3088,10 @@ export function toQueueSliding_<R, E, A>(
2848
3088
  *
2849
3089
  * @tsplus getter fncts.io.Stream toQueueUnbounded
2850
3090
  */
2851
- export function toQueueUnbounded<R, E, A>(stream: Stream<R, E, A>): IO<R | Scope, never, Queue<Take<E, A>>> {
3091
+ export function toQueueUnbounded<R, E, A>(
3092
+ stream: Stream<R, E, A>,
3093
+ __tsplusTrace?: string,
3094
+ ): IO<R | Scope, never, Queue<Take<E, A>>> {
2852
3095
  return Do((Δ) => {
2853
3096
  const queue = Δ(IO.acquireRelease(Queue.makeUnbounded<Take<E, A>>(), (_) => _.shutdown));
2854
3097
  Δ(stream.runIntoQueueScoped(queue).fork);
@@ -2859,6 +3102,7 @@ export function toQueueUnbounded<R, E, A>(stream: Stream<R, E, A>): IO<R | Scope
2859
3102
  function unfoldChunkIOLoop<S, R, E, A>(
2860
3103
  s: S,
2861
3104
  f: (s: S) => IO<R, E, Maybe<readonly [Conc<A>, S]>>,
3105
+ __tsplusTrace?: string,
2862
3106
  ): Channel<R, unknown, unknown, unknown, E, Conc<A>, unknown> {
2863
3107
  return Channel.unwrap(
2864
3108
  f(s).map((m) =>
@@ -2875,7 +3119,11 @@ function unfoldChunkIOLoop<S, R, E, A>(
2875
3119
  *
2876
3120
  * @tsplus static fncts.io.StreamOps unfoldChunkIO
2877
3121
  */
2878
- export function unfoldChunkIO<R, E, A, S>(s: S, f: (s: S) => IO<R, E, Maybe<readonly [Conc<A>, S]>>): Stream<R, E, A> {
3122
+ export function unfoldChunkIO<R, E, A, S>(
3123
+ s: S,
3124
+ f: (s: S) => IO<R, E, Maybe<readonly [Conc<A>, S]>>,
3125
+ __tsplusTrace?: string,
3126
+ ): Stream<R, E, A> {
2879
3127
  return new Stream(unfoldChunkIOLoop(s, f));
2880
3128
  }
2881
3129
 
@@ -2884,13 +3132,18 @@ export function unfoldChunkIO<R, E, A, S>(s: S, f: (s: S) => IO<R, E, Maybe<read
2884
3132
  *
2885
3133
  * @tsplus static fncts.io.StreamOps unfoldIO
2886
3134
  */
2887
- export function unfoldIO<S, R, E, A>(s: S, f: (s: S) => IO<R, E, Maybe<readonly [A, S]>>): Stream<R, E, A> {
3135
+ export function unfoldIO<S, R, E, A>(
3136
+ s: S,
3137
+ f: (s: S) => IO<R, E, Maybe<readonly [A, S]>>,
3138
+ __tsplusTrace?: string,
3139
+ ): Stream<R, E, A> {
2888
3140
  return unfoldChunkIO(s, (_) => f(_).map((m) => m.map(([a, s]) => tuple(Conc.single(a), s))));
2889
3141
  }
2890
3142
 
2891
3143
  function unfoldChunkLoop<S, A>(
2892
3144
  s: S,
2893
3145
  f: (s: S) => Maybe<readonly [Conc<A>, S]>,
3146
+ __tsplusTrace?: string,
2894
3147
  ): Channel<never, unknown, unknown, unknown, never, Conc<A>, unknown> {
2895
3148
  return f(s).match(
2896
3149
  () => Channel.unit,
@@ -2901,14 +3154,22 @@ function unfoldChunkLoop<S, A>(
2901
3154
  /**
2902
3155
  * @tsplus static fncts.io.StreamOps unfoldChunk
2903
3156
  */
2904
- export function unfoldChunk<S, A>(s: S, f: (s: S) => Maybe<readonly [Conc<A>, S]>): Stream<never, never, A> {
3157
+ export function unfoldChunk<S, A>(
3158
+ s: S,
3159
+ f: (s: S) => Maybe<readonly [Conc<A>, S]>,
3160
+ __tsplusTrace?: string,
3161
+ ): Stream<never, never, A> {
2905
3162
  return new Stream(Channel.defer(unfoldChunkLoop(s, f)));
2906
3163
  }
2907
3164
 
2908
3165
  /**
2909
3166
  * @tsplus static fncts.io.StreamOps unfold
2910
3167
  */
2911
- export function unfold<S, A>(s: S, f: (s: S) => Maybe<readonly [A, S]>): Stream<never, never, A> {
3168
+ export function unfold<S, A>(
3169
+ s: S,
3170
+ f: (s: S) => Maybe<readonly [A, S]>,
3171
+ __tsplusTrace?: string,
3172
+ ): Stream<never, never, A> {
2912
3173
  return Stream.unfoldChunk(s, (s) => f(s).map(([a, s]) => tuple(Conc.single(a), s)));
2913
3174
  }
2914
3175
 
@@ -2917,7 +3178,10 @@ export function unfold<S, A>(s: S, f: (s: S) => Maybe<readonly [A, S]>): Stream<
2917
3178
  *
2918
3179
  * @tsplus static fncts.io.StreamOps unwrap
2919
3180
  */
2920
- export function unwrap<R, E, R1, E1, A>(stream: IO<R, E, Stream<R1, E1, A>>): Stream<R | R1, E | E1, A> {
3181
+ export function unwrap<R, E, R1, E1, A>(
3182
+ stream: IO<R, E, Stream<R1, E1, A>>,
3183
+ __tsplusTrace?: string,
3184
+ ): Stream<R | R1, E | E1, A> {
2921
3185
  return Stream.fromIO(stream).flatten;
2922
3186
  }
2923
3187
 
@@ -2928,6 +3192,7 @@ export function unwrap<R, E, R1, E1, A>(stream: IO<R, E, Stream<R1, E1, A>>): St
2928
3192
  */
2929
3193
  export function unwrapScoped<R0, E0, R, E, A>(
2930
3194
  stream: IO<R0, E0, Stream<R, E, A>>,
3195
+ __tsplusTrace?: string,
2931
3196
  ): Stream<R | Exclude<R0, Scope>, E0 | E, A> {
2932
3197
  return Stream.scoped(stream).flatten;
2933
3198
  }
@@ -2937,7 +3202,7 @@ export function unwrapScoped<R0, E0, R, E, A>(
2937
3202
  */
2938
3203
  export function zipWithIndex_<R, E, A>(
2939
3204
  self: Stream<R, E, A>,
2940
- __tsPlusTrace?: string,
3205
+ __tsplusTrace?: string,
2941
3206
  ): Stream<R, E, readonly [A, number]> {
2942
3207
  return self.mapAccum(0, (index, a) => [index + 1, [a, index]]);
2943
3208
  }
@@ -2957,8 +3222,9 @@ export function zipWithLatest_<R, E, A, R1, E1, B, C>(
2957
3222
  fa: Stream<R, E, A>,
2958
3223
  fb: Stream<R1, E1, B>,
2959
3224
  f: (a: A, b: B) => C,
3225
+ __tsplusTrace?: string,
2960
3226
  ): Stream<R | R1, E | E1, C> {
2961
- function pullNonEmpty<R, E, A>(pull: IO<R, Maybe<E>, Conc<A>>): IO<R, Maybe<E>, Conc<A>> {
3227
+ function pullNonEmpty<R, E, A>(pull: IO<R, Maybe<E>, Conc<A>>, __tsplusTrace?: string): IO<R, Maybe<E>, Conc<A>> {
2962
3228
  return pull.flatMap((chunk) => (chunk.isNonEmpty ? pullNonEmpty(pull) : IO.succeedNow(chunk)));
2963
3229
  }
2964
3230
  return Stream.fromPull(
@@ -2969,7 +3235,8 @@ export function zipWithLatest_<R, E, A, R1, E1, B, C>(
2969
3235
  Stream.fromIOMaybe(
2970
3236
  left.raceWith(
2971
3237
  right,
2972
- (leftDone, rightFiber) => IO.fromExitNow(leftDone).zipWith(rightFiber.join, (l, r) => tuple(l, r, true)),
3238
+ (leftDone: Exit<Maybe<E | E1>, Conc<A>>, rightFiber) =>
3239
+ IO.fromExitNow(leftDone).zipWith(rightFiber.join, (l, r) => tuple(l, r, true)),
2973
3240
  (rightDone, leftFiber) => IO.fromExitNow(rightDone).zipWith(leftFiber.join, (r, l) => tuple(l, r, false)),
2974
3241
  ),
2975
3242
  ).flatMap(([l, r, leftFirst]) =>