Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 3,623
    • Issues 3,623
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 204
    • Merge Requests 204
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #5704

Closed
Open
Opened Dec 15, 2011 by Simon Marlow@simonmar
  • Report abuse
  • New issue
Report abuse New issue

Bug in the handling of wired-in packages (like template-haskell)

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-2.6.0.0, but GHC ships with 2.7.0.0. Cabal installed template-haskell-2.6.0.0, but while building aeson against it we get:

Data/Aeson/TH.hs:181:1:
    Bad interface file: /Users/tibbe/.cabal/lib/template-haskell-2.6.0.0/ghc-7.4.0.20111213/Language/Haskell/TH.hi
        Something is amiss; requested module  template-haskell-2.6.0.0: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-2.7.0.0 to be the wired-in package:

wired-in package template-haskell mapped to template-haskell-2.7.0.0-inplace

whereas we wanted to use template-haskell-2.6.0.0.

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-2.7.0.0.

Trac metadata
Trac field Value
Version 7.2.1
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Package system
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture

Related issues

  • Discussion
  • Designs
Assignee
Assign to
7.4.2
Milestone
7.4.2
Assign milestone
Time tracking
None
Due date
None
4
Labels
bug package system P::high Trac import
Assign labels
  • View project labels
Reference: ghc/ghc#5704