showVersions :: Options -> Map.Map Version [FilePath] -> IO ()
showVersions opts m = do
    whenVer blank
    mapM_ disp (Map.toAscList m)
    progMessage hints
  where
    whenVer = when (optVerbose opts)
    blank = putStrLn ""
    disp (v, fp) = do
        putStrLn $ show v
        whenVer $ do
            mapM_ (putStrLn . ("    " ++)) $ sort fp
            blank
    hints =
        "-- To remove a version and all earlier: $ thru VERSION\n\
        \-- To remove only a single version:     $ only VERSION\n\n"
showVersions :: Options -> Map.Map Version [FilePath] -> IO ()
showVersions opts m = do
    whenVer blank
    mapM_ disp (Map.toAscList m)
    progMessage hints
  where
    whenVer = when (optVerbose opts)
    blank = putStrLn ""
    disp (v, fp) = do
        putStrLn $ show v
        whenVer $ do
            mapM_ (putStrLn . ("    " ++)) $ sort fp
            blank
    hints =
        "-- To remove a version and all earlier: $ thru VERSION\n\
        \-- To remove only a single version:     $ only VERSION\n\n"
showVersions opts m = do
    whenVer blank
    mapM_ disp (Map.toAscList m)
    progMessage hints
  where
    whenVer = when (optVerbose opts)
    blank = putStrLn ""
    disp (v, fp) = do
        putStrLn $ show v
        whenVer $ do
            mapM_ (putStrLn . ("    " ++)) $ sort fp
            blank
    hints =
        "-- To remove a version and all earlier: $ thru VERSION\n\
        \-- To remove only a single version:     $ only VERSION\n\n"