From a103a9dc0de992716e62c30d7ac81c0bc0dbcdc5 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 10 Apr 2000 16:02:58 +0000 Subject: [PATCH] [project @ 2000-04-10 16:02:58 by simonpj] Make it so that -fcompiling-prelude applies only for Prelude modules (i.e. ones called Prelxxx). I've done this with an {-# OPTIONS #-} line in each such module (they all has -fno-implicit-prelude anyway) but a less repetitive approach in the Makefile would be welcome. --- ghc/lib/std/Makefile | 2 +- ghc/lib/std/PrelAddr.lhs | 2 +- ghc/lib/std/PrelArr.lhs | 2 +- ghc/lib/std/PrelArrExtra.lhs | 2 +- ghc/lib/std/PrelBase.lhs | 2 +- ghc/lib/std/PrelByteArr.lhs | 2 +- ghc/lib/std/PrelConc.lhs | 2 +- ghc/lib/std/PrelDynamic.lhs | 2 +- ghc/lib/std/PrelEnum.lhs | 2 +- ghc/lib/std/PrelErr.lhs | 2 +- ghc/lib/std/PrelException.lhs | 4 ++-- ghc/lib/std/PrelFloat.lhs | 2 +- ghc/lib/std/PrelForeign.lhs | 2 +- ghc/lib/std/PrelHandle.lhs | 2 +- ghc/lib/std/PrelIO.lhs | 2 +- ghc/lib/std/PrelIOBase.lhs | 4 ++-- ghc/lib/std/PrelList.lhs | 2 +- ghc/lib/std/PrelMaybe.lhs | 2 +- ghc/lib/std/PrelNum.lhs | 2 +- ghc/lib/std/PrelPack.lhs | 2 +- ghc/lib/std/PrelRead.lhs | 2 +- ghc/lib/std/PrelReal.lhs | 2 +- ghc/lib/std/PrelST.lhs | 2 +- ghc/lib/std/PrelShow.lhs | 2 +- ghc/lib/std/PrelStable.lhs | 4 ++-- ghc/lib/std/PrelTup.lhs | 2 +- ghc/lib/std/PrelWeak.lhs | 2 +- ghc/lib/std/Prelude.lhs | 2 +- 28 files changed, 31 insertions(+), 31 deletions(-) diff --git a/ghc/lib/std/Makefile b/ghc/lib/std/Makefile index ba614e7..5b72cd0 100644 --- a/ghc/lib/std/Makefile +++ b/ghc/lib/std/Makefile @@ -34,7 +34,7 @@ endif #----------------------------------------------------------------------------- # Setting the GHC compile options -SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts) -fcompiling-prelude +SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts) ifneq "$(way)" "dll" SRC_HC_OPTS += -static endif diff --git a/ghc/lib/std/PrelAddr.lhs b/ghc/lib/std/PrelAddr.lhs index 8a46737..8a0ba32 100644 --- a/ghc/lib/std/PrelAddr.lhs +++ b/ghc/lib/std/PrelAddr.lhs @@ -5,7 +5,7 @@ \section[PrelAddr]{Module @PrelAddr@} \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelAddr ( Addr(..) diff --git a/ghc/lib/std/PrelArr.lhs b/ghc/lib/std/PrelArr.lhs index e930bad..6ee1418 100644 --- a/ghc/lib/std/PrelArr.lhs +++ b/ghc/lib/std/PrelArr.lhs @@ -9,7 +9,7 @@ types and operations. For byte-arrays see @PrelByteArr@. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelArr where diff --git a/ghc/lib/std/PrelArrExtra.lhs b/ghc/lib/std/PrelArrExtra.lhs index a7769b8..69d8fb1 100644 --- a/ghc/lib/std/PrelArrExtra.lhs +++ b/ghc/lib/std/PrelArrExtra.lhs @@ -9,7 +9,7 @@ to compile. So as not to compile the whole of PrelArr with module. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelArrExtra where diff --git a/ghc/lib/std/PrelBase.lhs b/ghc/lib/std/PrelBase.lhs index 4859f47..e9160ea 100644 --- a/ghc/lib/std/PrelBase.lhs +++ b/ghc/lib/std/PrelBase.lhs @@ -71,7 +71,7 @@ Other Prelude modules are much easier with fewer complex dependencies. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelBase ( diff --git a/ghc/lib/std/PrelByteArr.lhs b/ghc/lib/std/PrelByteArr.lhs index f2a1b10..f51ad17 100644 --- a/ghc/lib/std/PrelByteArr.lhs +++ b/ghc/lib/std/PrelByteArr.lhs @@ -6,7 +6,7 @@ Byte-arrays are flat arrays of non-pointers only. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelByteArr where diff --git a/ghc/lib/std/PrelConc.lhs b/ghc/lib/std/PrelConc.lhs index 01faf6c..f096db1 100644 --- a/ghc/lib/std/PrelConc.lhs +++ b/ghc/lib/std/PrelConc.lhs @@ -7,7 +7,7 @@ Basic concurrency stuff \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelConc ( ThreadId(..) diff --git a/ghc/lib/std/PrelDynamic.lhs b/ghc/lib/std/PrelDynamic.lhs index b90fafe..b5939e4 100644 --- a/ghc/lib/std/PrelDynamic.lhs +++ b/ghc/lib/std/PrelDynamic.lhs @@ -7,7 +7,7 @@ Dynamic visible here. The rest of the operations on Dynamics are available in exts/Dynamic.lhs. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} #ifndef __HUGS__ module PrelDynamic where diff --git a/ghc/lib/std/PrelEnum.lhs b/ghc/lib/std/PrelEnum.lhs index f4d37ee..64b599c 100644 --- a/ghc/lib/std/PrelEnum.lhs +++ b/ghc/lib/std/PrelEnum.lhs @@ -6,7 +6,7 @@ Instances of Bounded for various datatypes. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelEnum( Bounded(..), Enum(..), diff --git a/ghc/lib/std/PrelErr.lhs b/ghc/lib/std/PrelErr.lhs index c0269cd..812a369 100644 --- a/ghc/lib/std/PrelErr.lhs +++ b/ghc/lib/std/PrelErr.lhs @@ -12,7 +12,7 @@ We cannot define these functions in a module where they might be used with what the typechecker figures out. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelErr ( irrefutPatError diff --git a/ghc/lib/std/PrelException.lhs b/ghc/lib/std/PrelException.lhs index a04c66a..5c63069 100644 --- a/ghc/lib/std/PrelException.lhs +++ b/ghc/lib/std/PrelException.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelException.lhs,v 1.16 2000/04/10 13:35:45 simonmar Exp $ +% $Id: PrelException.lhs,v 1.17 2000/04/10 16:02:58 simonpj Exp $ % % (c) The GRAP/AQUA Project, Glasgow University, 1998 % @@ -7,7 +7,7 @@ Exceptions and exception-handling functions. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} #ifndef __HUGS__ module PrelException where diff --git a/ghc/lib/std/PrelFloat.lhs b/ghc/lib/std/PrelFloat.lhs index 250da00..a1be918 100644 --- a/ghc/lib/std/PrelFloat.lhs +++ b/ghc/lib/std/PrelFloat.lhs @@ -16,7 +16,7 @@ and the classes \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} #include "../includes/ieee-flpt.h" diff --git a/ghc/lib/std/PrelForeign.lhs b/ghc/lib/std/PrelForeign.lhs index 859dc18..ef4f815 100644 --- a/ghc/lib/std/PrelForeign.lhs +++ b/ghc/lib/std/PrelForeign.lhs @@ -5,7 +5,7 @@ \section[Foreign]{Module @Foreign@} \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelForeign ( module PrelForeign, diff --git a/ghc/lib/std/PrelHandle.lhs b/ghc/lib/std/PrelHandle.lhs index a51186e..22ca0d6 100644 --- a/ghc/lib/std/PrelHandle.lhs +++ b/ghc/lib/std/PrelHandle.lhs @@ -8,7 +8,7 @@ This module defines Haskell {\em handles} and the basic operations which are supported for them. \begin{code} -{-# OPTIONS -fno-implicit-prelude -#include "cbits/stgio.h" #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude -#include "cbits/stgio.h" #-} #include "cbits/stgerror.h" #ifndef __HUGS__ /* Hugs just includes this in PreludeBuiltin so no header needed */ diff --git a/ghc/lib/std/PrelIO.lhs b/ghc/lib/std/PrelIO.lhs index 3501b6e..237b333 100644 --- a/ghc/lib/std/PrelIO.lhs +++ b/ghc/lib/std/PrelIO.lhs @@ -10,7 +10,7 @@ module IO. \begin{code} -{-# OPTIONS -fno-implicit-prelude -#include "cbits/stgio.h" #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude -#include "cbits/stgio.h" #-} module PrelIO where diff --git a/ghc/lib/std/PrelIOBase.lhs b/ghc/lib/std/PrelIOBase.lhs index 3d4714c..7782c2a 100644 --- a/ghc/lib/std/PrelIOBase.lhs +++ b/ghc/lib/std/PrelIOBase.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelIOBase.lhs,v 1.20 2000/04/07 13:45:48 simonpj Exp $ +% $Id: PrelIOBase.lhs,v 1.21 2000/04/10 16:02:58 simonpj Exp $ % % (c) The AQUA Project, Glasgow University, 1994-1998 % @@ -10,7 +10,7 @@ Definitions for the @IO@ monad and its friends. Everything is exported concretely; the @IO@ module itself exports abstractly. \begin{code} -{-# OPTIONS -fno-implicit-prelude -#include "cbits/stgio.h" #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude -#include "cbits/stgio.h" #-} #include "cbits/stgerror.h" #include "config.h" diff --git a/ghc/lib/std/PrelList.lhs b/ghc/lib/std/PrelList.lhs index 1ea90d6..7b85297 100644 --- a/ghc/lib/std/PrelList.lhs +++ b/ghc/lib/std/PrelList.lhs @@ -7,7 +7,7 @@ The List data type and its operations \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelList ( [] (..), diff --git a/ghc/lib/std/PrelMaybe.lhs b/ghc/lib/std/PrelMaybe.lhs index 008a544..16383de 100644 --- a/ghc/lib/std/PrelMaybe.lhs +++ b/ghc/lib/std/PrelMaybe.lhs @@ -6,7 +6,7 @@ The @Maybe@ type. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelMaybe where diff --git a/ghc/lib/std/PrelNum.lhs b/ghc/lib/std/PrelNum.lhs index 1ff4c98..92ce9ae 100644 --- a/ghc/lib/std/PrelNum.lhs +++ b/ghc/lib/std/PrelNum.lhs @@ -14,7 +14,7 @@ and the type \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelNum where diff --git a/ghc/lib/std/PrelPack.lhs b/ghc/lib/std/PrelPack.lhs index 934ffa7..6301060 100644 --- a/ghc/lib/std/PrelPack.lhs +++ b/ghc/lib/std/PrelPack.lhs @@ -11,7 +11,7 @@ The programmer level view of packed strings is provided by a GHC system library PackedString. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelPack ( diff --git a/ghc/lib/std/PrelRead.lhs b/ghc/lib/std/PrelRead.lhs index 3f64865..0b4c156 100644 --- a/ghc/lib/std/PrelRead.lhs +++ b/ghc/lib/std/PrelRead.lhs @@ -7,7 +7,7 @@ Instances of the Read class. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelRead where diff --git a/ghc/lib/std/PrelReal.lhs b/ghc/lib/std/PrelReal.lhs index e6d64d5..396b5c8 100644 --- a/ghc/lib/std/PrelReal.lhs +++ b/ghc/lib/std/PrelReal.lhs @@ -17,7 +17,7 @@ and the classes \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelReal where diff --git a/ghc/lib/std/PrelST.lhs b/ghc/lib/std/PrelST.lhs index 77e337a..1e2a473 100644 --- a/ghc/lib/std/PrelST.lhs +++ b/ghc/lib/std/PrelST.lhs @@ -4,7 +4,7 @@ \section[PrelST]{The @ST@ monad} \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelST where diff --git a/ghc/lib/std/PrelShow.lhs b/ghc/lib/std/PrelShow.lhs index 44e3364..837f94f 100644 --- a/ghc/lib/std/PrelShow.lhs +++ b/ghc/lib/std/PrelShow.lhs @@ -5,7 +5,7 @@ \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelShow ( diff --git a/ghc/lib/std/PrelStable.lhs b/ghc/lib/std/PrelStable.lhs index faefb03..09dc0dc 100644 --- a/ghc/lib/std/PrelStable.lhs +++ b/ghc/lib/std/PrelStable.lhs @@ -1,11 +1,11 @@ % ----------------------------------------------------------------------------- -% $Id: PrelStable.lhs,v 1.3 1999/12/20 10:34:35 simonpj Exp $ +% $Id: PrelStable.lhs,v 1.4 2000/04/10 16:02:58 simonpj Exp $ % % (c) The GHC Team, 1992-1999 % \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelStable ( StablePtr(..) diff --git a/ghc/lib/std/PrelTup.lhs b/ghc/lib/std/PrelTup.lhs index b1f143a..68e4dc8 100644 --- a/ghc/lib/std/PrelTup.lhs +++ b/ghc/lib/std/PrelTup.lhs @@ -7,7 +7,7 @@ This modules defines the typle data types. \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelTup where diff --git a/ghc/lib/std/PrelWeak.lhs b/ghc/lib/std/PrelWeak.lhs index c710127..c1d49fb 100644 --- a/ghc/lib/std/PrelWeak.lhs +++ b/ghc/lib/std/PrelWeak.lhs @@ -5,7 +5,7 @@ \section[PrelWeak]{Module @PrelWeak@} \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module PrelWeak where diff --git a/ghc/lib/std/Prelude.lhs b/ghc/lib/std/Prelude.lhs index 7a09c42..01e55fc 100644 --- a/ghc/lib/std/Prelude.lhs +++ b/ghc/lib/std/Prelude.lhs @@ -3,7 +3,7 @@ special names such as () and -> shouldn't be resolved to Prelude.() and Prelude.-> (as they are normally). -- SDM 8/10/97 \begin{code} -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-} module Prelude ( -- 1.7.10.4