Data.Array.MArray "lost" bounds

With ghc-6.6 there is a change in module Data.Array.MArray which now includes a function getBounds :: (MArray a e m, Ix i) => a i e -> m (i,i) but it misses the good old bounds [which had type bounds :: (HasBounds a, Ix i) => aie -> (i,i)]. What is the rational behind this change? Are MArrays now able to change there size? Thanks for any eplanations, Andreas

On Wed, 2006-10-18 at 11:31 +0200, Andreas Marth wrote:
With ghc-6.6 there is a change in module Data.Array.MArray which now includes a function getBounds :: (MArray a e m, Ix i) => a i e -> m (i,i) but it misses the good old bounds [which had type bounds :: (HasBounds a, Ix i) => aie -> (i,i)]. What is the rational behind this change? Are MArrays now able to change there size?
Yes, that's exactly it. Duncan

Hello Andreas, Wednesday, October 18, 2006, 1:31:28 PM, you wrote:
getBounds :: (MArray a e m, Ix i) => a i e -> m (i,i) but it misses the good old bounds [which had type bounds :: (HasBounds a, Ix i) => aie -> (i,i)]. What is the rational behind this change? Are MArrays now able to change there size?
no. but now you can implement array type that has dynamic bound and still compatible with MArray class i have already implemented such beast as part of my ArrayRef library. look at http://haskell.org/haskellwiki/Library/ArrayRef you can steal my code, or switch to using my library. the later has advantage of compatibility with both 6.4 and 6.6 -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
participants (3)
-
Andreas Marth
-
Bulat Ziganshin
-
Duncan Coutts