From 09fe0caf4894f02069ba40f81bd569556f7e1361 Mon Sep 17 00:00:00 2001 From: Romain Edelmann Date: Fri, 9 Aug 2013 17:39:33 +0200 Subject: [PATCH] Added missing documentation. --- src/Scat.hs | 2 ++ src/Scat/Options.hs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Scat.hs b/src/Scat.hs index f6307df..69b9c08 100644 --- a/src/Scat.hs +++ b/src/Scat.hs @@ -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 diff --git a/src/Scat/Options.hs b/src/Scat/Options.hs index 157200c..881a867 100644 --- a/src/Scat/Options.hs +++ b/src/Scat/Options.hs @@ -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