BFPG Meetup - February 2026 - web double header - servers as functions + Servant API packages
Join the BFPG Discord: https://discord.gg/yYz2d8w7FY
Agenda
18:00: Welcome and setup
Presentation #1: Servers as Functions - George Wilson
Presentation #2:
Standalone API packages with modern Servant - Jack Kelly20:00ish: Pack down, head to Criterion pub
Servers as Functions
In FP, we love building things out of functions, so why not a web server? This talk will compare two web server libraries in different languages: http4s in Scala and http4k in Kotlin. Both are inspired by the same paper, Your Server as a Function (Marius Eriksen, 2013).
We'll look the key ideas from the paper and see how well each library embodies them. Along the way we'll meet the Kleisli type and see how Scala and Kotlin approach FP differently.
Standalone API packages with modern Servant
Servant promises that if you write out your web APIs as types, everything will stay in sync. So why is it that, six months in, your OpenAPI spec is lying about your JSON structure, and why has that other team gone off and hand-rolled their own client for your API?
API types often share a package with the server implementing them, but that's a large dependency footprint for clients and code generators to swallow. The answer is a standalone API package, which gives you a place to property-test your schemas and to define a structure for your severs and clients to copy. I'll be walking you through Bellroy's opinionated defaults for such packages and show how we take advantage of modern servant features like union verbs and nested record routes, so that you'll be able to immediately apply these patterns to your own projects.