;lib: clarify choiceopt doc
This commit is contained in:
		
							parent
							
								
									8b4ae4cd43
								
							
						
					
					
						commit
						3f0892556d
					
				| @ -55,9 +55,9 @@ inRawOpts name = isJust . lookup name . unRawOpts | |||||||
| boolopt :: String -> RawOpts -> Bool | boolopt :: String -> RawOpts -> Bool | ||||||
| boolopt = inRawOpts | boolopt = inRawOpts | ||||||
| 
 | 
 | ||||||
| -- | Get latests successfully parsed flag. | -- | From a list of RawOpts, get the last one (ie the right-most on the command line) | ||||||
| -- | -- for which the given predicate returns a Just value. | ||||||
| -- Expected to be used for exclusive choice flags like "--json" vs "--csv". | -- Useful for exclusive choice flags like --daily|--weekly|--quarterly... | ||||||
| -- | -- | ||||||
| -- >>> choiceopt Just (RawOpts [("a",""), ("b",""), ("c","")]) | -- >>> choiceopt Just (RawOpts [("a",""), ("b",""), ("c","")]) | ||||||
| -- Just "c" | -- Just "c" | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user