Safe Haskell | None |
---|---|
Language | GHC2021 |
Stack.Types.Component
Description
A module providing the types that represent different sorts of components of a package (library and sub-library, foreign library, executable, test suite and benchmark).
Synopsis
- data StackLibrary = StackLibrary {}
- data StackForeignLibrary = StackForeignLibrary {}
- data StackExecutable = StackExecutable {}
- data StackTestSuite = StackTestSuite {}
- data StackBenchmark = StackBenchmark {}
- newtype StackUnqualCompName = StackUnqualCompName UnqualComponentName
- data StackBuildInfo = StackBuildInfo {
- buildable :: !Bool
- dependency :: !(Map PackageName DepValue)
- unknownTools :: Set Text
- otherModules :: [ModuleName]
- jsSources :: [FilePath]
- hsSourceDirs :: [SymbolicPath PackageDir SourceDir]
- cSources :: [FilePath]
- cppOptions :: [String]
- targetBuildDepends :: [Dependency]
- options :: PerCompilerFlavor [String]
- allLanguages :: [Language]
- usedExtensions :: [Extension]
- includeDirs :: [FilePath]
- extraLibs :: [String]
- extraLibDirs :: [String]
- frameworks :: [String]
- type HasName component = HasField "name" component StackUnqualCompName
- type HasBuildInfo component = HasField "buildInfo" component StackBuildInfo
- type HasComponentInfo component = (HasName component, HasBuildInfo component, HasQualiName component)
Documentation
data StackLibrary Source #
A type representing (unnamed) main library or sub-library components of a package.
Cabal-syntax uses data constructors
LMainLibName
and
LSubLibName
to distinguish main libraries
and sub-libraries. We do not do so, as the 'missing' name in the case of a
main library can be represented by the empty string.
The corresponding Cabal-syntax type is Library
.
Constructors
StackLibrary | |
Fields |
Instances
Show StackLibrary Source # | |
Defined in Stack.Types.Component Methods showsPrec :: Int -> StackLibrary -> ShowS # show :: StackLibrary -> String # showList :: [StackLibrary] -> ShowS # | |
HasField "qualifiedName" StackLibrary NamedComponent Source # | |
Defined in Stack.Types.Component Methods getField :: StackLibrary -> NamedComponent # |
data StackForeignLibrary Source #
A type representing foreign library components of a package.
The corresponding Cabal-syntax type is
ForeignLib
.
Constructors
StackForeignLibrary | |
Fields |
Instances
Show StackForeignLibrary Source # | |
Defined in Stack.Types.Component Methods showsPrec :: Int -> StackForeignLibrary -> ShowS # show :: StackForeignLibrary -> String # showList :: [StackForeignLibrary] -> ShowS # | |
HasField "qualifiedName" StackForeignLibrary NamedComponent Source # | |
Defined in Stack.Types.Component Methods |
data StackExecutable Source #
A type representing executable components of a package.
The corresponding Cabal-syntax type is
Executable
.
Constructors
StackExecutable | |
Fields |
Instances
Show StackExecutable Source # | |
Defined in Stack.Types.Component Methods showsPrec :: Int -> StackExecutable -> ShowS # show :: StackExecutable -> String # showList :: [StackExecutable] -> ShowS # | |
HasField "qualifiedName" StackExecutable NamedComponent Source # | |
Defined in Stack.Types.Component Methods |
data StackTestSuite Source #
A type representing test suite components of a package.
The corresponding Cabal-syntax type is
TestSuite
.
Constructors
StackTestSuite | |
Fields |
Instances
Show StackTestSuite Source # | |
Defined in Stack.Types.Component Methods showsPrec :: Int -> StackTestSuite -> ShowS # show :: StackTestSuite -> String # showList :: [StackTestSuite] -> ShowS # | |
HasField "qualifiedName" StackTestSuite NamedComponent Source # | |
Defined in Stack.Types.Component Methods |
data StackBenchmark Source #
A type representing benchmark components of a package.
The corresponding Cabal-syntax type is
Benchmark
.
Constructors
StackBenchmark | |
Fields
|
Instances
Show StackBenchmark Source # | |
Defined in Stack.Types.Component Methods showsPrec :: Int -> StackBenchmark -> ShowS # show :: StackBenchmark -> String # showList :: [StackBenchmark] -> ShowS # | |
HasField "qualifiedName" StackBenchmark NamedComponent Source # | |
Defined in Stack.Types.Component Methods |
newtype StackUnqualCompName Source #
Type representing the name of an 'unqualified' component (that is, the component can be any sort - a (unnamed) main library or sub-library, an executable, etc. ).
The corresponding The Cabal-syntax type is
UnqualComponentName
.
Constructors
StackUnqualCompName UnqualComponentName |
Instances
data StackBuildInfo Source #
Type representing information needed to build. The file gathering-related fields are lazy because they are not always needed.
The corresponding Cabal-syntax type is
BuildInfo
.
Constructors
StackBuildInfo | |
Fields
|
Instances
Show StackBuildInfo Source # | |
Defined in Stack.Types.Component Methods showsPrec :: Int -> StackBuildInfo -> ShowS # show :: StackBuildInfo -> String # showList :: [StackBuildInfo] -> ShowS # |
type HasName component = HasField "name" component StackUnqualCompName Source #
Type synonym for a HasField
constraint.
type HasBuildInfo component = HasField "buildInfo" component StackBuildInfo Source #
Type synonym for a HasField
constraint.
type HasComponentInfo component = (HasName component, HasBuildInfo component, HasQualiName component) Source #
Type synonym for a HasField
constraint for all the common component
fields i.e. name
, buildInfo
and qualifiedName
.