id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
3659,two-dimensional PArrays in data parallel code,ams,rl,"Hi -- Is it possible to create two-dimensional PArrays? It seems like an expression like

{{{
   fromList [fromList [1]]
}}}

would do it (where fromList is from Data.Array.Parallel.Prelude), but a type class constraint seems not to be matched here:
{{{
    No instance for (Elt (PArray Int))
      arising from a use of `fromList' at Main.hs:8:16-42
    Possible fix: add an instance declaration for (Elt (PArray Int))
}}}
(Details below.) Are there any other ways?

Thanks -- Adam Shaw

{{{
$ cat Main.hs
import Data.Array.Parallel.PArray as P

main :: IO ()
main
  = do
      let v2D = P.fromList [P.fromList [1::Int]]
      print v2D

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.13.20090929

$ ghc -fdph-seq Main.hs

Main.hs:6:16:
    No instance for (Elt (PArray Int))
      arising from a use of `fromList' at Main.hs:6:16-47
    Possible fix: add an instance declaration for (Elt (PArray Int))
    In the expression: fromList [fromList [1 :: Int]]
    In the definition of `v2D': v2D = fromList [fromList [1 :: Int]]
    In the expression:
        do { let v2D = fromList ...;
             print v2D }
}}}",feature request,closed,normal,,Compiler,6.10.4,worksforme,,rl@…,Unknown/Multiple,Unknown/Multiple,,,,,,
