summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-17 18:50:46 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-17 18:59:19 +0100
commite76fa6999edab45baccc572bff5b0abe7abe3405 (patch)
tree0d6e8276a3d9504fa786e3362c665e83f50a47fa
parent998a633764db8cea2b650b59be3d2ac6d300465e (diff)
downloadhaskell-e76fa6999edab45baccc572bff5b0abe7abe3405.tar.gz
Merge the remainder of HaskellConstants into Constants
-rw-r--r--compiler/ghc.mk6
-rw-r--r--compiler/main/Constants.lhs27
-rw-r--r--includes/HaskellConstants.hs40
3 files changed, 17 insertions, 56 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index f65813dd94..a0754af5c2 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 0cecb82f1a..497bae500e 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 5b7e3dd5eb..0000000000
--- 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
-