on ad01094 help sign in
stackage/Stackage/Config.hs
496 lines 19 kB history raw
1{-# LANGUAGE CPP #-}
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)
11import Stackage.Types
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
23 -> Set PackageName
24defaultExpectedFailures ghcVer = execWriter $ do
25 -- Requires an old version of WAI and Warp for tests
26 add "HTTP"
28 -- text and setenv have recursive dependencies in their tests, which
29 -- cabal can't (yet) handle
30 add "text"
31 add "setenv"
33 -- The version of GLUT included with the HP does not generate
34 -- documentation correctly.
35 add "GLUT"
37 -- https://github.com/bos/statistics/issues/42
38 add "statistics"
40 -- https://github.com/kazu-yamamoto/simple-sendfile/pull/10
41 add "simple-sendfile"
43 -- http://hackage.haskell.org/trac/hackage/ticket/954
44 add "diagrams"
46 -- https://github.com/fpco/stackage/issues/24
47 add "unix-time"
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
53 -- databases
54 add "HTF"
56 -- https://github.com/simonmar/monad-par/issues/28
57 add "monad-par"
59 -- Unfortunately network failures seem to happen haphazardly
60 add "network"
62 -- https://github.com/ekmett/hyphenation/issues/1
63 add "hyphenation"
65 -- Test suite takes too long to run on some systems
66 add "punycode"
68 -- http://hub.darcs.net/stepcut/happstack/issue/1
69 add "happstack-server"
71 -- Requires a Facebook app.
72 add "fb"
74 -- https://github.com/tibbe/hashable/issues/64
75 add "hashable"
77 -- https://github.com/vincenthz/language-java/issues/10
78 add "language-java"
80 add "threads"
81 add "crypto-conduit"
82 add "pandoc"
83 add "language-ecmascript"
84 add "hspec"
85 add "alex"
87 -- https://github.com/basvandijk/concurrent-extra/issues/
88 add "concurrent-extra"
90 -- https://github.com/skogsbaer/xmlgen/issues/2
91 add "xmlgen"
93 -- Something very strange going on with the test suite, I can't figure
94 -- out how to fix it
95 add "bson"
97 -- Requires a locally running PostgreSQL server with appropriate users
98 add "postgresql-simple"
100 -- Missing files
101 add "websockets"
103 -- Some kind of Cabal bug when trying to run tests
104 add "thyme"
106 when (ghcVer < GhcMajorVersion 7 6) $ do
107 -- https://github.com/haskell-suite/haskell-names/issues/39
108 add "haskell-names"
110 add "shake"
112 -- https://github.com/jgm/pandoc-citeproc/issues/5
113 add "pandoc-citeproc"
115 -- Problems with doctest and sandboxing
116 add "warp"
117 add "wai-logger"
119 -- https://github.com/fpco/stackage/issues/163
120 add "hTalos"
121 add "seqloc"
123 -- FIXME the test suite fails fairly regularly in builds, though I haven't
124 -- discovered why yet
125 add "crypto-numbers"
127 -- Test suite is currently failing regularly, needs to be worked out still.
128 add "lens"
130 -- Requires too old a version of test-framework
131 add "time"
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"
142 ]
144 -- Cloud Haskell tests seem to be unreliable
145 mapM_ add $ words =<<
146 [ "distributed-process lockfree-queue network-transport-tcp"
147 ]
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
156 add "options"
158 -- Requires too high a bytestring
159 when (ghcVer <= GhcMajorVersion 7 4) $ add "scientific"
161 -- https://github.com/gtk2hs/gtk2hs/issues/36
162 add "glib"
163 add "pango"
165 -- https://github.com/acw/bytestring-progress/issues/3
166 add "bytestring-progress"
168 -- Seems to require 32-bit functions
169 add "nettle"
171 -- Depends on a missing graphviz executable
172 add "graphviz"
174 where
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
179-- via comments.
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"
194 ]
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"
199#endif
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"
211 ]
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"
216 ]
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
222 when requireHP $ 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
243 "uuid byteorder"
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
250 "parseargs"
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"
257 ]
259 mapM_ (add "Chris Done") $ words
260 "statistics-linreg"
262#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
263 -- Does not compile on Windows
264 mapM_ (add "Vincent Hanquez") $ words "udbus xenstore"
265#endif
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"
281 ]
282 when (ghcVer < GhcMajorVersion 7 8) $
283 mapM_ (add "Edward Kmett <ekmett@gmail.com>") $ words =<<
284 [ "categories comonad-extras recursion-schemes syb-extras"
285 ]
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"
306 , "MonadRandom"
307 ]
308 mapM_ (add "Vincent Berthoux <vincent.berthoux@gmail.com>") $ words
309 "JuicyPixels"
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
322 "accelerate"
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"
330 ]
332 mapM_ (add "Daniel Díaz <dhelta.diaz@gmail.com>") $ words
333 "HaTeX matrix"
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
345 "sqlite-simple"
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
351 "hPDB-examples"
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"
357 ]
359 mapM_ (add "George Giorgidze <giorgidze@gmail.com>") $ words
360 "HCodecs YampaSynth"
362 when (ghcVer >= GhcMajorVersion 7 6) $ do -- No GHC 7.4 support
363 mapM_ (add "Phil Hargett <phil@haphazardhouse.net>") $ words
364 "courier"
366#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
367 mapM_ (add "Aycan iRiCAN <iricanaycan@gmail.com>") $ words
368 "hdaemonize hsyslog hweblib"
369#else
370 mapM_ (add "Aycan iRiCAN <iricanaycan@gmail.com>") $ words
371 "hweblib"
372#endif
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"
383 ]
385 mapM_ (add "Ben Ford <ben@dlstartup.com") $ words
386 "HandsomeSoup"
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"
403 -- MC-Fold-DP
404 ]
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 =<<
409 -- RNAFold
410 [ "hTalos parsestar"
411 ]
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"
418 ]
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"
460 -- local patch
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"
473 where
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
482-- organization. See:
483--
484-- https://github.com/fpco/stackage/issues/226#issuecomment-45644142
485convertGithubUser :: String -> String
486convertGithubUser x =
487 fromMaybe x $ Map.lookup (map toLower x) pairs
488 where
489 pairs = Map.fromList
490 [ ("diagrams", "diagrams/Core")
491 , ("yesodweb", "snoyberg")
492 , ("fpco", "snoyberg")
493 , ("faylang", "bergmark")
494 , ("silkapp", "silkapp/stackage")
495 , ("snapframework","mightybyte")
496 ]