[project @ 2004-11-09 17:21:58 by simonmar]
authorsimonmar <unknown>
Tue, 9 Nov 2004 17:22:01 +0000 (17:22 +0000)
committersimonmar <unknown>
Tue, 9 Nov 2004 17:22:01 +0000 (17:22 +0000)
Add a compatibility library, which will mean that we can make use of
brand new libraries directly in GHC and the tools even when compiling
with older versions of GHC.  The library just consists of stubs that
#include code from fptools/libraries.

This isn't wired up to the build yet.

12 files changed:
ghc/lib/Makefile [new file with mode: 0644]
ghc/lib/compat/Data/Version.hs [new file with mode: 0644]
ghc/lib/compat/Distribution/Compat/Error.hs [new file with mode: 0644]
ghc/lib/compat/Distribution/Compat/ReadP.hs [new file with mode: 0644]
ghc/lib/compat/Distribution/Extension.hs [new file with mode: 0644]
ghc/lib/compat/Distribution/InstalledPackageInfo.hs [new file with mode: 0644]
ghc/lib/compat/Distribution/License.hs [new file with mode: 0644]
ghc/lib/compat/Distribution/Package.hs [new file with mode: 0644]
ghc/lib/compat/Distribution/ParseUtils.hs [new file with mode: 0644]
ghc/lib/compat/Distribution/Setup.hs [new file with mode: 0644]
ghc/lib/compat/Distribution/Version.hs [new file with mode: 0644]
ghc/lib/compat/Makefile [new file with mode: 0644]

diff --git a/ghc/lib/Makefile b/ghc/lib/Makefile
new file mode 100644 (file)
index 0000000..ca08ea2
--- /dev/null
@@ -0,0 +1,6 @@
+TOP=..
+include $(TOP)/mk/boilerplate.mk
+
+SUBDIRS = compat
+
+include $(TOP)/mk/target.mk
diff --git a/ghc/lib/compat/Data/Version.hs b/ghc/lib/compat/Data/Version.hs
new file mode 100644 (file)
index 0000000..eb6a6ea
--- /dev/null
@@ -0,0 +1,3 @@
+{-# OPTIONS -cpp #-}
+#include "base/Data/Version.hs"
+-- dummy comment
diff --git a/ghc/lib/compat/Distribution/Compat/Error.hs b/ghc/lib/compat/Distribution/Compat/Error.hs
new file mode 100644 (file)
index 0000000..d9ef96c
--- /dev/null
@@ -0,0 +1,3 @@
+{-# OPTIONS -cpp #-}
+#include "Cabal/Distribution/Compat/Error.hs"
+-- dummy comment
diff --git a/ghc/lib/compat/Distribution/Compat/ReadP.hs b/ghc/lib/compat/Distribution/Compat/ReadP.hs
new file mode 100644 (file)
index 0000000..5fc69da
--- /dev/null
@@ -0,0 +1,3 @@
+{-# OPTIONS -cpp #-}
+#include "Cabal/Distribution/Compat/ReadP.hs"
+-- dummy comment
diff --git a/ghc/lib/compat/Distribution/Extension.hs b/ghc/lib/compat/Distribution/Extension.hs
new file mode 100644 (file)
index 0000000..f511df2
--- /dev/null
@@ -0,0 +1,3 @@
+{-# OPTIONS -cpp #-}
+#include "Cabal/Distribution/Extension.hs"
+-- dummy comment
diff --git a/ghc/lib/compat/Distribution/InstalledPackageInfo.hs b/ghc/lib/compat/Distribution/InstalledPackageInfo.hs
new file mode 100644 (file)
index 0000000..03f5092
--- /dev/null
@@ -0,0 +1,3 @@
+{-# OPTIONS -cpp #-}
+#include "Cabal/Distribution/InstalledPackageInfo.hs"
+-- dummy comment
diff --git a/ghc/lib/compat/Distribution/License.hs b/ghc/lib/compat/Distribution/License.hs
new file mode 100644 (file)
index 0000000..31b1b27
--- /dev/null
@@ -0,0 +1,4 @@
+{-# OPTIONS -cpp #-}
+#include "Cabal/Distribution/License.hs"
+
+-- dummy comment
diff --git a/ghc/lib/compat/Distribution/Package.hs b/ghc/lib/compat/Distribution/Package.hs
new file mode 100644 (file)
index 0000000..d40171e
--- /dev/null
@@ -0,0 +1,3 @@
+{-# OPTIONS -cpp #-}
+#include "Cabal/Distribution/Package.hs"
+-- dummy comment
diff --git a/ghc/lib/compat/Distribution/ParseUtils.hs b/ghc/lib/compat/Distribution/ParseUtils.hs
new file mode 100644 (file)
index 0000000..f5bf266
--- /dev/null
@@ -0,0 +1,3 @@
+{-# OPTIONS -cpp #-}
+#include "Cabal/Distribution/ParseUtils.hs"
+-- dummy comment
diff --git a/ghc/lib/compat/Distribution/Setup.hs b/ghc/lib/compat/Distribution/Setup.hs
new file mode 100644 (file)
index 0000000..7088b61
--- /dev/null
@@ -0,0 +1,3 @@
+{-# OPTIONS -cpp #-}
+#include "Cabal/Distribution/Setup.hs"
+-- dummy comment
diff --git a/ghc/lib/compat/Distribution/Version.hs b/ghc/lib/compat/Distribution/Version.hs
new file mode 100644 (file)
index 0000000..1140c03
--- /dev/null
@@ -0,0 +1,3 @@
+{-# OPTIONS -cpp #-}
+#include "Cabal/Distribution/Version.hs"
+-- dummy comment
diff --git a/ghc/lib/compat/Makefile b/ghc/lib/compat/Makefile
new file mode 100644 (file)
index 0000000..c3f080b
--- /dev/null
@@ -0,0 +1,25 @@
+# 
+# This library contains modules only available in versions of GHC
+# newer than the current one.  They are implemented as stubs that
+# #include the actual code from fptools/libraries.
+#
+# The idea is to ease the task of writing portable code in GHC and its
+# tools: the client can link with libghccompat.a and assume that all
+# the modules are available.  In this way we can add modules to the library
+# and start using them right away in GHC, as long as the new library modules
+# can be compiled using older versions of GHC.
+#
+
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
+
+ALL_DIRS = \
+       Data \
+       Distribution \
+       Distribution/Compat
+
+LIBRARY = libghccompat.a
+
+SRC_HC_OPTS += -I$(FPTOOLS_TOP)/libraries -fglasgow-exts
+
+include $(TOP)/mk/target.mk