[commit: ghc] master: Merge the remainder of HaskellConstants into Constants (e76fa69)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e76fa6999edab45baccc572bff5b0abe7abe3405

>---------------------------------------------------------------

commit e76fa6999edab45baccc572bff5b0abe7abe3405
Author: Ian Lynagh <[email protected]>
Date:   Mon Sep 17 18:50:46 2012 +0100

    Merge the remainder of HaskellConstants into Constants

>---------------------------------------------------------------

 compiler/ghc.mk              |    6 +-----
 compiler/main/Constants.lhs  |   27 ++++++++++++++++-----------
 includes/HaskellConstants.hs |   40 ----------------------------------------
 3 files changed, 17 insertions(+), 56 deletions(-)

diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index f65813d..a0754af 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -474,16 +474,12 @@ $(compiler_stage1_depfile_haskell) : $(COMPILER_INCLUDES_DEPS)
 $(compiler_stage2_depfile_haskell) : $(COMPILER_INCLUDES_DEPS)
 $(compiler_stage3_depfile_haskell) : $(COMPILER_INCLUDES_DEPS)
 
-# Every Constants.o object file depends on includes/GHCConstants.h:
-$(eval $(call compiler-hs-dependency,Constants,$(includes_GHCCONSTANTS) includes/HaskellConstants.hs))
-
 # Every PrimOp.o object file depends on $(PRIMOP_BITS):
 $(eval $(call compiler-hs-dependency,PrimOp,$(PRIMOP_BITS)))
 
 # GHC itself doesn't know about the above dependencies, so we have to
-# switch off the recompilation checker for those modules:
+# switch off the recompilation checker for that module:
 compiler/prelude/PrimOp_HC_OPTS  += -fforce-recomp
-compiler/main/Constants_HC_OPTS  += -fforce-recomp
 
 # LibFFI.hs #includes ffi.h
 compiler/stage2/build/LibFFI.hs : $(libffi_HEADERS)
diff --git a/compiler/main/Constants.lhs b/compiler/main/Constants.lhs
index 0cecb82..497bae5 100644
--- a/compiler/main/Constants.lhs
+++ b/compiler/main/Constants.lhs
@@ -4,21 +4,26 @@
 \section[Constants]{Info about this compilation}
 
 \begin{code}
-{-# OPTIONS -fno-warn-tabs #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and
--- detab the module (please do the detabbing in a separate patch). See
---     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
-
 module Constants (module Constants) where
 
 import Config
 
-#include "ghc_boot_platform.h"
-
-#include "../includes/HaskellConstants.hs"
-
 hiVersion :: Integer
 hiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer
+
+-- All pretty arbitrary:
+
+mAX_TUPLE_SIZE :: Int
+mAX_TUPLE_SIZE = 62 -- Should really match the number
+                    -- of decls in Data.Tuple
+
+mAX_CONTEXT_REDUCTION_DEPTH :: Int
+mAX_CONTEXT_REDUCTION_DEPTH = 200
+  -- Increase to 200; see Trac #5395
+
+wORD64_SIZE :: Int
+wORD64_SIZE = 8
+
+tARGET_MAX_CHAR :: Int
+tARGET_MAX_CHAR = 0x10ffff
 \end{code}
diff --git a/includes/HaskellConstants.hs b/includes/HaskellConstants.hs
deleted file mode 100644
index 5b7e3dd..0000000
--- a/includes/HaskellConstants.hs
+++ /dev/null
@@ -1,40 +0,0 @@
-
-import Data.Int
-
--- This magical #include brings in all the everybody-knows-these magic
--- constants unfortunately, we need to be *explicit* about which one
--- we want; if we just hope a -I... will get the right one, we could
--- be in trouble.
-
-{-
-Pull in the autoconf defines (HAVE_FOO), but don't include
-ghcconfig.h, because that will include ghcplatform.h which has the
-wrong platform settings for the compiler (it has the platform
-settings for the target plat instead).
--}
-#include "../includes/ghcautoconf.h"
-
-#include "stg/HaskellMachRegs.h"
-
-#include "rts/Constants.h"
-#include "MachDeps.h"
-#include "../includes/dist-derivedconstants/header/DerivedConstants.h"
-
--- import Util
-
--- All pretty arbitrary:
-
-mAX_TUPLE_SIZE :: Int
-mAX_TUPLE_SIZE = 62 -- Should really match the number
-                    -- of decls in Data.Tuple
-
-mAX_CONTEXT_REDUCTION_DEPTH :: Int
-mAX_CONTEXT_REDUCTION_DEPTH = 200
-  -- Increase to 200; see Trac #5395
-
-wORD64_SIZE :: Int
-wORD64_SIZE = 8
-
-tARGET_MAX_CHAR :: Int
-tARGET_MAX_CHAR = 0x10ffff
-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.