promptXs :: String -> IO [Int]
promptXs m = do
    putStr m
    x <- getLine
    return (map read $ words x) `catch` except
  where
    except e = do
      putStrLn $ "Couldn't parse number. Error was: " ++ show (e::IOException)
      promptXs m
promptXs :: String -> IO [Int]
promptXs m = do
    putStr m
    x <- getLine
    return (map read $ words x) `catch` except
  where
    except e = do
      putStrLn $ "Couldn't parse number. Error was: " ++ show (e::IOException)
      promptXs m
promptXs m = do
    putStr m
    x <- getLine
    return (map read $ words x) `catch` except
  where
    except e = do
      putStrLn $ "Couldn't parse number. Error was: " ++ show (e::IOException)
      promptXs m