main = do
  args <- getArgs
  case args of
    [] -> putStrLn $ "Exiting, need spiral size"
    list | length list > 1 -> putStrLn $ "too many parameters" 
    [sizeString] -> do
        let 
          size = read sizeString :: Integer
          matrix = spiral size
        putStrLn $ "spiral size " ++ (show size) ++ "\n" ++ prettyPrint matrix
main = do
  args <- getArgs
  case args of
    [] -> putStrLn $ "Exiting, need spiral size"
    list | length list > 1 -> putStrLn $ "too many parameters" 
    [sizeString] -> do
        let 
          size = read sizeString :: Integer
          matrix = spiral size
        putStrLn $ "spiral size " ++ (show size) ++ "\n" ++ prettyPrint matrix
main = do
  args <- getArgs
  case args of
    [] -> putStrLn $ "Exiting, need spiral size"
    list | length list > 1 -> putStrLn $ "too many parameters" 
    [sizeString] -> do
        let 
          size = read sizeString :: Integer
          matrix = spiral size
        putStrLn $ "spiral size " ++ (show size) ++ "\n" ++ prettyPrint matrix