On Tue, 9 Dec 2025 at 15:23, Matthew Pickering <[email protected]> wrote: > > I think a solution based on multi-stage programming is the most > natural way to tackle the stream fusion problem in a robust manner.
In theory, sure, but in practice multi-stage programming is not very ergonomic for most developers. It introduces yet another unfamiliar paradigm, which is a tough sell when Haskell is already niche. I would much rather improve the existing programming model with minimal disruption. Stream fusion already works remarkably well, and GHC is excellent at the required core transformations, it has all the necessary infrastructure. If we address the remaining corner cases and bring these improvements into GHC itself, we can get C-like performance out of the box. fusion-plugin and streamly have shown that the required fixes are small, the results are robust, and most real-world cases fuse cleanly, including streams, folds, parsers, and combinations of these. GHC’s ability to generate highly efficient code is underrated, I would love to see these enhancements become part of stock GHC. This is already proven, implemented and used in practice with hundreds of benchmarks, so can be done with a bit more effort. I would be more than happy to help if anyone wants to take this up. At the same time, we can look into making multi-stage programming more popular, but that would be a tough job I guess. -harendra _______________________________________________ ghc-devs mailing list -- [email protected] To unsubscribe send an email to [email protected]
