Use Cabal directly in place of ghc-cabal + make build root configurable (#531)
[hadrian.git] / src / Hadrian / Haskell / Cabal / Type.hs
1 module Hadrian.Haskell.Cabal.Type where
2
3 import Development.Shake.Classes
4 import Distribution.PackageDescription (GenericPackageDescription, PackageDescription)
5 import GHC.Generics
6 import Hadrian.Package.Type
7
8 -- | Haskell package metadata extracted from a Cabal file.
9 data Cabal = Cabal
10 { name :: PackageName
11 , version :: String
12 , synopsis :: String
13 , genericPackageDescription :: GenericPackageDescription
14 , packageDescription :: PackageDescription
15 , packageDependencies :: [Package]
16 } deriving (Eq, Show, Typeable, Generic)
17
18 instance Binary Cabal
19
20 instance Hashable Cabal where
21 hashWithSalt salt = hashWithSalt salt . show
22
23 instance NFData Cabal