[1] http://h2.jaguarpaw.co.uk/posts/make-invalid-laziness-unrepr...
[2] Here's a space leak I fixed two years ago in a popular library by making invalid laziness unrepresentable https://github.com/mrkkrp/megaparsec/issues/486#issue-135418...
Our team's big mistake was believing blog posts that swept laziness problems under the rug. In hindsight, there's plenty of criticism about Haskell's laziness in complex apps, and we should have taken that criticism more much seriously.
I linked a blog post[1]. I wouldn't say it sweeps anything under the rug. In fact it takes laziness out from under the rug and shows you exactly how to deal with it. If you think that approach wouldn't have solved your problem then perhaps you could elaborate why.
[1] http://h2.jaguarpaw.co.uk/posts/make-invalid-laziness-unrepr...
We had lots of legacy subcomponents that permeated throughout the app's data structures, and as a practical matter, we couldn't reopen all that existing code. Some of that legacy code crossed organizational boundaries, so eliminating laziness throughout simply wasn't do-able.
So given all the above, there are two reasonable conclusions, which aren't contradictory:
1) If we could have reworked lots of existing code, we could have eliminated space leaks via @tome's approach.
2) Haskell's laziness is fundamentally misaligned with projects like ours, which has cross-organization code, long-running iterative algorithms, and complex data structures.
In desperation we used deepseq, which everyone knows is bad, and shortly thereafter we cut our losses by switching platforms.