[Haskell-cafe] Re: UArray

Bulat Ziganshin bulat.ziganshin at gmail.com
Sun Mar 12 15:29:29 EST 2006

Hello Frederik,

Sunday, March 12, 2006, 9:39:13 PM, you wrote:

FE> Why define separate instances when one could just define one
FE> equivalent one:

FE>     instance (Ix ix, Eq e, IArray UArray e) => Eq (UArray ix e)
FE>             (==) = eqUArray

FE> ???

afaik, this is just not H98-compatible and require to use even more
type extensions than currently used in this module

FE> The same question applies to the Ord instances in that file.

FE> I can give an answer *why not* do this: it makes UArray even more
FE> unusable. UArrays which are polymorphic in their element types cannot
FE> be compared. Here is another patch, please apply:

_I_ don't apply the patches, but you can propose patches by sending
them to libs maillist. tomorrow Simon Marlow will read it and decide
whether it need to be applied

most UArrays users don't need polymorphism, i run into problems with
arrays only when i wrote general library which should support every
array type

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list