<div dir="ltr">Hello -<div><br></div><div>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.</div><div><br></div><div>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 ?</div><div><br></div><div>regards.<br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Debasish Ghosh<br><a href="http://manning.com/ghosh2" target="_blank">http://manning.com/ghosh2</a></div><div><a href="http://manning.com/ghosh" target="_blank">http://manning.com/ghosh</a><br></div><div><br>Twttr: @debasishg<br>Blog: <a href="http://debasishg.blogspot.com" target="_blank">http://debasishg.blogspot.com</a><br>Code: <a href="http://github.com/debasishg" target="_blank">http://github.com/debasishg</a></div></div></div></div></div>