I am looking for some good practices on how to design database access APIs in applications using Haskell. I have been going through various libraries like persistent, Esqueleto etc. All of them have nice APIs. However I am looking for practices around designing APIs that also offer testability without plugging in a concrete database engine. Like the one we can design using tagless final approaches where we can switch out the Database monad with some mocked one (maybe that uses some hashmap instead of a real database) for unit tests.
Is there any recommended practice on this or may be some sample application that's designed around these practices ? Or is this at all a recommended practice in Haskell ?