Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
type
Setter s t a b = a -> Identity b -> s -> Identity tconfiguration-tools Configuration.Utils.Internal This is almost the same type as the type from the lens library with the same name. In case it is already import from the lens package this should be hidden from the import.
type
Setter' s a = Setter s s a aconfiguration-tools Configuration.Utils.Internal This is almost the same type as the type from the lens library with the same name. In case it is already import from the lens package this should be hidden from the import.
module Configuration.Utils.
Setup This module contains a Setup.hs script that hooks into the cabal build process at the end of the configuration phase and generates a module with package information for each component of the cabal package. The modules are created in the autogen build directories where also the Path_ modules are created by cabal's simple build setup.
Usage as Setup Script
There are three ways how this module can be used:- Copy the code of this module into a file called Setup.hs in the root directory of your package.
- If the configuration-tools package is already installed in the system where the build is done, following code can be used as Setup.hs script:
module Main (main) where import Configuration.Utils.Setup
- For usage within a more complex Setup.hs script you shall import this module qualified and use the mkPkgInfoModules function. For example:
module Main (main) where import qualified Configuration.Utils.Setup as ConfTools main :: IO () main = defaultMainWithHooks (ConfTools.mkPkgInfoModules simpleUserHooks)
With all methods the field Build-Type in the package description (cabal) file must be set to Custom:Build-Type: Custom
Integration With Configuration.Utils
You can integrate the information provided by the PkgInfo modules with the command line interface of an application by importing the respective module for the component and using the runWithPkgInfoConfiguration function from the module Configuration.Utils as show in the following example:{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} module Main ( main ) where import Configuration.Utils import PkgInfo instance FromJSON (() -> ()) where parseJSON _ = pure id mainInfo :: ProgramInfo () mainInfo = programInfo "Hello World" (pure id) () main :: IO () main = runWithPkgInfoConfiguration mainInfo pkgInfo . const $ putStrLn "hello world"
With that the resulting application supports the following additional command line options:- --version, -v prints the version of the application and exits.
- --info, -i prints a short info message for the application and exits.
- --long-info print a detailed info message for the application and exits. Beside component name, package name, version, revision, and copyright the message also contain information about the compiler that was used for the build, the build architecture, build flags, the author, the license type, and a list of all direct and indirect dependencies along with their licenses and copyrights.
- --license prints the text of the lincense of the application and exits.
-
cql-io Database.CQL.IO No documentation available.
-
Settings needed for running the GHC Parser.
-
faktory Faktory.Ent.Tracking No documentation available.
SetJobDetails :: JobId -> Maybe Int -> Maybe Text -> Maybe UTCTime -> SetJobDetailsfaktory Faktory.Ent.Tracking No documentation available.
-
faktory Faktory.Pool No documentation available.
-
No documentation available.
-
faktory Faktory.Settings No documentation available.