About me

Alejandro Serrano Mena is a passionate of functional programming and formal methods in software development, especially using Kotlin and Haskell as languages. He enjoys not only using those tools, but also spreading the word: he's written four books targeting different levels, regularly gives talks in conferences and meetups, and teaches courses at Xebia Functional Academy. Lately, he's becoming interested in formal approaches to modeling, design, and architecture, using tools like Alloy.

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.

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.

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.

Talks

Haskell logo Haskell

Trading Card Game Workshop

ZuriHac

June 2022

Slides and exercises
Part 1: The Legend of DSLs
Part 2: Adventures in IO

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

Going Higher

LambdaWorld

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

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

Being Formal Yet Lightweight

DDD Europe

February 2021

A workshop about Alloy

Slides and exercises

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

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-kinded types

Arrow Analysis Kotlin logo Kotlin

Pre-, post-condition, and invariant checks for your Kotlin code
Part of the Arrow project

patternr.dev Elixir logo Elixir

Tool to learn pattern matching for several languages

Inikio Kotlin logo Kotlin

Better initial-style DSLs in Kotlin

Research

PhD Thesis

Utrecht University

Type Error Customization for Embedded Domain-Specific Languages

Publications

Peer-reviewed articles, hosted at DBLP