Ticket #5704 (closed bug: wontfix)
Bug in the handling of wired-in packages (like template-haskell)
|Reported by:||simonmar||Owned by:||simonmar|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||Blocked By:|
If you install an older version of a wired-in package (e.g. template-haskell) and then try to use it, GHC will use the newer one as the "wired-in" package rather than the older one.
This happened when trying to build aeson-0.4.0.0 with ghc 7.4: aeson requires template-haskell-126.96.36.199, but GHC ships with 188.8.131.52. Cabal installed template-haskell-184.108.40.206, but while building aeson against it we get:
Data/Aeson/TH.hs:181:1: Bad interface file: /Users/tibbe/.cabal/lib/template-haskell-220.127.116.11/ghc-18.104.22.16811213/Language/Haskell/TH.hi Something is amiss; requested module template-haskell-22.214.171.124:Language.Haskell.TH differs from name found in the interface file template-haskell:Language.Haskell.TH
the bug is that findWiredInPackage has picked template-haskell-126.96.36.199 to be the wired-in package:
wired-in package template-haskell mapped to template-haskell-188.8.131.52-inplace
whereas we wanted to use template-haskell-184.108.40.206.
Not immediately obvious what the fix should be, so I'm making a ticket for this. The workaround is to update the dependency in aeson to allow template-haskell-220.127.116.11.