Connecting...

Copy Of Fp Conf

After Life by Pawel Szulc at FP in the City Conf

Copy Of Fp Conf

​Have you heard of the Netflix series 'After Life'?

Pawel Szulc's talk was originally called 'Life After Polysemy'...

He begins by giving the understanding that people might not like polysemy because it is too slow.

Then suggests, using a Joe Armstrong quote, that code doesn't have to be fast, it just has to be beautiful.

After Life

I'm a huge fan of Free monads, that's no secrete. For a very long time, I've been advocating writing maintainable software using one of the available "effects" library called Polysemy. At work, however, you can not always work with technologies you prefer. At Klarna we rely heavily on MTL stack. It took us some time and a couple of iterations, but I believe we've finally reached encoding, that - even though not perfect - gives us the majority of benefits typically found in Free-based solutions. Those (among many) are effects tractability, DSL-like encodings, coding to the interface, testability, "compiling" to the lower-level languages.

In this talk, I will present our approach. You will not only learn how to program effects in MTL to get all the above mention benefits. We will also explore all "lower-level" machinery that was used. We will touch upon GeneralizedNewtypeDeriving and DerivingVia, MonadTrans and MonadTransControl, instances resolution in GHC, and many more.

This talk is targeting beginner/intermediate Haskellers who want to gain knowledge on how to best leverage their favorite language in order to write beautiful, maintainable code.