X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FCmdLineOpts.lhs;h=2f75b20356b8b84c1ab89c759c59af4083424a78;hb=904f158f9fe208b8154029dff655a6eab4b2828e;hp=06b9cf75028a57012d10f189c3bca6e02a84b85b;hpb=6ee2f67e582427f931c21c1fc58f62f8619d40b7;p=ghc-hetmet.git diff --git a/ghc/compiler/main/CmdLineOpts.lhs b/ghc/compiler/main/CmdLineOpts.lhs index 06b9cf7..2f75b20 100644 --- a/ghc/compiler/main/CmdLineOpts.lhs +++ b/ghc/compiler/main/CmdLineOpts.lhs @@ -14,6 +14,8 @@ module CmdLineOpts ( intSwitchSet, switchIsOn, + src_filename, + -- debugging opts opt_D_dump_absC, opt_D_dump_asm, @@ -155,6 +157,7 @@ import GlaExts import Argv import Constants -- Default values for some flags +import FastString ( headFS ) import Maybes ( assocMaybe, firstJust, maybeToBool ) import Panic ( panic, panic# ) @@ -283,6 +286,13 @@ unpacked_opts = \end{code} \begin{code} +src_filename :: FAST_STRING +src_filename = case argv of + filename : rest | headFS filename /= '-' -> filename + otherwise -> panic "no filename" +\end{code} + +\begin{code} -- debugging opts opt_D_dump_absC = lookUp SLIT("-ddump-absC") opt_D_dump_asm = lookUp SLIT("-ddump-asm")