finding the exact instance of a function causing an error

Hey, I have a program, that, when I run it fails with: Main: Prelude.tail: empty list Can I somehow find out which exat instance of tail causes this error? I tried compiling with -prof and running with +RTX -xc, which gives me: *** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace: GHC.List.CAF --> evaluated by: SYSTEM.SYSTEM *** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace: GHC.List.CAF *** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace: GHC.List.CAF Does not really help me ... Thanks! Nathan

Try running the program with the ghci debugger and
-fbreak-on-errorhttp://www.haskell.org/ghc/docs/7.6.2/html/users_guide/ghci-debugger.html#gh...
.
On Wed, Sep 25, 2013 at 5:57 PM, Nathan Hüsken
Hey,
I have a program, that, when I run it fails with: Main: Prelude.tail: empty list
Can I somehow find out which exat instance of tail causes this error? I tried compiling with -prof and running with +RTX -xc, which gives me:
*** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace: GHC.List.CAF --> evaluated by: SYSTEM.SYSTEM *** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace: GHC.List.CAF *** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace: GHC.List.CAF
Does not really help me ...
Thanks! Nathan ______________________________**_________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/**mailman/listinfo/beginnershttp://www.haskell.org/mailman/listinfo/beginners
participants (2)
-
Julian Arni
-
Nathan Hüsken