[GHC] #2158: deriving (Ix) and listArray give unexpected results

GHC trac at galois.com
Sun Mar 30 14:16:22 EDT 2008


#2158: deriving (Ix) and listArray give unexpected results
----------------------------+-----------------------------------------------
 Reporter:  guest           |          Owner:  igloo  
     Type:  bug             |         Status:  new    
 Priority:  normal          |      Milestone:  6.8.3  
Component:  libraries/base  |        Version:  6.6    
 Severity:  normal          |     Resolution:         
 Keywords:                  |     Difficulty:  Unknown
 Testcase:                  |   Architecture:  Unknown
       Os:  Unknown         |  
----------------------------+-----------------------------------------------
Changes (by igloo):

  * owner:  => igloo
  * difficulty:  => Unknown
  * milestone:  => 6.8.3

Comment:

 Right, http://haskell.org/onlinereport/ix.html says that
 {{{
 range (l,u) !! index (l,u) i == i   -- when i is in range
 }}}
 must hold, but
 {{{
 Prelude Foo Data.Array> let l = Pos 0 0; u = Pos 2 3; i = Pos 0 1 in range
 (l,u) !! index (l,u) i == i
 False
 }}}
 I'll take a look.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2158#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list