On Wed, Aug 27, 2008 at 03:14:27PM +0100, Claus Reinke wrote:
> >>|Then, after adding "base < 4" to all extralibs .cabal files, I'm
> >>|treated to a
> >>|
> >>|Network.hs:434:10:
> >>|    Couldn't match expected type `Exception.IOException'
> >>|           against inferred type `Exception.Exception'
> >>|      Expected type: Exception.IOException -> IO a
> >>|      Inferred type: Exception.Exception -> IO a
> >>|    In the expression: Exception.catch
> >>|    In the definition of `catchIO': catchIO = Exception.catch
> >
> >That's because network's code requires base 4 due to this patch:
> >
> >   Make network work with extensible exceptions
> >   Ian Lynagh <[EMAIL PROTECTED]>**20080805125755
> 
> Thanks, now we're finally getting somewhere!-)
> 
> So, that patch was incomplete and left the package
> unbuildable, because the .cabal wasn't updated, right?

No, that patch was complete, and network built with it at the time that
it was made.

(the patch could also have put a lower bound on the base dep, so that
people trying to install it with an older GHC would get a clearer
error, but that wouldn't help it build with the HEAD)

Another option would have been to put a <4 upper bound on the base dep,
but (a) I don't think base3-compat existed at the time, (b) we were
converting things to use extensible exceptions to see if there were any
unforseen issues lurking, and (c) I don't think we want libraries to use
the old base versions where possible.


Subsequent changes to the base package have meant that network no longer
builds, but that is due to the partial base 4 support in network, and
doesn't add any insight about how other, non-extralib packages will work
with GHC 6.10.

> Presumably, the patch code should be under .cabal-configurations
> generated CPP, so that both older and newer ghcs (with or without 
> base 4) can still build that package?

If someone wanted to maintain support for old GHC versions then they
could do something like that, yes. It wouldn't help it build in the
HEAD, which would pick the base 4 configuration.

If anyone is interested in doing some work on network then I think their
time would be better spent looking at the code, though; e.g. see my
comments in #2250.


Thanks
Ian

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to