df3255ffd23f797d59360e63f610a8047be31f18
[hadrian.git] / src / Hadrian / Haskell / Cabal / Type.hs
1 module Hadrian.Haskell.Cabal.Type where
2
3 import Development.Shake.Classes
4 import Hadrian.Package.Type
5
6 -- TODO: Use fine-grain tracking instead of tracking the whole Cabal file.
7 -- | Haskell package metadata extracted from a Cabal file.
8 data Cabal = Cabal
9 { dependencies :: [PackageName]
10 , name :: PackageName
11 , synopsis :: String
12 , version :: String
13 } deriving (Eq, Read, Show, Typeable)
14
15 instance Binary Cabal where
16 put = put . show
17 get = fmap read get
18
19 instance Hashable Cabal where
20 hashWithSalt salt = hashWithSalt salt . show
21
22 instance NFData Cabal where
23 rnf (Cabal a b c d) = a `seq` b `seq` c `seq` d `seq` ()