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).
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).

gridaphobe/ghc,mfine/ghc,ml9951/ghc,anton-dessiatov/ghc,wxwxwwxxx/ghc,da-x/ghc,christiaanb/ghc,snoyberg/ghc,frantisekfarka/ghc-dsi,sgillespie/ghc,tibbe/ghc,ezyang/ghc,olsner/ghc,snoyberg/ghc,jstolarek/ghc,siddhanathan/ghc,lukexi/ghc,anton-dessiatov/ghc,holzensp/ghc,forked-upstream-packages-for-ghcjs/ghc,gcampax/ghc,TomMD/ghc,nkaretnikov/ghc,jstolarek/ghc,mcschroeder/ghc,acowley/ghc,mettekou/ghc,TomMD/ghc,bitemyapp/ghc,wxwxwwxxx/ghc,tjakway/ghcjvm,acowley/ghc,urbanslug/ghc,oldmanmike/ghc,urbanslug/ghc,olsner/ghc,nkaretnikov/ghc,bitemyapp/ghc,TomMD/ghc,ezyang/ghc,christiaanb/ghc,GaloisInc/halvm-ghc,TomMD/ghc,nathyong/microghc-ghc,acowley/ghc,elieux/ghc,mfine/ghc,snoyberg/ghc,mcschroeder/ghc,ghc-android/ghc,sgillespie/ghc,siddhanathan/ghc,mettekou/ghc,tjakway/ghcjvm,AlexanderPankiv/ghc,nkaretnikov/ghc,nkaretnikov/ghc,gridaphobe/ghc,green-haskell/ghc,wxwxwwxxx/ghc,siddhanathan/ghc,ghc-android/ghc,spacekitteh/smcghc,sgillespie/ghc,holzensp/ghc,oldmanmike/ghc,fmthoma/ghc,jstolarek/ghc,shlevy/ghc,mfine/ghc,mcschroeder/ghc,spacekitteh/smcghc,frantisekfarka/ghc-dsi,mcschroeder/ghc,mettekou/ghc,anton-dessiatov/ghc,anton-dessiatov/ghc,gcampax/ghc,snoyberg/ghc,nkaretnikov/ghc,shlevy/ghc,ml9951/ghc,ezyang/ghc,elieux/ghc,jstolarek/ghc,ezyang/ghc,mfine/ghc,vikraman/ghc,TomMD/ghc,nathyong/microghc-ghc,wxwxwwxxx/ghc,oldmanmike/ghc,wxwxwwxxx/ghc,AlexanderPankiv/ghc,GaloisInc/halvm-ghc,spacekitteh/smcghc,sdiehl/ghc,snoyberg/ghc,nathyong/microghc-ghc,fmthoma/ghc,sdiehl/ghc,fmthoma/ghc,snoyberg/ghc,ryantm/ghc,gcampax/ghc,da-x/ghc,tjakway/ghcjvm,green-haskell/ghc,TomMD/ghc,sdiehl/ghc,olsner/ghc,nushio3/ghc,siddhanathan/ghc,gridaphobe/ghc,sgillespie/ghc,mcschroeder/ghc,ml9951/ghc,elieux/ghc,shlevy/ghc,nathyong/microghc-ghc,GaloisInc/halvm-ghc,oldmanmike/ghc,fmthoma/ghc,AlexanderPankiv/ghc,GaloisInc/halvm-ghc,lukexi/ghc,shlevy/ghc,ml9951/ghc,da-x/ghc,frantisekfarka/ghc-dsi,holzensp/ghc,nathyong/microghc-ghc,frantisekfarka/ghc-dsi,green-haskell/ghc,olsner/ghc,vikraman/ghc,sgillespie/ghc,gcampax/ghc,fmthoma/ghc,ghc-android/ghc,nushio3/ghc,tjakway/ghcjvm,ghc-android/ghc,bitemyapp/ghc,gcampax/ghc,spacekitteh/smcghc,mettekou/ghc,da-x/ghc,tjakway/ghcjvm,sgillespie/ghc,AlexanderPankiv/ghc,mcschroeder/ghc,urbanslug/ghc,shlevy/ghc,green-haskell/ghc,AlexanderPankiv/ghc,acowley/ghc,da-x/ghc,anton-dessiatov/ghc,acowley/ghc,nushio3/ghc,sdiehl/ghc,ml9951/ghc,forked-upstream-packages-for-ghcjs/ghc,urbanslug/ghc,shlevy/ghc,bitemyapp/ghc,lukexi/ghc,ezyang/ghc,gcampax/ghc,olsner/ghc,urbanslug/ghc,tjakway/ghcjvm,GaloisInc/halvm-ghc,green-haskell/ghc,ml9951/ghc,gcampax/ghc,GaloisInc/halvm-ghc,christiaanb/ghc,vikraman/ghc,vTurbine/ghc,ryantm/ghc,spacekitteh/smcghc,fmthoma/ghc,anton-dessiatov/ghc,mcschroeder/ghc,christiaanb/ghc,nkaretnikov/ghc,lukexi/ghc,wxwxwwxxx/ghc,tibbe/ghc,snoyberg/ghc,forked-upstream-packages-for-ghcjs/ghc,fmthoma/ghc,oldmanmike/ghc,vikraman/ghc,vTurbine/ghc,siddhanathan/ghc,holzensp/ghc,elieux/ghc,vTurbine/ghc,tibbe/ghc,gridaphobe/ghc,siddhanathan/ghc,urbanslug/ghc,ezyang/ghc,frantisekfarka/ghc-dsi,anton-dessiatov/ghc,ryantm/ghc,lukexi/ghc,tibbe/ghc,urbanslug/ghc,da-x/ghc,elieux/ghc,ryantm/ghc,ml9951/ghc,jstolarek/ghc,acowley/ghc,TomMD/ghc,nkaretnikov/ghc,oldmanmike/ghc,sdiehl/ghc,vTurbine/ghc,olsner/ghc,vTurbine/ghc,AlexanderPankiv/ghc,wxwxwwxxx/ghc,forked-upstream-packages-for-ghcjs/ghc,AlexanderPankiv/ghc,acowley/ghc,shlevy/ghc,tibbe/ghc,vikraman/ghc,olsner/ghc,holzensp/ghc,forked-upstream-packages-for-ghcjs/ghc,oldmanmike/ghc,ghc-android/ghc,nushio3/ghc,mettekou/ghc,sdiehl/ghc,mfine/ghc,elieux/ghc,nathyong/microghc-ghc,mettekou/ghc,christiaanb/ghc,vTurbine/ghc,forked-upstream-packages-for-ghcjs/ghc,mfine/ghc,nushio3/ghc,gridaphobe/ghc,ml9951/ghc,nathyong/microghc-ghc,tjakway/ghcjvm,da-x/ghc,gridaphobe/ghc,siddhanathan/ghc,vTurbine/ghc,ryantm/ghc,ezyang/ghc,nushio3/ghc,mettekou/ghc,vikraman/ghc,GaloisInc/halvm-ghc,christiaanb/ghc,elieux/ghc,mfine/ghc,ghc-android/ghc,nushio3/ghc,gridaphobe/ghc,sdiehl/ghc,ghc-android/ghc,sgillespie/ghc,christiaanb/ghc,bitemyapp/ghc,vikraman/ghc,forked-upstream-packages-for-ghcjs/ghc