Skip to content
Snippets Groups Projects
Commit 00b2f07d authored by John Ericson's avatar John Ericson
Browse files

Better document "build-tools" and "build-tool-depends"

parent 9694751a
No related branches found
No related tags found
No related merge requests found
...@@ -30,8 +30,23 @@ import Language.Haskell.Extension ...@@ -30,8 +30,23 @@ import Language.Haskell.Extension
-- Consider refactoring into executable and library versions. -- Consider refactoring into executable and library versions.
data BuildInfo = BuildInfo { data BuildInfo = BuildInfo {
buildable :: Bool, -- ^ component is buildable here buildable :: Bool, -- ^ component is buildable here
buildTools :: [LegacyExeDependency], -- ^ tools needed to build this bit -- | Tools needed to build this bit.
toolDepends :: [ExeDependency], -- ^ haskell tools needed to build this bit --
-- This is a legacy field that "build-tool-depends" larely supersedes.
--
-- Unless use are very sure what you are doing, use the functions in
-- `Distribution.Simple.BuildToolDepends` rather than accessing this
-- field directly.
buildTools :: [LegacyExeDependency],
-- | Haskell tools needed to build this bit
--
-- This field is better than "build-tools" because it allows one to
-- precisely specify an executable in a package.
--
-- Unless use are very sure what you are doing, use the functions in
-- `Distribution.Simple.BuildToolDepends` rather than accessing this
-- field directly.
toolDepends :: [ExeDependency],
cppOptions :: [String], -- ^ options for pre-processing Haskell code cppOptions :: [String], -- ^ options for pre-processing Haskell code
ccOptions :: [String], -- ^ options for C compiler ccOptions :: [String], -- ^ options for C compiler
ldOptions :: [String], -- ^ options for linker ldOptions :: [String], -- ^ options for linker
...@@ -180,4 +195,3 @@ lookupHcOptions :: (BuildInfo -> [(CompilerFlavor,[String])]) ...@@ -180,4 +195,3 @@ lookupHcOptions :: (BuildInfo -> [(CompilerFlavor,[String])])
lookupHcOptions f hc bi = [ opt | (hc',opts) <- f bi lookupHcOptions f hc bi = [ opt | (hc',opts) <- f bi
, hc' == hc , hc' == hc
, opt <- opts ] , opt <- opts ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment