aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/InterfaceFile.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/InterfaceFile.hs')
-rw-r--r--src/Haddock/InterfaceFile.hs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index a25b734a..ec7272e7 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -61,7 +61,6 @@ binaryInterfaceMagic :: Word32
binaryInterfaceMagic = 0xD0Cface
-#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.
@@ -75,11 +74,21 @@ binaryInterfaceMagic = 0xD0Cface
-- (2) set `binaryInterfaceVersionCompatibility` to [binaryInterfaceVersion]
--
binaryInterfaceVersion :: Word16
+#if __GLASGOW_HASKELL__ == 702
+binaryInterfaceVersion = 20
+#elif __GLASGOW_HASKELL__ == 703
+binaryInterfaceVersion = 20
+#elif __GLASGOW_HASKELL__ == 704
+binaryInterfaceVersion = 20
+#elif __GLASGOW_HASKELL__ == 705
+binaryInterfaceVersion = 20
+#elif __GLASGOW_HASKELL__ == 706
+binaryInterfaceVersion = 20
+#elif __GLASGOW_HASKELL__ == 707
binaryInterfaceVersion = 22
binaryInterfaceVersionCompatibility :: [Word16]
binaryInterfaceVersionCompatibility = [21, 22]
-
#else
#error Unsupported GHC version
#endif