On Mon, May 26, 2014 at 5:12 PM, Kevin Van Horn <kevin@ksvanhorn.com> wrote:
I'm looking on the Haskell 98 Report, and the definition of (==) for values of type Array a b looks wrong to me. Here is the definition given:

  a == a' = (assocs a == assocs a')

But this fails to account for the array length in each dimension; hence, if

Have you tested this? assocs produces a list whose length depends on the array bounds; (==) on lists accounts for the length. What's left is the possibility of bounds mismatches, but in that case the index elements of the list of pairs produced by assocs will not match and they will compare unequal.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net