Skip to content

Late cost centres shouldn't be added for exprIsWorkFree RHSs

When you enable -fprof-late then we add cost centres to all top-level definitions, in a module such as Cabal-syntax/src/Distribution/SPDX/LicenseId.hs there are many top-level bindings which are exprIsWorkFree.

When you add a cost centre to these definitions, you then end up generating a bunch more code, including entry code for each of these definitions. This leads to the compile time of the module doubling because of this extra overhead.

cc @AndreasK

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