aboutsummaryrefslogtreecommitdiff
path: root/src/FastMutInt.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-07-24 09:42:18 +0000
committersimonmar <unknown>2002-07-24 09:42:18 +0000
commit4d8d5e948cd6620ed923bf7b11ce408a728e3521 (patch)
tree07cdc2e4dde15cb1e3a212d7f22998198829e6b6 /src/FastMutInt.hs
parent1d44cadf21cdf3d5437e6cd438723d9ce7c895e2 (diff)
[haddock @ 2002-07-24 09:42:17 by simonmar]
Patches to quieten ghc -Wall, from those nice folks at Galois.
Diffstat (limited to 'src/FastMutInt.hs')
-rw-r--r--src/FastMutInt.hs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/FastMutInt.hs b/src/FastMutInt.hs
index 0e98852b..39f4f99b 100644
--- a/src/FastMutInt.hs
+++ b/src/FastMutInt.hs
@@ -33,31 +33,31 @@ newByteArray# = newCharArray#
data FastMutInt = FastMutInt (MutableByteArray# RealWorld)
newFastMutInt :: IO FastMutInt
-newFastMutInt = IO $ \s ->
- case newByteArray# size s of { (# s, arr #) ->
+newFastMutInt = IO $ \s0 ->
+ case newByteArray# size s0 of { (# s, arr #) ->
(# s, FastMutInt arr #) }
where I# size = SIZEOF_HSINT
readFastMutInt :: FastMutInt -> IO Int
-readFastMutInt (FastMutInt arr) = IO $ \s ->
- case readIntArray# arr 0# s of { (# s, i #) ->
+readFastMutInt (FastMutInt arr) = IO $ \s0 ->
+ case readIntArray# arr 0# s0 of { (# s, i #) ->
(# s, I# i #) }
writeFastMutInt :: FastMutInt -> Int -> IO ()
-writeFastMutInt (FastMutInt arr) (I# i) = IO $ \s ->
- case writeIntArray# arr 0# i s of { s ->
+writeFastMutInt (FastMutInt arr) (I# i) = IO $ \s0 ->
+ case writeIntArray# arr 0# i s0 of { s ->
(# s, () #) }
incFastMutInt :: FastMutInt -> IO Int -- Returns original value
-incFastMutInt (FastMutInt arr) = IO $ \s ->
- case readIntArray# arr 0# s of { (# s, i #) ->
- case writeIntArray# arr 0# (i +# 1#) s of { s ->
+incFastMutInt (FastMutInt arr) = IO $ \s0 ->
+ case readIntArray# arr 0# s0 of { (# s1, i #) ->
+ case writeIntArray# arr 0# (i +# 1#) s1 of { s ->
(# s, I# i #) } }
incFastMutIntBy :: FastMutInt -> Int -> IO Int -- Returns original value
-incFastMutIntBy (FastMutInt arr) (I# n) = IO $ \s ->
- case readIntArray# arr 0# s of { (# s, i #) ->
- case writeIntArray# arr 0# (i +# n) s of { s ->
+incFastMutIntBy (FastMutInt arr) (I# n) = IO $ \s0 ->
+ case readIntArray# arr 0# s0 of { (# s1, i #) ->
+ case writeIntArray# arr 0# (i +# n) s1 of { s ->
(# s, I# i #) } }
#endif