File tree 4 files changed +30
-2
lines changed
cabal-install/src/Distribution/Client
cabal-testsuite/PackageTests/NewHaddock/ImplyDependencies 4 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import Distribution.Client.TargetProblem
24
24
import Distribution.Client.NixStyleOptions
25
25
( NixStyleFlags (.. ), nixStyleOptions , defaultNixStyleFlags )
26
26
import Distribution.Client.Setup
27
- ( GlobalFlags , ConfigFlags (.. ) )
27
+ ( GlobalFlags , ConfigFlags (.. ), InstallFlags ( .. ) )
28
28
import Distribution.Simple.Setup
29
29
( HaddockFlags (.. ), fromFlagOrDefault , trueArg )
30
30
import Distribution.Simple.Command
@@ -141,7 +141,8 @@ haddockAction flags@NixStyleFlags {..} targetStrings globalFlags = do
141
141
runProjectPostBuildPhase verbosity baseCtx buildCtx' buildOutcomes
142
142
where
143
143
verbosity = fromFlagOrDefault normal (configVerbosity configFlags)
144
- cliConfig = commandLineFlagsToProjectConfig globalFlags flags mempty -- ClientInstallFlags, not needed here
144
+ flags' = flags { installFlags = installFlags { installDocumentation = Flag True } }
145
+ cliConfig = commandLineFlagsToProjectConfig globalFlags flags' mempty -- ClientInstallFlags, not needed here
145
146
146
147
-- | This defines what a 'TargetSelector' means for the @haddock@ command.
147
148
-- It selects the 'AvailableTarget's that the 'TargetSelector' refers to,
Original file line number Diff line number Diff line change
1
+ module Lib where
2
+
3
+ import Text.PrettyPrint (render , text )
4
+
5
+ -- | Rendering using 'text' and 'render'
6
+ myLibFunc :: IO ()
7
+ myLibFunc = do
8
+ putStrLn (render (text " foo" ))
Original file line number Diff line number Diff line change
1
+ import Test.Cabal.Prelude
2
+ -- Test that `cabal haddock` doesn't require explicit
3
+ -- `--enable-dependencies` to happily process links to external packages
4
+ main = cabalTest $
5
+ cabal " haddock" [" lib" ]
Original file line number Diff line number Diff line change
1
+ name : test
2
+ version : 1.0
3
+ cabal-version : >= 1.10
4
+ author : Artem Pelenitsyn
5
+ category : PackageTests
6
+ build-type : Simple
7
+
8
+ description :
9
+ Check that `cabal haddock` implies `--enable-dependencies`
10
+ ---------------------------------------
11
+
12
+ Library
13
+ exposed-modules : Lib
14
+ build-depends : base, pretty
You can’t perform that action at this time.
0 commit comments