summaryrefslogtreecommitdiff
path: root/compiler/coreSyn
diff options
context:
space:
mode:
authorFacundo Domínguez <facundo.dominguez@tweag.io>2016-06-22 14:09:57 -0300
committerFacundo Domínguez <facundo.dominguez@tweag.io>2016-06-23 11:09:39 -0300
commit7fc20b02b20c97209b97f0e36d34a4ef40f537a4 (patch)
tree9dee87215ff137c761bde380ac16b51f03dff0e3 /compiler/coreSyn
parent2f8cd14fe909a377b3e084a4f2ded83a0e6d44dd (diff)
downloadhaskell-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
Diffstat (limited to 'compiler/coreSyn')
-rw-r--r--compiler/coreSyn/CoreLint.hs2
1 files changed, 1 insertions, 1 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