X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FFastMutInt.lhs;h=fae79d66be7fa7c74b62d102ed781a071efbb7b3;hb=1a7d1b77334529ca96ed4cbc03fcb5f55dc2de4a;hp=bdcf502f5260848eb30bb43d603a1fa741f76c41;hpb=25ad11473b8ba3d7596d83e95e2bee72af9790b1;p=ghc-hetmet.git diff --git a/compiler/utils/FastMutInt.lhs b/compiler/utils/FastMutInt.lhs index bdcf502..fae79d6 100644 --- a/compiler/utils/FastMutInt.lhs +++ b/compiler/utils/FastMutInt.lhs @@ -5,6 +5,13 @@ -- Unboxed mutable Ints \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module FastMutInt( FastMutInt, newFastMutInt, readFastMutInt, writeFastMutInt @@ -50,6 +57,10 @@ writeFastMutInt (FastMutInt arr) (I# i) = IO $ \s -> case writeIntArray# arr 0# i s of { s -> (# s, () #) } #else /* ! __GLASGOW_HASKELL__ */ +--maybe someday we could use +--http://haskell.org/haskellwiki/Library/ArrayRef +--which has an implementation of IOURefs +--that is unboxed in GHC and just strict in all other compilers... newtype FastMutInt = FastMutInt (IORef Int) -- If any default value was chosen, it surely would be 0,