Linking Smaller Haskell Binaries
Summary
The article explains how to reduce Haskell binary sizes by enabling -split-sections and -Wl,--gc-sections, and experiments with identical code folding (ICF) using lld, including benchmarks showing size reductions from 113MB to 83MB and then to 64MB. It also discusses safety caveats, debugging visibility, and potential trade-offs in correctness and debugging.