on bcabc00 help sign in
stackage/Stackage/Config.hs
59 lines 2.2 kB history raw
1module Stackage.Config where
3import Control.Monad (unless, when)
4import Control.Monad.Trans.Writer (execWriter, tell)
5import qualified Data.Map as Map
6import Data.Set (fromList, singleton)
7import Distribution.System (OS (..), buildOS)
8import Distribution.Text (simpleParse)
9import Stackage.Types
11-- | Packages which are shipped with GHC but are not included in the
12-- Haskell Platform list of core packages.
13extraCore :: Set PackageName
14extraCore = singleton $ PackageName "binary"
16-- | Test suites which are expected to fail for some reason. The test suite
17-- will still be run and logs kept, but a failure will not indicate an
18-- error in our package combination.
19expectedFailures :: Set PackageName
20expectedFailures = fromList $ map PackageName
21 [ -- Requires an old version of WAI and Warp for tests
22 "HTTP"
23 -- Requires a special hspec-meta which is not yet available from
24 -- Hackage.
25 , "hspec"
27 -- Requires markdown-unlit, which we don't want to depend on.
28 , "hspec-expectations"
30 -- text and setenv have recursive dependencies in their tests, which
31 -- cabal can't (yet) handle
32 , "text"
33 , "setenv"
35 -- The version of GLUT included with the HP does not generate
36 -- documentation correctly.
37 , "GLUT"
38 ]
40-- | List of packages for our stable Hackage. All dependencies will be
41-- included as well. Please indicate who will be maintaining the package
42-- via comments.
43stablePackages :: Map PackageName VersionRange
44stablePackages = execWriter $ do
45 -- Michael Snoyman michael@snoyman.com
46 addRange "yesod" "< 1.4"
47 add "yesod-newsfeed"
48 add "yesod-sitemap"
49 add "yesod-static"
50 -- A few transient deps not otherwise picked up
51 add "cipher-aes"
52 when (buildOS == Linux) $ add "hinotify"
53 unless (buildOS == Windows) $ add "unix-time"
54 where
55 add = flip addRange "-any"
56 addRange package range =
57 case simpleParse range of
58 Nothing -> error $ "Invalid range " ++ show range ++ " for " ++ package
59 Just range' -> tell $ Map.singleton (PackageName package) range'