Skip to content

Instantly share code, notes, and snippets.

@hiratara
Created February 6, 2016 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiratara/96f80bd35b84342f8cf5 to your computer and use it in GitHub Desktop.
Save hiratara/96f80bd35b84342f8cf5 to your computer and use it in GitHub Desktop.
The TOP 100 packages on hackage
module Main where
import Control.Monad (forM_)
import qualified Data.Map as M
import qualified Distribution.PackDeps as PD
import GHC.Exts (sortWith)
main :: IO ()
main = do
ns <- PD.loadNewest
let rs = PD.getReverses ns
rs' = reverse . sortWith snd . map len . M.toList $ rs
forM_ (take 100 rs') $ \(k, n) -> do
putStrLn $ show n ++ "\t" ++ k
where
len (k, (_, ms)) = (k, length ms)
{-
14225 base
4782 bytestring
4217 containers
3280 text
3245 mtl
2534 transformers
2139 directory
1864 filepath
1633 time
1431 QuickCheck
1330 vector
1232 process
1151 aeson
1068 array
1042 parsec
977 template-haskell
970 unordered-containers
959 random
945 HUnit
932 network
894 deepseq
882 binary
711 lens
687 hspec
644 test-framework
638 attoparsec
631 stm
560 unix
515 utf8-string
513 data-default
499 hashable
490 http-types
478 tasty
449 test-framework-hunit
443 conduit
440 pretty
438 split
418 ghc-prim
417 old-locale
414 test-framework-quickcheck2
394 Cabal
385 cereal
369 criterion
349 resourcet
325 tasty-hunit
321 monad-control
321 exceptions
320 hsc3
315 optparse-applicative
310 cmdargs
297 semigroups
289 blaze-builder
275 wai
275 async
274 syb
271 old-time
256 HTTP
249 haskell98
244 transformers-base
242 tasty-quickcheck
242 safe
233 http-conduit
216 base64-bytestring
206 http-client
205 lifted-base
191 case-insensitive
190 doctest
186 tagged
186 primitive
182 haskell-src-exts
181 MissingH
177 gtk
177 either
176 cryptohash
174 hslogger
174 blaze-html
171 scientific
170 conduit-extra
167 GLUT
166 zlib
160 parallel
157 data-default-class
156 temporary
148 pipes
147 ansi-terminal
142 yaml
131 OpenGL
129 hsc3-lang
128 warp
128 regex-compat
128 amazonka-core
122 transformers-compat
122 system-filepath
120 regex-posix
118 network-uri
116 bifunctors
115 hxt
113 xml
112 utility-ht
109 errors
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment