Cabal-syntax-3.12.1.0: A library for working with .cabal files

Safe Haskell | None
Language | Haskell2010

Distribution.Types.Component

Synopsis

- data Component
  - = CLib Library
  - | CFLib ForeignLib
  - | CExe Executable
  - | CTest TestSuite
  - | CBench Benchmark
- foldComponent :: (Library -> a) -> (ForeignLib -> a) -> (Executable -> a) -> (TestSuite -> a) -> (Benchmark -> a) -> Component -> a
- componentBuildInfo :: Component -> BuildInfo
- componentBuildable :: Component -> Bool
- componentName :: Component -> ComponentName
- partitionComponents :: [Component] -> ([Library], [ForeignLib], [Executable], [TestSuite], [Benchmark])

# Documentation

data Component Source #

Constructors

CLib Library |
CFLib ForeignLib |
CExe Executable |
CTest TestSuite |
CBench Benchmark |

#### Instances

Instances details

HasBuildInfo Component Source # |

Instance details

Defined in Distribution.Types.Component

Methods

buildInfo :: Lens' Component BuildInfo Source #

buildable :: Lens' Component Bool Source #

buildTools :: Lens' Component [LegacyExeDependency] Source #

buildToolDepends :: Lens' Component [ExeDependency] Source #

cppOptions :: Lens' Component [String] Source #

asmOptions :: Lens' Component [String] Source #

cmmOptions :: Lens' Component [String] Source #

ccOptions :: Lens' Component [String] Source #

cxxOptions :: Lens' Component [String] Source #

ldOptions :: Lens' Component [String] Source #

hsc2hsOptions :: Lens' Component [String] Source #

pkgconfigDepends :: Lens' Component [PkgconfigDependency] Source #

frameworks :: Lens' Component [String] Source #

extraFrameworkDirs :: Lens' Component [String] Source #

asmSources :: Lens' Component [FilePath] Source #

cmmSources :: Lens' Component [FilePath] Source #

cSources :: Lens' Component [FilePath] Source #

cxxSources :: Lens' Component [FilePath] Source #

jsSources :: Lens' Component [FilePath] Source #

hsSourceDirs :: Lens' Component [SymbolicPath PackageDir SourceDir] Source #

otherModules :: Lens' Component [ModuleName] Source #

virtualModules :: Lens' Component [ModuleName] Source #

autogenModules :: Lens' Component [ModuleName] Source #

defaultLanguage :: Lens' Component (Maybe Language) Source #

otherLanguages :: Lens' Component [Language] Source #

defaultExtensions :: Lens' Component [Extension] Source #

otherExtensions :: Lens' Component [Extension] Source #

oldExtensions :: Lens' Component [Extension] Source #

extraLibs :: Lens' Component [String] Source #

extraLibsStatic :: Lens' Component [String] Source #

extraGHCiLibs :: Lens' Component [String] Source #

extraBundledLibs :: Lens' Component [String] Source #

extraLibFlavours :: Lens' Component [String] Source #

extraDynLibFlavours :: Lens' Component [String] Source #

extraLibDirs :: Lens' Component [String] Source #

extraLibDirsStatic :: Lens' Component [String] Source #

includeDirs :: Lens' Component [FilePath] Source #

includes :: Lens' Component [FilePath] Source #

autogenIncludes :: Lens' Component [FilePath] Source #

installIncludes :: Lens' Component [FilePath] Source #

options :: Lens' Component (PerCompilerFlavor [String]) Source #

profOptions :: Lens' Component (PerCompilerFlavor [String]) Source #

sharedOptions :: Lens' Component (PerCompilerFlavor [String]) Source #

staticOptions :: Lens' Component (PerCompilerFlavor [String]) Source #

customFieldsBI :: Lens' Component [(String, String)] Source #

targetBuildDepends :: Lens' Component [Dependency] Source #

mixins :: Lens' Component [Mixin] Source #

Structured Component Source # |
Instance details Defined in Distribution.Types.Component Methods structure :: Proxy Component -> Structure Source # structureHash' :: Tagged Component MD5
Binary Component Source # |
Instance details Defined in Distribution.Types.Component Methods put :: Component -> Put Source # get :: Get Component Source # putList :: [Component] -> Put Source #
Semigroup Component Source # |
Instance details Defined in Distribution.Types.Component Methods (<>) :: Component -> Component -> Component # sconcat :: NonEmpty Component -> Component # stimes :: Integral b => b -> Component -> Component #
Generic Component Source # |

Instance details

Defined in Distribution.Types.Component

Associated Types

type Rep Component |

Instance details

Defined in Distribution.Types.Component

type Rep Component = D1 ('MetaData "Component" "Distribution.Types.Component" "Cabal-syntax-3.12.1.0-5c0e" 'False) ((C1 ('MetaCons "CLib" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Library)) :+: C1 ('MetaCons "CFLib" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ForeignLib))) :+: (C1 ('MetaCons "CExe" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Executable)) :+: (C1 ('MetaCons "CTest" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TestSuite)) :+: C1 ('MetaCons "CBench" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Benchmark)))))

Methods

from :: Component -> Rep Component x #

to :: Rep Component x -> Component #

Read Component Source # |
Instance details Defined in Distribution.Types.Component Methods readsPrec :: Int -> ReadS Component # readList :: ReadS [Component] # readPrec :: ReadPrec Component # readListPrec :: ReadPrec [Component] #
Show Component Source # |
Instance details Defined in Distribution.Types.Component Methods showsPrec :: Int -> Component -> ShowS # show :: Component -> String # showList :: [Component] -> ShowS #
Eq Component Source # |
Instance details Defined in Distribution.Types.Component Methods (==) :: Component -> Component -> Bool # (/=) :: Component -> Component -> Bool #
type Rep Component Source # |

Instance details

Defined in Distribution.Types.Component

type Rep Component = D1 ('MetaData "Component" "Distribution.Types.Component" "Cabal-syntax-3.12.1.0-5c0e" 'False) ((C1 ('MetaCons "CLib" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Library)) :+: C1 ('MetaCons "CFLib" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ForeignLib))) :+: (C1 ('MetaCons "CExe" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Executable)) :+: (C1 ('MetaCons "CTest" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TestSuite)) :+: C1 ('MetaCons "CBench" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Benchmark)))))

foldComponent :: (Library -> a) -> (ForeignLib -> a) -> (Executable -> a) -> (TestSuite -> a) -> (Benchmark -> a) -> Component -> a Source #

componentBuildInfo :: Component -> BuildInfo Source #

componentBuildable :: Component -> Bool Source #

Is a component buildable (i.e., not marked with `buildable: False`)? See also this note in Distribution.Types.ComponentRequestedSpec.

Since: Cabal-syntax-2.0.0.2

componentName :: Component -> ComponentName Source #

partitionComponents :: [Component] -> ([Library], [ForeignLib], [Executable], [TestSuite], [Benchmark]) Source #