Coding suggestions for GHC/Hugs related code

Comments

NB These are just suggestions. They're not set in stone. Some of them are probably misguided. If you disagree with them, feel free to modify this document (and make your commit message reasonably informative) or mail someone (eg. The GHC mailing list)

References

If you haven't read them already, you might like to check the following. Where they conflict with our suggestions, they're probably right.

Portability issues

Debugging/robustness tricks

Anyone who has tried to debug a garbage collector or code generator will tell you: "If a program is going to crash, it should crash as soon, as noisily and as often as possible." There's nothing worse than trying to find a bug which only shows up when running GHC on itself and doesn't manifest itself until 10 seconds after the actual cause of the problem.

The ideas in this section are mostly aimed at this issue:

Syntactic details

CVS issues