Re: [Haskell-cafe] Modules and files

2004-06-15 Thread Jon Fairbairn
On 2004-06-14 at 15:59PDT "Iavor S. Diatchki" wrote: > according to the report there should be no connection > between modules and files, and one should be able to have > multiple modules in a file, and even a single module in > multiple files. however none of the implementations > support that, s

Re: [Haskell-cafe] Modules and files

2004-06-15 Thread Jerzy Karczmarczuk
Jon Fairbairn wrote: On 2004-06-14 at 15:59PDT "Iavor S. Diatchki" wrote: according to the report there should be no connection between modules and files, and one should be able to have multiple modules in a file, and even a single module in multiple files. however none of the implementations supp

RE: [Haskell-cafe] forkIO preemption

2004-06-15 Thread Simon Marlow
On 07 June 2004 22:59, S. Alexander Jacobson wrote: > When you forkIO and one of the threads blocks > (e.g. on a socket or a readchan), do execution > automatically resume on other threads and does the > blocked thread consume timeslices while it is > blocked? In GHC: yes, no. > In other words,

[Haskell-cafe] EuroHaskell 2004 pictures

2004-06-15 Thread Shae Matijs Erisson
The EuroHaskell 2004 Conference was great fun. Shae Erisson gave a Haskell tutorial, Jeremy Bobbio gave a talk about hOp, and John Hughes gave a talk/tutorial about Arrows. Code was written, pizza was purchased, most attendees claimed to enjoy themselves. A social event for programmers may be

[Haskell-cafe] readEitherChan

2004-06-15 Thread S. Alexander Jacobson
I'd like a function that blocks until data is available on one of two channels and then returns that data wrapped in an Either. Here is my naive implementation: readEitherChan::Chan a -> Chan b -> Either a b readEitherChan a b = do var <- newEmptyMVar forkIO (readChan

Re: [Haskell-cafe] Modules and files

2004-06-15 Thread ajb
G'day all. Quoting Jerzy Karczmarczuk <[EMAIL PROTECTED]>: > Question of perspective... In Pascal, Modula, Python, Clean, > you name it, modules and files were always 1 - 1. A C++ class is basically an instantiable module. In C++, you can implement more than one module in a file, and you can im