RE: [Haskell-cafe] GHC ignores RTS options

2005-11-16 Thread Simon Marlow
On 16 November 2005 08:12, Tomasz Zielonka wrote:

 On Wed, Nov 16, 2005 at 08:53:18AM +0100, Dusan Kolar wrote:
  I wonder whether anybody could advise me how to pass
 correctly RTS options to ghc? I've tried
 
 You have to pass these options to the program, not
 to GHC.
 
 BTW - it would be nice if it was easier to override the default RTS
 options when compiling the program. Perhaps a nice task for a newbie
 GHC developer?

Already possible, see:

http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.
html#rts-hooks

Admittedly it's a bit more fiddly than a command-line flag to GHC,
though.

Cheers,
Simon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Haskell-cafe] GHC ignores RTS options

2005-11-16 Thread Tomasz Zielonka
On Wed, Nov 16, 2005 at 01:09:07PM -, Simon Marlow wrote:
  BTW - it would be nice if it was easier to override the default RTS
  options when compiling the program. Perhaps a nice task for a newbie
  GHC developer?
 
 Already possible, see:
 
 http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.
 html#rts-hooks

I was aware of this, and I should write about it.

 Admittedly it's a bit more fiddly than a command-line flag to GHC,
 though.

And because of this I wrote that it would be nice if it was easier :-)
I've bitten several times by the default values of RTS options,
especially the stack size limit (-K). But it was always easier to
set GHCRTS or use +RTS -RTS, so I never used the rts-hooks.

Do you think I could do this? I am not sure how difficult it would be.

Best regards
Tomasz
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: [Haskell-cafe] GHC ignores RTS options

2005-11-16 Thread Simon Marlow
On 16 November 2005 13:24, Tomasz Zielonka wrote:

 On Wed, Nov 16, 2005 at 01:09:07PM -, Simon Marlow wrote:
 BTW - it would be nice if it was easier to override the default RTS
 options when compiling the program. Perhaps a nice task for a newbie
 GHC developer?
 
 Already possible, see:
 

http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.
 html#rts-hooks
 
 I was aware of this, and I should write about it.
 
 Admittedly it's a bit more fiddly than a command-line flag to GHC,
 though.
 
 And because of this I wrote that it would be nice if it was easier :-)

Sorry, I misread the message.

 I've bitten several times by the default values of RTS options,
 especially the stack size limit (-K). But it was always easier to
 set GHCRTS or use +RTS -RTS, so I never used the rts-hooks.
 
 Do you think I could do this? I am not sure how difficult it would be.

Sure, it shouldn't be too hard.  You need to generate a .c file
containing the ghc_rts_opts setting, and then compile  link it into the
final binary.  It's just a matter of plumbing the various bits together
in GHC's front end.

(it might be nicer to generate Cmm and then push this through the back
end, to avoid the dependence on the C compiler, though).

Cheers,
Simon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: [Haskell-cafe] GHC ignores RTS options

2005-11-16 Thread Simon Peyton-Jones
I'd love to see this done. It's been requested several times.

Simon


| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:glasgow-haskell-users-
| [EMAIL PROTECTED] On Behalf Of Simon Marlow
| Sent: 16 November 2005 15:48
| To: Tomasz Zielonka
| Cc: Dusan Kolar; GHC-users; Haskell-Cafe@haskell.org
| Subject: RE: [Haskell-cafe] GHC ignores RTS options
| 
| On 16 November 2005 13:24, Tomasz Zielonka wrote:
| 
|  On Wed, Nov 16, 2005 at 01:09:07PM -, Simon Marlow wrote:
|  BTW - it would be nice if it was easier to override the default
RTS
|  options when compiling the program. Perhaps a nice task for a
newbie
|  GHC developer?
| 
|  Already possible, see:
| 
| 
|
http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.
|  html#rts-hooks
| 
|  I was aware of this, and I should write about it.
| 
|  Admittedly it's a bit more fiddly than a command-line flag to GHC,
|  though.
| 
|  And because of this I wrote that it would be nice if it was easier
:-)
| 
| Sorry, I misread the message.
| 
|  I've bitten several times by the default values of RTS options,
|  especially the stack size limit (-K). But it was always easier to
|  set GHCRTS or use +RTS -RTS, so I never used the rts-hooks.
| 
|  Do you think I could do this? I am not sure how difficult it would
be.
| 
| Sure, it shouldn't be too hard.  You need to generate a .c file
| containing the ghc_rts_opts setting, and then compile  link it into
the
| final binary.  It's just a matter of plumbing the various bits
together
| in GHC's front end.
| 
| (it might be nicer to generate Cmm and then push this through the back
| end, to avoid the dependence on the C compiler, though).
| 
| Cheers,
|   Simon
| ___
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users@haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users