on 529cfab help sign in
stackage/Stackage/Config.hs
501 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 -- https://github.com/silkapp/json-schema/issues/8
175 when (ghcVer <= GhcMajorVersion 7 6) $
176 add "json-schema"
178 where
179 add = tell . singleton . PackageName
181-- | List of packages for our stable Hackage. All dependencies will be
182-- included as well. Please indicate who will be maintaining the package
183-- via comments.
184defaultStablePackages :: GhcMajorVersion
185 -> Bool -- ^ using haskell platform?
186 -> Map PackageName (VersionRange, Maintainer)
187defaultStablePackages ghcVer requireHP = unPackageMap $ execWriter $ do
188 mapM_ (add "michael@snoyman.com") $ words =<<
189 [ "yesod yesod-newsfeed yesod-sitemap yesod-static yesod-test yesod-bin"
190 , "markdown mime-mail-ses"
191 , "persistent persistent-template persistent-sqlite"
192 , "network-conduit-tls yackage warp-tls keter"
193 , "process-conduit stm-conduit"
194 , "classy-prelude-yesod yesod-fay yesod-eventsource wai-websockets"
195 , "random-shuffle hebrew-time"
196 , "bzlib-conduit case-insensitive"
197 , "conduit-extra conduit-combinators yesod-websockets"
198 ]
199 when (ghcVer >= GhcMajorVersion 7 6) $ add "michael@snoyman.com" "cabal-src"
200#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
201 -- Does not compile on Windows
202 mapM_ (add "michael@snoyman.com") $ words "judy"
203#endif
205 mapM_ (add "FP Complete <michael@fpcomplete.com>") $ words =<<
206 [ "web-fpco th-expand-syns configurator smtLib"
207 , "fixed-list indents language-c pretty-class"
208 , "aws csv-conduit cassava"
209 , "async shelly thyme"
210 , "hxt hxt-relaxng dimensional"
211 , "cairo diagrams-cairo"
212 , "persistent-mongoDB fpco-api"
213 , "base16-bytestring convertible"
214 , "compdata hybrid-vectors"
215 ]
216 when (ghcVer < GhcMajorVersion 7 8) $ do -- No GHC 7.8 support
217 mapM_ (add "FP Complete <michael@fpcomplete.com>") $ words =<<
218 [ "" -- too unreliable for the moment "distributed-process distributed-process-simplelocalnet"
219 , "threepenny-gui unification-fd"
220 ]
221 addRange "FP Complete <michael@fpcomplete.com>" "compdata" "< 0.8"
223 -- Deprecated version
224 addRange "FP Complete <michael@fpcomplete.com>" "persistent-mongoDB" "< 1.3.1 || > 1.3.1"
225 when (ghcVer < GhcMajorVersion 7 6) $ do
226 when requireHP $ do
227 addRange "FP Complete <michael@fpcomplete.com>" "hxt" "<= 9.3.0.1"
228 addRange "FP Complete <michael@fpcomplete.com>" "shelly" "<= 1.0"
229 addRange "FP Complete <michael@fpcomplete.com>" "lockfree-queue" "== 0.2"
230 -- when (ghcVer == GhcMajorVersion 7 6) $ do -- No GHC 7.8 support
231 -- add "FP Complete <michael@fpcomplete.com>" "repa-devil"
232 addRange "FP Complete <michael@fpcomplete.com>" "kure" "<= 2.4.10"
234 mapM_ (add "Neil Mitchell") $ words
235 "hlint hoogle shake derive"
237 mapM_ (add "Alan Zimmerman") $ words
238 "hjsmin language-javascript"
239 -- Requires newer alex than provided with HP
240 when (ghcVer == GhcMajorVersion 7 4 && requireHP) $
241 addRange "Alan Zimmerman" "language-javascript" "== 0.5.9"
243 mapM_ (add "Jasper Van der Jeugt") $ words
244 "blaze-html blaze-markup stylish-haskell"
246 mapM_ (add "Antoine Latter") $ words
247 "uuid byteorder"
249 mapM_ (add "Stefan Wehr <wehr@factisresearch.com>") $ words
250 "HTF xmlgen stm-stats"
251 when (ghcVer < GhcMajorVersion 7 8) $ add "Stefan Wehr <wehr@factisresearch.com>" "hscurses"
253 mapM_ (add "Bart Massey <bart.massey+stackage@gmail.com>") $ words
254 "parseargs"
256 mapM_ (add "Vincent Hanquez") $ words =<<
257 [ "bytedump certificate cipher-aes cipher-rc4 connection"
258 , "cprng-aes cpu crypto-pubkey-types crypto-random-api cryptocipher"
259 , "cryptohash hit language-java libgit pem siphash socks tls"
260 , "tls-debug vhd language-java"
261 ]
263 mapM_ (add "Chris Done") $ words
264 "statistics-linreg"
266#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
267 -- Does not compile on Windows
268 mapM_ (add "Vincent Hanquez") $ words "udbus xenstore"
269#endif
271 when (ghcVer < GhcMajorVersion 7 8) $
272 mapM_ (add "Alberto G. Corona <agocorona@gmail.com>") $ words
273 "RefSerialize TCache Workflow MFlow"
275 mapM_ (add "Edward Kmett <ekmett@gmail.com>") $ words =<<
276 [ "ad adjunctions bifunctors bound charset comonad comonad-transformers"
277 , "comonads-fd compressed concurrent-supply constraints contravariant"
278 , "distributive either eq free groupoids heaps hyphenation"
279 , "integration intervals kan-extensions lca lens linear monadic-arrays machines"
280 , "mtl profunctors profunctor-extras reducers reflection"
281 , "semigroups semigroupoids semigroupoid-extras speculation tagged void"
282 , "graphs monad-products monad-st wl-pprint-extras wl-pprint-terminfo"
283 , "numeric-extras parsers pointed prelude-extras reducers"
284 , "streams vector-instances"
285 ]
286 when (ghcVer < GhcMajorVersion 7 8) $
287 mapM_ (add "Edward Kmett <ekmett@gmail.com>") $ words =<<
288 [ "categories comonad-extras recursion-schemes syb-extras"
289 ]
291 when (ghcVer >= GhcMajorVersion 7 6) $
292 mapM_ (add "Andrew Farmer <afarmer@ittc.ku.edu>") $ words
293 "scotty wai-middleware-static"
295 mapM_ (add "Simon Hengel <sol@typeful.net>") $ words
296 "hspec doctest base-compat"
298 mapM_ (add "Mario Blazevic <blamario@yahoo.com>") $ words
299 "monad-parallel monad-coroutine"
300 -- https://github.com/blamario/monoid-subclasses/issues/3
301 when (ghcVer >= GhcMajorVersion 7 6) $ do
302 mapM_ (add "Mario Blazevic <blamario@yahoo.com>") $ words
303 "incremental-parser monoid-subclasses"
305 mapM_ (add "Brent Yorgey <byorgey@gmail.com>") $ words =<<
306 [ "monoid-extras dual-tree vector-space-points active force-layout"
307 , "diagrams diagrams-contrib diagrams-core diagrams-lib diagrams-svg"
308 , "diagrams-postscript diagrams-builder diagrams-haddock haxr"
309 , "BlogLiterately BlogLiterately-diagrams"
310 , "MonadRandom"
311 ]
312 mapM_ (add "Vincent Berthoux <vincent.berthoux@gmail.com>") $ words
313 "JuicyPixels"
315 mapM_ (add "Patrick Brisbin") $ words "gravatar"
317 mapM_ (add "Felipe Lessa <felipe.lessa@gmail.com>") $ words
318 "esqueleto fb fb-persistent yesod-fb yesod-auth-fb"
320 mapM_ (add "Alexander Altman <alexanderaltman@me.com>") $ words
321 "base-unicode-symbols containers-unicode-symbols"
323 -- NOTE: accelerate not yet supported on GHC 7.8
324 when (ghcVer == GhcMajorVersion 7 6) $ do
325 mapM_ (add "Ryan Newton <ryan.newton@alum.mit.edu>") $ words
326 "accelerate"
327 when (ghcVer < GhcMajorVersion 7 6) $ do
328 addRange "Ryan Newton <ryan.newton@alum.mit.edu>" "accelerate" "< 0.14"
329 addRange "Ryan Newton <ryan.newton@alum.mit.edu>" "fclabels" "< 2.0"
331 mapM_ (add "Dan Burton <danburton.email@gmail.com>") $ words =<<
332 [ "basic-prelude composition io-memoize numbers rev-state runmemo"
333 , "tardis lens-family-th"
334 ]
336 mapM_ (add "Daniel Díaz <dhelta.diaz@gmail.com>") $ words
337 "HaTeX matrix"
339 mapM_ (add "Gabriel Gonzalez <Gabriel439@gmail.com>")
340 ["pipes", "pipes-parse", "pipes-concurrency"]
342 mapM_ (add "Adam Bergmark <adam@bergmark.nl>") $ words
343 "fay fay-base fay-dom fay-jquery fay-text fay-uri snaplet-fay"
345 mapM_ (add "Boris Lykah <lykahb@gmail.com>") $ words
346 "groundhog groundhog-th groundhog-sqlite groundhog-postgresql groundhog-mysql"
348 mapM_ (add "Janne Hellsten <jjhellst@gmail.com>") $ words
349 "sqlite-simple"
351 mapM_ (add "Michal J. Gajda") $ words
352 "iterable Octree FenwickTree hPDB"
353 when (ghcVer == GhcMajorVersion 7 6) $ do -- No GHC 7.8 support
354 mapM_ (add "Michal J. Gajda") $ words
355 "hPDB-examples"
357 mapM_ (add "Roman Cheplyaka <roma@ro-che.info>") $ words =<<
358 [ "smallcheck tasty tasty-smallcheck tasty-quickcheck tasty-hunit tasty-golden"
359 , "traverse-with-class regex-applicative time-lens"
360 , "haskell-names haskell-packages hse-cpp"
361 ]
363 mapM_ (add "George Giorgidze <giorgidze@gmail.com>") $ words
364 "HCodecs YampaSynth"
366 when (ghcVer >= GhcMajorVersion 7 6) $ do -- No GHC 7.4 support
367 mapM_ (add "Phil Hargett <phil@haphazardhouse.net>") $ words
368 "courier"
370#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
371 mapM_ (add "Aycan iRiCAN <iricanaycan@gmail.com>") $ words
372 "hdaemonize hsyslog hweblib"
373#else
374 mapM_ (add "Aycan iRiCAN <iricanaycan@gmail.com>") $ words
375 "hweblib"
376#endif
378 mapM_ (add "Joachim Breitner <mail@joachim-breitner.de>") $ words
379 "circle-packing arbtt"
381 when (ghcVer < GhcMajorVersion 7 8) $
382 mapM_ (add "John Wiegley") $ words =<<
383 -- Removed these: bad semigroups upper bound
384 [ "bindings-DSL github monad-extras numbers hlibgit2"
385 , "gitlib gitlib-cmdline gitlib-test"
386 , "gitlib-libgit2 gitlib-s3"
387 ]
389 mapM_ (add "Ben Ford <ben@dlstartup.com") $ words
390 "HandsomeSoup"
392 mapM_ (add "Clint Adams <clint@debian.org>") $ words
393 "DAV hOpenPGP hopenpgp-tools openpgp-asciiarmor MusicBrainz"
395 -- https://github.com/fpco/stackage/issues/160
396 when (ghcVer >= GhcMajorVersion 7 6) $ do
397 mapM_ (add "Ketil Malde") $ words =<<
398 [ "biocore biofasta biofastq biosff"
399 , "blastxml bioace biophd"
400 , "biopsl" -- https://github.com/ingolia/SamTools/issues/3 samtools
401 , "seqloc bioalign BlastHTTP"
402 -- The following have out-of-date dependencies currently
403 -- biostockholm memexml RNAwolf
404 -- , "Biobase BiobaseDotP BiobaseFR3D BiobaseInfernal BiobaseMAF"
405 -- , "BiobaseTrainingData BiobaseTurner BiobaseXNA BiobaseVienna"
406 -- , "BiobaseTypes BiobaseFasta"
407 -- MC-Fold-DP
408 ]
409 -- https://github.com/fpco/stackage/issues/163
410 addRange "Michael Snoyman" "biophd" "< 0.0.6 || > 0.0.6"
411 when (ghcVer == GhcMajorVersion 7 6) $ do
412 mapM_ (add "Ketil Malde") $ words =<<
413 -- RNAFold
414 [ "hTalos parsestar"
415 ]
417 mapM_ (add "Silk <code@silk.co>") $ words =<<
418 [ "aeson-utils arrow-list attoparsec-expr bumper code-builder fay-builder"
419 , "generic-aeson hxt-pickle-utils json-schema multipart regular-xmlpickler"
420 , "rest-client rest-core rest-gen rest-happstack rest-snap rest-stringmap"
421 , "rest-types rest-wai tostring uri-encode imagesize-conduit"
422 ]
424 mapM_ (add "Simon Michael <simon@joyful.com>") $ words
425 "hledger"
427 -- Newest hxt requires network 2.4 or newest
428 when (ghcVer == GhcMajorVersion 7 4 && requireHP) $ do
429 addRange "Michael Snoyman" "hxt" "< 9.3.1"
430 addRange "Michael Snoyman" "network" "< 2.4"
432 -- https://github.com/fpco/stackage/issues/189
433 addRange "Michael Snoyman" "statistics" "< 0.11"
435 -- https://github.com/fpco/stackage/issues/197
436 when (ghcVer == GhcMajorVersion 7 6 && requireHP) $
437 addRange "Michael Snoyman" "parsers" "< 0.11"
439 -- https://github.com/fpco/stackage/issues/216
440 -- QuickCheck constraint
441 -- when (ghcVer == GhcMajorVersion 7 6) $
442 -- addRange "Michael Snoyman" "repa" "< 3.2.5.1"
444 -- https://github.com/fpco/stackage/issues/217
445 addRange "Michael Snoyman" "transformers" "< 0.4"
446 addRange "Michael Snoyman" "mtl" "< 2.2"
447 addRange "Michael Snoyman" "lifted-base" "< 0.2.2.2"
449 -- https://github.com/fpco/stackage/issues/224
450 when (ghcVer <= GhcMajorVersion 7 6) $ do
451 addRange "Michael Snoyman" "zip-archive" "== 0.2.2.1"
453 -- https://github.com/fpco/stackage/issues/231
454 addRange "Michael Snoyman" "optparse-applicative" "< 0.9"
456 -- https://github.com/fpco/stackage/issues/237
457 addRange "Michael Snoyman" "lens" "< 4.2"
459 -- https://github.com/fpco/stackage/issues/242
460 addRange "Michael Snoyman" "mongoDB" "< 1.5"
462 -- https://github.com/fpco/stackage/issues/257
463 addRange "Michael Snoyman" "aeson" "< 0.8"
465 -- Requires too new a version of text
466 when (ghcVer == GhcMajorVersion 7 4 && requireHP) $ do
467 addRange "Michael Snoyman" "attoparsec" "< 0.11.2.1"
468 addRange "Michael Snoyman" "parsers" "< 0.11"
470 -- local patch
471 addRange "Michael Snoyman" "bson" "== 0.2.4"
473 -- 0.16.2 fixes dependency issues with different version of GHC
474 -- and Haskell Platform. Now builds on GHC 7.4-7.8. Version 1.0 is
475 -- guaranteed to break the API. See
476 -- https://travis-ci.org/jswebtools/language-ecmascript for
477 -- current build status.
478 addRange "Andrey Chudnov <oss@chudnov.com>" "language-ecmascript" ">= 0.16.2 && < 1.0"
479 where
480 add maintainer package = addRange maintainer package "-any"
481 addRange maintainer package range =
482 case simpleParse range of
483 Nothing -> error $ "Invalid range " ++ show range ++ " for " ++ package
484 Just range' -> tell $ PackageMap $ Map.singleton (PackageName package) (range', Maintainer maintainer)
486-- | Replacement Github users. This is useful when a project is owned by an
487-- organization. It also lets you ping multiple users.
488--
489-- Note that cross organization team mentions aren't allowed by Github.
490convertGithubUser :: String -> [String]
491convertGithubUser x =
492 fromMaybe [x] $ Map.lookup (map toLower x) pairs
493 where
494 pairs = Map.fromList
495 [ ("diagrams", ["byorgey"])
496 , ("yesodweb", ["snoyberg"])
497 , ("fpco", ["snoyberg"])
498 , ("faylang", ["bergmark"])
499 , ("silkapp", ["bergmark"])
500 , ("snapframework",["mightybyte"])
501 ]