// ets_tracing: off import type { Has, Tag } from "../Has/index.js" import type { Managed } from "../Managed/managed.js" import { use_ } from "../Managed/use.js" import type { Effect } from "./effect.js" import * as has from "./has.js" import * as provide from "./provide.js" /** * Provides a managed to the given effect */ export function provideSomeManaged(managed: Managed) { return (self: Effect): Effect => use_(managed, (a) => provide.provide(a)(self)) } /** * Provides a managed to the given effect */ export function provideServiceManaged(tag: Tag) { return (managed: Managed) => (self: Effect, E1, A1>): Effect => use_(managed, (a) => has.provideService(tag)(a)(self)) }