Your problem is that you're including the (i, j) in your array element type, when you really only want it to be in your index type (I assume). This would not normally be an issue, but an unboxed array doesn't work on an element type of ((Int, Int), Double).
initIdentityMat :: Int -> ST s (STUArray s (Int,Int) ((Int, Int), Double))initIdentityMat m = newListArray ((1,m),(1,m)) ([((i,j), if i == j then 1.0 else 0.0) | i <- [1..m], j <- [1..m]] :: [((Int,Int), Double)])Doesn't seem to compile, nor do minor variations of the type declaration.--
--
Regards,
KC
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe