Commit d30aeb4b authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot

Document restriction on SCC pragma syntax

Currently, the names of cost centres must be quoted or
be lowercase identifiers.

Fixes #17916.
parent 1de3ab4a
Pipeline #16736 passed with stages
in 373 minutes and 41 seconds
......@@ -220,7 +220,7 @@ semantics of the program, in accordance with `GHC Proposal #176
<https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0176-scc-parsing.rst>`__.
SCC stands for "Set Cost Centre". The double quotes can be omitted if ``name``
is a Haskell identifier, for example: ::
is a Haskell identifier starting with a lowercase letter, for example: ::
{-# SCC id #-} <expression>
......
-- Currently, capitalized identifiers in SCC pragmas must be put in quotes.
-- If you change this decision, this test is there to remind you to
-- update the section scc-pragma in User's Guide.
module T17916 where
f = {-# SCC CapitalCase #-} ()
T17916.hs:6:13: error: parse error on input ‘CapitalCase’
test('proffail001', normal, compile_fail, ['-prof -fprof-cafs'])
test('T17916', normal, compile_fail, [''])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment