[Haskell-beginners] :trace seems not to work in ghci

Nathan Hüsken nathan.huesken at posteo.de
Thu Sep 26 12:35:51 CEST 2013


Hey,

I have a program I want to debug in ghci because it crashes with an 
exception. So I do:

Prelude> :l Main
Ok, modules loaded: Main, PlotDisplay, PlotDiagram, ForexData.
Prelude Main> :set -fbreak-on-exception
Prelude Main> :trace main
(...)
Stopped at <exception thrown>
_exception :: e = _
[<exception thrown>] Prelude Main> :hist
Empty history. Perhaps you forgot to use :trace?
[<exception thrown>] Prelude Main> :back
no more logged breakpoints
[<exception thrown>] Prelude Main> :force _exception
_exception = GHC.Exception.SomeException
                (GHC.Exception.ErrorCall "Prelude.tail: empty list")

What could be the reason why :hist/:back/:trace are not working?

Thanks!
Nathan



More information about the Beginners mailing list