Support GHC 9.12
[cabal.git] / Cabal / src / Distribution / Types / GivenComponent.hs
blobc8314311d898348f1f33be6df655ca4f842bc0db
1 {-# LANGUAGE DeriveDataTypeable #-}
2 {-# LANGUAGE DeriveGeneric #-}
4 module Distribution.Types.GivenComponent
5 ( GivenComponent (..)
6 ) where
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
19 -- @since 2.3.0.0
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