arrayCompare for arrays of the same size seems to use lexicographical ordering from right to left, rather than the conventional left to right. It's also implemented in a confusing way. I'd expect something vaguely like
arrayCompare xs ys = compare (length xs) (length ys) <> foldr go EQ [0..length xs - 1]
where
go i r = compare (index xs i) (index ys i) <> r
arrayCompare
for arrays of the same size seems to use lexicographical ordering from right to left, rather than the conventional left to right. It's also implemented in a confusing way. I'd expect something vaguely like