syb changes (Re: base-3 vs base-4 (Was: Breakage with 6.10))

Niklas Broberg niklas.broberg at
Sat Oct 11 07:04:56 EDT 2008

>  So there is a compatibility module in the new syb. Unfortunately,
>  that won't tell you about the moves and rationale. Most of the time,
>  you'll want Data.Data (check "ghc -e ':browse Data.Data'" or the
>  Haddock pages, or google for "syb" in the libraries@ archives):
>    $ ghc-pkg find-module Data.Data
>    c:/ghc/ghc-6.11.20081004\package.conf:
>        base-

Thanks a lot Claus and José for the info. Since all I use is the Data
and Typeable classes (presumably like so many others, which I guess
was the reason to keep these in base), it would obviously be better
for me to avoid linking to the new syb package when I don't have to.

>    $ ghc -ignore-dot-ghci -e ':info Data.Data.Data'

Somehow I find this name hilarious. :-)

> > .. I would prefer to use the new
> > base-4 when possible. The cabal file already includes a conditional
> > "if flag(splitBase)" to handle really old versions, I guess what I'm
> > asking for is something similar for this case. Is there a splitSyb
> > flag or some such?
> >
>  I was wondering whether there is a way to set user-defined flags
>  depending on whether some package is available. Then I recalled
>  that flags don't work the way I expected - instead Cabal will try
>  all flag settings to find a buildable configuration (a fact I only became
>  aware of when a different kind of flag was added recently that does
>  behave the way I expected;-). Which might be what you want in this case.
> Duncan: is this correct, and are these subtleties documented somewhere?

While these things would be good to know in general, it seems this is
not what I want in this case, since I don't want to use the syb
package after all. It seems instead what I want is to simply make a
conditional import of either Data.Generics or Data.Data based on which
version of base is available. I guess that means more CPP heresy,



More information about the Glasgow-haskell-users mailing list