Commit d255dfff authored by simonpj's avatar simonpj
Browse files

[project @ 2003-11-10 12:04:25 by simonpj]

Better error message for ghc --show-iface, with no file supplied
parent 3206cccb
......@@ -93,7 +93,7 @@ processOneArg action rest (dash_arg@('-':arg):args) =
if rest /= ""
then fio rest >> return args
else case args of
[] -> unknownFlagErr dash_arg
[] -> missingArgErr dash_arg
(arg1:args1) -> fio arg1 >> return args1
SepArg fio ->
......
-----------------------------------------------------------------------------
-- $Id: DriverUtil.hs,v 1.39 2003/08/20 15:07:57 simonmar Exp $
-- $Id: DriverUtil.hs,v 1.40 2003/11/10 12:04:25 simonpj Exp $
--
-- Utils for the driver
--
......@@ -101,6 +101,9 @@ unknownFlagErr f = throwDyn (UsageError ("unrecognised flag: " ++ f))
unknownFlagsErr :: [String] -> a
unknownFlagsErr fs = throwDyn (UsageError ("unrecognised flags: " ++ unwords fs))
missingArgErr :: String -> a
missingArgErr f = throwDyn (UsageError ("missing argument for flag: " ++ f))
my_partition :: (a -> Maybe b) -> [a] -> ([(a,b)],[a])
my_partition _ [] = ([],[])
my_partition p (a:as)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment