Runghc patch

Isaac Dupree isaacdupree at charter.net
Wed Aug 22 11:12:51 EDT 2007


Ian Lynagh wrote:
> On Wed, Aug 22, 2007 at 09:34:32AM -0300, Isaac Dupree wrote:
>> Hmm, ghc doesn't take '-f' as an argument alone... the odd '--' 
>> interpretation
> 
> It's actually a standard way to separate groups of arguments, e.g.
> 
>     touch -- -a
>     rm -- -a
> 
> will create and remove a file called -a, and
> 
>     startx -geometry +1+1 -- -depth 16
> 
> passes "-geometry +1+1" to the client and "-depth 16" to the server.

Hmm. I knew about the former meaning. I should have been more specific:

runghc -- -- -fglasgow-exts

would be needed to run a file named "-fglasgow-exts", compared to

ghc -- -fglasgow-exts

.  Therefore this exposes that runghc is a wrapper, rather than another 
first-class way to invoke GHC.  Of course, as you point out, there is no 
clean backwards-compatible way not to expose this. (runhaskell shouldn't 
expose this, but it _doesn't_ really, because there is no portable 
Haskell-implementation flag that starts with -f)

In any case it seems like ghc ought to have a --run flag to make ghc 
itself run a file like runghc, similar to --interactive/ghci? - making 
runghc a _simple_ wrapper, trivial not to use.

Isaac



More information about the Cvs-ghc mailing list