aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2009-08-14 17:14:28 +0000
committerDavid Waern <david.waern@gmail.com>2009-08-14 17:14:28 +0000
commit70b0328fbb31f898e002f9405f85ec4e901c5f4f (patch)
tree3fc45f6acb22235ae6a1d99b2d4cc8c97eadf32b
parent877ff1c287427f54510d01f3a01424a86f9a970c (diff)
Version .haddock files made with GHC 6.10.3/4 correclty
-rw-r--r--haddock.cabal12
-rw-r--r--src/Haddock/InterfaceFile.hs12
2 files changed, 16 insertions, 8 deletions
diff --git a/haddock.cabal b/haddock.cabal
index 4af5e71f..b3902e92 100644
--- a/haddock.cabal
+++ b/haddock.cabal
@@ -112,8 +112,12 @@ executable haddock
-- Cabal doesn't define __GHC_PATCHLEVEL__
if impl(ghc == 6.10.1)
cpp-options: -D__GHC_PATCHLEVEL__=1
- if impl(ghc >= 6.10.1.20090223)
+ if impl(ghc == 6.10.2)
cpp-options: -D__GHC_PATCHLEVEL__=2
+ if impl(ghc == 6.10.3)
+ cpp-options: -D__GHC_PATCHLEVEL__=3
+ if impl(ghc == 6.10.4)
+ cpp-options: -D__GHC_PATCHLEVEL__=4
library
hs-source-dirs: src
@@ -129,8 +133,12 @@ library
-- Cabal doesn't define __GHC_PATCHLEVEL__
if impl(ghc == 6.10.1)
cpp-options: -D__GHC_PATCHLEVEL__=1
- if impl(ghc >= 6.10.1.20090223)
+ if impl(ghc == 6.10.2)
cpp-options: -D__GHC_PATCHLEVEL__=2
+ if impl(ghc == 6.10.3)
+ cpp-options: -D__GHC_PATCHLEVEL__=3
+ if impl(ghc == 6.10.4)
+ cpp-options: -D__GHC_PATCHLEVEL__=4
if flag(in-ghc-tree)
buildable: False
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index 9c6df447..d51847f8 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -58,18 +58,18 @@ binaryInterfaceMagic = 0xD0Cface
-- Instead of adding one, we add five to all version numbers
-- when one of our own (stored) datatypes is changed.
binaryInterfaceVersion :: Word16
-#if __GLASGOW_HASKELL__ == 608 && __GHC_PATCHLEVEL__ == 2
-binaryInterfaceVersion = 9
-#endif
-#if __GLASGOW_HASKELL__ == 608 && __GHC_PATCHLEVEL__ == 3
-binaryInterfaceVersion = 10
-#endif
#if __GLASGOW_HASKELL__ == 610 && __GHC_PATCHLEVEL__ == 1
binaryInterfaceVersion = 11
#endif
#if __GLASGOW_HASKELL__ == 610 && __GHC_PATCHLEVEL__ == 2
binaryInterfaceVersion = 12
#endif
+#if __GLASGOW_HASKELL__ == 610 && __GHC_PATCHLEVEL__ == 3
+binaryInterfaceVersion = 14
+#endif
+#if __GLASGOW_HASKELL__ == 610 && __GHC_PATCHLEVEL__ == 4
+binaryInterfaceVersion = 15
+#endif
#if __GLASGOW_HASKELL__ == 611
binaryInterfaceVersion = 13
#endif