haskell / haskell/cabal

Warn when a package uses TH but doesn't tell about it to Cabal

Open
#1,562 7 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/check type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

It seems like there are a lot of packages that use Template Haskell but don't tell Cabal about it via `extensions` or `other-extensions`. With GHC 7.8 (and probably also older ones) this can lead to build failures (see e.g. #1553). It'd be nice if we could do a check akin to #1455 and warn the user if this is the case.

This feature will likely require using GHC API, so perhaps we could combine it with #1455 - what we need is a `ghc --make` augmented to dump the dependency graph and the set of all enabled extensions before the actual compilation.

**Update:** see also #3081. If we implement this feature for TH, it will be easy to generalise for all extensions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.