Opened 22 months ago

Last modified 22 months ago

#14571 new feature request

RFE: Make template-haskell cabal package require a specific version of GHC

Reported by: atodorov Owned by:
Priority: normal Milestone:
Component: Template Haskell Version: 8.0.2
Keywords: Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Following a conversation on another bug tracker: https://github.com/bos/math-functions/issues/52

it looks like template-haskell is very dependent on the version of GHC being used (although the test matrix is all green at present). In the above case we're trying to use template-haskell 2.12.0.0 with GHC 8.0.2 to build another package and that fails.

One of the problems is that on Fedora template-haskell is shipped separately from GHC while on Debian or with source installations it comes bundled with GHC.

Is it possible to specify a requirement on the GHC version inside .cabal files? This will make it easier to track down why something isn't able to compile.

Change History (2)

comment:1 Changed 22 months ago by refold

Indeed, upgrading template-haskell is almost always a bad idea. That's why cabal-install's solver considers `template-haskell` to be a non-upgradeable package.

Last edited 22 months ago by refold (previous) (diff)

comment:2 Changed 22 months ago by hvr

Here's some more backstory:

Long story short, if use a recent enough cabal-install this shouldn't be a problem.

More generally, one long-standing idea was to have either ghc or ghc-pkg expose the information of whether a package is reinstallable dynamically to cabal, but in the past that would have been merely an aesthetical improvement, as Cabal has to encode special knowledge about GHC anyway. Also, the small set of non-reinstallable packages has been very stable over the years; so there was little incentive to do anything about this.

Note: See TracTickets for help on using tickets.