summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org>2019-09-05 15:35:29 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-08 21:41:12 -0400
commitd0b45ac6984f245bce9de7ffcc7dad4a0046d344 (patch)
treecbbd2b3926e245ab31e1a9822f25765b7e6cae21
parent51379b89eb08252560e911ab559205ea69d21fec (diff)
downloadhaskell-d0b45ac6984f245bce9de7ffcc7dad4a0046d344.tar.gz
Fix GHC version guard for Int32Rep/Word32Rep
Those constructors have been added after GHC 8.8. The version guards in `binary` are correct, see https://github.com/kolmodin/binary/pull/167/files.
-rw-r--r--compiler/utils/Binary.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index 9761c5ddf3..7a3b7a1472 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -854,6 +854,8 @@ instance Binary RuntimeRep where
put_ bh Word8Rep = putByte bh 13
put_ bh Int16Rep = putByte bh 14
put_ bh Word16Rep = putByte bh 15
+#endif
+#if __GLASGOW_HASKELL__ >= 809
put_ bh Int32Rep = putByte bh 16
put_ bh Word32Rep = putByte bh 17
#endif
@@ -878,6 +880,8 @@ instance Binary RuntimeRep where
13 -> pure Word8Rep
14 -> pure Int16Rep
15 -> pure Word16Rep
+#endif
+#if __GLASGOW_HASKELL__ >= 809
16 -> pure Int32Rep
17 -> pure Word32Rep
#endif