Skip to content

Commit

Permalink
Fix module dependency for older base package installs
Browse files Browse the repository at this point in the history
  • Loading branch information
clockfort committed Dec 21, 2012
1 parent d7ead02 commit 1aeaac0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Data/Vault/ST_GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ import Data.IntMap (IntMap)
import qualified Data.IntMap as IntMap
import Data.IORef
import Control.Monad.ST
import Control.Monad.ST.Unsafe

#if MIN_VERSION_base(4,4,0)
import Control.Monad.ST.Unsafe as STUnsafe
#else
import Control.Monad.ST as STUnsafe
#endif

import Data.Unique.Really

Expand Down Expand Up @@ -38,7 +41,7 @@ empty :: Vault s
empty = Vault Map.empty

newKey :: ST s (Key s a)
newKey = Control.Monad.ST.Unsafe.unsafeIOToST $ Key <$> newUnique
newKey = STUnsafe.unsafeIOToST $ Key <$> newUnique

lookup :: Key s a -> Vault s -> Maybe a
lookup (Key k) (Vault m) = fromAny <$> Map.lookup k m
Expand Down

0 comments on commit 1aeaac0

Please sign in to comment.