Posted on August 30, 2025 by Thomas Mahler Abstract This post shows how to use Lennart Augustsson’s MicroHs as an execution backend for a small combinator compiler and how to embed the MicroHs compiler and runtime into GHC-built programs. It covers generating MicroHs‑compatible combinator expressions, emitting valid out.comb format and executing the result with the MicroHs runtime. Benchmarks…
Posted on December 5, 2024 by Thomas Mahler Abstract In this blog post I will show how to write a real world REST service in Haskell using the Scotty web framework and the generic-persistence database access library. In particular I will demonstrate how to - build CRUD operations against a database backend, - add pagination support - and secure access with token based authentication My main…
Posted on October 8, 2023 by Thomas Mahler Abstract In this post I will show how to significantly improve the performance of combinator based reducers by using a alternative abstraction algorithms. These algorithms are based on the paper λ to SKI, Semantically by Oleg Kiselyov and closely follow Ben Lynn’s implementation of Kiselyov’s ideas . I will also give detailed comparisons of the different…
Posted on July 29, 2023 by Thomas Mahler Interesting design challenges in seemingly simple programs The other day I wrote a simple Haskell program that retrieves data from a REST API and processes it. The task at hand sounded simple enough to just start coding without too much upfront thinking. This blog post is about how I discovered the shortcomings of my original design and how I improved it…
Posted on January 21, 2023 by Thomas Mahler Abstract In this post I’ll describe how to write a minimalistic Haskell persistence layer (on top of HDBC). My approach will rely heavily on Generics ( Data.Data , Data.Typeable ) and Reflection ( Type.Reflection ). The design goal is to avoid any boilerplate code. Please note: I received some helpful feedback on this post. I have now updated the code to…
Posted on August 7, 2022 by Thomas Mahler Abstract In this post I’m presenting a DependencyChecker to validate module dependencies in Haskell applications that can easily be integrated in CI/CD pipelines. The solution is based on the Graphmod dependency visualization tool. Introduction Welcome to yet another sequel of Clean Architecture with Haskell and Polysemy . In my last to posts ( integration…
Posted on July 17, 2022 by Thomas Mahler Introduction This is yet another sequel to my Clean Architecture with Haskell and Polysemy article . In my last blog post I demonstrated how the actual hosting of a WAI web app (e.g. with the Warp server or on AWS Lambda) can be defined as a Polysemy effect. The idea was well received on reddit/r/haskell and also stirred some further discussions. One…
Posted on July 4, 2022 by Thomas Mahler Introduction Two years ago I wrote Implementing Clean Architecture with Haskell and Polysemy where I demonstrated how core elements of Clean Architecture can be implemented with Polysemy in quite an elegant way. A few months ago an interesting question was raised in the issues section of the respective GitHub project : I’m wondering, if we want to change the…
Posted on February 5, 2022 by Thomas Mahler Abstract In this post I present an alternative approach to combinator-based implementation of functional languages that is significantly faster than classical graph-reduction based solutions. As this approach makes use of combinator reduction directly implemented as Haskell functions it is also much simpler and smaller in size than explicit…
Posted on January 9, 2022 by Thomas Mahler Abstract In this blog post I’m presenting an implementation of a Wiki System in the spirit of the legendary C2-Wiki - written in Haskell with the Yesod framework. There will also be some nice add-ons like a graphical representation of the page links. Introduction The WikiWikiWeb is the first wiki, or user-editable website. It was launched on 25 March 1995…