1
0
mirror of https://github.com/redelmann/scat synced 2025-01-10 06:34:20 +01:00

Added missing documentation.

This commit is contained in:
Romain Edelmann 2013-08-09 17:39:33 +02:00
parent 6608dce71e
commit 09fe0caf48
2 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,7 @@ scat = do
printVerbose "Generated password:\n"
liftIO $ putStrLn $ evalBuilder s $ scatter k pw
-- | Prints, if the verbosity level allows it.
printVerbose :: String -> Scat ()
printVerbose str = do
v <- fmap verbose ask
@ -77,6 +78,7 @@ getPassword = do
printVerbose "Passwords do not match, please retry.\n"
getPassConfirm
-- | Ask a password on the command line, with the specified prompt.
askPassword :: String -> Scat C.ByteString
askPassword str = do
printVerbose str

View File

@ -33,6 +33,8 @@ data Options = Options
-- ^ Indicates if the password must be confirmed. Activates verbosity.
}
{- | Verbosity. If false, do not print anything but the generated password.
True when @--verbose@ or @--confirmation@ are specified. -}
verbose :: Options -> Bool
verbose opts = verbose_ opts || confirm opts