Final Tagless is a functional dependency-inversion pattern: business logic targets an abstract interface, while type-directed implementations supply the concrete behavior. The approach is also called mtl style and commonly uses type classes and phantom types. section 13.2.6 section 13.3
A small interface can define operations such as reporting meteors and asteroids. A type selector then chooses an implementation, allowing the same business logic to run through HTTP or TCP. section 13.2.6
Selecting an astronomy service
The runtime reads a reporting channel, maps TCP to meteorsApp @(TcpAstroService) or HTTP to meteorsApp @(HttpAstroService), and executes the chosen scenario. The business operation stays unchanged, but this simple version still carries ReportChannel through the interface and can fail when its value mismatches the selected instance. section 13.2.6
