aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2009-08-14 22:03:20 +0000
committerDavid Waern <david.waern@gmail.com>2009-08-14 22:03:20 +0000
commit25b4d2d2de53a4390f17b10f7c2fc1723d3fa4b7 (patch)
tree250212f4ec971c32b76543d9988081c4f0a7e112
parent0b2007a1e55f7603dc4ee23b810f19ffe7e0b9cd (diff)
Do not version .haddock file based on GHC patchlevel version
We require that the instances of Binary that we use from GHC will not change between patchlevel versions.
-rw-r--r--haddock.cabal2
-rw-r--r--src/Haddock/InterfaceFile.hs23
2 files changed, 6 insertions, 19 deletions
diff --git a/haddock.cabal b/haddock.cabal
index 0a43c4ca..92eb0256 100644
--- a/haddock.cabal
+++ b/haddock.cabal
@@ -73,7 +73,7 @@ executable haddock
containers,
array,
Cabal >= 1.5,
- ghc (>= 6.10.1 && <= 6.10.4) || 6.11.*
+ ghc == 6.10.* || == 6.11.*
if flag(in-ghc-tree)
cpp-options: -DIN_GHC_TREE
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index d51847f8..81361997 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -51,26 +51,13 @@ binaryInterfaceMagic :: Word32
binaryInterfaceMagic = 0xD0Cface
--- Since datatypes in GHC might change between patchlevel versions,
--- and because we store GHC datatypes in our interface files,
--- we need to make sure we version our interface files accordingly.
---
--- Instead of adding one, we add five to all version numbers
--- when one of our own (stored) datatypes is changed.
+-- Since datatypes in the GHC API might change between major versions, and
+-- because we store GHC datatypes in our interface files, we need to make sure
+-- we version our interface files accordingly.
binaryInterfaceVersion :: Word16
-#if __GLASGOW_HASKELL__ == 610 && __GHC_PATCHLEVEL__ == 1
-binaryInterfaceVersion = 11
-#endif
-#if __GLASGOW_HASKELL__ == 610 && __GHC_PATCHLEVEL__ == 2
+#if __GLASGOW_HASKELL__ == 610
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
+#elif __GLASGOW_HASKELL__ == 611
binaryInterfaceVersion = 13
#endif