About me

Alejandro Serrano Mena is a passionate of formal methods and functional programming in software development, especially using Kotlin and Haskell as languages. He works as researcher in the Kotlin Language Evolution team at JetBrains and helps co-maintaining the Arrow library. He enjoys not only using and improving those tools, but also spreading the word: he's written four books targeting different levels, regularly gives talks in conferences and meetups.

For quite some time Alejandro was an academic, working on the area of compilers and type systems for functional languages. His PhD thesis versed over error messages, and he's been involved in efforts like improving GHC's support for impredicativity. This knowledge is put in practice in several open source projects, many of them using metaprogramming techniques or compiler extensions. Lately, he's becoming interested in formal approaches to modeling, design, and architecture, using tools like Alloy.

Full curriculum vitae

Books

Cover of FP Ideas for the Curious Kotliner

FP Ideas for the Curious Kotliner

Functional programming and Kotlin make such a great couple! In this book we explore ideas from the former that will definitely change the way you look and code in Kotlin.

Kotlin lies in a really interesting intersection of programming styles, with functional programming becoming increasingly popular. Functional style is by no means new, so why not take advantage of the decades of ideas, concepts, and patterns from that community? In this book we explore those ideas with a higher impact on Kotlin code, including how to model data in immutable fashion, describing dependencies using contexts and effects, or treating actions as data.

The free tutorial Poké-Fun with Kotlin and Arrow contains tasks to practice functional programming idioms in Kotlin.

Cover for Practical Haskell

Practical Haskell

Get a practical, hands-on introduction to the Haskell language, its libraries and environment, and to the functional programming paradigm that is fast growing in importance in the software industry. This updated edition includes more modern treatment of Haskell's web framework and APIs.

You'll see how functional programming is gathering momentum, allowing you to express yourself in a more concise way, reducing boilerplate, and increasing the safety of your code. Haskell is an elegant and noise-free pure functional language with a long history, having a huge number of library contributors and an active community.

Cover for The Book of Monads

The Book of Monads

In functional programming, at the heart of input/output, failure, state, logic, and much more, lies a powerful abstraction called monad. This book provides a journey from the very first concepts, to the myriad of monads available to programmers, down to the categorical foundations.

Monads are key to unlocking many powerful patterns in functional programming. Alas, many developers struggle at first with the concept and the applications of monads. This books provides a full dive into the subject, including thorough explanations of adjacent concepts such as functors, monad transformers, final tagless, or extensible effects.

Cover for Haskell (almost) Standard Libraries

Haskell (almost) Standard Libraries

How do I match against a regex? How do I copy a file and handle any exception? These are just a couple of examples of common tasks which require libraries in Haskell. Everybody knows which one you should use... right? This book walks you through the main "standard" libraries in the ecosystem, with lots of examples to get you started.

As opposed to other languages, Haskell's base library is quite slim. However, for many tasks there's usually one community-blessed library. Unraveling that landscape is one of the main thresholds to move from beginner Haskeller to practitioner. This book introduces these "standard libraries", organized by topic. More than 20 chapters provide examples of most common tasks in daily programming, solved using the power of the Haskell ecosystem.

Tutorials

The title of each workshop links to the slides and example code

Haskell logo Haskell

Kotlin logo Kotlin

Poké-Fun with Kotlin and Arrow

Create your own deck builder using functional programming patterns

⊢ Programming Languages

Implement Your Own Type Checker

Lambda World

October 2024

Being Formal Yet Lightweight

DDD Europe

February 2021

A workshop about Alloy

Talks

Haskell logo Haskell

A Beginner's Guide to Haskell

Haskell eXchange (Novice Track)

November 2021

Un parser en una docena de líneas

Colombia Lambda

October 2021

All You Wanted to Know About Type Classes

Haskell Love

September 2021

Type classes: de aprendiz a maestro

Lambdada

February 2021

A comparison between Elixir and Haskell

FunctionalFest

March 2021

Describing Microservices in Modern Haskell

Haskell Symposium

September 2020

Companion to this paper

Miso: Haskell in the Front-End

MuniHac

September 2020

Do more with your types: GADTs and LiquidHaskell

47 Degrees Academy

August 2020

GraphQL 💜 Haskell

Haskell Love

August 2020

Basic optics: lenses, prisms and traversals

47 Degrees Academy

June 2020

The Inner Workings of Mu-Haskell

47 Degrees

December 2019

A Hands on Tutorial to Generic Programming

LambdaConf

December 2018


Part 1

Part 2

Going Higher

Lambda World

November 2017

Type Inference in GHC

LambdaConf

October 2017

Variables in Haskell

LambdaConf

October 2017

Buenos tipos para el desarrollo web

Madrid Haskell

March 2016

Pattern Functors

LambdaConf

December 2015

Developing Web Applications with Haskell

LambdaConf

December 2015

Kotlin logo Kotlin

Actions as data, continued

Lambda World

October 2024

Lifecycles, coroutines and scopes

KotlinConf

May 2024

Actions as Data

Live & Online

November 2022

Func Prog Sweden, with hints to Haskell
Kotlin Dev Day

Context Receivers:
Kotlin's new secret sauce

Advanced Kotlin Dev Day

November 2022

Mapping Right and Wrong

CodeMotion

May 2022

Types and Categories

A Quick Look at Impredicativity

ICFP

December 2020

Companion to this paper

Type-Based Formal Verification

47 Degrees

February 2020

Category Theory through Functional Programming

LambdaConf Winter Retreat

February 2017


Part 1

Part 2

Part 3

Immutable Conversations

by 47 Degrees

Casual conversations about important open source libraries with maintainers and contributors

Open Source

Arrow Kotlin logo Kotlin

➢ Co-maintainer of the main libraries
Arrow Analysis: Pre-, post-condition, and invariant checks
Plug-in for IntelliJ

Mu-Haskell Haskell logo Haskell

Purely functional framework for building micro services

KopyKat Kotlin logo Kotlin

Little utilities for more pleasant immutable data in Kotlin

kind-generics Haskell logo Haskell

Datatype-generic programming for GADTs and higher kinds

Inikio Kotlin logo Kotlin

Better initial-style DSLs in Kotlin

patternr.dev Elixir logo Elixir

Tool to learn pattern matching for several languages

deck.run Kotlin logo Kotlin

Create your own Pokémon TCG deck

Research

PhD Thesis

Utrecht University

Type Error Customization for Embedded Domain-Specific Languages

Publications

Peer-reviewed articles, hosted at DBLP