uniqPathName :: T.MonadIO io => T.FilePath -> io T.FilePath
uniqPathName path = do
  dirExists <- T.testdir path
  case dirExists of
    False -> return path
    True -> uniqPathNumbered path 0
      where
        uniqPathNumbered :: T.MonadIO io => T.FilePath -> Int -> io T.FilePath
        uniqPathNumbered path i = do
          let ip1 = i + 1
              ip1path = T.fromText ((toTxt path) <> "-" <> (showt ip1))
          enumDirExists <- T.testdir ip1path
          case enumDirExists of
            True -> uniqPathNumbered path ip1
            False -> return ip1path
uniqPathName :: T.MonadIO io => T.FilePath -> io T.FilePath
uniqPathName path = do
  dirExists <- T.testdir path
  case dirExists of
    False -> return path
    True -> uniqPathNumbered path 0
      where
        uniqPathNumbered :: T.MonadIO io => T.FilePath -> Int -> io T.FilePath
        uniqPathNumbered path i = do
          let ip1 = i + 1
              ip1path = T.fromText ((toTxt path) <> "-" <> (showt ip1))
          enumDirExists <- T.testdir ip1path
          case enumDirExists of
            True -> uniqPathNumbered path ip1
            False -> return ip1path
uniqPathName path = do
  dirExists <- T.testdir path
  case dirExists of
    False -> return path
    True -> uniqPathNumbered path 0
      where
        uniqPathNumbered :: T.MonadIO io => T.FilePath -> Int -> io T.FilePath
        uniqPathNumbered path i = do
          let ip1 = i + 1
              ip1path = T.fromText ((toTxt path) <> "-" <> (showt ip1))
          enumDirExists <- T.testdir ip1path
          case enumDirExists of
            True -> uniqPathNumbered path ip1
            False -> return ip1path