[Haskell-cafe] Is Repa suitable for boxed arrays?...

Ben Lippmeier benl at ouroborus.net
Sun Jun 3 14:28:58 CEST 2012


On 03/06/2012, at 18:10 , Stuart Hungerford wrote:

> I need to construct a 2D array of a Haskell  data type ("boxed" ?)
> where each array entry value depends on values "earlier" in the same
> array (i.e. for entries in previous row/column indexes).

It should work. Use the V type-index for boxed arrays [1], so your array type will be something like (Array V DIM2 Float)

If you can't figure it out then send me a small list program showing what you want to do.


> Repa (V3.1.4.2) looks very powerful and flexible but it's still not
> clear to me that it will work with arbitrary values as I haven't been
> able to get any of the Wiki tutorial array creation examples to work
> (this is with Haskell platform 2012.2 pre-release for OS/X).

The wiki tutorial is old. It was written for the Repa 2 series, but Repa 3 is different. However I just (just) submitted a paper on Repa 3 to Haskell Symposium, which might help [2]

[1] http://hackage.haskell.org/packages/archive/repa/3.1.4.2/doc/html/Data-Array-Repa-Repr-Vector.html
[2] http://www.cse.unsw.edu.au/~benl/papers/guiding/guiding-Haskell2012-sub.pdf


Ben.






More information about the Haskell-Cafe mailing list