by Vanessa McHale | 2018-08-09 22:30

This post was inspired by a curious question on Twitter: is curry or uncurry more common in Haskell code?

To answer this, we first use hackage-fetch to download every package on Hackage. This will gives us a large sample with many authors.

To find uses of uncurry , we use ripgrep with the following incantation:

rg '[ \(\)]uncurry[ \(\)]' hackage/ --stats

This doesn't actually find every instance of uncurry on Hackage, but it's good enough for our purposes.

Uncurry

rg '[ \(\)]uncurry[ \(\)]' hackage/ --stats ... 7966 matched lines 4346 files contained matches 289306 files searched 2.879 seconds

Curry

rg '[ \(\)]curry[ \(\)]' hackage/ --stats ... 1154 matched lines 525 files contained matches 289306 files searched 2.572 seconds