[Haskell-cafe] Re: two problems with Data.Binary and Data.ByteString
Ben Franksen
ben.franksen at online.de
Thu Aug 28 15:34:41 EDT 2008
Duncan Coutts wrote:
> On Tue, 2008-08-26 at 15:31 -0700, Bryan O'Sullivan wrote:
>> On Tue, Aug 26, 2008 at 3:04 PM, Don Stewart <dons at galois.com> wrote:
>> > No, since I can get whnf with `seq`. However, that does sound like a
>> > good idea (a patch to the parallel library? )
>>
>> I suspect that patching parallel doesn't scale. It doesn't have a
>> maintainer, so it will be slow, and the package will end up dragging
>> in everything under the sun if we centralise instances in there. I
>> think that the instance belongs in bytestring instead. I know that
>> this would make everything depend on parallel, but that doesn't seem
>> as bad a problem.
>
> This is a general problem we have with packages and instances. Perhaps
> in this specific case it wouldn't cause many problems to make bytestring
> depend on parallel (though it means bytestring cannot be a boot lib and
> cannot be used to implement basic IO) but in general it can be a
> problem. I can't see any obvious solutions. We don't want lots of tiny
> packages that just depend on two other packages and define a instance.
Just some raw ideas:
What if we had a way to express 'optional dependencies' between packages in
a cabal file. Something like 'if package x is installed (and satisfies
given version constraints) then add module UseX'.
One problem with this idea is that I might install the missing (optional)
package afterwards, and then I still do not have the instance I would like
(unless I re-build). Could cabal be instructed to re-build a package if an
optional dependency becomes available (or if one gets removed)?
Cheers
Ben
More information about the Haskell-Cafe
mailing list