Advent of Code 2025: Haskell Solution Reflections for all 12 Days
by Justin Le ♦
Merry Christmas all! This is my annual Advent of Code post! Advent of Code is a series of (this year) 12 daily Christmas-themed programming puzzles that are meant to be fun diversions from your daily life, help you find a bit of whimsy in your world, give you a chance to explore new ideas and program together with your friends. I always enjoy discussing creative ways to solve these puzzles every day, and it’s become a bit of an annual highlight for me and a lot of others. My favorite part about these puzzles is that they are open ended enough that there are usually many different interesting ways to solve them — it’s not like a stressful interview question where you have to recite the obscure incantation to pass the test. In the past I’ve leveraged group theory, galilean transformations and linear algebra, and more group theory.
Haskell is especially fun for these because if you set up your abstractions in just the right way, the puzzles seem to solve themselves. It’s a good opportunity every year to get exposed to different parts of the Haskell ecosystem! Last year, I moved almost all of my Haskell code to an Advent of Code Megarepo, and I also write up my favorite ways to solve each one in the megarepo wiki.
All of this year’s 12 puzzles are here, but I’ve also included links to each individual one in this post. I’m also considering expanding some of these into full on blog posts, so be on the look out, or let me know if there are any that you might want fully expanded! And if you haven’t, why not try these out yourself? Be sure to drop by the libera-chat ##advent-of-code channel to discuss any fun ways you solve them, or any questions! Thanks again to Eric for a great new fresh take on the event this year!
- Day 1 - Secret Entrance — The classic Day 1
scanl - Day 2 - Gift Shop — The super efficient
IntSet - Day 3 - Lobby —
StateT+[]= backtracking search monad - Day 4 - Printing Department — 2D cellular automata
- Day 5 - Cafeteria — The power of the
data-intervallibrary - Day 6 - Trash Compactor —
Data.Listmanipulations - Day 7 - Laboratories — Tying the knot
- Day 8 - Playground — Iterative Clustering
- Day 9 - Movie Theater —
IntervalSetandIntervalMap - Day 10 - Factory — Guassian Elimation, Type-safe Mutable Vectors
- Day 11 - Reactor — More Knot Tying and DP!
- Day 12 - Christmas Tree Farm — Counting