[commit: ghc] ghc-7.6: MERGED: Give PrimOps a NOINLINE pragma, to suppress silly warnings from dsRule (aa7732c)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-7.6

http://hackage.haskell.org/trac/ghc/changeset/aa7732c503a5ebc7af5d6bc08a07dd76b878ef8c

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

commit aa7732c503a5ebc7af5d6bc08a07dd76b878ef8c
Author: Ian Lynagh <[email protected]>
Date:   Thu Nov 29 16:12:07 2012 +0000

    MERGED: Give PrimOps a NOINLINE pragma, to suppress silly warnings from dsRule
    
        commit 419af69c1bea2cecce7b4bf58162cbfac81526f2
        Author: Simon Peyton Jones <[email protected]>
        Date:   Tue Oct 2 17:39:46 2012 +0100
    
        Give PrimOps a NOINLINE pragma, to suppress silly warnings from dsRule
    
        See Trac #7287

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

 compiler/basicTypes/MkId.lhs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs
index c1127da..acf82c7 100644
--- a/compiler/basicTypes/MkId.lhs
+++ b/compiler/basicTypes/MkId.lhs
@@ -749,9 +749,14 @@ mkPrimOpId prim_op
     id   = mkGlobalId (PrimOpId prim_op) name ty info
                 
     info = noCafIdInfo
-           `setSpecInfo`          mkSpecInfo (primOpRules prim_op name)
-           `setArityInfo`         arity
+           `setSpecInfo`       mkSpecInfo (primOpRules prim_op name)
+           `setArityInfo`      arity
            `setStrictnessInfo` Just strict_sig
+           `setInlinePragInfo` neverInlinePragma
+               -- We give PrimOps a NOINLINE pragma so that we don't
+               -- get silly warnings from Desugar.dsRule (the inline_shadows_rule
+               -- test) about a RULE conflicting with a possible inlining
+               -- cf Trac #7287
 
 -- For each ccall we manufacture a separate CCallOpId, giving it
 -- a fresh unique, a type that is correct for this particular ccall,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.