[project @ 2000-04-10 16:02:58 by simonpj]
authorsimonpj <unknown>
Mon, 10 Apr 2000 16:02:58 +0000 (16:02 +0000)
committersimonpj <unknown>
Mon, 10 Apr 2000 16:02:58 +0000 (16:02 +0000)
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.

28 files changed:
ghc/lib/std/Makefile
ghc/lib/std/PrelAddr.lhs
ghc/lib/std/PrelArr.lhs
ghc/lib/std/PrelArrExtra.lhs
ghc/lib/std/PrelBase.lhs
ghc/lib/std/PrelByteArr.lhs
ghc/lib/std/PrelConc.lhs
ghc/lib/std/PrelDynamic.lhs
ghc/lib/std/PrelEnum.lhs
ghc/lib/std/PrelErr.lhs
ghc/lib/std/PrelException.lhs
ghc/lib/std/PrelFloat.lhs
ghc/lib/std/PrelForeign.lhs
ghc/lib/std/PrelHandle.lhs
ghc/lib/std/PrelIO.lhs
ghc/lib/std/PrelIOBase.lhs
ghc/lib/std/PrelList.lhs
ghc/lib/std/PrelMaybe.lhs
ghc/lib/std/PrelNum.lhs
ghc/lib/std/PrelPack.lhs
ghc/lib/std/PrelRead.lhs
ghc/lib/std/PrelReal.lhs
ghc/lib/std/PrelST.lhs
ghc/lib/std/PrelShow.lhs
ghc/lib/std/PrelStable.lhs
ghc/lib/std/PrelTup.lhs
ghc/lib/std/PrelWeak.lhs
ghc/lib/std/Prelude.lhs

index ba614e7..5b72cd0 100644 (file)
@@ -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
index 8a46737..8a0ba32 100644 (file)
@@ -5,7 +5,7 @@
 \section[PrelAddr]{Module @PrelAddr@}
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelAddr (
          Addr(..)
index e930bad..6ee1418 100644 (file)
@@ -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
 
index a7769b8..69d8fb1 100644 (file)
@@ -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
 
index 4859f47..e9160ea 100644 (file)
@@ -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
        (
index f2a1b10..f51ad17 100644 (file)
@@ -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
 
index 01faf6c..f096db1 100644 (file)
@@ -7,7 +7,7 @@
 Basic concurrency stuff
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelConc
        ( ThreadId(..)
index b90fafe..b5939e4 100644 (file)
@@ -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
index f4d37ee..64b599c 100644 (file)
@@ -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(..),
index c0269cd..812a369 100644 (file)
@@ -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
index a04c66a..5c63069 100644 (file)
@@ -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
index 250da00..a1be918 100644 (file)
@@ -16,7 +16,7 @@ and the classes
 
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 #include "../includes/ieee-flpt.h"
 
index 859dc18..ef4f815 100644 (file)
@@ -5,7 +5,7 @@
 \section[Foreign]{Module @Foreign@}
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelForeign (
        module PrelForeign,
index a51186e..22ca0d6 100644 (file)
@@ -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 */
index 3501b6e..237b333 100644 (file)
@@ -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
 
index 3d4714c..7782c2a 100644 (file)
@@ -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"
 
index 1ea90d6..7b85297 100644 (file)
@@ -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 (
    [] (..),
index 008a544..16383de 100644 (file)
@@ -6,7 +6,7 @@
 The @Maybe@ type.
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelMaybe where
 
index 1ff4c98..92ce9ae 100644 (file)
@@ -14,7 +14,7 @@ and the type
 
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelNum where
 
index 934ffa7..6301060 100644 (file)
@@ -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
        (
index 3f64865..0b4c156 100644 (file)
@@ -7,7 +7,7 @@
 Instances of the Read class.
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelRead where
 
index e6d64d5..396b5c8 100644 (file)
@@ -17,7 +17,7 @@ and the classes
 
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelReal where
 
index 77e337a..1e2a473 100644 (file)
@@ -4,7 +4,7 @@
 \section[PrelST]{The @ST@ monad}
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelST where
 
index 44e3364..837f94f 100644 (file)
@@ -5,7 +5,7 @@
 
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelShow
        (
index faefb03..09dc0dc 100644 (file)
@@ -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(..)
index b1f143a..68e4dc8 100644 (file)
@@ -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
 
index c710127..c1d49fb 100644 (file)
@@ -5,7 +5,7 @@
 \section[PrelWeak]{Module @PrelWeak@}
 
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS -fcompiling-prelude -fno-implicit-prelude #-}
 
 module PrelWeak where
 
index 7a09c42..01e55fc 100644 (file)
@@ -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 (