
13 Feb
2003
13 Feb
'03
10:20 a.m.
The MArray class in Data.Array.MArray is a very nice abstraction. However, when creating an array whose type partakes of MArray, say STUArray, I find myself defining and using a type-specific creation function, such as: newSTUArray :: (MArray (STUArray s) e (ST s), Ix i) => (i, i) -> e -> ST s (STUArray s i e) newSTUArray = newArray so that I don't have to give a complicated type declaration for each use of `newArray` that creates an STUArray. 1. Is there a better (more concise/convenient) way to provide the necessary type information? 2. If not, should functions such as `newSTUArray` be provided in the libraries? -- Dean
8132
Age (days ago)
8132
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dean Herington