-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Utilities for cross-compiling with Shake
--   
--   This library provides <a>Shake</a> utilities for cross-compiling
--   <tt>C</tt>, <tt>C++</tt> and <tt>ObjC</tt> code for various target
--   platforms. Currently supported target platforms are Android, iOS,
--   Linux, MacOS X, Windows/MinGW and Google Portable Native Client
--   (PNaCl). Supported host platforms are MacOS X, Linux and Windows.
@package shake-language-c
@version 0.12.0


-- | This module provides some lens utilities and also re-exports
--   <a>Data.Label</a>, which can avoid a package dependency on
--   <tt>fclabels</tt> in some cases.
module Development.Shake.Language.C.Label

-- | Append stuff to the <a>Monoid</a> in record field specified by lens.
append :: Monoid a => (f :-> a) -> a -> f -> f

-- | Prepend stuff to the <a>Monoid</a> in record field specified by lens.
prepend :: Monoid a => (f :-> a) -> a -> f -> f


-- | This module provides utilities for reading values from configuration
--   files, similar to the functions provided by
--   <a>Development.Shake.Config</a>.
module Development.Shake.Language.C.Config

-- | Given a list of dependencies, return a function that takes an
--   environment of variable bindings, a configuration file path and a
--   configuration variable and returns the corresponding configuration
--   value.
--   
--   This function is more flexible than <a>usingConfigFile</a>. It allows
--   the use of multiple configuration files as well as specifying default
--   variable bindings.
--   
--   Typical usage would be something like this:
--   
--   <pre>
--   -- In the Rules monad
--   getConfig &lt;- withConfig []
--   -- Then in an Action
--   ... value &lt;- getConfig [("variable", "default value")] "config.cfg" "variable"
--   </pre>
withConfig :: [FilePath] -> Rules ([(String, String)] -> FilePath -> String -> Action (Maybe String))

-- | Return a function that takes a list of dependencies, a configuration
--   file path, an environment of variable bindings and a configuration
--   variable and returns the corresponding configuration value.
--   
--   This function is more flexible than <a>usingConfigFile</a>. It allows
--   the use of multiple configuration files as well as specifying default
--   variable bindings.
--   
--   Typical usage would be something like this:
--   
--   <pre>
--   -- In the Rules monad
--   getConfig &lt;- mkConfig
--   -- Then in an Action
--   ... value &lt;- getConfig ["some_generated_config.cfg"] [("variable", "default value")] "config.cfg" "variable"
--   </pre>
mkConfig :: Rules ([FilePath] -> FilePath -> [(String, String)] -> String -> Action (Maybe String))

-- | Parse a list of space separated paths from an input string. Spaces can
--   be escaped by <tt>\</tt> characters.
--   
--   <pre>
--   &gt;&gt;&gt; parsePaths "/a /a/b /a/b/c\\ d"
--   ["/a","/a/b","/a/b/c d"]
--   </pre>
parsePaths :: String -> [FilePath]

-- | Given a function that maps a configuration variable to a value and a
--   list of variable names, return a corresponding list of file paths.
--   Missing variables are ignored.
getPaths :: (String -> Action (Maybe String)) -> [String] -> Action [FilePath]
instance Control.DeepSeq.NFData Development.Shake.Language.C.Config.Config
instance Data.Binary.Class.Binary Development.Shake.Language.C.Config.Config
instance Data.Hashable.Class.Hashable Development.Shake.Language.C.Config.Config
instance GHC.Classes.Eq Development.Shake.Language.C.Config.Config
instance GHC.Show.Show Development.Shake.Language.C.Config.Config


-- | The <a>BuildFlags</a> record is an abstraction for various toolchain
--   flags for building executables and libraries from source files in a
--   <tt>C</tt>-based language. It's intended to be toolchain-independent,
--   but currently there's a bias towards binutils/gcc/clang toolchains.
module Development.Shake.Language.C.BuildFlags

-- | Source language.
--   
--   Currently something derived from <tt>C</tt>.
data Language

-- | Plain old C
C :: Language

-- | C++
Cpp :: Language

-- | Objective-C
ObjC :: Language

-- | Objective-C with C++ (Apple extension)
ObjCpp :: Language

-- | Record type for abstracting various toolchain command line flags.
--   
--   <a>BuildFlags</a> is an instance of <a>Default</a>, you can create a
--   default record with <a>def</a>. <a>BuildFlags</a> is also an instance
--   <a>Monoid</a>, you can create an empty record with <a>mempty</a> and
--   append flags with <a>mappend</a>. <a>def</a> and <a>mempty</a> are
--   synonyms:
--   
--   <pre>
--   &gt;&gt;&gt; (def :: BuildFlags) == (mempty :: BuildFlags)
--   True
--   </pre>
--   
--   Record accessors are <a>Lens</a>es from the <a>fclabels</a> package,
--   which makes accessing and modifying record fields a bit more
--   convenient. <tt>fclabels</tt> was chosen over <a>lens</a> because it
--   has far fewer dependencies, which is convenient when installing the
--   Shake build system in a per-project cabal sandbox. We might switch to
--   <tt>lens</tt> when it gets included in the Haskell platform.
--   
--   There are two convenience functions for working with <a>BuildFlags</a>
--   record fields containing lists of flags, <a>append</a> and
--   <a>prepend</a>. Since most combinators in this library expect a
--   function <tt>BuildFlags -&gt; BuildFlags</tt>, the following is a
--   common idiom:
--   
--   <pre>
--   buildFlags . append <a>systemIncludes</a> ["path"]
--   </pre>
--   
--   Note that when modifying the same record field, order of function
--   composition matters and you might want to use the arrow combinator
--   <a>&gt;&gt;&gt;</a> for appending in source statement order:
--   
--   <pre>
--   &gt;&gt;&gt; :{
--     get systemIncludes
--       $ append systemIncludes ["path1"] . append systemIncludes ["path2"]
--       $ mempty
--   :}
--   ["path2","path1"]
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; :{
--     get systemIncludes
--       $ append systemIncludes ["path1"] &gt;&gt;&gt; append systemIncludes ["path2"]
--       $ mempty
--   :}
--   ["path1","path2"]
--   </pre>
--   
--   See <a>Development.Shake.Language.C.Rules</a> for how to use
--   <a>BuildFlags</a> in build product rules.
data BuildFlags
systemIncludes :: forall cat. ArrowApply cat => Lens cat BuildFlags [FilePath]
userIncludes :: forall cat. ArrowApply cat => Lens cat BuildFlags [FilePath]
defines :: forall cat. ArrowApply cat => Lens cat BuildFlags [(String, Maybe String)]
preprocessorFlags :: forall cat. ArrowApply cat => Lens cat BuildFlags [String]
compilerFlags :: forall cat. ArrowApply cat => Lens cat BuildFlags [(Maybe Language, [String])]
libraryPath :: forall cat. ArrowApply cat => Lens cat BuildFlags [FilePath]
libraries :: forall cat. ArrowApply cat => Lens cat BuildFlags [String]
linkerFlags :: forall cat. ArrowApply cat => Lens cat BuildFlags [String]
localLibraries :: forall cat. ArrowApply cat => Lens cat BuildFlags [FilePath]
archiverFlags :: forall cat. ArrowApply cat => Lens cat BuildFlags [String]

-- | Construct preprocessor flags from the <a>defines</a> field of
--   <a>BuildFlags</a>.
defineFlags :: BuildFlags -> [String]

-- | Return a list of compiler flags for a specific source language.
compilerFlagsFor :: Maybe Language -> BuildFlags -> [String]

-- | Construct a <a>BuildFlags</a> modifier function from a config file.
--   
--   See also <a>Development.Shake.Language.C.Config</a>.
fromConfig :: (Functor m, Monad m) => (String -> m (Maybe String)) -> m (BuildFlags -> BuildFlags)

-- | Utility function for composing functions in a monad.
(>>>=) :: Monad m => m (a -> b) -> m (b -> c) -> m (a -> c)

-- | Append stuff to the <a>Monoid</a> in record field specified by lens.
append :: Monoid a => (f :-> a) -> a -> f -> f

-- | Prepend stuff to the <a>Monoid</a> in record field specified by lens.
prepend :: Monoid a => (f :-> a) -> a -> f -> f
instance Data.Default.Class.Default Development.Shake.Language.C.BuildFlags.BuildFlags
instance GHC.Base.Semigroup Development.Shake.Language.C.BuildFlags.BuildFlags
instance GHC.Base.Monoid Development.Shake.Language.C.BuildFlags.BuildFlags
instance GHC.Show.Show Development.Shake.Language.C.BuildFlags.BuildFlags
instance GHC.Classes.Eq Development.Shake.Language.C.BuildFlags.BuildFlags


module Development.Shake.Language.C.ToolChain

-- | Linkage type, static or shared.
data Linkage
Static :: Linkage
Shared :: Linkage
data ToolChain

-- | Toolchain variant.
data ToolChainVariant

-- | Unspecified toolchain
Generic :: ToolChainVariant

-- | GNU Compiler Collection (gcc) toolchain
GCC :: ToolChainVariant

-- | Low-Level Virtual Machine (LLVM) toolchain
LLVM :: ToolChainVariant
toolDirectory :: forall cat. ArrowApply cat => Lens cat ToolChain (Maybe FilePath)
toolPrefix :: forall cat. ArrowApply cat => Lens cat ToolChain String
variant :: forall cat. ArrowApply cat => Lens cat ToolChain ToolChainVariant
compilerCommand :: forall cat. ArrowApply cat => Lens cat ToolChain FilePath

-- | <a>Action</a> type for producing an object file from a source file.
type Compiler = ToolChain  Toolchain -> BuildFlags  Compiler flags -> FilePath  Input source file -> FilePath  Output object file -> Action ()
compiler :: forall cat. ArrowApply cat => Lens cat ToolChain Compiler
archiverCommand :: forall cat. ArrowApply cat => Lens cat ToolChain FilePath

-- | <a>Action</a> type for archiving object files into a static library.
type Archiver = ToolChain  Toolchain -> BuildFlags  Archiver flags -> [FilePath]  Input object files -> FilePath  Output object archive (static library) -> Action ()
archiver :: forall cat. ArrowApply cat => Lens cat ToolChain Archiver
linkerCommand :: forall cat. ArrowApply cat => Lens cat ToolChain FilePath

-- | <a>Action</a> type for linking object files into an executable or a
--   library.
type Linker = ToolChain  Toolchain -> BuildFlags  Linker flags -> [FilePath]  Input object files -> FilePath  Output link product -> Action ()

-- | Link result type
data LinkResult

-- | Executable
Executable :: LinkResult

-- | Shared (dynamically linked) library
SharedLibrary :: LinkResult

-- | Dynamically loadable library
LoadableLibrary :: LinkResult
linker :: forall cat. ArrowApply cat => Lens cat ToolChain (LinkResult -> Linker)
defaultBuildFlags :: forall cat. ArrowApply cat => Lens cat ToolChain (Action (BuildFlags -> BuildFlags))

-- | Apply the current environment and return a modified toolchain.
--   
--   This function is experimental and subject to change!
--   
--   Currently recognised environment variables are
--   
--   <ul>
--   <li><i><tt>CC</tt></i> Path to <tt>C</tt> compiler.</li>
--   <li><i><tt>LD</tt></i> Path to linker.</li>
--   <li><i><tt>SHAKE_TOOLCHAIN_VARIANT</tt></i> One of the values of
--   <a>ToolChainVariant</a> (case insensitive). If this variable is not
--   present, an attempt is made to determine the toolchain variant from
--   the <tt>C</tt> compiler command.</li>
--   </ul>
applyEnv :: ToolChain -> Action ToolChain

-- | Export a <a>ToolChain</a> definition to a list of environment variable
--   mappings, suitable e.g. for calling third-party configure scripts in
--   cross-compilation mode.
--   
--   Needs some fleshing out; currently only works for "standard" binutil
--   toolchains.
toEnv :: ToolChain -> Action [(String, String)]

-- | Default toolchain.
--   
--   Probably not useful without modification.
defaultToolChain :: ToolChain

-- | Default compiler action.
defaultCompiler :: Compiler

-- | Default archiver action.
defaultArchiver :: Archiver

-- | Default linker action.
defaultLinker :: Linker

-- | Given a tool chain command name, construct the command's full path,
--   taking into account the toolchain's <a>toolPrefix</a>.
toolFromString :: ToolChain -> String -> FilePath

-- | Construct the full path of a predefined tool given a <a>ToolChain</a>
--   accessor.
tool :: ToolChain -> (ToolChain :-> String) -> FilePath
instance GHC.Show.Show Development.Shake.Language.C.ToolChain.ToolChainVariant
instance GHC.Classes.Eq Development.Shake.Language.C.ToolChain.ToolChainVariant
instance GHC.Show.Show Development.Shake.Language.C.ToolChain.LinkResult
instance GHC.Classes.Eq Development.Shake.Language.C.ToolChain.LinkResult
instance GHC.Enum.Enum Development.Shake.Language.C.ToolChain.LinkResult
instance GHC.Show.Show Development.Shake.Language.C.ToolChain.Linkage
instance GHC.Classes.Eq Development.Shake.Language.C.ToolChain.Linkage
instance GHC.Enum.Enum Development.Shake.Language.C.ToolChain.Linkage


-- | This module provides toolchain definitions and utilities for targeting
--   Windows. See <a>Development.Shake.Language.C.Rules</a> for examples of
--   how to use a target toolchain.
--   
--   Windows is also a supported host operating system, see
--   <a>Development.Shake.Language.C.Host</a> for examples of how to target
--   the host.
--   
--   On Windows currently only the <a>MinGW</a> toolchain is supported.
module Development.Shake.Language.C.Target.Windows

-- | Build target given an architecture.
target :: Arch -> Target

-- | Windows toolchain.
toolChain :: ToolChainVariant -> ToolChain


-- | This module provides toolchain definitions and utilities for targeting
--   OSX and iOS. See <a>Development.Shake.Language.C.Rules</a> for
--   examples of how to use a target toolchain.
--   
--   OSX is also a supported host operating system, see
--   <a>Development.Shake.Language.C.Host</a> for examples of how to target
--   the host.
module Development.Shake.Language.C.Target.OSX

-- | Base path of development tools on OSX.
data DeveloperPath

-- | Get base path of development tools on OSX.
getSDKRoot :: Action DeveloperPath

-- | Mac OSX platform.
macOSX :: Platform

-- | iOS platform.
iPhoneOS :: Platform

-- | iOS simulator platform.
iPhoneSimulator :: Platform

-- | Build target given a platform and an architecture.
target :: Platform -> Arch -> Target

-- | SDK version given major and minor version numbers.
sdkVersion :: Int -> Int -> Version

-- | Construct an OSX or iOS toolchain.
toolChain :: DeveloperPath -> Version -> Target -> ToolChain

-- | Return a list of available platform SDK versions.
--   
--   For example in order to get the latest iOS SDK version:
--   
--   <pre>
--   maximum &lt;$&gt; getPlatformVersions iPhoneOS
--   </pre>
getPlatformVersions :: Platform -> Action [Version]

-- | Specify the <tt>-mmacosx-version-min</tt> compiler flag.
macosx_version_min :: Version -> BuildFlags -> BuildFlags

-- | Specify the <tt>-miphoneos-version-min</tt> compiler flag.
iphoneos_version_min :: Version -> BuildFlags -> BuildFlags

-- | Create a universal binary a list of input files.
--   
--   Calls <a>lipo</a> with the <tt>-create</tt> option.
universalBinary :: [FilePath] -> FilePath -> Action ()
instance GHC.Show.Show Development.Shake.Language.C.Target.OSX.DeveloperPath


-- | This module provides toolchain definitions and utilities for targeting
--   Linux. See <a>Development.Shake.Language.C.Rules</a> for examples of
--   how to use a target toolchain.
--   
--   Linux is also a supported host operating system, see
--   <a>Development.Shake.Language.C.Host</a> for examples of how to target
--   the host.
module Development.Shake.Language.C.Target.Linux

-- | Build target given an architecture.
target :: Arch -> Target

-- | Linux toolchain.
toolChain :: ToolChainVariant -> ToolChain


module Development.Shake.Language.C.Host

-- | Host operating system.
data OS
Linux :: OS
OSX :: OS
Windows :: OS

-- | This host's operating system.
os :: OS

-- | File extension for executables.
executableExtension :: String

-- | File extension for dynamic shared libraries.
sharedLibraryExtension :: String

-- | File extension for dynamic loadable libraries.
loadableLibraryExtension :: String

-- | Get host's default toolchain.
--   
--   This function can be used for targeting the host operating system, see
--   also <a>Development.Shake.Language.C.Rules</a>.
defaultToolChain :: (Target, Action ToolChain)
instance GHC.Show.Show Development.Shake.Language.C.Host.OS
instance GHC.Classes.Ord Development.Shake.Language.C.Host.OS
instance GHC.Classes.Eq Development.Shake.Language.C.Host.OS


-- | This module provides toolchain definitions and utilities for targeting
--   Android. See <a>Development.Shake.Language.C.Rules</a> for examples of
--   how to use a target toolchain.
--   
--   The minimum required Android NDK revision is 11c.
module Development.Shake.Language.C.Target.Android

-- | Android target for architecture.
target :: Arch -> Target

-- | Construct a version record from an integral Android SDK version.
--   
--   <pre>
--   sdkVersion 19 == Version [19] []
--   </pre>
sdkVersion :: Int -> Version

-- | Construct an Android toolchain.
toolChain :: FilePath -> Version -> ToolChainVariant -> Target -> ToolChain

-- | Valid Android ABI identifier for the given architecture.
abiString :: Arch -> String

-- | Build flags for building with and linking against the GNU
--   <tt>gnustl</tt> standard C++ library.
gnustl :: Version -> Linkage -> FilePath -> Target -> (BuildFlags -> BuildFlags)

-- | Build flags for building with and linking against the LLVM
--   <tt>libc++</tt> standard C++ library.
libcxx :: Linkage -> FilePath -> Target -> (BuildFlags -> BuildFlags)

-- | Source paths and build flags for the <tt>native_app_glue</tt> module.
native_app_glue :: FilePath -> ([FilePath], BuildFlags -> BuildFlags)


module Development.Shake.Language.C

-- | Target operating system.
data OS

-- | Google Android
Android :: OS

-- | GNU Linux
Linux :: OS

-- | Apple Mac OSX and iOS
OSX :: OS

-- | Google Portable Native Client (PNaCl)
Pepper :: OS

-- | Microsoft Windows
Windows :: OS

-- | Target platform.
--   
--   Basically just a platform identifier string. Use <a>toBuildPrefix</a>
--   to convert a platform to a file path prefix that can be used in Shake
--   rules.
data Platform
Platform :: String -> Platform
[platformName] :: Platform -> String

-- | <a>Arm</a> architecture version.
data ArmVersion
Armv5 :: ArmVersion
Armv6 :: ArmVersion
Armv7 :: ArmVersion
Armv7s :: ArmVersion
Arm64 :: ArmVersion

-- | <a>X86</a> architecture version.
data X86Version

-- | <tt>i386</tt>, 32-bit architecture without <tt>SSE</tt>
I386 :: X86Version

-- | <tt>i686</tt>, 32-bit architecture with <tt>SSE</tt>
--   (<i>Pentium-Pro</i>)
I686 :: X86Version

-- | <tt>x86_64</tt>, 64-bit architecture
X86_64 :: X86Version

-- | Target architecture.
--   
--   Use <a>toBuildPrefix</a> to convert an architecture to a short, more
--   or less canonical file path prefix that can be used in Shake rules.
data Arch

-- | Intel <tt>x86</tt> architecture
X86 :: X86Version -> Arch

-- | Arm architecture
Arm :: ArmVersion -> Arch

-- | LLVM intermediate representation, used by <a>Pepper</a> (PNaCl)
LLVM_IR :: Arch

-- | Compilation target triple consisting of operating system, platform and
--   architecture.
--   
--   Use <a>toBuildPrefix</a> to convert a target to a file path prefix
--   that can be used in Shake rules. The prefix is of the form
--   
--   <pre>
--   &lt;platform&gt;/&lt;architecture&gt;
--   </pre>
--   
--   For example:
--   
--   <pre>
--   &gt;&gt;&gt; import qualified Development.Shake.Language.C.Target.OSX as OSX
--   
--   &gt;&gt;&gt; toBuildPrefix $ OSX.target OSX.iPhoneOS (Arm Armv7)
--   "iphoneos/armv7"
--   </pre>
data Target
Target :: OS -> Platform -> Arch -> Target

-- | Target operating system
[targetOS] :: Target -> OS

-- | Target platform
[targetPlatform] :: Target -> Platform

-- | Target architecture
[targetArch] :: Target -> Arch

-- | Convert a value to a build directory prefix.
--   
--   The idea is that several such values can be combined to form more
--   complex build directory hierarchies. This can be important for
--   disambiguating build product paths in Shake rules.
class ToBuildPrefix a

-- | Convert a value to a (unique) build directory prefix.
toBuildPrefix :: ToBuildPrefix a => a -> FilePath

-- | Linkage type, static or shared.
data Linkage
Static :: Linkage
Shared :: Linkage

-- | Shake rule for building an executable.
executable :: Action ToolChain -> FilePath -> Action (BuildFlags -> BuildFlags) -> Action [FilePath] -> Rules FilePath

-- | Shake rule for building a static library.
staticLibrary :: Action ToolChain -> FilePath -> Action (BuildFlags -> BuildFlags) -> Action [FilePath] -> Rules FilePath

-- | Shake rule for building a shared (dynamically linked) library.
sharedLibrary :: Action ToolChain -> FilePath -> Action (BuildFlags -> BuildFlags) -> Action [FilePath] -> Rules FilePath

-- | Shake rule for building a dynamically loadable library.
loadableLibrary :: Action ToolChain -> FilePath -> Action (BuildFlags -> BuildFlags) -> Action [FilePath] -> Rules FilePath
data ToolChain

-- | Toolchain variant.
data ToolChainVariant

-- | Unspecified toolchain
Generic :: ToolChainVariant

-- | GNU Compiler Collection (gcc) toolchain
GCC :: ToolChainVariant

-- | Low-Level Virtual Machine (LLVM) toolchain
LLVM :: ToolChainVariant

-- | Apply the current environment and return a modified toolchain.
--   
--   This function is experimental and subject to change!
--   
--   Currently recognised environment variables are
--   
--   <ul>
--   <li><i><tt>CC</tt></i> Path to <tt>C</tt> compiler.</li>
--   <li><i><tt>LD</tt></i> Path to linker.</li>
--   <li><i><tt>SHAKE_TOOLCHAIN_VARIANT</tt></i> One of the values of
--   <a>ToolChainVariant</a> (case insensitive). If this variable is not
--   present, an attempt is made to determine the toolchain variant from
--   the <tt>C</tt> compiler command.</li>
--   </ul>
applyEnv :: ToolChain -> Action ToolChain

-- | Export a <a>ToolChain</a> definition to a list of environment variable
--   mappings, suitable e.g. for calling third-party configure scripts in
--   cross-compilation mode.
--   
--   Needs some fleshing out; currently only works for "standard" binutil
--   toolchains.
toEnv :: ToolChain -> Action [(String, String)]


-- | This module provides toolchain definitions and utilities for targeting
--   Google Pepper and Portable Native Client (PNaCl). Arguably it should
--   be renamed appropriately. See
--   <a>Development.Shake.Language.C.Rules</a> for examples of how to use a
--   target toolchain.
module Development.Shake.Language.C.Target.NaCl

-- | Stable <i>Pepper</i> API version.
pepper :: Int -> Version

-- | Unstable <i>Pepper Canary</i> API version.
canary :: Version

-- | Pepper target.
--   
--   <a>LLVM_IR</a> (PNaCl) is the only supported target architecture at
--   the moment.
target :: Target

-- | Pepper build configuration.
--   
--   This is used to select the respective library versions when linking.
data Config
Debug :: Config
Release :: Config

-- | Construct Pepper toolchain.
toolChain :: FilePath -> Version -> Config -> Target -> ToolChain

-- | Finalize a bit code executable.
finalize :: ToolChain -> FilePath -> FilePath -> Action ()

-- | Translate bit code to native code.
translate :: ToolChain -> Arch -> FilePath -> FilePath -> Action ()

-- | Executable specification for Native Client Manifest (nmf) files.
data Executable
Executable :: FilePath -> Maybe Int -> Executable

-- | Relative path to executable.
[executablePath] :: Executable -> FilePath

-- | Optional optimization level.
[optimizationLevel] :: Executable -> Maybe Int

-- | Program specification for Native Client Manifest (nmf) files.
data Program
Program :: Executable -> Maybe Executable -> Program

-- | Release executable (pexe)
[pnaclTranslate] :: Program -> Executable

-- | Executable used when debugging (bit code).
[pnaclDebug] :: Program -> Maybe Executable

-- | Create Native Client Manifest (nmf) files.
--   
--   This file is needed for serving PNaCl outside the Google Play store.
--   See the native client <a>documentation</a> for more information on the
--   file format.
mk_nmf :: Program -> FilePath -> Action ()
instance GHC.Show.Show Development.Shake.Language.C.Target.NaCl.Program
instance GHC.Classes.Eq Development.Shake.Language.C.Target.NaCl.Program
instance GHC.Show.Show Development.Shake.Language.C.Target.NaCl.Executable
instance GHC.Classes.Eq Development.Shake.Language.C.Target.NaCl.Executable
instance GHC.Show.Show Development.Shake.Language.C.Target.NaCl.Config
instance GHC.Classes.Eq Development.Shake.Language.C.Target.NaCl.Config


-- | This module provides utilities for querying <a>BuildFlags</a> from the
--   <a>pkg-config</a> database, which is available on many Unix like
--   operating systems.
module Development.Shake.Language.C.PkgConfig

-- | PkgConfig options.
data Options
Options :: Maybe [FilePath] -> Bool -> Options

-- | List of directories where <tt>.pc</tt> files are searched,
--   corresponding to the <tt>PKG_CONFIG_PATH</tt> environment variable
[searchPath] :: Options -> Maybe [FilePath]

-- | Return flags appropriate for static linking
[static] :: Options -> Bool

-- | Default <tt>pkg-config</tt> options.
--   
--   This function is an alias for <a>def</a>.
defaultOptions :: Options

-- | Call <tt>pkg-config</tt> with options and a package name and return a
--   <a>BuildFlags</a> modification function.
--   
--   The <tt>pkg-config</tt> executable must be installed on the build
--   host.
pkgConfig :: Options -> String -> Action (BuildFlags -> BuildFlags)

-- | Given an initial <a>Options</a> record and a configuration variable
--   lookup function, call <tt>pkg-config</tt> based on configuration
--   variable settings and return a <a>BuildFlags</a> modification
--   function.
--   
--   The following configuration variables are recognised:
--   
--   <ul>
--   <li><i><tt>PkgConfig.packages</tt></i> List of package names for which
--   build flags should be queried</li>
--   <li><i><tt>PkgConfig.options.searchPath</tt></i> Space-separated list
--   of file paths, corresponds to the <a>searchPath</a> option</li>
--   <li><i><tt>PkgConfig.options.static</tt></i> <tt>true</tt> or
--   <tt>false</tt>, corresponds to the <a>static</a> option</li>
--   </ul>
fromConfig :: Options -> (String -> Action (Maybe String)) -> Action (BuildFlags -> BuildFlags)
instance GHC.Show.Show Development.Shake.Language.C.PkgConfig.Options
instance GHC.Classes.Eq Development.Shake.Language.C.PkgConfig.Options
instance Data.Default.Class.Default Development.Shake.Language.C.PkgConfig.Options
