Constructing a DSL for Composable Reports in Haskell
summary
Claims a practical solution: an type-safe DSL in Haskell that generates Excel via the xlsx library, arrived at in a few days and used in production. It models headers as trees, treats column indices as builder state so formulas use cell coordinates rather than hardcoded A1 refs, and composes templates with Monoid-style concatenation and a Writer + StateT builder (do-notation friendly). It supports subreports with scoped input types and exports working XLSX files; code is planned as chloric.
AI-written summary · about
chapters (20)
- 0:00Intro
- 0:42Disclaimer
- 1:29Sample Report
- 2:27Building Excel Reports
- 3:38Trying to Build Excel Reports
- 5:26Why composable?
- 6:02Report Structure
- 6:37Can you spot a tree?
- 7:53Column Trees
- 8:10Report Tree
- 9:57Report Concatenation
- 11:31Basic Building Blocks
- 13:38Monoidal Report
- 15:24Supporting Formulas
- 17:59Report Builder Monad
- 20:05Report Builder Blocks
- 23:32Report Builder Example
- 25:13Sub-reports
- 29:29Passing Data In
- 31:17So what if we want to...
related talks
39mCreating Beautiful Spreadsheets With Data and Templates
21mDemo: A functional EDSL for mathematics visualization that compiles to JavaScrip...
48mDesigning composable functional libraries, not just for data visualization
26mA Functional EDSL for Economics Concepts & Models
34mHomoiconic spreadsheets: What, How & Why
38mThinking DSLs for Massive Visualization
24mRecursion Schemes Without the Barbed Wire (Part 6)
21mPractical compositional diagramming
