On 21 February 2010 18:58, Artyom Kazak <artyom.ka...@gmail.com> wrote: > So, if I type "./prog +RTS --RTS +RTS", the output will be "+RTS". But > I want the output to be equal to the input IN ALL CASES, without any > quotes, additional options, etc. I want all the command line to go to > my program. How can I do it? (The only way I know now - hacking the > GHC. If there are no other ways, I'll do it.)
You might be able to get somewhere by writing a custom "main" function in C and linking it in. According to http://haskell.org/ghc/docs/latest/html/users_guide/options-phases.html if a lib specified with the -l option during compilation contains a "main", that will be used in preference to the one from HSrts. You could presumably just extend argv with the "+RTS" "--RTS" entries and then call into the one from HSrts, so this might even be quite easy. Cheers, Max _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe