summaryrefslogtreecommitdiff
path: root/docs/building
diff options
context:
space:
mode:
authorsimonpj <unknown>2003-02-24 12:39:27 +0000
committersimonpj <unknown>2003-02-24 12:39:27 +0000
commit395917a05328e935f40abd080b169aa25546b083 (patch)
treeac80055ad5babbee9632343f1ac1ac88140416bb /docs/building
parent384d5bcf83b6e7ee103fca364ca1ab6ef831834a (diff)
downloadhaskell-395917a05328e935f40abd080b169aa25546b083.tar.gz
[project @ 2003-02-24 12:39:24 by simonpj]
Three Template Haskell improvements a) Add type synonyms to THSyntax (and DsMeta, Convert) b) Make Q into a newtype instead of a type synonym c) Eliminate tiresome and error prone argument to DsMeta.wrapGenSyms and similarly addTyVarBinds
Diffstat (limited to 'docs/building')
-rw-r--r--docs/building/building.sgml30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/building/building.sgml b/docs/building/building.sgml
index 0975985c27..fc342d04ee 100644
--- a/docs/building/building.sgml
+++ b/docs/building/building.sgml
@@ -4129,6 +4129,36 @@ that Haskell programs compiled by GHC-cygwin can import the (Haskell) Posix libr
</para>
</sect3>
+<sect3><title>HOST_OS vs TARGET_OS</title>
+
+<para>
+In the source code you'll find various ifdefs looking like:
+<programlisting>
+ #ifdef mingw32_HOST_OS
+ ...blah blah...
+ #endif
+</programlisting>
+and
+<programlisting>
+ #ifdef mingw32_TARGET_OS
+ ...blah blah...
+ #endif
+</programlisting>
+These macros are set by the configure script (via the file config.h).
+Which is which? The criterion is this. In the ifdefs in GHC's source code:
+<itemizedlist>
+ <listitem> <para>
+ The "host" system is the one on which GHC itself will be run.
+ </para> </listitem>
+ <listitem> <para>
+ The "target" system is the one for which the program compiled by GHC will be run.
+ </para> </listitem>
+</itemizedlist>
+For a stage-2 compiler, in which GHCi is available, the "host" and "target" systems must be the same.
+So then it doesn't really matter whether you use the HOST_OS or TARGET_OS cpp macros.
+</para>
+</sect3>
+
<sect3><title>Summary</title>
<para>Notice that "GHC-mingw" means "GHC that <emphasis>targets</emphasis> MinGW". It says nothing about