Lightweight DataFrame in MicroHs: A Haskell 2010 Adventure

2025-09-11

Starting with a Frege (JVM Haskell) Android project in 2015, the author's functional programming journey led to a quest to decouple their DataFrame library from GHC for MicroHs compatibility. This post details implementing core DataFrame functionality – construction, basic expressions, `filterWhere`, `derive`, and Markdown rendering – in Haskell 2010, without GADTs, type families, or reflection. The experiment demonstrates that while verbose, the core functionality remains viable, offering portability between MicroHs (for tiny CLIs or embedded contexts) and GHC (for speed and ecosystem access). MicroHs binaries are roughly 100x smaller but 5-10x slower; a worthwhile trade-off for many data-wrangling tasks, allowing a GHC backend for heavy lifting.

Read more
Development