From 6af1c68b36ae0fcac79d42943cfc299b9870d4ce Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 24 Aug 1999 15:33:12 +0000 Subject: [PATCH] [project @ 1999-08-24 15:33:09 by simonmar] Add -D__HASKELL__=98 --- ghc/docs/users_guide/using.vsgml | 23 ++++++++++++----------- ghc/driver/ghc.lprl | 3 ++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ghc/docs/users_guide/using.vsgml b/ghc/docs/users_guide/using.vsgml index b5b5a75..f0a435a 100644 --- a/ghc/docs/users_guide/using.vsgml +++ b/ghc/docs/users_guide/using.vsgml @@ -1169,24 +1169,25 @@ Specify a directory in which to look for @#include@ files, in the usual C way. -The @ghc@ driver pre-defines several macros: +The @ghc@ driver pre-defines several macros when processing Haskell +source code (@.hs@ or @.lhs@ files): + @__HASKELL98__@: __HASKELL98__ -If defined, this means that GHC supports the language -defined by the Haskell 98 report. +If defined, this means that GHC supports the language defined by the +Haskell 98 report. -NB. This macro is @__HASKELL__=98@: +__HASKELL__ +In GHC 4.04 and later, the @__HASKELL__@ macro is defined as having +the value @98@. @__HASKELL1__@: __HASKELL1__ macro -If defined to @__GLASGOW_HASKELL__@: __GLASGOW_HASKELL__ macro diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index b9d4ef2..d09be78 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -367,7 +367,8 @@ $Haskell1Version = 5; # i.e., Haskell 1.4 # Cpp symbols defined when we're processing Haskell source. @HsSourceCppOpts = - ( "-D__HASKELL1__=$Haskell1Version" + ( "-D__HASKELL__=98" + , "-D__HASKELL1__=$Haskell1Version" , "-D__GLASGOW_HASKELL__=$ProjectVersionInt" , "-D__HASKELL98__" , "-D__CONCURRENT_HASKELL__" -- 1.7.10.4