Reporting bugs in GHC

Create a new bug, and enter your bug report. You can also search the bug database here to make sure your bug hasn't already been reported (if it has, it might still help to add information from your experience to the existing report).

Less preferred:

To submit an anonymous bug: use login "guest", password "guest"

Frequently reported bugs

GHC 7.4 gives an internal error (panic) on:

Lowercase identifier used in a deriving clause, such as data A = B deriving show. Use uppercase: deriving Show. Bug #5961.

How do I tell if I should report my bug?

Please search for existing tickets on the ​bug tracker or ​Google. It saves time to have all the manifestations of the same bug gathered together. If you get an error message from GHC, a good search key is usually the non-program-specific part of the error message.

If you do find an existing ticket that seems to describe the same problem, then

Add a comment that explains how it manifests for you, and add your description of how to reproduce it (see below)

Add yourself to the CC list for the bug. We will try to prioritise bugs that affect a lot of people, and the length of the CC list is how we are currently determining this. Use a comma or space (but not semicolon) to separate your email address from the next one.

However, if you encounter a crash from the runtime system, then don't bother searching for existing tickets - just create a new ticket. These indicate a general RTS failure of some kind, and can arise due to a wide range of causes, so it is easier for us to track each failure in a separate ticket.

Runtime system errors usually manifest as one of the following error messages:

task (for use by GHC developers only): something we intend to do sometime

Type of failure: the nature of the failure (compile-time crash, incorrect result, etc.). This allows us to prioritize important bugs.

Full description. This is where you describe your bug in details. See "What information to provide" below. Use the wiki markup in your description, especially {{{ ... }}} brackets to mark up literal code.

CC. If you are only logged in as guest then please consider including your email address (using a comma or space as separator, not a semicolon). That way we can ask you questions, and you'll get email from Trac when something happens to your bug.

Component, Version, Operating system, Architecture all help to describe the setup that failed. Please pay particular attention to version, which is the version of GHC that you are running.

Priority, Milestone, Assign to, Difficulty, Test case, Blocking, Blocked by: these are all for use by GHC developers; please don't fill these in.

Full description: what information to provide in the body of your bug report

The name of the bug-reporting game is: facts, facts, facts. Don't omit them because "Oh, they won't be interested…".

The absolutely key thing is that we must be able to reproduce the bug. Without this, we are virtually helpless; we know there's a problem but we usually can make no progress with fixing it. The easiest way to help us reproduce the bug is to provide us with a program that elicits it:

The smaller the better. It costs you real work to "boil down" the bug from a big program to a small one, but the plain truth is that the easier the bug is to reproduce, and the smaller the test program (= smaller debug output), the more likely we are to fix it. Also, as you are familiar with the code, it is generally easier for you to boil it down than for us to.

The fewer dependencies the better. If your program depends on many libraries, it's harder for us to reproduce.

One way to cut down programs is to replace library functions with definitions like

displayWidget :: This -> IO That
displayWidget = error "urk"

and thereby avoid the necessity for the supporting library.

Here is a check-list of things to cover in your description:

The source code of the program that shows the bug. You can give the code inline, or attach a file, or attach a tarball.

What kind of machine are you running on, and exactly what version of the operating system are you using? (on a Unix system, uname -a or cat /etc/motd will show the desired information.) In the bug tracker, this information can be given in the "Architecture" and "Operating system" fields.

What version of GCC are you using? gcc -v will tell you.

Run the sequence of compiles/runs that caused the offending behaviour, cut-and-paste the whole session into the bug report. We'd prefer to see the whole thing.

Add the -v flag when running GHC, so we can see exactly what was run, what versions of things you have, etc.

Add the -dcore-lint flag when running GHC. This adds some significant internal consistency-checking, which often nails bugs early.