diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2016-07-20 09:33:43 +0000 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2016-07-20 09:33:57 +0000 |
commit | 98b2c5088a6f1a3b40c6eedc69d9204ba53690d3 (patch) | |
tree | 4807efab791526b79352a36b396e67c021278778 /testsuite/config | |
parent | 0df3f4cdd1dfff42461e3f5c3962f1ecd7c90652 (diff) | |
download | haskell-98b2c5088a6f1a3b40c6eedc69d9204ba53690d3.tar.gz |
Support SCC pragmas in declaration context
Not having SCCs at the top level is becoming annoying real quick. For
simplest cases, it's possible to do this transformation:
f x y = ...
=>
f = {-# SCC f #-} \x y -> ...
However, it doesn't work when there's a `where` clause:
f x y = <t is in scope>
where t = ...
=>
f = {-# SCC f #-} \x y -> <t is out of scope>
where t = ...
Or when we have a "equation style" definition:
f (C1 ...) = ...
f (C2 ...) = ...
f (C3 ...) = ...
...
(usual solution is to rename `f` to `f'` and define a new `f` with a
`SCC`)
This patch implements support for SCC annotations in declaration
contexts. This is now a valid program:
f x y = ...
where
g z = ...
{-# SCC g #-}
{-# SCC f #-}
Test Plan: This passes slow validate (no new failures added).
Reviewers: goldfire, mpickering, austin, bgamari, simonmar
Reviewed By: bgamari, simonmar
Subscribers: simonmar, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D2407
Diffstat (limited to 'testsuite/config')
-rw-r--r-- | testsuite/config/ghc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 68d4a64979..b0d84535d6 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -76,6 +76,7 @@ config.way_flags = { 'optllvm' : ['-O', '-fllvm'], 'debugllvm' : ['-fllvm', '-keep-llvm-files'], 'prof' : ['-prof', '-static', '-fprof-auto', '-fasm'], + 'prof_no_auto' : ['-prof', '-static', '-fasm'], 'profasm' : ['-O', '-prof', '-static', '-fprof-auto'], 'profthreaded' : ['-O', '-prof', '-static', '-fprof-auto', '-threaded'], 'ghci' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '+RTS', '-I0.1', '-RTS'], @@ -111,6 +112,7 @@ config.way_rts_flags = { 'optllvm' : [], 'debugllvm' : [], 'prof' : ['-p'], + 'prof_no_auto' : ['-p'], 'profasm' : ['-hc', '-p'], # test heap profiling too 'profthreaded' : ['-p'], 'ghci' : [], |