
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@gmail.com

I don't know about Hugs, but you can add an explicit 'forall' to the type sig for allocUnboxed, to bring the type variables into scope. http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions. html#scoped-type-variables S | -----Original Message----- | From: Bulat Ziganshin [mailto:bulat.ziganshin@gmail.com] | Sent: 16 October 2006 17:16 | To: glasgow-haskell-users@haskell.org | Cc: Simon Peyton-Jones | Subject: scoped tyvar | | 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@gmail.com

Hi,
After downloading Haskell 98 (current version), I tried to load stdm by
typing *:load stdm *I kept gettin <command line> could not find module
'stdm'
I added path under system variables under environment variables like this:
control panel/system/Aadvanced/(under system variable)Environment
variables/path *c:ghc/stdm.hs*
After which I tried to load stdm as before but no changes.
Could you please help.
Thanks
Tope, South Africa
On 10/17/06, Bulat Ziganshin
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@gmail.com
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (3)
-
Bulat Ziganshin
-
Simon Peyton-Jones
-
TOPE KAREM