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/FastString.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/FastString.lhs')
-rw-r--r-- | compiler/utils/FastString.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs index cf4e37d21d..62bc5d5edf 100644 --- a/compiler/utils/FastString.lhs +++ b/compiler/utils/FastString.lhs @@ -380,9 +380,9 @@ hashStr (Ptr a#) (I# len#) = loop 0# 0# where loop h n | n GHC.Exts.==# len# = I# h | otherwise = loop h2 (n GHC.Exts.+# 1#) - where c = ord# (indexCharOffAddr# a# n) - h2 = (c GHC.Exts.+# (h GHC.Exts.*# 128#)) `remInt#` - hASH_TBL_SIZE# + where !c = ord# (indexCharOffAddr# a# n) + !h2 = (c GHC.Exts.+# (h GHC.Exts.*# 128#)) `remInt#` + hASH_TBL_SIZE# -- ----------------------------------------------------------------------------- -- Operations |