PgConf.Russia 2016 talks

Programming Postgres clients declaratively in Haskell with Hasql

Sannsyn AS

Nikita Volkov is a software engineer with 15 years of experience, who lately specializes in functional programming languages like Haskell, Clojure, Scala. He is the author of a multitude of open-source projects for Haskell, including ["stm-containers"](, ["record"]( and [the "hasql" library](, which is the subject of this talk. He is also the author of [the "SORM" project](, which is an ORM-library for Scala. Nikita [blogs about functional programming](, and is employed by a Norwegian company [Sannsyn AS](, which provides a recommendation engine as a service as well as the general consulting services in IT.

This talk will cover "hasql", a highly-efficient library for integration of Haskell and PostgreSQL. The library provides an API for declarative programming, which is also quite flexible and terse. The talk will cover the benefits of declarative programming as well as the architectural and technical solutions behind the library, including the implementation of the PostgreSQL binary protocol. Hasql is used in PostgREST, a popular modern restful API for Postgres.