@@ -24,7 +24,6 @@ import Distribution.Client.TargetProblem
24
24
import Distribution.Client.TargetSelector
25
25
( ComponentKind (.. )
26
26
, ComponentKindFilter
27
- , SubComponentTarget (.. )
28
27
, TargetSelector (.. )
29
28
, componentKind
30
29
, showTargetSelector
@@ -142,28 +141,18 @@ renderTargetSelector (TargetAllPackages (Just kfilter)) =
142
141
" all the "
143
142
++ renderComponentKind Plural kfilter
144
143
++ " in the project"
145
- renderTargetSelector (TargetComponent pkgid cname subtarget) =
146
- renderSubComponentTarget subtarget
147
- ++ " the "
144
+ renderTargetSelector (TargetComponent pkgid cname) =
145
+ " the "
148
146
++ renderComponentName (packageName pkgid) cname
149
- renderTargetSelector (TargetComponentUnknown pkgname (Left ucname) subtarget) =
150
- renderSubComponentTarget subtarget
151
- ++ " the component "
147
+ renderTargetSelector (TargetComponentUnknown pkgname (Left ucname)) =
148
+ " the component "
152
149
++ prettyShow ucname
153
150
++ " in the package "
154
151
++ prettyShow pkgname
155
- renderTargetSelector (TargetComponentUnknown pkgname (Right cname) subtarget) =
156
- renderSubComponentTarget subtarget
157
- ++ " the "
152
+ renderTargetSelector (TargetComponentUnknown pkgname (Right cname)) =
153
+ " the "
158
154
++ renderComponentName pkgname cname
159
155
160
- renderSubComponentTarget :: SubComponentTarget -> String
161
- renderSubComponentTarget WholeComponent = " "
162
- renderSubComponentTarget (FileTarget filename) =
163
- " the file " ++ filename ++ " in "
164
- renderSubComponentTarget (ModuleTarget modname) =
165
- " the module " ++ prettyShow modname ++ " in "
166
-
167
156
renderOptionalStanza :: Plural -> OptionalStanza -> String
168
157
renderOptionalStanza Singular TestStanzas = " test suite"
169
158
renderOptionalStanza Plural TestStanzas = " test suites"
@@ -260,7 +249,7 @@ renderTargetProblem verb _ (TargetAvailableInIndex pkgname) =
260
249
++ " in this project (either directly or indirectly), but it is in the current "
261
250
++ " package index. If you want to add it to the project then edit the "
262
251
++ " cabal.project file."
263
- renderTargetProblem verb _ (TargetComponentNotProjectLocal pkgid cname _ ) =
252
+ renderTargetProblem verb _ (TargetComponentNotProjectLocal pkgid cname) =
264
253
" Cannot "
265
254
++ verb
266
255
++ " the "
@@ -273,7 +262,7 @@ renderTargetProblem verb _ (TargetComponentNotProjectLocal pkgid cname _) =
273
262
++ " non-local dependencies. To run test suites or benchmarks from "
274
263
++ " dependencies you can unpack the package locally and adjust the "
275
264
++ " cabal.project file to include that package directory."
276
- renderTargetProblem verb _ (TargetComponentNotBuildable pkgid cname _ ) =
265
+ renderTargetProblem verb _ (TargetComponentNotBuildable pkgid cname) =
277
266
" Cannot "
278
267
++ verb
279
268
++ " the "
@@ -286,7 +275,7 @@ renderTargetProblem verb _ (TargetComponentNotBuildable pkgid cname _) =
286
275
++ " property is conditional on flags. Alternatively you may simply have to "
287
276
++ " edit the .cabal file to declare it as buildable and fix any resulting "
288
277
++ " build problems."
289
- renderTargetProblem verb _ (TargetOptionalStanzaDisabledByUser _ cname _ ) =
278
+ renderTargetProblem verb _ (TargetOptionalStanzaDisabledByUser _ cname) =
290
279
" Cannot "
291
280
++ verb
292
281
++ " the "
@@ -305,7 +294,7 @@ renderTargetProblem verb _ (TargetOptionalStanzaDisabledByUser _ cname _) =
305
294
++ " explanation."
306
295
where
307
296
compkinds = renderComponentKind Plural (componentKind cname)
308
- renderTargetProblem verb _ (TargetOptionalStanzaDisabledBySolver pkgid cname _ ) =
297
+ renderTargetProblem verb _ (TargetOptionalStanzaDisabledBySolver pkgid cname) =
309
298
" Cannot "
310
299
++ verb
311
300
++ " the "
0 commit comments