<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 19 August 2016 at 14:42, Sven Panne <span dir="ltr"><<a href="mailto:svenpanne@gmail.com" target="_blank">svenpanne@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Hmmm, do we need '--ghc-args=' at all when we have '--' as the border between the 2 "argument worlds"? Without thinking too much about it, :-} I guess we don't. This would be consistent with how e.g. "stack exec" or "gdb" work. An explicit option --pass-this-to-some-progXY is only needed when there are more than 2 "argument worlds" involved, otherwise '--' is enough, and also easier to type/remember.</div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">Hmm, I have been there :-) There is a slight gotcha here. This is how the runghc command looks like:</div><div class="gmail_extra">







<p class=""><span class="">runghc [runghc flags] [--] [GHC flags] progname [prog</span><span class=""> args]</span></p><p class="">The regular '--' separation works well when we have only two worlds; we consume upto '--' and give the rest opaquely to the other one. Here we have three  scopes, we need to separate runghc flags, GHC flags, program and its args. In the above command we cannot distinguish a GHC arg from progname.</p><p class="">One way to solve that is to put another mandatory '--' after the GHC flags so that GHC flags are always delimited. With that here are the valid forms of the command:</p><p class=""><span class="">1) runghc [runghc flags] progname [prog</span><span class=""> args]</span><br></p><p class="">2) runghc [runghc flags] -- progname [prog args]</p><div><span class="">3) runghc [runghc flags] -- [GHC flags] -- progname [prog args]</span></div><div><span class=""><br></span></div><div><span class="">For simplicity we will only pass GHC args using the 3rd form of the command even if they are not conflicting with runghc flags. Note that these changes will be incompatible with the previous implementation. Does this sound ok? Or we keep the good old '--ghc-arg='?</span></div><div><span class=""><br></span></div><div><span class="">-harendra</span></div><div><span class=""><br></span></div><div><span class=""><br></span></div></div></div>