[Haskell-beginners] exceptions and stacks

Emmanuel Touzery etouzery at gmail.com
Thu Nov 8 18:32:43 CET 2012


Well I tried and it displays the same with GHC 7.4.1.

However this is the output with GHC 7.0.4:
<GHC.List.CAF>stack: Prelude.head: empty list

So this is supported from 7.4 onwards (well maybe 7.2, I guess that version
existed).

So there are all the chances that with GHC 7.4.1 I would get a proper stack
for my problem. I'll try it soon but I must reinstall all the libraries
with profiling on the computer on which I have 7.4.1...

emmanuel

On Thu, Nov 8, 2012 at 1:08 PM, Ozgur Akgun <ozgurakgun at gmail.com> wrote:

> fwiw, I am getting a stack trace with 7.6.1.
>
> -- stack.hs
> main = print $ foo [1]
> foo xs = bar xs ++ bar xs
> bar (x:xs) = [x, head xs]
>
> $ ghc -prof -auto-all -rtsopts stack.hs
>
> $ ./stack +RTS -xc
> *** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace:
>   GHC.List.CAF
>   --> evaluated by: Main.bar,
>   called from Main.foo,
>   called from Main.main,
>   called from Main.CAF
>   --> evaluated by: Main.main,
>   called from Main.CAF
> stack: Prelude.head: empty list
>
>
>
> --
> Ozgur Akgun
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20121108/665fa946/attachment.htm>


More information about the Beginners mailing list