Improve the index checking for array accesses; fixes #2120 #2669
authorIan Lynagh <igloo@earth.li>
Sun, 19 Jul 2009 15:32:28 +0000 (15:32 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 19 Jul 2009 15:32:28 +0000 (15:32 +0000)
commit9cac65ea790d47f5ad32da0695a5c85ee788cbba
tree12bde8795e2f82524b99211163990883592d4d6e
parent811bf3ff4977e169901d81695f1f2340ce3dcb80
Improve the index checking for array accesses; fixes #2120 #2669
As well as checking that offset we are reading is actually inside the
array, we now also check that it is "in range" as defined by the Ix
instance. This fixes confusing behaviour (#2120) and improves some error
messages (#2669).
GHC/Arr.lhs