Since those types come out of the time library, and that library's version *has* been bumped (I assume), couldn't you use Cabal to condition on the version of the time library to determine whether or not to have CPP set a -DTYPEABLE_IN_TIME flag, and then #ifdef out your versions of the instances?
I suppose a nice compiler extension would be "recessive instances" which would take effect only if they did not overlap with another instance. Probably a lot of corner cases involving multiple recessive instances to work out, though. Alex On Thu, May 21, 2009 at 2:53 PM, John Goerzen <jgoer...@complete.org> wrote: > So this is annoying (CCing -cafe) > > I need NominalDiffTime and UTCTime to have Typeable instances. In > 6.10.1, they didn't ship with them out of the box, so I added them. > Apparently, in 6.10.3, they DO ship with those instances out of the box. > > Annoyingly, that means that my code breaks on 6.10.3. > > Even more annoyingly, __GLASGOW_HASKELL__ is still 610, so I can't even > work around this via cpphs. There appears to be no way to make code > that requires those Typeable instances work with both 6.10.1 and 6.10.3. > > Yet another reason to avoid API incompatibilities in point releases. > > Does anybody have an idea on the best way to handle this? > > -- John > > Don Stewart wrote: >> convertible appears broken with 6.10.3. Any thoughts? >> >> Writing new package config file... done. >> Downloading convertible-1.0.1... >> Configuring convertible-1.0.1... >> Preprocessing library convertible-1.0.1... >> Preprocessing executables for convertible-1.0.1... >> Building convertible-1.0.1... >> [1 of 8] Compiling Data.Convertible.Base ( Data/Convertible/Base.hs, >> dist/build/Data/Convertible/Base.o ) >> [2 of 8] Compiling Data.Convertible.Utils ( Data/Convertible/Utils.hs, >> dist/build/Data/Convertible/Utils.o ) >> [3 of 8] Compiling Data.Convertible.Instances.Map ( >> Data/Convertible/Instances/Map.hs, >> dist/build/Data/Convertible/Instances/Map.o ) >> [4 of 8] Compiling Data.Convertible.Instances.Num ( >> Data/Convertible/Instances/Num.hs, >> dist/build/Data/Convertible/Instances/Num.o ) >> [5 of 8] Compiling Data.Convertible.Instances.C ( >> Data/Convertible/Instances/C.hs, dist/build/Data/Convertible/Instances/C.o ) >> [6 of 8] Compiling Data.Convertible.Instances.Time ( >> Data/Convertible/Instances/Time.hs, >> dist/build/Data/Convertible/Instances/Time.o ) >> >> Data/Convertible/Instances/Time.hs:61:9: >> Duplicate instance declarations: >> instance Typeable NominalDiffTime >> -- Defined at Data/Convertible/Instances/Time.hs:61:9-32 >> instance Typeable NominalDiffTime >> -- Defined in time-1.1.3:Data.Time.Clock.UTC >> >> Data/Convertible/Instances/Time.hs:64:9: >> Duplicate instance declarations: >> instance Typeable UTCTime >> -- Defined at Data/Convertible/Instances/Time.hs:64:9-24 >> instance Typeable UTCTime >> -- Defined in time-1.1.3:Data.Time.Clock.UTC >> cabal: Error: some packages failed to install: >> HDBC-2.1.0 depends on convertible-1.0.1 which failed to install. >> convertible-1.0.1 failed during the building phase. The exception was: >> >> > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe