PackageData.hs 1.43 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 13 14 15 16 17 18 19 20 21 22 23
    { dependencies    :: [PackageName]
    , name            :: PackageName
    , version         :: String
    , componentId     :: String
    , modules         :: [String]
    , otherModules    :: [String]
    , synopsis        :: String
    , description     :: String
    , srcDirs         :: [String]
    , deps            :: [String]
    , depIpIds        :: [String]
    , depNames        :: [String]
    , depCompIds      :: [String]
    , includeDirs     :: [String]
    , includes        :: [String]
24
    , installIncludes :: [String]
Andrey Mokhov's avatar
Andrey Mokhov committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    , 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
41 42
    } deriving (Eq, Read, Show, Typeable, Generic)

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