@@ -1,4 +1,4 @@
1−{-# LANGUAGE FlexibleInstances, FlexibleContexts, TupleSections #-}
1+{-# LANGUAGE CPP, FlexibleInstances, FlexibleContexts, TupleSections #-}
3module Main where
3module Main where
@@ -311,6 +311,7 @@ integralRandomR (a,b) g = case randomR (fromIntegral a :: Integer,
311 fromIntegral b :: Integer) g of
311 fromIntegral b :: Integer) g of
312 (x,g) -> (fromIntegral x, g)
312 (x,g) -> (fromIntegral x, g)
314instance Random Word where
315instance Random Word where
315 randomR = integralRandomR
316 randomR = integralRandomR
316 random = randomR (minBound,maxBound)
317 random = randomR (minBound,maxBound)
@@ -330,3 +331,4 @@ instance Random Word32 where
330instance Random Word64 where
331instance Random Word64 where
331 randomR = integralRandomR
332 randomR = integralRandomR
332 random = randomR (minBound,maxBound)
333 random = randomR (minBound,maxBound)