listen/bind socket problem in GHC 5.04

2002-08-20 Thread paul
I understand that GHC 5.04 has reoganized the network modules, but somehow my code broke over GHC 5.04... prepareSocket addr port = do s - socket AF_INET Stream 6 setSocketOption s ReuseAddr 1 let port' = PortNum port addr' - case addr of Just str - inet_addr str = (\x

Re: Evaluation order, ghc versus hugs, lazy vs. strict

2002-08-20 Thread Jan Kybic
As you've apparently discovered, the trick is to be lazy but not too lazy. That is, you want to generate the list lazily but compute a partial result (i.e., the running total of that part of the list processed so far) strictly. Thanks for all reactions. Now my simplified examples indeed run in

RE: listen/bind socket problem in GHC 5.04

2002-08-20 Thread Simon Marlow
I understand that GHC 5.04 has reoganized the network modules, but somehow my code broke over GHC 5.04... prepareSocket addr port = do s - socket AF_INET Stream 6 setSocketOption s ReuseAddr 1 let port' = PortNum port addr' - case addr of Just str - inet_addr

Re: listen/bind socket problem in GHC 5.04

2002-08-20 Thread paul
Thanks for the help, it works! I wonder why mkPortNumber is no longer in the socket API? Regards, .paul. On Tue, Aug 20, 2002 at 10:05:40AM +0100, Simon Marlow wrote: instead of let port' = PortNum port use let port' = fromIntegral port The PortNumber type should

Re: zipWith, zipWith3, zipWith4.... looks gawky, IMHO

2002-08-20 Thread Coeus
Nice, except that operator names that start with ':' are constructors. Have you seen the paper Do we need dependent types http://www.brics.dk/RS/01/10/? They do the same trick, and go further. --Dylan No; but now I have it. I do not know where to use zipWith8 instead of operators.

Re: GPH: RE: Concurrency and Haskell

2002-08-20 Thread Phil Trinder
Murray, There are several parallel Haskell implementations: a survey of them has just appeared in Journal of Func. Prog Vols 45 (July Sept 2002). Implementations are available for o Eden http://www.mathematik.uni-marburg.de/inf/eden/ o GpH http://www.cee.hw.ac.uk/~dsg/gph/ My group works on

Re: GPH: RE: Concurrency and Haskell

2002-08-20 Thread paul
Speaking of GpH, I wonder how is GdH coming along? It seems that the installation instruction on http://www.cee.hw.ac.uk/~dsg/gdh/ is still incomplete... As far as I know, Mosix has nothing to do with PVM, so am I right to say that GpH still needs PVM even you use it on a Mosix cluster? Then

Re: GPH: RE: Concurrency and Haskell

2002-08-20 Thread mgross
To reduce the amount of duplication, I'm going to assume that everyone copied on your original note to me reads the list and copy only the list. If you know someone on the copy list who does not read the list, please tell me, and I will individually copy them on appropriate future e-mail. On

Re: GPH: RE: Concurrency and Haskell

2002-08-20 Thread mgross
On Tue, 20 Aug 2002 [EMAIL PROTECTED] wrote: Speaking of GpH, I wonder how is GdH coming along? It seems that the installation instruction on http://www.cee.hw.ac.uk/~dsg/gdh/ is still incomplete... As far as I know, Mosix has nothing to do with PVM, so am I right to say that GpH

Re: Question about sets

2002-08-20 Thread Ketil Z. Malde
Scott J. [EMAIL PROTECTED] writes: I have a question. Why are sets not implemented in Haskell? What do you mean? Isn't http://www.haskell.org/ghc/docs/latest/html/hslibs/set.html sufficient? (Remember to tell GHC '-package data') -kzm -- If I haven't seen further, it is by

OT: broken mail threads

2002-08-20 Thread Lauri Alanko
I'm sorry to bring up such petty issues, but this has been nagging me for quite a long while now... The Haskell mailing lists have one rather unflattering characteristic: their mail threads are almost always broken. I'll elaborate. Most mail user agents arrange messages in threads, keeping

Re: Question about sets

2002-08-20 Thread Scott J.
As far a I know sets can implemented by implementing a list of anything(a list of all types) The sets Haskell does have are AFAIK sets of elements of the same type: these are not general sets. Scott - Original Message - From: Ketil Z. Malde [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

questions

2002-08-20 Thread Jonata Goulart
I'm trying to do a simple lex analyser in haskell I defined the function lexi that is intended to break a string into tokens returning them as a list but I received the following error: ERROR TesteEval.hs:20 - Syntax error in input (unexpected symbol restante) isLetter:: Char - Bool isLetter

Re: questions

2002-08-20 Thread Hal Daume III
There are three basic problems here. The first is the syntax error you see, the second and third will become available once you fix the syntax error. lexi (a:x) | isLetter a = token: lexi restante where S = takeWhile isLetterorDigit x line 20 -- restante =

Re: Question about sets

2002-08-20 Thread Jon Cast
Scott J. [EMAIL PROTECTED] wrote: As far a I know sets can implemented by implementing a list of anything(a list of all types) The sets Haskell does have are AFAIK sets of elements of the same type: these are not general sets. Ah. That's a static typing issue. However, I don't think it's

Re: Fw: Question about the use of an inner forall

2002-08-20 Thread oleg
Leon Smith wrote: On Friday 16 August 2002 23:57, Scott J. wrote: runST :: forall a ( forall s ST s a) - a ? In logic forall x forall y statement(x.y) is equivalent to: forall y forall x statement(x,y). Now, using a different argument, since s does not appear free on the R.H.S of

Leical and syntactic analyzer

2002-08-20 Thread Jonata Goulart
Does somebody know where can I find an example of a lexical and syntactic analyzer for arithmetic and conditional statements in Haskell? Thanks _ Chat with friends online, try MSN Messenger: http://messenger.msn.com