@@ -29,7 +29,16 @@ type GhcPath = String
29
29
-- If they are edited, make sure to maintain the order of the versions.
30
30
hieVersions :: [VersionNumber ]
31
31
hieVersions =
32
- [" 8.2.1" , " 8.2.2" , " 8.4.2" , " 8.4.3" , " 8.4.4" , " 8.6.1" , " 8.6.2" , " 8.6.3" , " 8.6.4" ]
32
+ [ " 8.2.1"
33
+ , " 8.2.2"
34
+ , " 8.4.2"
35
+ , " 8.4.3"
36
+ , " 8.4.4"
37
+ , " 8.6.1"
38
+ , " 8.6.2"
39
+ , " 8.6.3"
40
+ , " 8.6.4"
41
+ ]
33
42
34
43
-- | Most recent version of hie.
35
44
-- Shown in the more concise help message.
@@ -74,9 +83,15 @@ main = do
74
83
forM_ hieVersions stackTest
75
84
76
85
phony " build-copy-compiler-tool" $ forM_ hieVersions buildCopyCompilerTool
86
+
87
+ phony " stack-build-doc" stackBuildDoc
77
88
forM_
78
89
hieVersions
79
- (\ version -> phony (" build-doc-" ++ version) $ stackBuildDoc version)
90
+ (\ version -> phony (" build-doc-" ++ version) $ do
91
+ need [" submodules" ]
92
+ need [" cabal" ]
93
+ need [" stack-build-doc" ]
94
+ )
80
95
forM_
81
96
hieVersions
82
97
(\ version -> phony (" hie-" ++ version) $ do
@@ -96,12 +111,13 @@ main = do
96
111
need [" cabal" ]
97
112
forM_ ghcVersions cabalTest
98
113
114
+ phony " cabal-doc" cabalBuildDoc
99
115
forM_
100
116
hieVersions
101
117
(\ version -> phony (" cabal-build-doc-" ++ version) $ do
102
118
need [" submodules" ]
103
119
need [" cabal" ]
104
- cabalBuildDoc version
120
+ need [ " cabal-doc " ]
105
121
)
106
122
forM_
107
123
hieVersions
@@ -181,9 +197,8 @@ cabalInstallHie versionNumber = do
181
197
copyFile' (localBin </> " hie" <.> exe)
182
198
(localBin </> " hie-" ++ dropExtension versionNumber <.> exe)
183
199
184
- cabalBuildDoc :: VersionNumber -> Action ()
185
- cabalBuildDoc versionNumber = do
186
- configureCabal versionNumber
200
+ cabalBuildDoc :: Action ()
201
+ cabalBuildDoc = do
187
202
execCabal_ [" new-install" , " hoogle" ]
188
203
execCabal_ [" new-exec" , " hoogle" , " generate" ]
189
204
@@ -222,10 +237,10 @@ buildCopyCompilerTool versionNumber =
222
237
stackTest :: VersionNumber -> Action ()
223
238
stackTest versionNumber = execStackWithYaml_ versionNumber [" test" ]
224
239
225
- stackBuildDoc :: VersionNumber -> Action ()
226
- stackBuildDoc versionNumber = do
227
- execStackWithYaml_ versionNumber [ " install" , " hoogle" ]
228
- execStackWithYaml_ versionNumber [ " exec" , " hoogle" , " generate" ]
240
+ stackBuildDoc :: Action ()
241
+ stackBuildDoc = do
242
+ execStack_ [ " --stack-yaml=shake.yaml " , " install" , " hoogle" ]
243
+ execStack_ [ " --stack-yaml=shake.yaml " , " exec" , " hoogle" , " generate" ]
229
244
230
245
shortHelpMessage :: Action ()
231
246
shortHelpMessage = do
0 commit comments