X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Futils%2FFastMutInt.lhs;h=b483a1428edf30bc592e3fd9e4361d8f25447054;hb=0dbbf1932d550293986af6244202cb735b2cd966;hp=09b535ad22fafc493a83d0a08abc232a9bb28862;hpb=c19b4e6286089cc4c41f336673224c1febba0e2e;p=ghc-hetmet.git diff --git a/ghc/compiler/utils/FastMutInt.lhs b/ghc/compiler/utils/FastMutInt.lhs index 09b535a..b483a14 100644 --- a/ghc/compiler/utils/FastMutInt.lhs +++ b/ghc/compiler/utils/FastMutInt.lhs @@ -7,8 +7,7 @@ \begin{code} module FastMutInt( FastMutInt, newFastMutInt, - readFastMutInt, writeFastMutInt, - incFastMutInt, incFastMutIntBy + readFastMutInt, writeFastMutInt ) where #include "MachDeps.h" @@ -50,18 +49,6 @@ writeFastMutInt :: FastMutInt -> Int -> IO () writeFastMutInt (FastMutInt arr) (I# i) = IO $ \s -> case writeIntArray# arr 0# i s 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 -> - (# 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 -> - (# s, I# i #) } } \end{code} #endif