Skip to content

Commit 09097c4

Browse files
committed
Make GHC.ST import more robust
This avoids opt-out `hiding` (which triggered warnings for me about non-existing symbols) in favor of a qualified import which only warns when there's an actual problem...
1 parent 09bc4f6 commit 09097c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Data/HashMap/Unsafe.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ module Data.HashMap.Unsafe
1313
) where
1414

1515
import GHC.Base (realWorld#)
16-
import GHC.ST hiding (runST, runSTRep)
16+
import qualified GHC.ST as ST
1717

1818
-- | Return the value computed by a state transformer computation.
1919
-- The @forall@ ensures that the internal state used by the 'ST'
2020
-- computation is inaccessible to the rest of the program.
21-
runST :: (forall s. ST s a) -> a
22-
runST st = runSTRep (case st of { ST st_rep -> st_rep })
21+
runST :: (forall s. ST.ST s a) -> a
22+
runST st = runSTRep (case st of { ST.ST st_rep -> st_rep })
2323
{-# INLINE runST #-}
2424

25-
runSTRep :: (forall s. STRep s a) -> a
25+
runSTRep :: (forall s. ST.STRep s a) -> a
2626
runSTRep st_rep = case st_rep realWorld# of
2727
(# _, r #) -> r
2828
{-# INLINE [0] runSTRep #-}

0 commit comments

Comments
 (0)