diff --git a/packages/effect-lens/src/Lens.ts b/packages/effect-lens/src/Lens.ts
index 5ef8119..b3384b7 100644
--- a/packages/effect-lens/src/Lens.ts
+++ b/packages/effect-lens/src/Lens.ts
@@ -57,13 +57,20 @@ extends Pipeable.Class() implements LensWithInternals {
readonly [LensTypeId]: LensTypeId = LensTypeId
readonly [LensWithInternalsTypeId]: LensWithInternalsTypeId = LensWithInternalsTypeId
+ readonly get: Effect.Effect
+ readonly changes: Stream.Stream
+ readonly update: (a: A) => Effect.Effect
+ readonly semaphore: Effect.Semaphore
+
constructor(
- readonly get: Effect.Effect,
- readonly changes: Stream.Stream,
- readonly update: (a: A) => Effect.Effect,
- readonly semaphore: Effect.Semaphore,
+ source: LensImpl.Source
) {
super()
+
+ this.get = source.get
+ this.changes = source.changes
+ this.update = source.update
+ this.semaphore = source.semaphore
}
modifyEffect(
@@ -83,7 +90,7 @@ extends Pipeable.Class() implements LensWithInternals {
*/
export const make = (
source: LensImpl.Source
-): Lens => new LensImpl(source.get, source.changes, source.update, source.semaphore)
+): Lens => new LensImpl(source)
export class LensLazyImpl