Skip to content

Commit

Permalink
Better document "build-tools" and "tool-depends"
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Nov 26, 2016
1 parent dcbd746 commit 30b4fa8
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions Cabal/Distribution/Types/BuildInfo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,21 @@ import Language.Haskell.Extension
-- Consider refactoring into executable and library versions.
data BuildInfo = BuildInfo {
buildable :: Bool, -- ^ component is buildable here
buildTools :: [LegacyExeDependency], -- ^ tools needed to build this bit
toolDepends :: [ExeDependency], -- ^ haskell tools needed to build this bit
-- | Tools needed to build this bit.
--
-- This is a legacy field that "tool-depends" larely supersedes.
--
-- Unless use are very sure what you are doing, use the function in
-- `Distribution.FooBar` 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 function in
-- `Distribution.FooBar` rather than accessing this field directly.
toolDepends :: [ExeDependency],
cppOptions :: [String], -- ^ options for pre-processing Haskell code
ccOptions :: [String], -- ^ options for C compiler
ldOptions :: [String], -- ^ options for linker
Expand Down Expand Up @@ -180,4 +193,3 @@ lookupHcOptions :: (BuildInfo -> [(CompilerFlavor,[String])])
lookupHcOptions f hc bi = [ opt | (hc',opts) <- f bi
, hc' == hc
, opt <- opts ]

0 comments on commit 30b4fa8

Please sign in to comment.