Changes between Version 4 and Version 6 of Ticket #12696

Oct 13, 2016 9:40:14 PM (3 years ago)


  • Ticket #12696 – Description

    v4 v6  
     8Paraphrased my own words and others from irc:
    810The bug is that it's a bug that ghc is not reporting something useful on the exception. So i don't get sufficient information from the debug facilities. When i have sufficient information i can go ahead and debug my program. This ticket is not about solving a possible bug in my code.
     12The specific issue is that it's producing what ghci calls an undefined exception, and -xc is producing *** Exception (reporting due to +RTS -xc): (THUNK_2_0).
     13"(THUNK_2_0)" doesn't tell anyone anything. I'd expect to see that it reentered something it wasn't supposed to, or something like that.
     14THUNK_2_0 sounds like an internal GHC thing, which i why i'm filing a bug.
     16The +RTS -xc includes names of info tables, which would help identify *what* it's throwing on. but unless the Core is generated at the same time during compilation, it's not possible to find out what. If i generate core now i will get different names. The exception could even be in the standard library.  +RTS -xc definitely has a lot of room for improvement
     18When the program runs normally it doesn't terminate. The GHCI run terminate because -fbreak-on-exception was set.
    4049Stopped in <exception thrown>, <unknown>
    4150_exception :: e = _
     51λ> _exception
     53<interactive>:2:1: error:
     54    • No instance for (Show e) arising from a use of ‘print’
     55      Cannot resolve unknown runtime type ‘e’
     56      Use :print or :force to determine these types
     57      Relevant bindings include it :: e (bound at <interactive>:2:1)
     58      These potential instances exist:
     59        instance [safe] Show Args -- Defined in ‘Test.QuickCheck.Test’
     60        instance [safe] Show Result -- Defined in ‘Test.QuickCheck.Test’
     61        instance Show a => Show (ZipList a)
     62          -- Defined in ‘Control.Applicative’
     63 297 others
     64 133 instances involving out-of-scope types
     65        (use -fprint-potential-instances to see them all)
     66    • In a stmt of an interactive GHCi command: print it
     67λ> :print e
     69<interactive>:1:1: error: Not in scope: ‘e’
     70λ> :force e
     72<interactive>:1:1: error: Not in scope: ‘e’
    4273λ> :back
    4374Logged breakpoint at Main.hs:95:13-26