On 18/12/09 09:48, Simon Peyton-Jones wrote:
Right. I'll make some specialised instances in GHC.Arr. And add comments to
explain the issue
Probably a good idea to reference the tickets in the comments: #1610,
#2120, #2669.
Cheers,
Simon
S
| -Original Message-
|
Right. I'll make some specialised instances in GHC.Arr. And add comments to
explain the issue
S
| -Original Message-
| From: Simon Marlow [mailto:marlo...@gmail.com]
| Sent: 18 December 2009 09:31
| To: Duncan Coutts
| Cc: Simon Peyton-Jones; Simon Marlow; cvs-ghc@haskell.org
| Su
On 18/12/09 05:48, Duncan Coutts wrote:
On Thu, 2009-12-17 at 18:03 +, Simon Peyton-Jones wrote:
Simon
I'm puzzling over GHC.Arr.safeIndex
It calls the overloaded method 'index' which does bound checks on the
"semantic range", by checking that i is in the range (l,u). But then
safeIndex d
On Thu, 2009-12-17 at 18:03 +, Simon Peyton-Jones wrote:
> Simon
>
> I'm puzzling over GHC.Arr.safeIndex
>
> It calls the overloaded method 'index' which does bound checks on the
> "semantic range", by checking that i is in the range (l,u). But then
> safeIndex does *another* range check, on
Simon
I'm puzzling over GHC.Arr.safeIndex
It calls the overloaded method 'index' which does bound checks on the "semantic
range", by checking that i is in the range (l,u). But then safeIndex does
*another* range check, on the resulting index value.
Shouldn't it be an invariant that if index (