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

2012-06-03 Thread Stuart Hungerford
Hi,

I have a newb-ish question about Haskell 2D arrays.

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).

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).

I can see I could also construct my own 2D array data structure from
Data.Vector instances. Are there any other approaches for general 2D
arrays I should be looking at?

Thanks,

Stu

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2012-06-03 Thread Ben Lippmeier

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.




___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe