Jens Petersen <[EMAIL PROTECTED]> writes: > Jens Petersen <[EMAIL PROTECTED]> writes: > > > It would be good if ghc would at like give a better error > > message when an empty cmd is passed to -pgmX. > > Rather I think it should abort rather than forking an empty > command...
How about something like the following untested patch to this effect? (In the ideal world it would test that c is a valid program flag, but anyway...) Jens 2002-02-20 Jens Petersen <[EMAIL PROTECTED]> * compiler/main/SysTools.lhs (setPgm): Abort when a null cmd is passed to a -pgmX option. Index: SysTools.lhs =================================================================== RCS file: /cvs/fptools/ghc/compiler/main/SysTools.lhs,v retrieving revision 1.70 diff -u -r1.70 SysTools.lhs --- SysTools.lhs 2002/02/16 19:39:51 1.70 +++ SysTools.lhs 2002/02/20 13:15:44 @@ -417,6 +417,7 @@ -- The string is the flag, minus the '-pgm' prefix -- So the first character says which program to override +setPgm ([c]) = throwDyn (UsageError ("-pgm" ++ [c]": no CMD argument")) setPgm ('P' : pgm) = writeIORef v_Pgm_P pgm setPgm ('F' : pgm) = writeIORef v_Pgm_F pgm setPgm ('c' : pgm) = writeIORef v_Pgm_c pgm _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs