[Haskell-beginners] exceptions and stacks

Emmanuel Touzery etouzery at gmail.com
Tue Nov 6 21:30:26 CET 2012


OK apparently i just needed to build normally then again with:

 ghc -prof -auto-all -osuf prof *.hs

Well the instructions were clear but it was after the big fight with cabal.

Well now the executable is 47Mb compared to 23Mb before, but if I'll get
the stack it's worth it. It's running now, it takes a while before it hits
the crash.

Emmanuel

On Tue, Nov 6, 2012 at 8:34 PM, Emmanuel Touzery <etouzery at gmail.com> wrote:

> well it certainly requires will to build with profiling.
> i had to reinstall all my cabal packages with profiling enabled, which i
> finally managed to do now..
>
> and now it tells me:
> ghc -prof -auto-all Prog.hs
>
>     Dynamic linking required, but this is a non-standard build (eg. prof).
>     You need to build the program twice: once the normal way, and then
>     in the desired way using -osuf to set the object file suffix.
>
> Ah well.. I'll fight some more with this later. Not exactly "out of the
> box"...
>
> Emmanuel
>
>
> On Tue, Nov 6, 2012 at 1:02 PM, Ozgur Akgun <ozgurakgun at gmail.com> wrote:
>
>> Hi Emmanuel,
>>
>> It is indeed good practice to write total programs in general. However, I
>> understand the need for stack traces in practice.
>>
>> There are some slides by Simon Marlow on the issue, ironically using your
>> example in the title.
>>
>> In short: check the -xc flag in
>> http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/runtime-control.html
>>
>> Hope this helps,
>> Ozgur
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20121106/caf47744/attachment.htm>


More information about the Beginners mailing list