We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c0bb73e + 55ae9b0 commit 3b91932Copy full SHA for 3b91932
Data/HashMap/Unsafe.hs
@@ -1,4 +1,8 @@
1
+{-# LANGUAGE CPP #-}
2
+
3
+#if !MIN_VERSION_base(4,9,0)
4
{-# LANGUAGE MagicHash, Rank2Types, UnboxedTuples #-}
5
+#endif
6
7
-- | This module exports a workaround for this bug:
8
--
@@ -12,6 +16,12 @@ module Data.HashMap.Unsafe
12
16
( runST
13
17
) where
14
18
19
+#if MIN_VERSION_base(4,9,0)
20
+-- The GHC issue was fixed in GHC 8.0/base 4.9
21
+import Control.Monad.ST
22
23
+#else
24
15
25
import GHC.Base (realWorld#)
26
import qualified GHC.ST as ST
27
@@ -26,3 +36,4 @@ runSTRep :: (forall s. ST.STRep s a) -> a
36
runSTRep st_rep = case st_rep realWorld# of
37
(# _, r #) -> r
28
38
{-# INLINE [0] runSTRep #-}
39
0 commit comments