Skip to content

Fix #16219: TemplateHaskell causes indefinite package build error

Edward Z. Yang requested to merge ezyang/ghc:pr/th-indef-pkg into master

It should work to write an indefinite package using TemplateHaskell, so long as all of the actual TH code lives outside of the package. However, cleverness we had to build TH code even when building with -fno-code meant that we attempted to build object code for modules in an indefinite package, even when the signatures were not instantiated. This patch disables said logic in the event that an indefinite package is being typechecked.

Merge request reports