Read the `main-is` field from the cabal file for executables (#627)
[hadrian.git] / src / Hadrian / Haskell / Cabal / PackageData.hs
1 module Hadrian.Haskell.Cabal.PackageData where
2
3 import Development.Shake.Classes
4 import Hadrian.Package.Type
5 import GHC.Generics
6
7 -- | Most of these fields used to be provided in @package-data.mk@ files.
8 data PackageData = PackageData
9 { dependencies :: [PackageName]
10 , name :: PackageName
11 , version :: String
12 , componentId :: String
13 , mainIs :: Maybe (String, FilePath) -- ("Main", filepath)
14 , modules :: [String]
15 , otherModules :: [String]
16 , synopsis :: String
17 , description :: String
18 , srcDirs :: [String]
19 , deps :: [String]
20 , depIpIds :: [String]
21 , depNames :: [String]
22 , depCompIds :: [String]
23 , includeDirs :: [String]
24 , includes :: [String]
25 , installIncludes :: [String]
26 , extraLibs :: [String]
27 , extraLibDirs :: [String]
28 , asmSrcs :: [String]
29 , cSrcs :: [String]
30 , cmmSrcs :: [String]
31 , dataFiles :: [String]
32 , hcOpts :: [String]
33 , asmOpts :: [String]
34 , ccOpts :: [String]
35 , cmmOpts :: [String]
36 , cppOpts :: [String]
37 , ldOpts :: [String]
38 , depIncludeDirs :: [String]
39 , depCcOpts :: [String]
40 , depLdOpts :: [String]
41 , buildGhciLib :: Bool
42 } deriving (Eq, Read, Show, Typeable, Generic)
43
44 instance Binary PackageData
45 instance Hashable PackageData
46 instance NFData PackageData