X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FUnique.hs;fp=Data%2FUnique.hs;h=1c1ceb88eef52e2943acb87279adf79525d09ba6;hb=8cfaaa32cdd732188a101cd813c389c601ca2e6b;hp=a5a96f62b214ec8d32582e1b87e46e6aa1a646bb;hpb=073a40996177960147ef91988910c6131ef29cb3;p=haskell-directory.git diff --git a/Data/Unique.hs b/Data/Unique.hs index a5a96f6..1c1ceb8 100644 --- a/Data/Unique.hs +++ b/Data/Unique.hs @@ -21,7 +21,7 @@ module Data.Unique ( import Prelude -import Control.Concurrent +import Control.Concurrent.MVar import System.IO.Unsafe (unsafePerformIO) #ifdef __GLASGOW_HASKELL__ @@ -57,5 +57,5 @@ hashUnique (Unique (S# i)) = I# i hashUnique (Unique (J# s d)) | s ==# 0# = 0 | otherwise = I# (indexIntArray# d 0#) #else -hashUnique (Unique u) = u `mod` (fromIntegral (maxBound :: Int) + 1) +hashUnique (Unique u) = fromInteger (u `mod` (toInteger (maxBound :: Int) + 1)) #endif