[Haskell-cafe] STUArray

Frederik Eaton frederik at a5.repetae.net
Sat Mar 11 21:58:42 EST 2006

I see. The solutions on that thread, i.e.: 


would seem to require me to at least declare an instance of some
class, for every type that I want to support. So the short answer to
"I'm trying to figure out how to use STUArray. Is it possible to let
it be polymorphic?" appears to be "No".

Perhaps some sort of warning in the documentation for STUArray is in
order, until Bulat's code can be incorporated?

By the way, why make the distinction between unboxable types and
"other" types in the first place? E.g., just because I want something
to work quickly on "Int", doesn't mean that I don't want it to work at
all on "String". It seems that there could be a default "IArray UArray
e" instance which just implements a regular Array behind the scenes.


On Fri, Mar 10, 2006 at 11:49:10PM +0100, Benjamin Franksen wrote:
> On Friday 10 March 2006 23:01, Frederik Eaton wrote:
> > I'm trying to figure out how to use STUArray. Is it possible to let
> > it be polymorphic?
> Hi Frederik
> I think this thread (and the one it referres to) provide a solution:
> http://www.mail-archive.com/haskell%40haskell.org/msg17081.html
> Ben
> -- 
> There are three kinds of programmers: those who make off by one errors, 
> and those who don't.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list