[Haskell-cafe] Time Typeable Instances
warrensomebody at gmail.com
Thu Oct 22 02:36:31 EDT 2009
I just stumbled on this issue while trying to compile turbinado with
the haskell platform / ghc 6.10.4. I got past it by manually editing
back in the time definitions, but just wondering if there was an
official resolution. Thanks,
On Oct 13, 2009, at 6:48 AM, John Goerzen wrote:
> Hugo Gomes wrote:
>> The Glorious Glasgow Haskell Compilation System, version 6.10.4
>> with old-time-126.96.36.199 and time-188.8.131.52
>> This is a standard haskell platform on a windows xp. Cabal install
>> didn't work complaining about missing instances of typeable for posix
>> time and other datatypes, yet, after removing the macros (thus,
>> those instances), hdbc and convertible compiled and installed fine.
>> Removing the macros might be a bit overkill, probably finetuning
>> them so
>> that they add only the necessary instances for typeable in ghc > 610
>> might be a better solution.
> I'm going to CC haskell-cafe on this because I am confused.
> Hugo, can you confirm what version of convertible you have?
> Back on May 21, I started a thread  on haskell-cafe complaining
> GHC 6.10.3 included a newer time that included instances of Typeable
> NominalDiffTime and UTCTime. This broke my code, which had manually
> defined instances for these types, as they were needed. Things got
> complicated, as only time's minor version number got incremented
> (x.x.x.Y) . Cabal can't test against that version number.
> I wanted my code to work with old and new versions of GHC. Since
> testing against the version of time was impossible, I did the next
> thing: tested against the version of GHC.
> #if __GLASGOW_HASKELL__ >= 610
> -- instances added in GHC 6.10.3
> instance Typeable NominalDiffTime where
> typeOf _ = mkTypeName "NominalDiffTime"
> instance Typeable UTCTime where
> typeOf _ = mkTypeName "UTCTime"
> Also, in the .cabal, there is a build-depends on time>=184.108.40.206.
> Now, that would break for GHC 6.10.1 and 6.10.2 users, but will work
> 6.10.3 and above, or 6.8 and below. Or so I thought.
> Now I'm getting complaints from people using 6.10.4 saying that there
> are now missing instances of Typeable with time 220.127.116.11.
> 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
> I'm looking at the darcs repo for time and don't see the instances
> getting dropped.
>  http://email@example.com/2009-05/msg00982.html
>  http://firstname.lastname@example.org/2009-05/msg00985.html
> .... later addendum ....
> 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
> work around it by restricting my build-dep to be time < 1.1.3 and
> re-adding the instances.
> Does this sound right?
>> On Tue, Oct 13, 2009 at 2:51 AM, John Goerzen <jgoerzen at complete.org
>> <mailto:jgoerzen at complete.org>> wrote:
>> Hugo Gomes wrote:
>>> convertible and hdbc packages fail to compile in my standard
>>> of the haskell platform. I think this has to do with those "if ghc
>>> 610" macros on the typeable instances for some datatypes. I
>> removed them
>>> and now they work fine...
>> What version of GHC and time do you have?
>> -- John
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe