Distribution.Types.Library

Cabal-3.2.0.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Types.Library

Synopsis

- data Library = Library {
  - libName :: LibraryName
  - exposedModules :: [ModuleName]
  - reexportedModules :: [ModuleReexport]
  - signatures :: [ModuleName]
  - libExposed :: Bool
  - libVisibility :: LibraryVisibility
  - libBuildInfo :: BuildInfo
  }
- emptyLibrary :: Library
- explicitLibModules :: Library -> [ModuleName]
- libModulesAutogen :: Library -> [ModuleName]

# Documentation

data Library #

Constructors

Library |
Fields libName :: LibraryName exposedModules :: [ModuleName] reexportedModules :: [ModuleReexport] signatures :: [ModuleName] What sigs need implementations? libExposed :: Bool Is the lib to be exposed by default? (i.e. whether its modules available in GHCi for example) libVisibility :: LibraryVisibility Whether this multilib can be dependent from outside. libBuildInfo :: BuildInfo

#### Instances

Instances details

Eq Library # |
Instance details Defined in Distribution.Types.Library Methods (==) :: Library -> Library -> Bool # (/=) :: Library -> Library -> Bool #
Data Library # |
Instance details Defined in Distribution.Types.Library Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Library -> c Library Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Library Source # toConstr :: Library -> Constr Source # dataTypeOf :: Library -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Library) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Library) Source # gmapT :: (forall b. Data b => b -> b) -> Library -> Library Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Library -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Library -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Library -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Library -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Library -> m Library Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Library -> m Library Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Library -> m Library Source #
Read Library # |
Instance details Defined in Distribution.Types.Library Methods readsPrec :: Int -> ReadS Library Source # readList :: ReadS [Library] Source # readPrec :: ReadPrec Library Source # readListPrec :: ReadPrec [Library] Source #
Show Library # |
Instance details Defined in Distribution.Types.Library Methods showsPrec :: Int -> Library -> ShowS Source # show :: Library -> String Source # showList :: [Library] -> ShowS Source #
Generic Library # |
Instance details Defined in Distribution.Types.Library Associated Types type Rep Library :: Type -> Type Source # Methods from :: Library -> Rep Library x Source # to :: Rep Library x -> Library Source #
Semigroup Library # |
Instance details Defined in Distribution.Types.Library Methods (<>) :: Library -> Library -> Library Source # sconcat :: NonEmpty Library -> Library Source # stimes :: Integral b => b -> Library -> Library Source #
Monoid Library # | This instance is not good. We need it for `addBuildableCondition`. More correct method would be some kind of "create empty clone". More concretely, `addBuildableCondition` will make `libVisibility = False` libraries when `buildable: false`. This may cause problems.
Instance details Defined in Distribution.Types.Library Methods mempty :: Library Source # mappend :: Library -> Library -> Library Source # mconcat :: [Library] -> Library Source #
Binary Library # |
Instance details Defined in Distribution.Types.Library Methods put :: Library -> Put Source # get :: Get Library Source # putList :: [Library] -> Put Source #
NFData Library # |
Instance details Defined in Distribution.Types.Library Methods rnf :: Library -> () Source #
Structured Library # |
Instance details Defined in Distribution.Types.Library Methods structure :: Proxy Library -> Structure # structureHash' :: Tagged Library MD5
HasBuildInfo Library # |
Instance details Defined in Distribution.Types.Library Methods buildInfo :: Lens' Library BuildInfo # buildable :: Lens' Library Bool # buildTools :: Lens' Library [LegacyExeDependency] # buildToolDepends :: Lens' Library [ExeDependency] # cppOptions :: Lens' Library [String] # asmOptions :: Lens' Library [String] # cmmOptions :: Lens' Library [String] # ccOptions :: Lens' Library [String] # cxxOptions :: Lens' Library [String] # ldOptions :: Lens' Library [String] # pkgconfigDepends :: Lens' Library [PkgconfigDependency] # frameworks :: Lens' Library [String] # extraFrameworkDirs :: Lens' Library [String] # asmSources :: Lens' Library [FilePath] # cmmSources :: Lens' Library [FilePath] # cSources :: Lens' Library [FilePath] # cxxSources :: Lens' Library [FilePath] # jsSources :: Lens' Library [FilePath] # hsSourceDirs :: Lens' Library [FilePath] # otherModules :: Lens' Library [ModuleName] # virtualModules :: Lens' Library [ModuleName] # autogenModules :: Lens' Library [ModuleName] # defaultLanguage :: Lens' Library (Maybe Language) # otherLanguages :: Lens' Library [Language] # defaultExtensions :: Lens' Library [Extension] # otherExtensions :: Lens' Library [Extension] # oldExtensions :: Lens' Library [Extension] # extraLibs :: Lens' Library [String] # extraGHCiLibs :: Lens' Library [String] # extraBundledLibs :: Lens' Library [String] # extraLibFlavours :: Lens' Library [String] # extraDynLibFlavours :: Lens' Library [String] # extraLibDirs :: Lens' Library [String] # includeDirs :: Lens' Library [FilePath] # includes :: Lens' Library [FilePath] # autogenIncludes :: Lens' Library [FilePath] # installIncludes :: Lens' Library [FilePath] # options :: Lens' Library (PerCompilerFlavor [String]) # profOptions :: Lens' Library (PerCompilerFlavor [String]) # sharedOptions :: Lens' Library (PerCompilerFlavor [String]) # staticOptions :: Lens' Library (PerCompilerFlavor [String]) # customFieldsBI :: Lens' Library [(String, String)] # targetBuildDepends :: Lens' Library [Dependency] # mixins :: Lens' Library [Mixin] #
type Rep Library # |
Instance details Defined in Distribution.Types.Library type Rep Library = D1 ('MetaData "Library" "Distribution.Types.Library" "Cabal-3.2.0.0" 'False) (C1 ('MetaCons "Library" 'PrefixI 'True) ((S1 ('MetaSel ('Just "libName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LibraryName) :*: (S1 ('MetaSel ('Just "exposedModules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ModuleName]) :*: S1 ('MetaSel ('Just "reexportedModules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ModuleReexport]))) :*: ((S1 ('MetaSel ('Just "signatures") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ModuleName]) :*: S1 ('MetaSel ('Just "libExposed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "libVisibility") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LibraryVisibility) :*: S1 ('MetaSel ('Just "libBuildInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuildInfo)))))

emptyLibrary :: Library #

explicitLibModules :: Library -> [ModuleName] #

Get all the module names from the library (exposed and internal modules) which are explicitly listed in the package description which would need to be compiled. (This does not include reexports, which do not need to be compiled.) This may not include all modules for which GHC generated interface files (i.e., implicit modules.)

libModulesAutogen :: Library -> [ModuleName] #

Get all the auto generated module names from the library, exposed or not. This are a subset of `libModules`.