on 4e6e979 help sign in
stackage/Stackage/Config.hs
47 lines 1.9 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"
26 ]
28-- | List of packages for our stable Hackage. All dependencies will be
29-- included as well. Please indicate who will be maintaining the package
30-- via comments.
31stablePackages :: Map PackageName VersionRange
32stablePackages = execWriter $ do
33 -- Michael Snoyman michael@snoyman.com
34 addRange "yesod" "< 1.4"
35 add "yesod-newsfeed"
36 add "yesod-sitemap"
37 add "yesod-static"
38 -- A few transient deps not otherwise picked up
39 add "cipher-aes"
40 when (buildOS == Linux) $ add "hinotify"
41 unless (buildOS == Windows) $ add "unix-time"
42 where
43 add = flip addRange "-any"
44 addRange package range =
45 case simpleParse range of
46 Nothing -> error $ "Invalid range " ++ show range ++ " for " ++ package
47 Just range' -> tell $ Map.singleton (PackageName package) range'