2module Stackage.Config where
4import Control.Monad (when)
5import Control.Monad.Trans.Writer (execWriter, tell)
6import Data.Char (toLower)
7import qualified Data.Map as Map
8import Data.Maybe (fromMaybe)
9import Data.Set (fromList, singleton)
10import Distribution.Text (simpleParse)
13-- | Packages which are shipped with GHC but are not included in the
14-- Haskell Platform list of core packages.
15defaultExtraCore :: GhcMajorVersion -> Set PackageName
16defaultExtraCore _ = fromList $ map PackageName $ words
17 "binary Win32 ghc-prim integer-gmp"
19-- | Test suites which are expected to fail for some reason. The test suite
20-- will still be run and logs kept, but a failure will not indicate an
21-- error in our package combination.
22defaultExpectedFailures :: GhcMajorVersion
24defaultExpectedFailures ghcVer = execWriter $ do
25 -- Requires an old version of WAI and Warp for tests
28 -- text and setenv have recursive dependencies in their tests, which
29 -- cabal can't (yet) handle
33 -- The version of GLUT included with the HP does not generate
34 -- documentation correctly.
37 -- https://github.com/bos/statistics/issues/42
40 -- https://github.com/kazu-yamamoto/simple-sendfile/pull/10
43 -- http://hackage.haskell.org/trac/hackage/ticket/954
46 -- https://github.com/fpco/stackage/issues/24
49 -- With transformers 0.3, it doesn't provide any modules
50 add "transformers-compat"
52 -- Tests require shell script and are incompatible with sandboxed package
56 -- https://github.com/simonmar/monad-par/issues/28
59 -- Unfortunately network failures seem to happen haphazardly
62 -- https://github.com/ekmett/hyphenation/issues/1
65 -- Test suite takes too long to run on some systems
68 -- http://hub.darcs.net/stepcut/happstack/issue/1
69 add "happstack-server"
71 -- Requires a Facebook app.
74 -- https://github.com/tibbe/hashable/issues/64
77 -- https://github.com/vincenthz/language-java/issues/10
83 add "language-ecmascript"
87 -- https://github.com/basvandijk/concurrent-extra/issues/
88 add "concurrent-extra"
90 -- https://github.com/skogsbaer/xmlgen/issues/2
93 -- Something very strange going on with the test suite, I can't figure
97 -- Requires a locally running PostgreSQL server with appropriate users
98 add "postgresql-simple"
103 -- Some kind of Cabal bug when trying to run tests
106 when (ghcVer < GhcMajorVersion 7 6) $ do
107 -- https://github.com/haskell-suite/haskell-names/issues/39
112 -- https://github.com/jgm/pandoc-citeproc/issues/5
113 add "pandoc-citeproc"
115 -- Problems with doctest and sandboxing
119 -- https://github.com/fpco/stackage/issues/163
123 -- FIXME the test suite fails fairly regularly in builds, though I haven't
124 -- discovered why yet
127 -- Test suite is currently failing regularly, needs to be worked out still.
130 -- Requires too old a version of test-framework
133 -- No code included any more, therefore Haddock fails
134 mapM_ add $ words =<<
135 [ "comonad-transformers comonads-fd groupoids"
136 , "profunctor-extras semigroupoid-extras"
137 , "hamlet shakespeare-css shakespeare-i18n"
138 , "shakespeare-js shakespeare-text"
139 , "attoparsec-conduit blaze-builder-conduit http-client-conduit"
140 , "network-conduit zlib-conduit http-client-multipart"
141 , "wai-eventsource wai-test"
144 -- Cloud Haskell tests seem to be unreliable
145 mapM_ add $ words =<<
146 [ "distributed-process lockfree-queue network-transport-tcp"
149 -- Pulls in monad-peel which does not compile
150 when (ghcVer >= GhcMajorVersion 7 8) $ add "monad-control"
152 -- issues with pthread
153 mapM_ add $ words "hlibgit2 gitlib-s3 gitlib-libgit2"
155 -- https://github.com/fpco/stackage/issues/226
158 -- Requires too high a bytestring
159 when (ghcVer <= GhcMajorVersion 7 4) $ add "scientific"
161 -- https://github.com/gtk2hs/gtk2hs/issues/36
165 -- https://github.com/acw/bytestring-progress/issues/3
166 add "bytestring-progress"
168 -- Seems to require 32-bit functions
171 -- Depends on a missing graphviz executable
175 add = tell . singleton . PackageName
177-- | List of packages for our stable Hackage. All dependencies will be
178-- included as well. Please indicate who will be maintaining the package
180defaultStablePackages :: GhcMajorVersion
181 -> Bool -- ^ using haskell platform?
182 -> Map PackageName (VersionRange, Maintainer)
183defaultStablePackages ghcVer requireHP = unPackageMap $ execWriter $ do
184 mapM_ (add "michael@snoyman.com") $ words =<<
185 [ "yesod yesod-newsfeed yesod-sitemap yesod-static yesod-test yesod-bin"
186 , "markdown mime-mail-ses"
187 , "persistent persistent-template persistent-sqlite"
188 , "network-conduit-tls yackage warp-tls keter"
189 , "process-conduit stm-conduit"
190 , "classy-prelude-yesod yesod-fay yesod-eventsource wai-websockets"
191 , "random-shuffle hebrew-time"
192 , "bzlib-conduit case-insensitive"
193 , "conduit-extra conduit-combinators yesod-websockets"
195 when (ghcVer >= GhcMajorVersion 7 6) $ add "michael@snoyman.com" "cabal-src"
196#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
197 -- Does not compile on Windows
198 mapM_ (add "michael@snoyman.com") $ words "judy"
201 mapM_ (add "FP Complete <michael@fpcomplete.com>") $ words =<<
202 [ "web-fpco th-expand-syns configurator smtLib"
203 , "fixed-list indents language-c pretty-class"
204 , "aws csv-conduit cassava"
205 , "async shelly thyme"
206 , "hxt hxt-relaxng dimensional"
207 , "cairo diagrams-cairo"
208 , "persistent-mongoDB fpco-api"
209 , "base16-bytestring convertible"
210 , "compdata hybrid-vectors"
212 when (ghcVer < GhcMajorVersion 7 8) $ do -- No GHC 7.8 support
213 mapM_ (add "FP Complete <michael@fpcomplete.com>") $ words =<<
214 [ "" -- too unreliable for the moment "distributed-process distributed-process-simplelocalnet"
215 , "threepenny-gui unification-fd"
217 addRange "FP Complete <michael@fpcomplete.com>" "compdata" "< 0.8"
219 -- Deprecated version
220 addRange "FP Complete <michael@fpcomplete.com>" "persistent-mongoDB" "< 1.3.1 || > 1.3.1"
221 when (ghcVer < GhcMajorVersion 7 6) $ do
223 addRange "FP Complete <michael@fpcomplete.com>" "hxt" "<= 9.3.0.1"
224 addRange "FP Complete <michael@fpcomplete.com>" "shelly" "<= 1.0"
225 addRange "FP Complete <michael@fpcomplete.com>" "lockfree-queue" "== 0.2"
226 -- when (ghcVer == GhcMajorVersion 7 6) $ do -- No GHC 7.8 support
227 -- add "FP Complete <michael@fpcomplete.com>" "repa-devil"
228 addRange "FP Complete <michael@fpcomplete.com>" "kure" "<= 2.4.10"
230 mapM_ (add "Neil Mitchell") $ words
231 "hlint hoogle shake derive"
233 mapM_ (add "Alan Zimmerman") $ words
234 "hjsmin language-javascript"
235 -- Requires newer alex than provided with HP
236 when (ghcVer == GhcMajorVersion 7 4 && requireHP) $
237 addRange "Alan Zimmerman" "language-javascript" "== 0.5.9"
239 mapM_ (add "Jasper Van der Jeugt") $ words
240 "blaze-html blaze-markup stylish-haskell"
242 mapM_ (add "Antoine Latter") $ words
245 mapM_ (add "Stefan Wehr <wehr@factisresearch.com>") $ words
246 "HTF xmlgen stm-stats"
247 when (ghcVer < GhcMajorVersion 7 8) $ add "Stefan Wehr <wehr@factisresearch.com>" "hscurses"
249 mapM_ (add "Bart Massey <bart.massey+stackage@gmail.com>") $ words
252 mapM_ (add "Vincent Hanquez") $ words =<<
253 [ "bytedump certificate cipher-aes cipher-rc4 connection"
254 , "cprng-aes cpu crypto-pubkey-types crypto-random-api cryptocipher"
255 , "cryptohash hit language-java libgit pem siphash socks tls"
256 , "tls-debug vhd language-java"
259 mapM_ (add "Chris Done") $ words
262#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
263 -- Does not compile on Windows
264 mapM_ (add "Vincent Hanquez") $ words "udbus xenstore"
267 when (ghcVer < GhcMajorVersion 7 8) $
268 mapM_ (add "Alberto G. Corona <agocorona@gmail.com>") $ words
269 "RefSerialize TCache Workflow MFlow"
271 mapM_ (add "Edward Kmett <ekmett@gmail.com>") $ words =<<
272 [ "ad adjunctions bifunctors bound charset comonad comonad-transformers"
273 , "comonads-fd compressed concurrent-supply constraints contravariant"
274 , "distributive either eq free groupoids heaps hyphenation"
275 , "integration intervals kan-extensions lca lens linear monadic-arrays machines"
276 , "mtl profunctors profunctor-extras reducers reflection"
277 , "semigroups semigroupoids semigroupoid-extras speculation tagged void"
278 , "graphs monad-products monad-st wl-pprint-extras wl-pprint-terminfo"
279 , "numeric-extras parsers pointed prelude-extras reducers"
280 , "streams vector-instances"
282 when (ghcVer < GhcMajorVersion 7 8) $
283 mapM_ (add "Edward Kmett <ekmett@gmail.com>") $ words =<<
284 [ "categories comonad-extras recursion-schemes syb-extras"
287 when (ghcVer >= GhcMajorVersion 7 6) $
288 mapM_ (add "Andrew Farmer <afarmer@ittc.ku.edu>") $ words
289 "scotty wai-middleware-static"
291 mapM_ (add "Simon Hengel <sol@typeful.net>") $ words
292 "hspec doctest base-compat"
294 mapM_ (add "Mario Blazevic <blamario@yahoo.com>") $ words
295 "monad-parallel monad-coroutine"
296 -- https://github.com/blamario/monoid-subclasses/issues/3
297 when (ghcVer >= GhcMajorVersion 7 6) $ do
298 mapM_ (add "Mario Blazevic <blamario@yahoo.com>") $ words
299 "incremental-parser monoid-subclasses"
301 mapM_ (add "Brent Yorgey <byorgey@gmail.com>") $ words =<<
302 [ "monoid-extras dual-tree vector-space-points active force-layout"
303 , "diagrams diagrams-contrib diagrams-core diagrams-lib diagrams-svg"
304 , "diagrams-postscript diagrams-builder diagrams-haddock haxr"
305 , "BlogLiterately BlogLiterately-diagrams"
308 mapM_ (add "Vincent Berthoux <vincent.berthoux@gmail.com>") $ words
311 mapM_ (add "Patrick Brisbin") $ words "gravatar"
313 mapM_ (add "Felipe Lessa <felipe.lessa@gmail.com>") $ words
314 "esqueleto fb fb-persistent yesod-fb yesod-auth-fb"
316 mapM_ (add "Alexander Altman <alexanderaltman@me.com>") $ words
317 "base-unicode-symbols containers-unicode-symbols"
319 -- NOTE: accelerate not yet supported on GHC 7.8
320 when (ghcVer == GhcMajorVersion 7 6) $ do
321 mapM_ (add "Ryan Newton <ryan.newton@alum.mit.edu>") $ words
323 when (ghcVer < GhcMajorVersion 7 6) $ do
324 addRange "Ryan Newton <ryan.newton@alum.mit.edu>" "accelerate" "< 0.14"
325 addRange "Ryan Newton <ryan.newton@alum.mit.edu>" "fclabels" "< 2.0"
327 mapM_ (add "Dan Burton <danburton.email@gmail.com>") $ words =<<
328 [ "basic-prelude composition io-memoize numbers rev-state runmemo"
329 , "tardis lens-family-th"
332 mapM_ (add "Daniel Díaz <dhelta.diaz@gmail.com>") $ words
335 mapM_ (add "Gabriel Gonzalez <Gabriel439@gmail.com>")
336 ["pipes", "pipes-parse", "pipes-concurrency"]
338 mapM_ (add "Adam Bergmark <adam@bergmark.nl>") $ words
339 "fay fay-base fay-dom fay-jquery fay-text fay-uri snaplet-fay"
341 mapM_ (add "Boris Lykah <lykahb@gmail.com>") $ words
342 "groundhog groundhog-th groundhog-sqlite groundhog-postgresql groundhog-mysql"
344 mapM_ (add "Janne Hellsten <jjhellst@gmail.com>") $ words
347 mapM_ (add "Michal J. Gajda") $ words
348 "iterable Octree FenwickTree hPDB"
349 when (ghcVer == GhcMajorVersion 7 6) $ do -- No GHC 7.8 support
350 mapM_ (add "Michal J. Gajda") $ words
353 mapM_ (add "Roman Cheplyaka <roma@ro-che.info>") $ words =<<
354 [ "smallcheck tasty tasty-smallcheck tasty-quickcheck tasty-hunit tasty-golden"
355 , "traverse-with-class regex-applicative time-lens"
356 , "haskell-names haskell-packages hse-cpp"
359 mapM_ (add "George Giorgidze <giorgidze@gmail.com>") $ words
362 when (ghcVer >= GhcMajorVersion 7 6) $ do -- No GHC 7.4 support
363 mapM_ (add "Phil Hargett <phil@haphazardhouse.net>") $ words
366#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
367 mapM_ (add "Aycan iRiCAN <iricanaycan@gmail.com>") $ words
368 "hdaemonize hsyslog hweblib"
370 mapM_ (add "Aycan iRiCAN <iricanaycan@gmail.com>") $ words
374 mapM_ (add "Joachim Breitner <mail@joachim-breitner.de>") $ words
375 "circle-packing arbtt"
377 when (ghcVer < GhcMajorVersion 7 8) $
378 mapM_ (add "John Wiegley") $ words =<<
379 -- Removed these: bad semigroups upper bound
380 [ "bindings-DSL github monad-extras numbers hlibgit2"
381 , "gitlib gitlib-cmdline gitlib-test"
382 , "gitlib-libgit2 gitlib-s3"
385 mapM_ (add "Ben Ford <ben@dlstartup.com") $ words
388 mapM_ (add "Clint Adams <clint@debian.org>") $ words
389 "DAV hOpenPGP hopenpgp-tools openpgp-asciiarmor MusicBrainz"
391 -- https://github.com/fpco/stackage/issues/160
392 when (ghcVer >= GhcMajorVersion 7 6) $ do
393 mapM_ (add "Ketil Malde") $ words =<<
394 [ "biocore biofasta biofastq biosff"
395 , "blastxml bioace biophd"
396 , "biopsl" -- https://github.com/ingolia/SamTools/issues/3 samtools
397 , "seqloc bioalign BlastHTTP"
398 -- The following have out-of-date dependencies currently
399 -- biostockholm memexml RNAwolf
400 -- , "Biobase BiobaseDotP BiobaseFR3D BiobaseInfernal BiobaseMAF"
401 -- , "BiobaseTrainingData BiobaseTurner BiobaseXNA BiobaseVienna"
402 -- , "BiobaseTypes BiobaseFasta"
405 -- https://github.com/fpco/stackage/issues/163
406 addRange "Michael Snoyman" "biophd" "< 0.0.6 || > 0.0.6"
407 when (ghcVer == GhcMajorVersion 7 6) $ do
408 mapM_ (add "Ketil Malde") $ words =<<
413 mapM_ (add "Silk <code@silk.co>") $ words =<<
414 [ "aeson-utils arrow-list attoparsec-expr bumper code-builder fay-builder"
415 , "generic-aeson hxt-pickle-utils json-schema multipart regular-xmlpickler"
416 , "rest-client rest-core rest-gen rest-happstack rest-snap rest-stringmap"
417 , "rest-types rest-wai tostring uri-encode"
420 -- Newest hxt requires network 2.4 or newest
421 when (ghcVer == GhcMajorVersion 7 4 && requireHP) $ do
422 addRange "Michael Snoyman" "hxt" "< 9.3.1"
423 addRange "Michael Snoyman" "network" "< 2.4"
425 -- https://github.com/fpco/stackage/issues/189
426 addRange "Michael Snoyman" "statistics" "< 0.11"
428 -- https://github.com/fpco/stackage/issues/197
429 when (ghcVer == GhcMajorVersion 7 6 && requireHP) $
430 addRange "Michael Snoyman" "parsers" "< 0.11"
432 -- https://github.com/fpco/stackage/issues/216
433 -- QuickCheck constraint
434 -- when (ghcVer == GhcMajorVersion 7 6) $
435 -- addRange "Michael Snoyman" "repa" "< 3.2.5.1"
437 -- https://github.com/fpco/stackage/issues/217
438 addRange "Michael Snoyman" "transformers" "< 0.4"
439 addRange "Michael Snoyman" "mtl" "< 2.2"
440 addRange "Michael Snoyman" "lifted-base" "< 0.2.2.2"
442 -- https://github.com/fpco/stackage/issues/224
443 when (ghcVer <= GhcMajorVersion 7 6) $ do
444 addRange "Michael Snoyman" "zip-archive" "== 0.2.2.1"
446 -- https://github.com/fpco/stackage/issues/231
447 addRange "Michael Snoyman" "optparse-applicative" "< 0.9"
449 -- https://github.com/fpco/stackage/issues/237
450 addRange "Michael Snoyman" "lens" "< 4.2"
452 -- https://github.com/fpco/stackage/issues/242
453 addRange "Michael Snoyman" "mongoDB" "< 1.5"
455 -- Requires too new a version of text
456 when (ghcVer == GhcMajorVersion 7 4 && requireHP) $ do
457 addRange "Michael Snoyman" "attoparsec" "< 0.11.2.1"
458 addRange "Michael Snoyman" "parsers" "< 0.11"
461 addRange "Michael Snoyman" "bson" "== 0.2.4"
463 -- Depends on a newer version of happy
464 when (ghcVer < GhcMajorVersion 7 8) $
465 addRange "Roman Cheplyaka <roma@ro-che.info>" "pretty-show" "<= 1.6.1"
467 -- 0.16.2 fixes dependency issues with different version of GHC
468 -- and Haskell Platform. Now builds on GHC 7.4-7.8. Version 1.0 is
469 -- guaranteed to break the API. See
470 -- https://travis-ci.org/jswebtools/language-ecmascript for
471 -- current build status.
472 addRange "Andrey Chudnov <oss@chudnov.com>" "language-ecmascript" ">= 0.16.2 && < 1.0"
474 add maintainer package = addRange maintainer package "-any"
475 addRange maintainer package range =
476 case simpleParse range of
477 Nothing -> error $ "Invalid range " ++ show range ++ " for " ++ package
478 Just range' -> tell $ PackageMap $ Map.singleton (PackageName package) (range', Maintainer maintainer)
480-- | Replacement Github users. This is useful when a project is owned by an
481-- organization, and you'd like to ping either an individual or a team in that
484-- https://github.com/fpco/stackage/issues/226#issuecomment-45644142
485convertGithubUser :: String -> String
487 fromMaybe x $ Map.lookup (map toLower x) pairs
490 [ ("diagrams", "diagrams/Core")
491 , ("yesodweb", "snoyberg")
492 , ("fpco", "snoyberg")
493 , ("faylang", "bergmark")
494 , ("silkapp", "silkapp/stackage")
495 , ("snapframework","mightybyte")
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list