PackageData.hs 1.5 KB
Newer Older
1 2 3 4 5 6
module Hadrian.Haskell.Cabal.PackageData where

import Development.Shake.Classes
import Hadrian.Package.Type
import GHC.Generics

Andrey Mokhov's avatar
Andrey Mokhov committed
7
-- | Most of these fields used to be provided in @package-data.mk@ files.
8
data PackageData = PackageData
Andrey Mokhov's avatar
Andrey Mokhov committed
9 10 11 12
    { dependencies    :: [PackageName]
    , name            :: PackageName
    , version         :: String
    , componentId     :: String
13
    , mainIs          :: Maybe (String, FilePath)  -- ("Main", filepath)
Andrey Mokhov's avatar
Andrey Mokhov committed
14 15 16 17 18 19 20 21 22 23 24
    , modules         :: [String]
    , otherModules    :: [String]
    , synopsis        :: String
    , description     :: String
    , srcDirs         :: [String]
    , deps            :: [String]
    , depIpIds        :: [String]
    , depNames        :: [String]
    , depCompIds      :: [String]
    , includeDirs     :: [String]
    , includes        :: [String]
25
    , installIncludes :: [String]
Andrey Mokhov's avatar
Andrey Mokhov committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    , extraLibs       :: [String]
    , extraLibDirs    :: [String]
    , asmSrcs         :: [String]
    , cSrcs           :: [String]
    , cmmSrcs         :: [String]
    , dataFiles       :: [String]
    , hcOpts          :: [String]
    , asmOpts         :: [String]
    , ccOpts          :: [String]
    , cmmOpts         :: [String]
    , cppOpts         :: [String]
    , ldOpts          :: [String]
    , depIncludeDirs  :: [String]
    , depCcOpts       :: [String]
    , depLdOpts       :: [String]
    , buildGhciLib    :: Bool
42 43
    } deriving (Eq, Read, Show, Typeable, Generic)

Andrey Mokhov's avatar
Andrey Mokhov committed
44
instance Binary   PackageData
45
instance Hashable PackageData
Andrey Mokhov's avatar
Andrey Mokhov committed
46
instance NFData   PackageData