What does castIOUArray do?

Adrian Hey ahey@iee.org
Tue, 7 Jan 2003 12:42:20 +0000


Hello,

I don't really understand what castIOUArray does or how to use it.
In fact it seems a little strange to me. Here's why..

The fact that it's type is..
 castIOUArray :: IOUArray ix a -> IO (IOUArray ix b)
and not simply..
 castIOUArray :: IOUArray ix a -> IOUArray ix b
seems like strong indication that it actually does something (it's not
just dummy id like function used to change types).

But whatever it does must depend on the particular instantiation of a and b? 
But this is not an overloaded function and the types a and b are not known at
compile time, so it's hard to see what it could sensibly do.

Can anybody explain this to me?

Thanks
--
Adrian Hey