command line option --show-iface

Steffen Mazanek steffen.mazanek at
Mon Oct 27 22:26:33 EST 2003


the following error is slightly confusing:

ghc --show-iface
ghc-6.0.1: unrecognised flag: --show-iface
Usage: For basic information, try the `--help' option.

ghc --show-iface Unify.hi      
__interface "Main" Unify 1 where
__export  Unify Unifiable{mgu} match mguType varBind;

A hint in the right direction would be more 
convenient :-)

Maybe in /ghc/compiler/main/DriverUtil.hs a function

unknownFlagErrUsage :: String->String -> a
unknownFlagErrUsage f specusage = throwDyn 
  (UsageError ("unrecognised flag: " ++ f ++ "\n" ++
               "hint: " ++ specusage))

and changing processOneArg from DriverFlags.hs

   HasArg fio ->
      if rest /= ""
      then fio rest >> return args
      else case args of
          [] -> unknownFlagErrUsage dash_arg "argument for flag expected"
          (arg1:args1) -> fio arg1 >> return args1

Would this be ok?


More information about the Glasgow-haskell-users mailing list