Does `Effect.provide` in a parent override the `provide` in a child effect?

Hi i have a question regarding services, if i have a like this

const prog = Effect.gen(function* () {
  const effect1 = someEffect.pipe(
    Effect.provide(ServiceAImpl(options))
  ) // requires ServiceA

  const effect2 = Effect.gen(function* () {
      const effect3 = anotherEffeect.pipe(
        Effect.provide(ServiceAImpl(options))
      ) // requires ServiceA

      const effect4 = fooEffect // requires ServiceA
  })
}).pipe(Effect.provide(ServiceAImpl(options)) // requires ServiceA because of fooEffect


here i passed ServiceAImpl with different options, does provide in parent overrides the children effect provide?
Was this page helpful?