From 5ac7a79f8b71028f0beca32b3aaf564971a494f3 Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Mon, 29 Mar 2021 11:16:53 -0400 Subject: [PATCH] add warning when no input files are specified --- src/sv2v.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sv2v.hs b/src/sv2v.hs index 95da2a8..379ea4a 100644 --- a/src/sv2v.hs +++ b/src/sv2v.hs @@ -60,6 +60,8 @@ rewritePath path = do (base, end) = splitAt (length path - length ext) path writeOutput :: Write -> [FilePath] -> [AST] -> IO () +writeOutput _ [] [] = + hPutStrLn stderr "Warning: No input files specified (try `sv2v --help`)" writeOutput Stdout _ asts = hPrint stdout $ concat asts writeOutput Adjacent inPaths asts = do