diff options
-rw-r--r-- | docs/users_guide/profiling.rst | 2 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_fail/T17916.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_fail/T17916.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_fail/all.T | 1 |
4 files changed, 10 insertions, 1 deletions
diff --git a/docs/users_guide/profiling.rst b/docs/users_guide/profiling.rst index 127944eb09..c9cb128613 100644 --- a/docs/users_guide/profiling.rst +++ b/docs/users_guide/profiling.rst @@ -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> diff --git a/testsuite/tests/profiling/should_fail/T17916.hs b/testsuite/tests/profiling/should_fail/T17916.hs new file mode 100644 index 0000000000..8d87e8c64d --- /dev/null +++ b/testsuite/tests/profiling/should_fail/T17916.hs @@ -0,0 +1,6 @@ +-- 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 #-} () diff --git a/testsuite/tests/profiling/should_fail/T17916.stderr b/testsuite/tests/profiling/should_fail/T17916.stderr new file mode 100644 index 0000000000..d7072126fe --- /dev/null +++ b/testsuite/tests/profiling/should_fail/T17916.stderr @@ -0,0 +1,2 @@ + +T17916.hs:6:13: error: parse error on input ‘CapitalCase’ diff --git a/testsuite/tests/profiling/should_fail/all.T b/testsuite/tests/profiling/should_fail/all.T index 89e04d5344..00a7a16025 100644 --- a/testsuite/tests/profiling/should_fail/all.T +++ b/testsuite/tests/profiling/should_fail/all.T @@ -1,3 +1,4 @@ test('proffail001', normal, compile_fail, ['-prof -fprof-cafs']) +test('T17916', normal, compile_fail, ['']) |