RE: Strictness confusion

2004-06-25 Thread Simon Peyton-Jones
Interesting: 1. When GHC decides that 'foo' is strict, it does not *require* that every caller must evaluate the argument before the call. So GHC does not assume that foo always gets an evaluated argument. Indeed, if GHC sees the call (foo v), where foo is strict, it does not evaluate v

RE: Strictness confusion

2004-06-25 Thread Simon Peyton-Jones
Indeed. GHC's existing strictness analyser answers precisely this question too -- that's not the point. The question is what it does with the information. At the moment the info flows upwards to x's binding site. What's wanted here is to make it flow downwards to x's uses. S | -Original

Re: Strictness confusion

2004-06-25 Thread Alastair Reid
On Friday 25 June 2004 09:17, Simon Peyton-Jones wrote: b) Adding a new top-down sweep to the strictness analyser. (e.g. what demand is placed on x by evaluating (f (g x))?). IIRC, the Yale Haskell compiler did this kind of thing. I joined the Yale team late in the development so I

Socket Options

2004-06-25 Thread Peter Simons
Hi, the Network module provides the data type SocketOption. I am particularly interested in setting the RecvTimeOut and SendTimeOut values, but I wonder how to set them. The function setSocketOption :: Socket - SocketOption - Int - IO () allows me only 'Int' parameters, but the kernel expects

Re: Socket Options

2004-06-25 Thread Glynn Clements
Peter Simons wrote: the Network module provides the data type SocketOption. I am particularly interested in setting the RecvTimeOut and SendTimeOut values, but I wonder how to set them. The function setSocketOption :: Socket - SocketOption - Int - IO () allows me only 'Int'