1 {-# LANGUAGE DeriveDataTypeable #-}
2 {-# LANGUAGE DeriveGeneric #-}
4 module Distribution
.Types
.GivenComponent
8 import Distribution
.Compat
.Prelude
10 import Distribution
.Types
.ComponentId
11 import Distribution
.Types
.LibraryName
12 import Distribution
.Types
.PackageName
14 -- | A 'GivenComponent' represents a library depended on and explicitly
15 -- specified by the user/client with @--dependency@
17 -- It enables Cabal to know which 'ComponentId' to associate with a library
20 data GivenComponent
= GivenComponent
21 { givenComponentPackage
:: PackageName
22 , givenComponentName
:: LibraryName
-- --dependency is for libraries
23 -- only, not for any component
24 , givenComponentId
:: ComponentId
26 deriving (Generic
, Read, Show, Eq
, Typeable
)
28 instance Binary GivenComponent
29 instance Structured GivenComponent