Take the 2-minute tour ×

Two related questions.

  • Is there a reason why there is no mutable (ST monad) implementation of repa arrays? Equivalent to Data.Vector.Mutable but with a shape.

  • Related to this, how is one supposed to implement dynamic programming algorithms (array elements computed from other elements of the same array), in the unboxed representation?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Repa is designed for bulk data parallel programming. It must be possible to compute array elements in arbitrary order, otherwise the Repa evaluation methods won't work.

If you want to destructively update an array element based on other array elements, then this constrains the evaluation order. If you can't express your algorithm in a bulk data parallel fashion then Repa isn't going to help you.

share|improve this answer
It would still be a useful feature to have, even in the absence of parallelism, because of repa 'shape' interface. Otherwise one is forced to use the old Data.Array for a huge class of algorithms. –  Federico Squartini Jan 5 '13 at 8:00

Your Answer


