All Repa reduction functions are discarded into the same types as the contents of the array. For example:
foldAllP :: (Shape sh, Source r a, Elt a, Unbox a, Monad m) => (a -> a -> a) -> a -> Array r sh a -> m a
foldAllS :: (Shape sh, Source r a, Elt a, Unbox a) => (a -> a -> a) -> a -> Array r sh a -> a
I would like to collapse the repa array into a data structure that I can pass to the GUI library for rendering, that is, an arbitrary value, but I cannot find a function in the library for this. Does this function exist or do I need to iterate over cells with [... | x <- [0..w-1], y <- [0..h-1]]
?
source
share