diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-03-13 23:15:22 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-03-15 03:57:41 -0400 |
commit | d30aeb4b38381758025bc1002eb2135ad6bc58b8 (patch) | |
tree | 31ff69aaeedf85e4e0f6c6450876326019c73e15 /testsuite/tests | |
parent | 1de3ab4a147eeb0b34b24a3c0e91f174e6e5cb79 (diff) | |
download | haskell-d30aeb4b38381758025bc1002eb2135ad6bc58b8.tar.gz |
Document restriction on SCC pragma syntax
Currently, the names of cost centres must be quoted or
be lowercase identifiers.
Fixes #17916.
Diffstat (limited to 'testsuite/tests')
-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 |
3 files changed, 9 insertions, 0 deletions
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, ['']) |