Re: Binary library

2001-11-22 Thread Malcolm Wallace
| Since the Report states that the derived Show instances only insert | parentheses where needed and that the derived Read instances can | read the output produced by show, I would suggest to change all | occurences of {showsPrec 10,readsPrec 10} to {showsPrec 0,readsPrec 0} | in the

hsc: Passing -1 as CString/Ptr a?

2001-11-22 Thread Volker Stolz
Hi, I want to invoke the C-function 'dlsym', which has three possible options for a parameter of type (void*): - NULL - void* to a string, i.e. CString in Haskell - RTLD_NEXT = (void *)(-1) The first two ones are no problem, I can use a CString and 'nullPtr'. For the last one, I have the

Re: Socket library ghc 5.02.1

2001-11-22 Thread Volker Stolz
In local.glasgow-haskell-users, you wrote: main = do d - connectTo localhost (PortNumber 80) hPutStr d GET / HTTP/1.0\n\n hFlush d c - hGetContents d putStr c whereas on Linux I get the following error: *** Exception: failed Action: connect Reason: Unknown

Re: Socket library ghc 5.02.1

2001-11-22 Thread Volker Stolz
In local.glasgow-haskell-users, you wrote: It seems that the Socket library does still not work with ghc 5.02.1. [ghci clarification] There, it crashes for me even on the 2nd invocation: connect(13, {sin_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr(137.226.194.33)}}, 16) = -1

RE: Socket library ghc 5.02.1

2001-11-22 Thread Simon Marlow
Am 22. Nov 2001 um 16:22 MET schrieb Simon Marlow: I'm sad to say there was another bug in SocketPrim.getSocketOption in 5.02.1. Please try the enclosed patch. How does this explain the two differing behaviours? And why didn't it happen in a compiled version? Because the 'optlen'

Existentials and newtype

2001-11-22 Thread Arthur Baars
At [EMAIL PROTECTED] I asked the following: this works data Exists f = forall x . E ( f x) this doesn't work newtype Exists f = forall x . E ( f x) Hugs accepts both. It there a reason why existential quantification does not work with a newtype, or is it just a

Re: hsc: Passing -1 as CString/Ptr a?

2001-11-22 Thread Marcin 'Qrczak' Kowalczyk
Thu, 22 Nov 2001 13:57:32 +0100, Volker Stolz [EMAIL PROTECTED] pisze: Hi, I want to invoke the C-function 'dlsym', which has three possible options for a parameter of type (void*): - NULL - void* to a string, i.e. CString in Haskell - RTLD_NEXT = (void *)(-1) You can obtain the value