echo "$catalog" | parallel -j 8 "cabal fetch {} --dry-run && echo 'Fetched {}'" cabal build --only-dependencies --jobs=8
In the fast-paced world of functional programming, Haskell remains a gold standard for safety, concurrency, and correctness. However, even the most elegant code can be stalled by a sluggish build pipeline. If you’ve found yourself typing variations of cabal update && cabal install only to watch your terminal crawl, you have likely searched for the phrase: gtools cabal download hot . gtools cabal download hot
| Method | Time (first run) | Time (cached run) | Network Traces | |--------|------------------|--------------------|----------------| | cabal build --only-dependencies | 12 min 30 sec | 2 min 10 sec | 870 MB fetched | | cabal with --jobs=8 | 6 min 15 sec | 1 min 50 sec | 870 MB (parallel) | | gtools + Nix binary cache | 2 min 20 sec | 12 sec | < 10 MB (metadata only) | | gtools + local Hackage mirror | 1 min 10 sec | 45 sec | 0 (over LAN) | echo "$catalog" | parallel -j 8 "cabal fetch
#!/bin/bash # gtools-cabal-hot.sh cabal update catalog="$(cabal v2-list-bin --simple-output | cut -d' ' -f1)" | Method | Time (first run) | Time