Tag: Scala

Bringing the latest tech to the legal sector.

Real world Tagless Final: Akka-Http

So far in our series about Interpreter patterns, we have looked at the ideas behind Tagless Final and Free monads, and seen how powerful they can be for de-coupling our application code and abstracting our effect types. However, we haven’t really looked at how these patterns really fit into our application code. Tagless Final &…
Read more

An introduction to Free Monads

Free Monads solve the very same problem as Tagless Final but in a different way. Our goal is the same: we want to decouple or abstract the implementation details from the application code. If you recall our previous post, we did this by using expressions or functions that would be injected into our application code.…
Read more

An introduction to Tagless Final in Scala

When you are building any kind of non-trivial application, you will naturally find yourself needing to decouple your implementation details from your application. Loose coupling not only makes code easier to test but also makes it easier to switch implementations in the future or for different use cases. One pattern that is increasing in popularity…
Read more

Scala, the Aux pattern & path dependent types

In our last post about Shapeless, we casually mentioned the Aux pattern was being used: L is a path dependent type on Generic[T], so we use the AUX pattern here so we can reference L Rather than just leaving that out there, with no explanation, we wanted to delve into that pattern a little deeper.…
Read more

Type class derivation with Shapeless: An introduction

You must be shapeless, formless, like water. At Basement Crowd we make use of Shapeless for a couple of problems – the most common use is for the automatic derivation of JSON de/serialisers for our APIs (spray-json-shapeless/circe), but it also comes into play for test data generation (scalacheck shapeless) and its polymorphic functions. This article…
Read more