[commit: ghc] : No lint warning about staticPtr data con worker (891c903)

git at git.haskell.org git at git.haskell.org
Mon Oct 10 21:43:34 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : 
Link       : http://ghc.haskell.org/trac/ghc/changeset/891c903b791b67aa4742a8634cfad71bf61a8d2c/ghc

>---------------------------------------------------------------

commit 891c903b791b67aa4742a8634cfad71bf61a8d2c
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Oct 9 14:23:04 2016 -0400

    No lint warning about staticPtr data con worker
    
    because of collectStaticPtrSatArgs this may be around.


>---------------------------------------------------------------

891c903b791b67aa4742a8634cfad71bf61a8d2c
 compiler/coreSyn/CoreLint.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index bccbd9f..6c2296d 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -911,6 +911,7 @@ checkBadDataConWorker :: Id -> LintM ()
 -- (It should either be a ConApp or a reference to the wrapper)
 checkBadDataConWorker id
   | Just dc <- isDataConWorkId_maybe id
+  , dataConName dc /= staticPtrDataConName
   = checkL (isNewTyCon (dataConTyCon dc))
            (text "data constructor worker found" <+> ppr id) 
   | otherwise



More information about the ghc-commits mailing list