Haskell.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
thread

-xc

Serge D. Mechveliani

13 Nov 2006 13 Nov '06
9:15 a.m.

Simon P. Jones wrote today about the -xc option to help with finding who called fromJust Noting. Now, I see in the GHC Guide: ------------------------------------------------------------------ -xs (Only available when the program is compiled for profiling.) When an exception is raised in the program, this option causes the current cost-centre-stack to be dumped to stderr. This can be particularly useful for debugging: if your program is complaining about a head [] error and you haven't got a clue which bit of code is causing it, compiling with -prof -auto-all and running with +RTS -xc -RTS will tell you exactly the call stack at the point the error was raised. The output contains one line for each exception raised in the program (the program might raise and catch several exceptions during its execution), where each line is of the form: < cc1, ..., ccn > ... --------------------------------------------------------------------- So, I `made' the project under -prof -auto-all and run ./Nat1 +RTS -xc -RTS. It prints ... (3, Ind n, (formula1 [(1, IndMember, Nat1: Maybe.fromJust: Nothing This does not help to see who called for fromJust in this case. Maybe this is in Nat.prof ? And it is empty. Adding -p does fill Nat.prof with a lot of statistics, but I guess, this statistics cannot help with the fromJust question. Can people, please, comment some more on this -xc usage? Thank you in advance for explanation, ----------------- Serge Mechveliani mechvel@botik.ru

0 0
Reply
Sign in to reply online Use email software

Back to the thread

Back to the list

HyperKitty Powered by HyperKitty version 1.3.9.