Typesafe SQL in Haskell by Ben Kolera (@benkolera)
Typesafe SQL in Haskell
By Ben Kolera (@benkolera)
SQL is a wonderful and powerful language for querying relational data, but as developers we're often forced to trade off between safety, composability and/or being forced to use a subset of what SQL can actually do.
In this talk we will examine Opaleye; a haskell DSL for interacting with Postgres that is both highly composable and will not generate SQL that fails at runtime if your haskell code compiles. Most impressively, it manages to do this while giving a DSL that still very much feels like and has the power of SQL (sorting, aggregation, unions, inner and outer joins).
This talk will cross over some intermediate level topics (Profunctors, Arrows, Lenses) but it should handwave them enough for things to make sense. All you should really need is a knowledge of SQL and an appreciation for type safety and composability. :)