Mateusz Kowalczyk | 2 Jun 00:13 2013

Debugging GHCi


Nowadays I'm looking at Haddock and amongst other things, recent GHC
is a must. Due to this, I now have 7.6.3 on my system as well as a
build from yesterday (7.7.20130531), straight from git HEAD.

Building Haddock with --enable-tests, I then try to run some hspec (or
probably more appropriately, nanospec) tests. Simple stuff:
> ghci src/Spec.hs

> Prelude> :main

Tests run as expected and everything is fine until about 2 seconds
after main terminates: GHCi segfaults.

As a means of checking whether this is a problem with GHCi, I ran the
same commands with my 7.6.3 install and everything was fine - no
segfault. This clearly points to something being wrong with GHCi.

My question is, how would I even begin to investigate what's wrong? If
I want to file a bug, I need to have more information, especially
considering that someone I asked could not reproduce this. I have no
experience with GHCis guts and I'm not sure how to progress.


Mateusz K.