From 6d490e93ec83dd5ee0fae86724f62c54801f4053 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Thu, 11 Oct 2012 10:49:04 +0200 Subject: Remove redundant if-defs, more source documentation --- src/Haddock/InterfaceFile.hs | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'src/Haddock') diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs index 1f6b489d..79818625 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 -- cgit v1.2.3