printTasks ts = do
  putStrLn $ taskHeader <> " - Started"
  mapM_ printTask started
  putStrLn ""
  putStrLn $ taskHeader <> " - Paused"
  mapM_ printTask paused
  putStrLn ""
  putStrLn $ taskHeader <> " - Unfinished"
  mapM_ printTask unfinished
    where
      taskHeader = "Tasks (Key: Description)"
      (started, notStarted) = L.partition (\(Entity _ TaskStore{..}) -> isJust taskStoreStartTime) ts
      (paused, unfinished) = L.partition (\(Entity _ TaskStore{..}) -> not (L.null taskStoreDurations)) notStarted

      printTask (Entity TaskStoreKey{..} TaskStore{..})
        = putStrLn $ let keylength = T.length keyText
                         keyText = showT (unSqlBackendKey unTaskStoreKey)
                     in leftpad (10 - keylength) keyText  <> ": " <> taskStoreTaskDesc

-- FIXME: Text builder and fold
printTasks ts = do
  putStrLn $ taskHeader <> " - Started"
  mapM_ printTask started
  putStrLn ""
  putStrLn $ taskHeader <> " - Paused"
  mapM_ printTask paused
  putStrLn ""
  putStrLn $ taskHeader <> " - Unfinished"
  mapM_ printTask unfinished
    where
      taskHeader = "Tasks (Key: Description)"
      (started, notStarted) = L.partition (\(Entity _ TaskStore{..}) -> isJust taskStoreStartTime) ts
      (paused, unfinished) = L.partition (\(Entity _ TaskStore{..}) -> not (L.null taskStoreDurations)) notStarted

      printTask (Entity TaskStoreKey{..} TaskStore{..})
        = putStrLn $ let keylength = T.length keyText
                         keyText = showT (unSqlBackendKey unTaskStoreKey)
                     in leftpad (10 - keylength) keyText  <> ": " <> taskStoreTaskDesc

-- FIXME: Text builder and fold
printTasks ts = do
  putStrLn $ taskHeader <> " - Started"
  mapM_ printTask started
  putStrLn ""
  putStrLn $ taskHeader <> " - Paused"
  mapM_ printTask paused
  putStrLn ""
  putStrLn $ taskHeader <> " - Unfinished"
  mapM_ printTask unfinished
    where
      taskHeader = "Tasks (Key: Description)"
      (started, notStarted) = L.partition (\(Entity _ TaskStore{..}) -> isJust taskStoreStartTime) ts
      (paused, unfinished) = L.partition (\(Entity _ TaskStore{..}) -> not (L.null taskStoreDurations)) notStarted

      printTask (Entity TaskStoreKey{..} TaskStore{..})
        = putStrLn $ let keylength = T.length keyText
                         keyText = showT (unSqlBackendKey unTaskStoreKey)
                     in leftpad (10 - keylength) keyText  <> ": " <> taskStoreTaskDesc

-- FIXME: Text builder and fold