Tracking ticket for improvements to TemplateHaskell
The purpose of this issue is to collect a list of (interdependent) tickets to track ways in which TemplateHaskell can be improved, for example to attract contributors at ZuriHac. At best, we end up with a kind of dependency graph between the tickets listed so that we can schedule tasks in parallel at ZuriHac. For now, I'll just try to collect issues.
Below list is the result of screening the issue range 24782-22828 (more to do before ZuriHac, I guess).
template-haskell
(across GHC releases)
API stability of These have the highest and most immediate impact. If we can't solve stability, TH will be unattractive to users.
- #24021 is the main tracking ticket. Most of the issues are now fixable independently of issues in the other categories, so I will not repeat them here.
- One exception: #20828 seems like a good fit to map out at ZuriHac, because it invites discussion.
Splicing, Quoting, TH AST and API parity
Good splicing and quoting go a long way towards proving a stable and enjoyable API.
-
#24713: Lack of hygiene (needs a GHC proposal rather than code)
- #24795 an alleged renaming bug in untyped TH
- Language features missing in TH AST (and of course neither quotes or splices work either):
- Missing or broken splicing
- Missing quote syntax or broken desugaring for a couple of constructs
- #24780: Constraint Quote desugaring should not need ConstraintKinds
-
#24757: TTH Quotes do not accept RequiredTypeArgs (interaction with
-XImpredicativeTypes
) -
#24756: TTH Quotes do not accept TypeAbstraction (interaction with
-XImpredicativeTypes
) - #24572: TH Quotes decide what is a term and type arg when they should not
- #24009: TH Quotes for Matches
- Missing API:
- #24353: Add DynFlags parsing to TH
-
#11251 (closed), #23331:
reifyInstances
forTypeable
- #22828: Reification of invisible type variable binders
GHC-internal refactorings
- #24622: Rename Cpp to CPP
Ergnonomics: Warning, error messages, TH pretty-printing, documentation
- #24650: Pattern quote should suggest to turn on -XTemplateHaskell
- #24440: QuasiQuoters should be able to point errors to context
-
#24235: Lack of docs for
getPackageRoot
-
#23705: Doc bug for
makeRelativeToProject
- #23197: Non-empty lists in some TH AST constructors
- #22784 (closed): -ddump-splices omits required parentheses when printing explicit kind signature
Bootstrapping, profiling and cross compilation
- #24624: Build external interpreter with stage1 GHC (critical to unlock using TH in GHC itself and basically to all the issues listed below.)
- #24731: Build external interpreter on-the-fly
- #24395: Segfault when a profiled GHC compiles a (non-profiled?) TH splice
- #24376: Support WASM backend (!12555)
- #24339: execute Splices on the host (in practice depends on #24624)
Misc
- #23013: Fix recompilation avoidance for JS