[Haskell-cafe] Pure and monadic functions using the Repa arrays

felipe zapata tifonzafel at gmail.com
Tue Aug 21 15:19:46 CEST 2012


Hi Haskellers,

I have been playing with the Repa functions and trying the Repa-examples.
In order to gain experience with the Repa functions I have written some
small linear algebra utilities and import this module to a bigger project.
In the beginning of my project I used the mmultP function from the
repa-examples to calculate a big matrix, therefore I have and array of type:


 arr :: Monad m => m (Array U DIM2 Double)


 Then I carried this array in a lot of functions which become Monadic
function and then it is necessary to introduce the monadic machinery for
manipulating this functions . The Question is then if there is the
possibility to work with a pure function in place of the monadic version?

There is something like a runRepa function?

runRepa :: Monad m => m (Array U DIM2 Double) - > Array U DIM2 Double


or could I used the unsafePerformIO function ?


 or the evaluation of the parallel arrays must be postponed until the
Repa.Array is called in the main function?


 Thanks in Advance,


 Felipe.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120821/527bd15a/attachment.htm>


More information about the Haskell-Cafe mailing list