
(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#SPECIAL... 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.