@@ -280,19 +280,19 @@ programInfo
280
280
-- ^ default configuration
281
281
→ ProgramInfo a
282
282
programInfo desc parser defaultConfig =
283
- programInfoValidate desc parser defaultConfig $ return
283
+ programInfoValidate desc parser defaultConfig $ const ( return () )
284
284
285
285
-- | Smart constructor for 'ProgramInfo'.
286
286
--
287
287
-- 'piHelpHeader' and 'piHelpFooter' are set to 'Nothing'.
288
288
--
289
- programInfoValidate
289
+ programInfoValidate'
290
290
∷ String
291
291
→ MParser a
292
292
→ a
293
293
→ ConfigValidation' a f r
294
294
→ ProgramInfoValidate' a f r
295
- programInfoValidate desc parser defaultConfig valFunc = ProgramInfo
295
+ programInfoValidate' desc parser defaultConfig valFunc = ProgramInfo
296
296
{ _piDescription = desc
297
297
, _piHelpHeader = Nothing
298
298
, _piHelpFooter = Nothing
@@ -302,6 +302,19 @@ programInfoValidate desc parser defaultConfig valFunc = ProgramInfo
302
302
, _piConfigurationFiles = []
303
303
}
304
304
305
+ -- | Smart constructor for 'ProgramInfo'.
306
+ --
307
+ -- 'piHelpHeader' and 'piHelpFooter' are set to 'Nothing'.
308
+ --
309
+ programInfoValidate
310
+ ∷ String
311
+ → MParser a
312
+ → a
313
+ → ConfigValidation a f
314
+ → ProgramInfoValidate a f
315
+ programInfoValidate desc parser defaultConfig valFunc =
316
+ programInfoValidate' desc parser defaultConfig $ \ c -> valFunc c >> return c
317
+
305
318
-- -------------------------------------------------------------------------- --
306
319
-- AppConfiguration
307
320
@@ -718,7 +731,7 @@ parseConfiguration
718
731
)
719
732
⇒ T. Text
720
733
-- ^ program name (used in error messages)
721
- → ProgramInfoValidate a f
734
+ → ProgramInfoValidate' a f r
722
735
-- ^ program info value; use 'programInfo' to construct a value of this
723
736
-- type
724
737
→ [String ]
0 commit comments