major missing piece to arrays?
Carsten Schultz
carsten at codimi.de
Mon Jul 19 21:34:46 EDT 2004
(I am not sure, if keeping the cc to libraries is ok, apologies in
case it is not.)
On Mon, Jul 19, 2004 at 06:23:21PM -0700, John Meacham wrote:
> 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?
I would vote for RULEs.
> anyone have any intuition on which would be a better approach to take?
> The class is more straightforward, but since we are not changing
> behavior, just doing a pure type based optimization, perhaps RULES is
> the better way to go.
Exactly.
> (can RULES even be used in this way?
I think so:
http://www.haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#SPECIALIZE-PRAGMA
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/libraries/attachments/20040720/7537c367/attachment.bin
More information about the Libraries
mailing list