On Tue, Mar 24, 2015 at 9:57 AM, wren romano <winterkoninkje@gmail.com> wrote:
So I was working on porting my libraries to work for GHC 7.10 and I
ran into a snag. Unlike the concrete type Data.Array.Array,  the
concrete type Data.Array.Unboxed.UArray is defined as being nominal in
the second type argument— is this a bug?

No, see https://ghc.haskell.org/trac/ghc/ticket/9220.
 
If not, then why must it be nominal? Shouldn't (UArray a New) and
(UArray a Old) have the same representation in memory? Using
unsafeCoerce has always been safe here in the past...

It wasn't and isn't necessarily safe (though in some cases it is safe). The IArray instances for Old and New could be unrelated (for example, they could use a different amount of space per element). Knowing that Old and New are related by a coercion means that the heap representation of actual values of types Old and New are the same, but that says nothing about how these values are stored in an unboxed array.

Regards,
Reid Barton