cli: comments
This commit is contained in:
		
							parent
							
								
									406acac48e
								
							
						
					
					
						commit
						3dc8dc428a
					
				| @ -62,8 +62,12 @@ module Hledger.Cli.CliOptions ( | |||||||
|   topicForMode, |   topicForMode, | ||||||
| 
 | 
 | ||||||
|   -- * Tests |   -- * Tests | ||||||
|   tests_Hledger_Cli_CliOptions |   tests_Hledger_Cli_CliOptions, | ||||||
| 
 | 
 | ||||||
|  | --  -- * Convenience re-exports | ||||||
|  | --  module Data.String.Here, | ||||||
|  | --  module System.Console.CmdArgs.Explicit, | ||||||
|  | --  module Test.HUnit | ||||||
| ) | ) | ||||||
| where | where | ||||||
| 
 | 
 | ||||||
| @ -80,6 +84,7 @@ import Data.List.Compat | |||||||
| import Data.List.Split (splitOneOf) | import Data.List.Split (splitOneOf) | ||||||
| import Data.Ord | import Data.Ord | ||||||
| import Data.Maybe | import Data.Maybe | ||||||
|  | --import Data.String.Here | ||||||
| -- import Data.Text (Text) | -- import Data.Text (Text) | ||||||
| import qualified Data.Text as T | import qualified Data.Text as T | ||||||
| import Safe | import Safe | ||||||
| @ -246,11 +251,10 @@ parseHelpTemplate t = | |||||||
|         preamble = unlines $ reverse $ dropWhile null $ reverse preamblels |         preamble = unlines $ reverse $ dropWhile null $ reverse preamblels | ||||||
|         postamblelines = dropWhile null $ drop 1 postamblels |         postamblelines = dropWhile null $ drop 1 postamblels | ||||||
| 
 | 
 | ||||||
| -- | Build a cmdarg mode suitable for a hledger add-on command, | -- | Build a cmdarg mode for a hledger command, | ||||||
| -- from a help template and flag/argument specifications. | -- from a help template and flag/argument specifications. | ||||||
| -- Reduces boilerplate a little, though the complicated cmdargs | -- Reduces boilerplate a little, though the complicated cmdargs | ||||||
| -- flag and argument specs are still required. | -- flag and argument specs are still required. | ||||||
| -- See the addons in bin/ for examples of usage. |  | ||||||
| hledgerCommandMode :: HelpTemplate -> [Flag RawOpts] -> [(Help, [Flag RawOpts])]  | hledgerCommandMode :: HelpTemplate -> [Flag RawOpts] -> [(Help, [Flag RawOpts])]  | ||||||
|   -> [Flag RawOpts] -> ([Arg RawOpts], Maybe (Arg RawOpts)) -> Mode RawOpts |   -> [Flag RawOpts] -> ([Arg RawOpts], Maybe (Arg RawOpts)) -> Mode RawOpts | ||||||
| hledgerCommandMode tmpl ungroupedflags groupedflags hiddenflags args = | hledgerCommandMode tmpl ungroupedflags groupedflags hiddenflags args = | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user