[GHC] #8712: Data.Ix missing info on row/column major indexing

GHC ghc-devs at haskell.org
Wed Jan 29 14:29:40 UTC 2014


#8712: Data.Ix missing info on row/column major indexing
-------------------------------------+-------------------------------------
        Reporter:  mirpa             |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  libraries/base    |          Version:  7.6.3
      Resolution:                    |         Keywords:  row, column,
Operating System:  Unknown/Multiple  |  major, Ix
 Type of failure:  Documentation     |     Architecture:  Unknown/Multiple
  bug                                |       Difficulty:  Easy (less than 1
       Test Case:                    |  hour)
        Blocking:                    |       Blocked By:
                                     |  Related Tickets:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Um, there's absolutely nothing wrong with using Ix and Array with
 multidimensional arrays (though the poster is not using Array anyways).

 Anyways, the Haskell 2010 (or 98) Report does specify that the Ix instance
 for `(a,b)` uses row-major order (though the wording is awkward: an
 instance for a built-in type is normally not called "derived"), so I agree
 that information should appear in the haddocks for Data.Ix somewhere.
 Incidentally there is a broken link at the end of
 http://hackage.haskell.org/package/base-4.6.0.1/docs/Data-Ix.html which
 ought to point to the relevant part of the Report, but as I mentioned
 "Deriving Instances of Ix" is not an intuitive section to look at for the
 instance `(a,b)`.

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


More information about the ghc-tickets mailing list