Skip to content

Add cost center pragmas to Template Haskell

Summary

SCC pragmas are not supported by Template Haskell. This make it impossible to properly profile a program, where part of the code is generate with TH.

Steps to reproduce

Type [d| {-# SCC x #-}; x = () |] in ghci

Expected behavior

Generate a splice annotated with an SCC pragma.

Environment

  • GHC version used: 9.6.2

Optional:

  • Operating System:
  • System Architecture:
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information