Re: Foreign.destructArray

2002-07-23 Thread Manuel M T Chakravarty
Hal Daume III <[EMAIL PROTECTED]> wrote, > what happened to Foreign.destructArray? I can't seem to find it > anywhere... Was removed. The rational should be in the archive of [EMAIL PROTECTED] Cheers, Manuel ___ Glasgow-haskell-users mailing list [E

Re: DeepSeq

2002-07-23 Thread John Meacham
DrIFT can derive 'rnf' or reduce to normal form for arbitrary classes which is similar to deepSeq, in fact does anyone have a good description as to how they are different? John On Fri, Jul 19, 2002 at 12:31:40PM +0100, Jorge Adriano wrote: > On Friday 19 July 2002 12:10, George Russell w

weird (bug?) in linear implicit parameters

2002-07-23 Thread Hal Daume III
(guess who finally decided to learn about imp params :P) this looks like a bug to me, but of course i may be wrong. consider these definitions: > data BLSupply = BLSupply [Bool] > > instance Splittable BLSupply where > split (BLSupply l) = (BLSupply (True:l), BLSupply (False:l)) > > newBL

infixed implicit parameters

2002-07-23 Thread Hal Daume III
in the cannonical sort with implicit params, i we write something like: mySort :: (?cmp :: a -> a -> Ordering) => [a] -> [a] mySort [] = [] mySort (x:xs) = insert x (mySort xs) where insert x [] = [x] insert x (y:ys) | ?cmp x y == GT = y : insert x ys

Re: Type of newForeignPtr & addForeignPtrFinalizer

2002-07-23 Thread Alastair Reid
[This question might be more appropriate for the ffi mailing list] > I wonder if I might indulge myself with > another stupid question related to this, that is, why make the > distinction between Ptr and ForeignPtr at all? [...] The reason for using ForeignPtr is to attach free functions. If w

RE: comparison of execution speed of array types

2002-07-23 Thread Zdenek Dvorak
Hello, >DiffArray seems to be broken :). Either that or I'm using it >incorrectly. I've attached the relevant code, but when I don't reverse >the array everything works fine; when I reverse it the program doesn't >(seem to) halt. I've tried to use DiffArray recently and it is terribly slow. I

RE: Type of newForeignPtr & addForeignPtrFinalizer

2002-07-23 Thread Simon Marlow
> On Monday 22 July 2002 12:33 pm, Simon Marlow wrote: > > > The second seems to require this bit of weirdness.. > > > myNewForeignPtr :: Ptr a -> (ForeignPtr a -> IO ()) -> IO > > > (ForeignPtr a) > > > myNewForeignPtr p fin = do > > >newfp <- newForeignPtr p (return ()) > > >addForeig

Re: Type of newForeignPtr & addForeignPtrFinalizer

2002-07-23 Thread Adrian Hey
On Monday 22 July 2002 12:33 pm, Simon Marlow wrote: > > The second seems to require this bit of weirdness.. > > myNewForeignPtr :: Ptr a -> (ForeignPtr a -> IO ()) -> IO > > (ForeignPtr a) > > myNewForeignPtr p fin = do > >newfp <- newForeignPtr p (return ()) > >addForeignPtrFinalizer

Array faster than UArray Double, Was: ...speed of array types

2002-07-23 Thread Jan Kybic
> > Could you try IOUArray for completeness too? (An IOUArray is the > > unboxed version of IOArray, it can be found in Data.Array.IO). > > It fits in as the fastest: > > IOUnboxedMutArray 0.48u 0.04s 0:00.58 89.6% > > > > NormalArray 1.65u 0.20s 0:01.89 97.8% > > > N

RE: Foreign.destructArray

2002-07-23 Thread Simon Marlow
> what happened to Foreign.destructArray? I can't seem to find it > anywhere... > > Also, has anyone thought of putting a search-engine front end > on to the > Haskell documentation? Even just a search on google using > > site:haskell.cs.yale.edu filetype:html inurl:docs > > would be nice