cabal, extralibs, no happy

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed Nov 1 15:58:10 EST 2006


Hello Christian,

Wednesday, November 1, 2006, 6:12:32 PM, you wrote:

> 3. the happy-1.15 sources can not be compiled due to

> http://haskell.org/ghc/docs/6.6/html/users_guide/release-6-6.html
> #
> The HasBounds class has been removed from Data.Array.Base, and its
> bounds method is now in the IArray class. The MArray class has also
> gained a method getBounds.
> #

> Is there any easy fix?

may be this will be useful:

-- This "equalizer" routine required because MArray interface was changed in GHC 6.6
#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 605)
getMBounds arr = getBounds arr
#else
getMBounds arr = return (bounds arr)
#endif

usage example:

putMArrayWith write h arr    = do bounds <- getMBounds arr
                                  loop 0 (rangeSize(bounds)-1)
                                      (\i -> unsafeRead arr i >>= write h)



-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com




More information about the Glasgow-haskell-bugs mailing list