[Haskell] Re: error rebuilding ghc-6.4
* vadim <[EMAIL PROTECTED]>: > when trying to rebuild ghc-6.4 from source, I fall into following error: > gcc -o hp2ps -O -I../../includes -Wall AreaBelow.o AuxFile.o > Axes.o Curves.o Deviation.o DimensiDeviation.o(.text+0x316): In function > `Deviation': >: undefined reference to `sqrt' For some reason you might be missing the LIBM=-lm in mk/config.mk. Keep an eye on configure's output and maybe start from a clean tree. (You should probably send follow-up to a more ghc-specific list). Cheers, Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME It's a million to one chance, but it just might work. ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Re: sockets and handles in ghc
[Moving to [EMAIL PROTECTED] In local.haskell, you wrote: > I've been using sockets and handles with ghc-5.04.3. > The strange thing is now that when I make a handle > out of a socket and ask whether the handle is readable > or writable, it returns True for the former and False > for the latter, although sockets are bidirectional. And yes, Do you have a small sample program which shows this behaviour? Can you try ghc-6? There have been some updates, but I cannot tell if this was a particular bug that got fixed. Regards, Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME rage against the finite state machine ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: lecture
In local.haskell, you wrote: > I am student of Computer Science and I have to write a lecture on ghc > network module. Where can I get some code samples of this module. I am > looking for short progrmas that show how to use network module. There's nothing special about Haskell's/GHC's networking module. As a rule of thumb you should be able to translate any regular C program into Haskell. There isn't any sample code, but if you are familiar with Haskell you could look at the low-level source-code of - the Haskell Web Server (in the fptools repository) - {Erlang-style, Port-based} Distributed Haskell Occasionally, you might find useful snippets on the GHC mailing lists, e.g. http://www.haskell.org/pipermail/glasgow-haskell-users/2003-March/004915.html You might want to comment on the use of non-blocking IO and using Concurrent Haskell instead of calling the C function 'fork' to implement a single server using lightweight threads to serve multiple clients. 'hGetContents' can be used to read all current (and future!) data so you can completely abstract from the underlying IO and instead focus on getting work done. Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME rage against the finite state machine ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: how to catch GHC "no threads to run" exception?
In local.haskell, you wrote: > Since I have 3 threads waiting on takeMVar, do I have to wrap > all of them with Exception.catch? Yes. Especially since ghc-5.04, you cannot be sure which of the blocked threads will get killed first: http://haskell.org/pipermail/glasgow-haskell-users/2002-July/003779.html -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME http://news.bbc.co.uk: The Israeli army destroyed the bomber's family's house afterwards, a military statement said. ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: how to catch GHC "no threads to run" exception?
In local.haskell, you wrote: > test: no threads to run: infinite loop or deadlock? > My problem is that this behavior is actually desired, but > how do I catch this exception and do some bookkeeping > (closing external IO, etc.) and then a proper exit? You can wrap the `takeMVar' with Exception.catch. Note that Prelude.catch won't suffice. -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME http://news.bbc.co.uk: The Israeli army destroyed the bomber's family's house afterwards, a military statement said. ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: GHC modules and packages
In local.haskell, you wrote: > is there some documentation about which modules reside in which packages in > GHC? You can take a look at http://www.haskell.org/ghc/docs/latest/set/book-hslibs.html. The top-level chapters ('category') are the packages. -- Volker Stolz * [EMAIL PROTECTED] * PGP + S/MIME ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell