
On Wed, Oct 1, 2008 at 10:52 PM, Duncan Coutts
On Wed, 2008-10-01 at 20:53 +0200, Svein Ove Aas wrote:
and you have network access, start updating it.
That's hard. Detecting if we would be able to make a network connection without actually doing it is not something I know how to do (esp in a portable way). We would very much appreciate some help in this area.
OS X has a function to test that, and a way to get notified when the access state changes; it never occurred to me that other OSs might not. It only tests for local connectivity, though. That aside, why not start downloading in the background, while it's doing whatever you started cabal for? Assuming the network is working, you should have an updated package list by the time it's done; granted, it won't be used for *that* invocation, but next time you invoke cabal it will. If the download fails, just ignore it.