summaryrefslogtreecommitdiff
path: root/ghc/compiler/HsVersions.h
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-08-29 15:44:23 +0000
committersimonmar <unknown>2002-08-29 15:44:23 +0000
commitce9687a5f450014c5596b32de8e8a7b99b6389e8 (patch)
tree718993a94d5e2b03bae392f4b3b4710814c3c4d8 /ghc/compiler/HsVersions.h
parent4a851c8281491a26ce130e6ce4496042e3feb42b (diff)
downloadhaskell-ce9687a5f450014c5596b32de8e8a7b99b6389e8.tar.gz
[project @ 2002-08-29 15:44:11 by simonmar]
Housekeeping: - The main goal is to remove dependencies on hslibs for a bootstrapped compiler, leaving only a requirement that the packages base, haskell98 and readline are built in stage 1 in order to bootstrap. We're almost there: Posix is still required for signal handling, but all other dependencies on hslibs are now gone. Uses of Addr and ByteArray/MutableByteArray array are all gone from the compiler. PrimPacked defines the Ptr type for GHC 4.08 (which didn't have it), and it defines simple BA and MBA types to replace uses of ByteArray and MutableByteArray respectively. - Clean up import lists. HsVersions.h now defines macros for some modules which have moved between GHC versions. eg. one now imports 'GLAEXTS' to get at unboxed types and primops in the compiler. Many import lists have been sorted as per the recommendations in the new style guidelines in the commentary. I've built the compiler with GHC 4.08.2, 5.00.2, 5.02.3, 5.04 and itself, and everything still works here. Doubtless I've got something wrong, though.
Diffstat (limited to 'ghc/compiler/HsVersions.h')
-rw-r--r--ghc/compiler/HsVersions.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/ghc/compiler/HsVersions.h b/ghc/compiler/HsVersions.h
index 40a58517b4..62c9c076a6 100644
--- a/ghc/compiler/HsVersions.h
+++ b/ghc/compiler/HsVersions.h
@@ -10,6 +10,36 @@ you will screw up the layout where they are used in case expressions!
#endif
+#if __GLASGOW_HASKELL__ >= 504
+
+#define CONCURRENT Control.Concurrent
+#define EXCEPTION Control.Exception
+#define DYNAMIC Data.Dynamic
+#define GLAEXTS GHC.Exts
+#define DATA_BITS Data.Bits
+#define DATA_INT Data.Int
+#define DATA_WORD Data.Word
+#define UNSAFE_IO System.IO.Unsafe
+#define TRACE Debug.Trace
+#define DATA_IOREF Data.IORef
+#define FIX_IO System.IO
+
+#else
+
+#define CONCURRENT Concurrent
+#define EXCEPTION Exception
+#define DYNAMIC Dynamic
+#define GLAEXTS GlaExts
+#define DATA_BITS Bits
+#define DATA_INT Int
+#define DATA_WORD Word
+#define UNSAFE_IO IOExts
+#define TRACE IOExts
+#define DATA_IOREF IOExts
+#define FIX_IO IOExts
+
+#endif
+
#ifdef __GLASGOW_HASKELL__
#define GLOBAL_VAR(name,value,ty) \
name = Util.global (value) :: IORef (ty); \