Rene de Visser <[EMAIL PROTECTED]> wrote in article <[EMAIL PROTECTED]> in gmane.comp.lang.haskell.general: > To do this I need to cast my 5 dimensional array to a 1 dimensional > array? Does this work? i.e. how do I know that GHC uses a flat array > representation for multidemsional arrays (rather than a nested model > using pointers).
You know that the array type you are using uses a flat representation because -it- doesn't know what index type you are using. IOUArray must be polymorphic over the index type (the first argument to the type constructor IOUArray), so it can't do anything with the indices that the Ix type class doesn't tell it how to do. The Ix type class doesn't tell IOUArray how many dimensions you have. But you may also want to look into StorableArray. -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig 2005-11-06 Against Exploiting the Environment in War http://tinyurl.com/adhg9 2005-11-20 Universal Children's Day http://www.un.org/depts/dhl/children_day/ 2005-11-25 Elimination of Violence Against Women http://tinyurl.com/drd57 2005-11-25 Buy Nothing Day http://www.buynothingday.co.uk/ _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell