major missing piece to arrays?

Simon Marlow simonmar at
Tue Jul 20 04:32:51 EDT 2004

On 20 July 2004 02:23, John Meacham wrote:

> Cool, I can build more efficient versions on these now that I know the
> ByteArray# as Addr# trick.
> I am curious what the best way to go about writing specialized
> versions is,
> placing the copying functions in a class, with (slow) default methods
> for everything and special instances for (IO)UArrays? or relying on
> RULES pragmas to do the appropriate specialization?

RULES is the way to go if you're just providing optimised versions.  If
you anticipate that there might be a semantic difference (I presume
not), then a class is more appropriate.


More information about the Glasgow-haskell-users mailing list