on 5697fdd help sign in
stackage/Stackage/Config.hs
78 lines 2.5 kB history raw
1{-# LANGUAGE CPP #-}
2module Stackage.Config where
4import Control.Monad (unless, when)
5import Control.Monad.Trans.Writer (execWriter, tell)
6import qualified Data.Map as Map
7import Data.Set (fromList, singleton)
8import Distribution.System (OS (..), buildOS)
9import Distribution.Text (simpleParse)
10import Stackage.Types
12targetCompilerVersion :: Version
13targetCompilerVersion =
14 case simpleParse "7.4.2" of
15 Nothing -> error "Invalid targetCompilerVersion"
16 Just v -> v
18-- | Packages which are shipped with GHC but are not included in the
19-- Haskell Platform list of core packages.
20extraCore :: Set PackageName
21extraCore = singleton $ PackageName "binary"
23-- | Test suites which are expected to fail for some reason. The test suite
24-- will still be run and logs kept, but a failure will not indicate an
25-- error in our package combination.
26expectedFailures :: Set PackageName
27expectedFailures = fromList $ map PackageName
28 [ -- Requires an old version of WAI and Warp for tests
29 "HTTP"
30 -- Requires a special hspec-meta which is not yet available from
31 -- Hackage.
32 , "hspec"
34 -- Requires markdown-unlit, which we don't want to depend on.
35 , "hspec-expectations"
37 -- text and setenv have recursive dependencies in their tests, which
38 -- cabal can't (yet) handle
39 , "text"
40 , "setenv"
42 -- The version of GLUT included with the HP does not generate
43 -- documentation correctly.
44 , "GLUT"
45 ]
47-- | List of packages for our stable Hackage. All dependencies will be
48-- included as well. Please indicate who will be maintaining the package
49-- via comments.
50stablePackages :: Map PackageName VersionRange
51stablePackages = execWriter $ do
52 -- Michael Snoyman michael@snoyman.com
53 addRange "yesod" "< 1.4"
54 add "yesod-newsfeed"
55 add "yesod-sitemap"
56 add "yesod-static"
57 add "yesod-test"
58 add "markdown"
59 add "filesystem-conduit"
60 add "mime-mail-ses"
62 -- Neil Mitchell
63 add "hoogle"
64 add "hlint"
65 where
66 add = flip addRange "-any"
67 addRange package range =
68 case simpleParse range of
69 Nothing -> error $ "Invalid range " ++ show range ++ " for " ++ package
70 Just range' -> tell $ Map.singleton (PackageName package) range'
72verbose :: Bool
73verbose =
74#if VERBOSE
75 True
76#else
77 False
78#endif