scoped tyvar

Bulat Ziganshin bulat.ziganshin at
Mon Oct 16 12:16:06 EDT 2006

Hello glasgow-haskell-users,

should the following work in 6.6?

-- | Alloc the mutable byte vector having `elems` elements of required type
allocUnboxed :: (STorIO m s, Integral elems, Unboxed a)
             => elems -> m (MUVec s a)
allocUnboxed elems :: m (MUVec s a) =          -- it's line 149
    allocUnboxedBytes (fromIntegral elems * sizeOfUnboxed (undefined::a))

the problem is that it works in 6.6rc1, but user reports that his
compiler (i think, 6.6 release) can't compile it saying:

Data/Unboxed.hs:149:0: Parse error in pattern

may be it's because september's changes in scoped tyvars handling? how
i can convert this code retaining compatibility with Hugs?

Best regards,
 Bulat                          mailto:Bulat.Ziganshin at

More information about the Glasgow-haskell-users mailing list