[Haskell-cafe] Time Typeable Instances

Duncan Coutts duncan.coutts at googlemail.com
Fri Oct 23 09:00:55 EDT 2009

On Tue, 2009-10-13 at 08:48 -0500, John Goerzen wrote:

> Now I'm getting complaints from people using 6.10.4 saying that there
> are now missing instances of Typeable with time

Right, because is an earlier version than 1.1.3 which is the
random intermediate snapshot version included in the ghc-6.10.3
extralibs collection and the version where the Typable instances were

So the problem you're noticing is that some people are using and
others are using 1.1.3 or 1.1.4 and these are not related to the version
of ghc that they are using, so using the ghc version as a proxy fails.

> 1) Did the Typeable instances get dropped again from time?


> 2) What exactly should I do so this library compiles on GHC 6.8 and 6.10.x?

Depend on the time library and use one of the following techniques:

If you're prepared to depend on Cabal-1.6 then you can use the cpp
macros that let you do conditional compilation on the version of a
package you depend on. You mention that the time only incremented the
4th digit when it added the instances but I don't think that's right. My
time- has no Typeable instances but 1.1.4 does (and I believe
1.1.3 did too). So you should be able to use this mechanism.

Alternatively you can use the "flag hack" in the .cabal file:

flag annoying-time-instances

  if flag(annoying-time-instances)
    build-depends: time >= 1.1.3
    build-depends: time < 1.1.3

> so it appears that what's happening here is that GHC 6.10.3 extralibs
> included time 1.1.3, but then haskell-platform standardized on
>  This is pretty annoying -- that haskell-platform would standardize on a
> version older than what shipped with a GHC release -- but I guess I can
> work around it by restricting my build-dep to be time < 1.1.3 and
> re-adding the instances.

No, it's the haskell-platform that was and is doing the right thing and
it is ghc that subsequently accidentally shipped a random development

The platform has a commitment to provide API compatible versions of
packages within a major series. The first release of the platform used
time- (along with ghc-6.10.2) and thus it could not include the
time-1.1.3 that the subsequent release of ghc-6.10.3 accidentally


More information about the Haskell-Cafe mailing list