Changes between Version 4 and Version 5 of Commentary/CodingStyle
- Timestamp:
- 05/03/07 04:27:12 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/CodingStyle
v4 v5 17 17 18 18 '''DEBUG''':: 19 Used to enables extra checks and debugging output in the compiler. The ASSERT macro (see HsVersions.h) provides assertions which disappear when DEBUG is not defined.19 Used to enables extra checks and debugging output in the compiler. The ASSERT macro (see {{{HsVersions.h}}}) provides assertions which disappear when DEBUG is not defined. 20 20 21 21 All debugging output should be placed inside #ifdef DEBUG; we generally use this to provide warnings about strange cases and things that might warrant investigation. When DEBUG is off, the compiler should normally be silent unless something goes wrong (exception when the verbosity level is greater than zero). … … 51 51 GHC must be compilable by every major version of GHC from 5.02 onwards, and itself. It isn't necessary for it to be compilable by every intermediate development version (that includes last week's CVS sources). 52 52 53 To maintain compatibility, use {{{HsVersions.h}}}(see below) where possible, and try to avoid using #ifdef in the source itself.53 To maintain compatibility, use [wiki:Commentary/CodingStyle#HsVersions.h HsVersions.h] (see below) where possible, and try to avoid using #ifdef in the source itself. 54 54 55 55 == The source file == … … 79 79 80 80 === {{{HsVersions.h}}} === 81 {{{HsVersions.h}}} is a CPP header file containing a number of macros that help smooth out the differences between compiler versions. It defines, for example, macros for library module names which have moved between versions. Take a look .81 {{{HsVersions.h}}} is a CPP header file containing a number of macros that help smooth out the differences between compiler versions. It defines, for example, macros for library module names which have moved between versions. Take a look [[GhcFile(compiler/HsVersions.h)]]. 82 82 {{{ 83 83 #include "HsVersions.h"
