Stealing from Biologists to Compile Haskell Faster

TL;DR AI
2 min readKey summary
A post explains how GHC’s ApplicativeDo can turn independent do-blocks into applicative code automatically, enabling batching in effectful Haskell programs like Haxl.
It shows that GHC’s default greedy scheduling can miss better plans, while the optimal schedule reduces network round-trips and latency.
The catch is that the optimal algorithm is O(n³), so it is too slow to enable by default.
The article also notes a connection to the dynamic-programming approach used in RNA folding.



