Types Not Catching Incorrect Service Dependencies with Layer Merging
Types not catching incorrect service dependencies provided to program, I think I am making a fairly basic error somewhere with merging layers.
Given a program that runs the get function, I can provide either of these layers, only one actually works of course, but I thought the type system would catch this and wonder what I am doing wrong (feels like I am making a basic error somewhere).
Simplified playground without Cache dependency, this works and TS catches the incorrect dependency: https://effect.website/play/#7b86f52a2d56.
Playground with Cache dependency and layer merging, no TS error even though the service type is incorrect: https://effect.website/play/#c1305ccfdd5c
Given a program that runs the get function, I can provide either of these layers, only one actually works of course, but I thought the type system would catch this and wonder what I am doing wrong (feels like I am making a basic error somewhere).
Simplified playground without Cache dependency, this works and TS catches the incorrect dependency: https://effect.website/play/#7b86f52a2d56.
Playground with Cache dependency and layer merging, no TS error even though the service type is incorrect: https://effect.website/play/#c1305ccfdd5c
