1
Fork 0

fix error message in simple sql parser when not parsing from file

This commit is contained in:
Jake Wheat 2019-08-31 13:43:37 +01:00
parent 4c8f612f56
commit 206982cd0a

View file

@ -59,8 +59,8 @@ indent: parse then pretty print sql
> getInput :: [String] -> IO (FilePath,String)
> getInput as =
> case as of
> ["-"] -> ("-",) <$> getContents
> ("-c":as') -> return ("-", unwords as')
> ["-"] -> ("",) <$> getContents
> ("-c":as') -> return ("", unwords as')
> [filename] -> (filename,) <$> readFile filename
> _ -> showHelp (Just "arguments not recognised") >> error ""