<div dir="ltr">Hi,<br><br>I&#39;m brand new to GHC development, and have been looking at:<br>  <a href="http://ghc.haskell.org/trac/ghc/ticket/4243">http://ghc.haskell.org/trac/ghc/ticket/4243</a><br><br>I was initially thinking of something like getopt_long_only, as per:<br>
  <a href="http://linux.die.net/man/3/getopt_long">http://linux.die.net/man/3/getopt_long</a><br>however it looks like the portability of that function isn&#39;t the greatest, and from looking at rts/RtsFlags.c:procRtsOpts(...) it might not be the best solution.<br>
<br>Unless I&#39;ve missed something, it seems that the processing of each flag is independent of the others, at least once we get into procRtsOpts(...), and the processing of a flag either mutates the RtsFlags variable or results in an error.<br>
<br>If that&#39;s not likely / wanted to change I think there are some nifty ways to abstract that, as long as function pointers aren&#39;t frowned on in the RTS code :)<br><br>Since it looks like it would be a sizeable patch, should I put together a proof-of-concept and ask for feedback sooner rather than later?  I&#39;d hate to emerge from my codecave with a fully-formed but unacceptable solution.<br>
<br>While I&#39;m at it - does anyone have any thoughts or wishlists for a cleaned up option parser?<br><br>Cheers,<br><br>Dave<br></div>