Lazy Evaluation

2002-03-03 Thread Tom Pledger
Nguyen Phan Dung writes: : | mylist :: [Integer] | mylist = [1..10] | | In Hugs, I type mylist to print out all the elements inside. However, | after printing about 22000 elements, the system crashs & outputs: | "Garbage collection fails to reclaim sufficient memory" The declarati

Lazy Evaluation

2002-03-03 Thread Nguyen Phan Dung
  Hello,   Sorry for asking such a silly question: Haskell is using lazy evaluation. So, it means we should be able to declare and use a list of billions elements without any trouble. So I declare my list as follow:   mylist :: [Integer] mylist = [1..10]   In Hugs, I type my

Re: getProtocolByName

2002-03-03 Thread Dominic Steinitz
 Finn, Thanks for this. I thought since I wasn't actually using the socket module I wouldn't have to use withSocketsDo.The documentation for BSD is a little spartan and a few explanatory words about how errors get handled wouldn't go amiss.Anyway, it now works so I'll move on to the next bit.Domini

Re: multiparameter generic classes

2002-03-03 Thread Ralf Laemmel
Hal Daume III wrote: > > are there any papers/webpages/implementations/etc. of using multiparameter > classes in a generic framework, with or without dependencies? Maybe this is something for you. It uses 7 parameters and many functional dependencies. But it is a kind of trivial :-) And yes

Re: getProtocolByName

2002-03-03 Thread Finn Wilcox
On Sun, 3 Mar 2002 [EMAIL PROTECTED] wrote: > Here's my test program. TCP is a valid protocol. But I get the following > when I run it. I'm running under W98 by the way. I have two questions: > > 1) Why do I get an error? You want: > module Main(main) where > > import BSD import Socket (with