Repository : ssh://darcs.haskell.org//srv/darcs/haddock

On branch  : ghc-7.6

http://hackage.haskell.org/trac/ghc/changeset/6d490e93ec83dd5ee0fae86724f62c54801f4053

>---------------------------------------------------------------

commit 6d490e93ec83dd5ee0fae86724f62c54801f4053
Author: Simon Hengel <[email protected]>
Date:   Thu Oct 11 10:49:04 2012 +0200

    Remove redundant if-defs, more source documentation

>---------------------------------------------------------------

 src/Haddock/InterfaceFile.hs |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index 1f6b489..7981862 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -61,27 +61,28 @@ binaryInterfaceMagic :: Word32
 binaryInterfaceMagic = 0xD0Cface
 
 
--- 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.
+#if __GLASGOW_HASKELL__ == 706
+-- IMPORTANT: 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.
+--
+-- If you adapt this code to work with a newer versions of GHC *you* need to
+-- follow those steps:
+--
+-- (1) increase `binaryInterfaceVersion`
+--
+-- (2) set `binaryInterfaceVersionCompatibility` to [binaryInterfaceVersion]
+--
 binaryInterfaceVersion :: Word16
-#if __GLASGOW_HASKELL__ == 702
-binaryInterfaceVersion = 22
-#elif __GLASGOW_HASKELL__ == 703
-binaryInterfaceVersion = 22
-#elif __GLASGOW_HASKELL__ == 704
-binaryInterfaceVersion = 22
-#elif __GLASGOW_HASKELL__ == 705
 binaryInterfaceVersion = 22
-#elif __GLASGOW_HASKELL__ == 706
-binaryInterfaceVersion = 22
-#else
-#error Unknown GHC version
-#endif
 
 binaryInterfaceVersionCompatibility :: [Word16]
 binaryInterfaceVersionCompatibility = [21, 22]
 
+#else
+#error Unsupported GHC version
+#endif
+
 
 initBinMemSize :: Int
 initBinMemSize = 1024*1024



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to