RE: Confusing GHC error message

2001-11-26 Thread Simon Peyton-Jones
Yes, good point. I've improved the error message. It now reports a malformed class declaration. S | -Original Message- | From: George Russell [mailto:[EMAIL PROTECTED]] | Sent: 23 November 2001 13:22 | To: [EMAIL PROTECTED] | Subject: Confusing GHC error message | | | (Yes, I know

RE: (no subject)

2001-11-26 Thread Simon Marlow
i use green-card with ghc's FFI export to sth like Haskell - C -- Haskell the program is just arithmatic operations. the program seg fault in the callback from C to Haskell. anyone whether it is a bug? There aren't any known bugs, but there

RE: GHC garbage collector

2001-11-26 Thread Simon Marlow
I have some code that uses FFI capabilities to associate previously allocated memory with a structure akin to a ByteArray and allows Haskell land to read and write to the C side of things. I use ForeignPtr and associate a destructor to allow the GHC's garbage collector to clean up

RE: (no subject)

2001-11-26 Thread Yu Chen
hi, i've found the reason with someone's help. it is because i used %code instead of safecode in the gc file where i did callback. thanks! chenyu -- Original Message -- From: Simon Marlow [EMAIL PROTECTED] Date: Mon, 26 Nov 2001 09:42:39 -

Re: Socket library ghc 5.02.1

2001-11-26 Thread Sigbjorn Finne
Sven Eric Panitz [EMAIL PROTECTED] writes: It seems that the Socket library does still not work with ghc 5.02.1. I tried the simple test: main = do d - connectTo localhost (PortNumber 80) hPutStr d GET / HTTP/1.0\n\n hFlush d c - hGetContents d

RE: heap and walking through a very long list

2001-11-26 Thread Simon Peyton-Jones
You can do it specifically for GHC, not not in standard Haskell (except grossly inefficiently). To see how to do it in GHC, look at the implementation in the source code (ghc/lib/std), which is online (check the CVS repository link on GHC's home page). Meanwhile you could use the IArray stuff.

Library report examples

2001-11-26 Thread Ian Lynagh
Hi guys, The library report defines -- Diagonal of a square matrix diag :: (Ix a) = Array (a,a) b - Array a b diag x = ixmap (l,u) (\i-(i,i)) x where ((l,l'),(u,u')) | l == l' u == u' = bounds x but ghc, hugs and nhc98 all loop (trying to get and test the value of l I believe). I

List module in library report exports []((:), [])

2001-11-26 Thread Ian Lynagh
Hiyas A few more things I'm afraid :-( The List module in the library report exports []((:), []) which, as I mentioned in a previous thread WRT the GHC prelude, the report doesn't allow in the exports list. The block at the top listing the exports and types has been split into 2 at an

Re: Asynchronous Exceptions

2001-11-26 Thread Hannah Schroeter
Hello! On Fri, Nov 23, 2001 at 09:38:35AM -, Simon Marlow wrote: [...] However, I agree that sometimes you really want to be able to do this, so perhaps we need another form of 'block' which doesn't allow *any* exceptions to be delivered, for those times when you know that the time