diff options
author | Ian Lynagh <igloo@earth.li> | 2009-04-24 12:47:54 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-04-24 12:47:54 +0000 |
commit | 831a35dd00faff195cf938659c2dd736192b865f (patch) | |
tree | 09b90239d250dca8fa8364c0daa80bbcef9c095c /compiler/utils/FastMutInt.lhs | |
parent | 7936b988d6d0a5f9a9b439c7d4a6adf616ddb9b5 (diff) | |
download | haskell-831a35dd00faff195cf938659c2dd736192b865f.tar.gz |
Require a bang pattern when unlifted types are where/let bound; #3182
For now we only get a warning, rather than an error, because the alex
and happy templates don't follow the new rules yet.
Diffstat (limited to 'compiler/utils/FastMutInt.lhs')
-rw-r--r-- | compiler/utils/FastMutInt.lhs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/utils/FastMutInt.lhs b/compiler/utils/FastMutInt.lhs index e8ea58c8db..c29b568426 100644 --- a/compiler/utils/FastMutInt.lhs +++ b/compiler/utils/FastMutInt.lhs @@ -50,7 +50,7 @@ data FastMutInt = FastMutInt (MutableByteArray# RealWorld) newFastMutInt = IO $ \s -> case newByteArray# size s of { (# s, arr #) -> (# s, FastMutInt arr #) } - where I# size = SIZEOF_HSINT + where !(I# size) = SIZEOF_HSINT readFastMutInt (FastMutInt arr) = IO $ \s -> case readIntArray# arr 0# s of { (# s, i #) -> @@ -65,7 +65,7 @@ data FastMutPtr = FastMutPtr (MutableByteArray# RealWorld) newFastMutPtr = IO $ \s -> case newByteArray# size s of { (# s, arr #) -> (# s, FastMutPtr arr #) } - where I# size = SIZEOF_VOID_P + where !(I# size) = SIZEOF_VOID_P readFastMutPtr (FastMutPtr arr) = IO $ \s -> case readAddrArray# arr 0# s of { (# s, i #) -> |