X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fcomm%2Fthe-beast%2Fcoding-style.html;h=41347c69022ce2c0916da0ec6902bfe4a41e2dc6;hb=153b9cb9b11e05c4edb1b6bc0a7b972660e41f70;hp=20aab896c12872f57ba49f64d4e696efb580056b;hpb=bfdd44b2bfec3d819fd5ce19279832c25f096bb4;p=ghc-hetmet.git diff --git a/ghc/docs/comm/the-beast/coding-style.html b/ghc/docs/comm/the-beast/coding-style.html index 20aab89..41347c6 100644 --- a/ghc/docs/comm/the-beast/coding-style.html +++ b/ghc/docs/comm/the-beast/coding-style.html @@ -70,17 +70,55 @@ -

More about what you're allowed to do in the way of CPP - directives later. +

Platform tests

+ +

There are three platforms of interest to GHC: + +

+ +

At the moment, there is very limited support for having + different values for buil, host, and target. In particular:

+ + + +

In the compiler's source code, you may make use of the + following CPP symbols:

+ + + +

where xxx is the appropriate value: + eg. i386_TARGET_ARCH.

Compiler versions

-

GHC must be compilable by every major version of GHC from 4.08 +

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), but we mustn't lose compatibility with 4.08 - for the time being, because that's the only version which can be - easily bootstrapped from .hc files. + week's CVS sources).

To maintain compatibility, use HsVersions.h (see below) where possible, and try to avoid using #ifdef in