[[project @ 2003-02-24 12:39:24 by simonpj] simonpj**20030224123927 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 ] { hunk ./docs/building/building.sgml 4131 + +HOST_OS vs TARGET_OS + + +In the source code you'll find various ifdefs looking like: + + #ifdef mingw32_HOST_OS + ...blah blah... + #endif + +and + + #ifdef mingw32_TARGET_OS + ...blah blah... + #endif + +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: + + + The "host" system is the one on which GHC itself will be run. + + + The "target" system is the one for which the program compiled by GHC will be run. + + +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. + + hunk ./ghc/compiler/ghci/InteractiveUI.hs 3 --- $Id: InteractiveUI.hs,v 1.147 2003/02/20 13:12:40 simonpj Exp $ +-- $Id: InteractiveUI.hs,v 1.148 2003/02/24 12:39:26 simonpj Exp $ hunk ./ghc/compiler/ghci/InteractiveUI.hs 48 -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS hunk ./ghc/compiler/ghci/InteractiveUI.hs 237 -#if defined(mingw32_TARGET_OS) +#if defined(mingw32_HOST_OS) hunk ./ghc/compiler/ghci/InteractiveUI.hs 277 -#ifdef mingw32_TARGET_OS +#ifdef mingw32_HOST_OS hunk ./ghc/compiler/main/DriverFlags.hs 2 --- $Id: DriverFlags.hs,v 1.113 2003/02/21 13:26:58 simonpj Exp $ +-- $Id: DriverFlags.hs,v 1.114 2003/02/24 12:39:26 simonpj Exp $ hunk ./ghc/compiler/main/DriverFlags.hs 365 -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS hunk ./ghc/compiler/main/DriverPhases.hs 2 --- $Id: DriverPhases.hs,v 1.22 2002/09/13 15:02:34 simonpj Exp $ +-- $Id: DriverPhases.hs,v 1.23 2003/02/24 12:39:27 simonpj Exp $ hunk ./ghc/compiler/main/DriverPhases.hs 109 +-- Use the appropriate suffix for the system on which +-- the GHC-compiled code will run hunk ./ghc/compiler/main/SysTools.lhs 89 -#if defined(mingw32_TARGET_OS) && (__GLASGOW_HASKELL__ <= 408) +#if defined(mingw32_HOST_OS) && (__GLASGOW_HASKELL__ <= 408) hunk ./ghc/compiler/main/SysTools.lhs 93 -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS hunk ./ghc/compiler/main/SysTools.lhs 106 -#ifdef mingw32_TARGET_OS +#ifdef mingw32_HOST_OS hunk ./ghc/compiler/main/SysTools.lhs 275 -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS hunk ./ghc/compiler/main/SysTools.lhs 317 -#if defined(mingw32_TARGET_OS) +#if defined(mingw32_HOST_OS) hunk ./ghc/compiler/main/SysTools.lhs 420 -#if defined(mingw32_TARGET_OS) +#if defined(mingw32_HOST_OS) hunk ./ghc/compiler/main/SysTools.lhs 704 -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS hunk ./ghc/compiler/main/SysTools.lhs 775 -#if defined(mingw32_TARGET_OS) +#if defined(mingw32_HOST_OS) hunk ./ghc/compiler/main/SysTools.lhs 835 -#if defined(mingw32_TARGET_OS) +#if defined(mingw32_HOST_OS) hunk ./ghc/compiler/main/SysTools.lhs 852 -#ifdef mingw32_TARGET_OS +#ifdef mingw32_HOST_OS hunk ./ghc/compiler/main/SysTools.lhs 863 -#if defined(mingw32_TARGET_OS) +#if defined(mingw32_HOST_OS) hunk ./ghc/compiler/utils/Panic.lhs 30 -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS hunk ./ghc/compiler/utils/Panic.lhs 44 -#endif /* mingw32_TARGET_OS */ +#endif /* mingw32_HOST_OS */ hunk ./ghc/compiler/utils/Panic.lhs 188 -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS }