[Haskell-cafe] Re: dynamic arrays

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Mar 17 15:06:13 EST 2006

Hello Chris,

Friday, March 17, 2006, 10:31:28 PM, you wrote:

CK> If I may make a suggestion: I think you have identified a need for certain
CK> operations which would benefit from a typeclass.  The dynamic arrays need new
CK> operations on their indices, so they need a more specific type than Ix:

the *small* problem is what writeArray and all other operations
defined with Ix in its head, so it's impossible to use in
implementation any operations not in the Ix dictionary! The problem,
after all, is what the MArray typeclass DON'T INCLUDES index type ibn
its head, so i can't define something like:

instance (IxDynamic i) => MArray DynamicIOArray i e IO ...

and NOT making dynamic arrays an MArray instance is total useless in
my opinion (and at least can be done by anyone without changing the
arrays library). on the other side, changing MArray interface arity
(number of parameters) will lead to changing declarations for all
routines what acquire MArray parameters. so i still look for more
oldcode-compatible solutions

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

More information about the Haskell-Cafe mailing list