Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Bertram Felgenhauer <bertram.felgenhauer <at> googlemail.com>
Subject: Re: Array bug?
Newsgroups: gmane.comp.lang.haskell.cafe
Date: Saturday 1st November 2008 14:14:30 UTC (over 8 years ago)
Andrew Coppin wrote:
> Consider the following GHCi session:
>
> GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for
help
> Prelude Data.Array.IO> t <- newArray ((0,0),(5,4)) 0 :: IO (IOUArray
(Int,Int) Int)
> Prelude Data.Array.IO> getBounds t
> ((0,0),(5,4))
> Prelude Data.Array.IO>
>
> Is this a known bug? Is it likely to be fixed any time soon? (I'm
guessing 
> the bug is as simple is converting indicies to integers and then checking

> the integers are in-range, rather than the underlying index type.)

Yes, it's a known bug - a conscious choice really. See

    http://hackage.haskell.org/trac/ghc/ticket/2120

It's somewhat ironic that this behaviour was introduced by a patch
that made arrays safer to use in other respects.

Bertram
 
CD: 3ms