diff options
author | Facundo DomÃnguez <facundo.dominguez@tweag.io> | 2016-06-22 14:09:57 -0300 |
---|---|---|
committer | Facundo DomÃnguez <facundo.dominguez@tweag.io> | 2016-06-23 11:09:39 -0300 |
commit | 7fc20b02b20c97209b97f0e36d34a4ef40f537a4 (patch) | |
tree | 9dee87215ff137c761bde380ac16b51f03dff0e3 | |
parent | 2f8cd14fe909a377b3e084a4f2ded83a0e6d44dd (diff) | |
download | haskell-7fc20b02b20c97209b97f0e36d34a4ef40f537a4.tar.gz |
Have Core linter accept programs using StaticPointers and -fhpc.
Summary:
This patch uses collectArgsTicks instead of collectArgs to test that
StaticPtr only occurs at the top of RHSs of top-level expressions.
Ticks introduced by -fhpc would interfere otherwise.
Test Plan: ./validate
Reviewers: thomie, austin, goldfire, bgamari, simonpj
Reviewed By: simonpj
Differential Revision: https://phabricator.haskell.org/D2355
GHC Trac Issues: #12207
-rw-r--r-- | compiler/coreSyn/CoreLint.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs index 06e45830e7..e7acafc2bb 100644 --- a/compiler/coreSyn/CoreLint.hs +++ b/compiler/coreSyn/CoreLint.hs @@ -552,7 +552,7 @@ lintRhs :: CoreExpr -> LintM OutType -- but produce errors otherwise. lintRhs rhs | (binders0, rhs') <- collectTyBinders rhs - , (fun@(Var b), args) <- collectArgs rhs' + , (fun@(Var b), args, _) <- collectArgsTicks (const True) rhs' , Just con <- isDataConId_maybe b , dataConName con == staticPtrDataConName , length args == 5 diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 0f222aac44..7e3c33fa2a 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -421,8 +421,8 @@ test('T8474', normal, compile, ['']) test('T8563', normal, compile, ['']) test('T8565', normal, compile, ['']) test('T8644', normal, compile, ['']) -test('TcStaticPointers01', expect_broken_for(12207, ['hpc']), compile, ['']) -test('TcStaticPointers02', expect_broken_for(12207, ['hpc']), compile, ['']) +test('TcStaticPointers01', normal, compile, ['']) +test('TcStaticPointers02', normal, compile, ['']) test('T8762', normal, compile, ['']) test('MutRec', normal, compile, ['']) test('T8856', normal, compile, ['']) |