{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Types.BuildInfo
( BuildInfo (..)
, emptyBuildInfo
, allLanguages
, allExtensions
, usedExtensions
, usesTemplateHaskellOrQQ
, hcOptions
, hcProfOptions
, hcSharedOptions
, hcStaticOptions
) where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Types.Dependency
import Distribution.Types.ExeDependency
import Distribution.Types.LegacyExeDependency
import Distribution.Types.Mixin
import Distribution.Types.PkgconfigDependency
import Distribution.Utils.Path
import Distribution.Compiler
import Distribution.ModuleName
import Language.Haskell.Extension
data BuildInfo = BuildInfo
{ BuildInfo -> Bool
buildable :: Bool
, BuildInfo -> [LegacyExeDependency]
buildTools :: [LegacyExeDependency]
, BuildInfo -> [ExeDependency]
buildToolDepends :: [ExeDependency]
, BuildInfo -> [String]
cppOptions :: [String]
, BuildInfo -> [String]
asmOptions :: [String]
, BuildInfo -> [String]
cmmOptions :: [String]
, BuildInfo -> [String]
ccOptions :: [String]
, BuildInfo -> [String]
cxxOptions :: [String]
, BuildInfo -> [String]
ldOptions :: [String]
, BuildInfo -> [String]
hsc2hsOptions :: [String]
, BuildInfo -> [PkgconfigDependency]
pkgconfigDepends :: [PkgconfigDependency]
, BuildInfo -> [String]
frameworks :: [String]
, :: [String]
, BuildInfo -> [String]
asmSources :: [FilePath]
, BuildInfo -> [String]
cmmSources :: [FilePath]
, BuildInfo -> [String]
cSources :: [FilePath]
, BuildInfo -> [String]
cxxSources :: [FilePath]
, BuildInfo -> [String]
jsSources :: [FilePath]
, BuildInfo -> [SymbolicPath PackageDir SourceDir]
hsSourceDirs :: [SymbolicPath PackageDir SourceDir]
, BuildInfo -> [ModuleName]
otherModules :: [ModuleName]
, BuildInfo -> [ModuleName]
virtualModules :: [ModuleName]
, BuildInfo -> [ModuleName]
autogenModules :: [ModuleName]
, BuildInfo -> Maybe Language
defaultLanguage :: Maybe Language
, BuildInfo -> [Language]
otherLanguages :: [Language]
, BuildInfo -> [Extension]
defaultExtensions :: [Extension]
, BuildInfo -> [Extension]
otherExtensions :: [Extension]
, BuildInfo -> [Extension]
oldExtensions :: [Extension]
, :: [String]
, :: [String]
, :: [String]
, :: [String]
, :: [String]
, :: [String]
, :: [String]
, :: [String]
, BuildInfo -> [String]
includeDirs :: [FilePath]
, BuildInfo -> [String]
includes :: [FilePath]
, BuildInfo -> [String]
autogenIncludes :: [FilePath]
, BuildInfo -> [String]
installIncludes :: [FilePath]
, BuildInfo -> PerCompilerFlavor [String]
options :: PerCompilerFlavor [String]
, BuildInfo -> PerCompilerFlavor [String]
profOptions :: PerCompilerFlavor [String]
, BuildInfo -> PerCompilerFlavor [String]
sharedOptions :: PerCompilerFlavor [String]
, BuildInfo -> PerCompilerFlavor [String]
staticOptions :: PerCompilerFlavor [String]
, BuildInfo -> [(String, String)]
customFieldsBI :: [(String, String)]
, BuildInfo -> [Dependency]
targetBuildDepends :: [Dependency]
, BuildInfo -> [Mixin]
mixins :: [Mixin]
}
deriving ((forall x. BuildInfo -> Rep BuildInfo x)
-> (forall x. Rep BuildInfo x -> BuildInfo) -> Generic BuildInfo
forall x. Rep BuildInfo x -> BuildInfo
forall x. BuildInfo -> Rep BuildInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. BuildInfo -> Rep BuildInfo x
from :: forall x. BuildInfo -> Rep BuildInfo x
$cto :: forall x. Rep BuildInfo x -> BuildInfo
to :: forall x. Rep BuildInfo x -> BuildInfo
Generic, Int -> BuildInfo -> ShowS
[BuildInfo] -> ShowS
BuildInfo -> String
(Int -> BuildInfo -> ShowS)
-> (BuildInfo -> String)
-> ([BuildInfo] -> ShowS)
-> Show BuildInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BuildInfo -> ShowS
showsPrec :: Int -> BuildInfo -> ShowS
$cshow :: BuildInfo -> String
show :: BuildInfo -> String
$cshowList :: [BuildInfo] -> ShowS
showList :: [BuildInfo] -> ShowS
Show, ReadPrec [BuildInfo]
ReadPrec BuildInfo
Int -> ReadS BuildInfo
ReadS [BuildInfo]
(Int -> ReadS BuildInfo)
-> ReadS [BuildInfo]
-> ReadPrec BuildInfo
-> ReadPrec [BuildInfo]
-> Read BuildInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS BuildInfo
readsPrec :: Int -> ReadS BuildInfo
$creadList :: ReadS [BuildInfo]
readList :: ReadS [BuildInfo]
$creadPrec :: ReadPrec BuildInfo
readPrec :: ReadPrec BuildInfo
$creadListPrec :: ReadPrec [BuildInfo]
readListPrec :: ReadPrec [BuildInfo]
Read, BuildInfo -> BuildInfo -> Bool
(BuildInfo -> BuildInfo -> Bool)
-> (BuildInfo -> BuildInfo -> Bool) -> Eq BuildInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BuildInfo -> BuildInfo -> Bool
== :: BuildInfo -> BuildInfo -> Bool
$c/= :: BuildInfo -> BuildInfo -> Bool
/= :: BuildInfo -> BuildInfo -> Bool
Eq, Eq BuildInfo
Eq BuildInfo =>
(BuildInfo -> BuildInfo -> Ordering)
-> (BuildInfo -> BuildInfo -> Bool)
-> (BuildInfo -> BuildInfo -> Bool)
-> (BuildInfo -> BuildInfo -> Bool)
-> (BuildInfo -> BuildInfo -> Bool)
-> (BuildInfo -> BuildInfo -> BuildInfo)
-> (BuildInfo -> BuildInfo -> BuildInfo)
-> Ord BuildInfo
BuildInfo -> BuildInfo -> Bool
BuildInfo -> BuildInfo -> Ordering
BuildInfo -> BuildInfo -> BuildInfo
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: BuildInfo -> BuildInfo -> Ordering
compare :: BuildInfo -> BuildInfo -> Ordering
$c< :: BuildInfo -> BuildInfo -> Bool
< :: BuildInfo -> BuildInfo -> Bool
$c<= :: BuildInfo -> BuildInfo -> Bool
<= :: BuildInfo -> BuildInfo -> Bool
$c> :: BuildInfo -> BuildInfo -> Bool
> :: BuildInfo -> BuildInfo -> Bool
$c>= :: BuildInfo -> BuildInfo -> Bool
>= :: BuildInfo -> BuildInfo -> Bool
$cmax :: BuildInfo -> BuildInfo -> BuildInfo
max :: BuildInfo -> BuildInfo -> BuildInfo
$cmin :: BuildInfo -> BuildInfo -> BuildInfo
min :: BuildInfo -> BuildInfo -> BuildInfo
Ord, Typeable, Typeable BuildInfo
Typeable BuildInfo =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BuildInfo -> c BuildInfo)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BuildInfo)
-> (BuildInfo -> Constr)
-> (BuildInfo -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BuildInfo))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuildInfo))
-> ((forall b. Data b => b -> b) -> BuildInfo -> BuildInfo)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BuildInfo -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BuildInfo -> r)
-> (forall u. (forall d. Data d => d -> u) -> BuildInfo -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> BuildInfo -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo)
-> Data BuildInfo
BuildInfo -> Constr
BuildInfo -> DataType
(forall b. Data b => b -> b) -> BuildInfo -> BuildInfo
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> BuildInfo -> u
forall u. (forall d. Data d => d -> u) -> BuildInfo -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BuildInfo -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BuildInfo -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BuildInfo
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BuildInfo -> c BuildInfo
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BuildInfo)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuildInfo)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BuildInfo -> c BuildInfo
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BuildInfo -> c BuildInfo
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BuildInfo
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BuildInfo
$ctoConstr :: BuildInfo -> Constr
toConstr :: BuildInfo -> Constr
$cdataTypeOf :: BuildInfo -> DataType
dataTypeOf :: BuildInfo -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BuildInfo)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BuildInfo)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuildInfo)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuildInfo)
$cgmapT :: (forall b. Data b => b -> b) -> BuildInfo -> BuildInfo
gmapT :: (forall b. Data b => b -> b) -> BuildInfo -> BuildInfo
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BuildInfo -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BuildInfo -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BuildInfo -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BuildInfo -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> BuildInfo -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> BuildInfo -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BuildInfo -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BuildInfo -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo
Data)
instance Binary BuildInfo
instance Structured BuildInfo
instance NFData BuildInfo where rnf :: BuildInfo -> ()
rnf = BuildInfo -> ()
forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf
instance Monoid BuildInfo where
mempty :: BuildInfo
mempty =
BuildInfo
{ buildable :: Bool
buildable = Bool
True
, buildTools :: [LegacyExeDependency]
buildTools = []
, buildToolDepends :: [ExeDependency]
buildToolDepends = []
, cppOptions :: [String]
cppOptions = []
, asmOptions :: [String]
asmOptions = []
, cmmOptions :: [String]
cmmOptions = []
, ccOptions :: [String]
ccOptions = []
, cxxOptions :: [String]
cxxOptions = []
, ldOptions :: [String]
ldOptions = []
, hsc2hsOptions :: [String]
hsc2hsOptions = []
, pkgconfigDepends :: [PkgconfigDependency]
pkgconfigDepends = []
, frameworks :: [String]
frameworks = []
, extraFrameworkDirs :: [String]
extraFrameworkDirs = []
, asmSources :: [String]
asmSources = []
, cmmSources :: [String]
cmmSources = []
, cSources :: [String]
cSources = []
, cxxSources :: [String]
cxxSources = []
, jsSources :: [String]
jsSources = []
, hsSourceDirs :: [SymbolicPath PackageDir SourceDir]
hsSourceDirs = []
, otherModules :: [ModuleName]
otherModules = []
, virtualModules :: [ModuleName]
virtualModules = []
, autogenModules :: [ModuleName]
autogenModules = []
, defaultLanguage :: Maybe Language
defaultLanguage = Maybe Language
forall a. Maybe a
Nothing
, otherLanguages :: [Language]
otherLanguages = []
, defaultExtensions :: [Extension]
defaultExtensions = []
, otherExtensions :: [Extension]
otherExtensions = []
, oldExtensions :: [Extension]
oldExtensions = []
, extraLibs :: [String]
extraLibs = []
, extraLibsStatic :: [String]
extraLibsStatic = []
, extraGHCiLibs :: [String]
extraGHCiLibs = []
, extraBundledLibs :: [String]
extraBundledLibs = []
, extraLibFlavours :: [String]
extraLibFlavours = []
, extraDynLibFlavours :: [String]
extraDynLibFlavours = []
, extraLibDirs :: [String]
extraLibDirs = []
, extraLibDirsStatic :: [String]
extraLibDirsStatic = []
, includeDirs :: [String]
includeDirs = []
, includes :: [String]
includes = []
, autogenIncludes :: [String]
autogenIncludes = []
, installIncludes :: [String]
installIncludes = []
, options :: PerCompilerFlavor [String]
options = PerCompilerFlavor [String]
forall a. Monoid a => a
mempty
, profOptions :: PerCompilerFlavor [String]
profOptions = PerCompilerFlavor [String]
forall a. Monoid a => a
mempty
, sharedOptions :: PerCompilerFlavor [String]
sharedOptions = PerCompilerFlavor [String]
forall a. Monoid a => a
mempty
, staticOptions :: PerCompilerFlavor [String]
staticOptions = PerCompilerFlavor [String]
forall a. Monoid a => a
mempty
, customFieldsBI :: [(String, String)]
customFieldsBI = []
, targetBuildDepends :: [Dependency]
targetBuildDepends = []
, mixins :: [Mixin]
mixins = []
}
mappend :: BuildInfo -> BuildInfo -> BuildInfo
mappend = BuildInfo -> BuildInfo -> BuildInfo
forall a. Semigroup a => a -> a -> a
(<>)
instance Semigroup BuildInfo where
BuildInfo
a <> :: BuildInfo -> BuildInfo -> BuildInfo
<> BuildInfo
b =
BuildInfo
{ buildable :: Bool
buildable = BuildInfo -> Bool
buildable BuildInfo
a Bool -> Bool -> Bool
&& BuildInfo -> Bool
buildable BuildInfo
b
, buildTools :: [LegacyExeDependency]
buildTools = (BuildInfo -> [LegacyExeDependency]) -> [LegacyExeDependency]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [LegacyExeDependency]
buildTools
, buildToolDepends :: [ExeDependency]
buildToolDepends = (BuildInfo -> [ExeDependency]) -> [ExeDependency]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [ExeDependency]
buildToolDepends
, cppOptions :: [String]
cppOptions = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
cppOptions
, asmOptions :: [String]
asmOptions = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
asmOptions
, cmmOptions :: [String]
cmmOptions = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
cmmOptions
, ccOptions :: [String]
ccOptions = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
ccOptions
, cxxOptions :: [String]
cxxOptions = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
cxxOptions
, ldOptions :: [String]
ldOptions = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
ldOptions
, hsc2hsOptions :: [String]
hsc2hsOptions = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
hsc2hsOptions
, pkgconfigDepends :: [PkgconfigDependency]
pkgconfigDepends = (BuildInfo -> [PkgconfigDependency]) -> [PkgconfigDependency]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [PkgconfigDependency]
pkgconfigDepends
, frameworks :: [String]
frameworks = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
frameworks
, extraFrameworkDirs :: [String]
extraFrameworkDirs = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
extraFrameworkDirs
, asmSources :: [String]
asmSources = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
asmSources
, cmmSources :: [String]
cmmSources = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
cmmSources
, cSources :: [String]
cSources = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
cSources
, cxxSources :: [String]
cxxSources = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
cxxSources
, jsSources :: [String]
jsSources = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
jsSources
, hsSourceDirs :: [SymbolicPath PackageDir SourceDir]
hsSourceDirs = (BuildInfo -> [SymbolicPath PackageDir SourceDir])
-> [SymbolicPath PackageDir SourceDir]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [SymbolicPath PackageDir SourceDir]
hsSourceDirs
, otherModules :: [ModuleName]
otherModules = (BuildInfo -> [ModuleName]) -> [ModuleName]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [ModuleName]
otherModules
, virtualModules :: [ModuleName]
virtualModules = (BuildInfo -> [ModuleName]) -> [ModuleName]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [ModuleName]
virtualModules
, autogenModules :: [ModuleName]
autogenModules = (BuildInfo -> [ModuleName]) -> [ModuleName]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [ModuleName]
autogenModules
, defaultLanguage :: Maybe Language
defaultLanguage = (BuildInfo -> Maybe Language) -> Maybe Language
forall {m :: * -> *} {a}. MonadPlus m => (BuildInfo -> m a) -> m a
combineMby BuildInfo -> Maybe Language
defaultLanguage
, otherLanguages :: [Language]
otherLanguages = (BuildInfo -> [Language]) -> [Language]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [Language]
otherLanguages
, defaultExtensions :: [Extension]
defaultExtensions = (BuildInfo -> [Extension]) -> [Extension]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [Extension]
defaultExtensions
, otherExtensions :: [Extension]
otherExtensions = (BuildInfo -> [Extension]) -> [Extension]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [Extension]
otherExtensions
, oldExtensions :: [Extension]
oldExtensions = (BuildInfo -> [Extension]) -> [Extension]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [Extension]
oldExtensions
, extraLibs :: [String]
extraLibs = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
extraLibs
, extraLibsStatic :: [String]
extraLibsStatic = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
extraLibsStatic
, extraGHCiLibs :: [String]
extraGHCiLibs = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
extraGHCiLibs
, extraBundledLibs :: [String]
extraBundledLibs = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
extraBundledLibs
, extraLibFlavours :: [String]
extraLibFlavours = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
extraLibFlavours
, extraDynLibFlavours :: [String]
extraDynLibFlavours = (BuildInfo -> [String]) -> [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [String]
extraDynLibFlavours
, extraLibDirs :: [String]
extraLibDirs = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
extraLibDirs
, extraLibDirsStatic :: [String]
extraLibDirsStatic = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
extraLibDirsStatic
, includeDirs :: [String]
includeDirs = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
includeDirs
, includes :: [String]
includes = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
includes
, autogenIncludes :: [String]
autogenIncludes = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
autogenIncludes
, installIncludes :: [String]
installIncludes = (BuildInfo -> [String]) -> [String]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [String]
installIncludes
, options :: PerCompilerFlavor [String]
options = (BuildInfo -> PerCompilerFlavor [String])
-> PerCompilerFlavor [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> PerCompilerFlavor [String]
options
, profOptions :: PerCompilerFlavor [String]
profOptions = (BuildInfo -> PerCompilerFlavor [String])
-> PerCompilerFlavor [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> PerCompilerFlavor [String]
profOptions
, sharedOptions :: PerCompilerFlavor [String]
sharedOptions = (BuildInfo -> PerCompilerFlavor [String])
-> PerCompilerFlavor [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> PerCompilerFlavor [String]
sharedOptions
, staticOptions :: PerCompilerFlavor [String]
staticOptions = (BuildInfo -> PerCompilerFlavor [String])
-> PerCompilerFlavor [String]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> PerCompilerFlavor [String]
staticOptions
, customFieldsBI :: [(String, String)]
customFieldsBI = (BuildInfo -> [(String, String)]) -> [(String, String)]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [(String, String)]
customFieldsBI
, targetBuildDepends :: [Dependency]
targetBuildDepends = (BuildInfo -> [Dependency]) -> [Dependency]
forall {a}. Eq a => (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [Dependency]
targetBuildDepends
, mixins :: [Mixin]
mixins = (BuildInfo -> [Mixin]) -> [Mixin]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [Mixin]
mixins
}
where
combine :: (BuildInfo -> a) -> a
combine BuildInfo -> a
field = BuildInfo -> a
field BuildInfo
a a -> a -> a
forall a. Monoid a => a -> a -> a
`mappend` BuildInfo -> a
field BuildInfo
b
combineNub :: (BuildInfo -> [a]) -> [a]
combineNub BuildInfo -> [a]
field = [a] -> [a]
forall a. Eq a => [a] -> [a]
nub ((BuildInfo -> [a]) -> [a]
forall {a}. Monoid a => (BuildInfo -> a) -> a
combine BuildInfo -> [a]
field)
combineMby :: (BuildInfo -> m a) -> m a
combineMby BuildInfo -> m a
field = BuildInfo -> m a
field BuildInfo
b m a -> m a -> m a
forall a. m a -> m a -> m a
forall (m :: * -> *) a. MonadPlus m => m a -> m a -> m a
`mplus` BuildInfo -> m a
field BuildInfo
a
emptyBuildInfo :: BuildInfo
emptyBuildInfo :: BuildInfo
emptyBuildInfo = BuildInfo
forall a. Monoid a => a
mempty
allLanguages :: BuildInfo -> [Language]
allLanguages :: BuildInfo -> [Language]
allLanguages BuildInfo
bi =
Maybe Language -> [Language]
forall a. Maybe a -> [a]
maybeToList (BuildInfo -> Maybe Language
defaultLanguage BuildInfo
bi)
[Language] -> [Language] -> [Language]
forall a. [a] -> [a] -> [a]
++ BuildInfo -> [Language]
otherLanguages BuildInfo
bi
allExtensions :: BuildInfo -> [Extension]
allExtensions :: BuildInfo -> [Extension]
allExtensions BuildInfo
bi =
BuildInfo -> [Extension]
usedExtensions BuildInfo
bi
[Extension] -> [Extension] -> [Extension]
forall a. [a] -> [a] -> [a]
++ BuildInfo -> [Extension]
otherExtensions BuildInfo
bi
usedExtensions :: BuildInfo -> [Extension]
usedExtensions :: BuildInfo -> [Extension]
usedExtensions BuildInfo
bi =
BuildInfo -> [Extension]
oldExtensions BuildInfo
bi
[Extension] -> [Extension] -> [Extension]
forall a. [a] -> [a] -> [a]
++ BuildInfo -> [Extension]
defaultExtensions BuildInfo
bi
usesTemplateHaskellOrQQ :: BuildInfo -> Bool
usesTemplateHaskellOrQQ :: BuildInfo -> Bool
usesTemplateHaskellOrQQ BuildInfo
bi = (Extension -> Bool) -> [Extension] -> Bool
forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
any Extension -> Bool
p (BuildInfo -> [Extension]
allExtensions BuildInfo
bi)
where
p :: Extension -> Bool
p Extension
ex =
Extension
ex
Extension -> [Extension] -> Bool
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`elem` [KnownExtension -> Extension
EnableExtension KnownExtension
TemplateHaskell, KnownExtension -> Extension
EnableExtension KnownExtension
QuasiQuotes]
hcOptions :: CompilerFlavor -> BuildInfo -> [String]
hcOptions :: CompilerFlavor -> BuildInfo -> [String]
hcOptions = (BuildInfo -> PerCompilerFlavor [String])
-> CompilerFlavor -> BuildInfo -> [String]
lookupHcOptions BuildInfo -> PerCompilerFlavor [String]
options
hcProfOptions :: CompilerFlavor -> BuildInfo -> [String]
hcProfOptions :: CompilerFlavor -> BuildInfo -> [String]
hcProfOptions = (BuildInfo -> PerCompilerFlavor [String])
-> CompilerFlavor -> BuildInfo -> [String]
lookupHcOptions BuildInfo -> PerCompilerFlavor [String]
profOptions
hcSharedOptions :: CompilerFlavor -> BuildInfo -> [String]
hcSharedOptions :: CompilerFlavor -> BuildInfo -> [String]
hcSharedOptions = (BuildInfo -> PerCompilerFlavor [String])
-> CompilerFlavor -> BuildInfo -> [String]
lookupHcOptions BuildInfo -> PerCompilerFlavor [String]
sharedOptions
hcStaticOptions :: CompilerFlavor -> BuildInfo -> [String]
hcStaticOptions :: CompilerFlavor -> BuildInfo -> [String]
hcStaticOptions = (BuildInfo -> PerCompilerFlavor [String])
-> CompilerFlavor -> BuildInfo -> [String]
lookupHcOptions BuildInfo -> PerCompilerFlavor [String]
staticOptions
lookupHcOptions
:: (BuildInfo -> PerCompilerFlavor [String])
-> CompilerFlavor
-> BuildInfo
-> [String]
lookupHcOptions :: (BuildInfo -> PerCompilerFlavor [String])
-> CompilerFlavor -> BuildInfo -> [String]
lookupHcOptions BuildInfo -> PerCompilerFlavor [String]
f CompilerFlavor
hc BuildInfo
bi = case BuildInfo -> PerCompilerFlavor [String]
f BuildInfo
bi of
PerCompilerFlavor [String]
ghc [String]
ghcjs
| CompilerFlavor
hc CompilerFlavor -> CompilerFlavor -> Bool
forall a. Eq a => a -> a -> Bool
== CompilerFlavor
GHC -> [String]
ghc
| CompilerFlavor
hc CompilerFlavor -> CompilerFlavor -> Bool
forall a. Eq a => a -> a -> Bool
== CompilerFlavor
GHCJS -> [String]
ghcjs
| Bool
otherwise -> [String]
forall a. Monoid a => a
mempty