u/kubukozcats,cats-effectin r/scala • Recommends
Using Tagless Final with laws - Scala tutorial
#taglessfinal#cats#cats-effect
3.7K subscribers • 30 videos on Hallway
Intermediate. Assumes working knowledge.
5K views6 years ago1 recommendation
Programming languagesSoftware designScalaFunctional programmingDesign patterns
Jakub Kozłowski demonstrates how to implement and test a Tagless Final algebra in Scala using laws and ScalaCheck.
In this video, you'll learn about the Tagless Final technique and a way to correctly implement and test a Tagless Final algebra in your program. Slap like if you enjoyed the video! Table of contents: - Introduction, overview - Introducing the KVStore algebra - Laws of KVStore - Verifying effects in laws - Implementing KVStore: in memory - Implementing KVStore with Redis - Law testing with Discipline and Scalacheck - Writing tests for concrete instances - Running tests - Utilities for tests, defining equality for State/IO values - Adding more laws - Summary, parting words Read the code: github.com/kubukoz/videos/tree/master/tagless-final Some libraries, tools that are mentioned in the video or could be useful for working with Tagless Final: - github.com/typelevel/cats-tagless - github.com/typelevel/cats-mtl - github.com/oleg-py/meow-mtl - github.com/profunktor/redis4cats - github.com/typelevel/discipline - github.com/typelevel/scalacheck - github.com/ChristopherDavenport/log4cats Original paper introducting Tagless Final - okmij.org/ftp/tagless-final/course/lecture.pdf Comparison with other DSL encodings - impurepics.com/posts/2018-04-09-final-tagless-path.html Another introduction to Tagless Final from Patryk, one of my past colleagues at Scalac - scalac.io/tagless-final-pattern-for-scala-code/ A great talk showing how to use Tagless Final and MTL style, by Paweł Szulc - youtube.com/watch?v=hKgnRVQ5Ad8 Post by Marcin Rzeźnicki showing the same approach for law testing - iteratorshq.com/blog/tagless-with-discipline-testing-scala-c… A post on benefits of Tagless Final in the world after ZIO by Adam Warski - blog.softwaremill.com/final-tagless-seen-alive-79a8d884691dWhat people say. Recommended as a practical guide to implementing and testing the Tagless Final pattern in Scala.
u/kubukozcats,cats-effectin r/scala • Recommends