[commit: containers] master: Prevent multiple warnings. (1ae51a2)

Paolo Capriotti <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.libraries
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/packages/containers

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/1ae51a2993b5518b8f1e39963a509c42a98dbaec

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

commit 1ae51a2993b5518b8f1e39963a509c42a98dbaec
Author: Milan Straka <[email protected]>
Date:   Sat Apr 21 20:25:00 2012 +0200

    Prevent multiple warnings.
    
    Prevent multiple warnings caused by unsuccessful SpecConstr pass.
    We do so by not inlining helper testing function.

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

 tests/intmap-properties.hs |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tests/intmap-properties.hs b/tests/intmap-properties.hs
index 60cdcab..344e802 100644
--- a/tests/intmap-properties.hs
+++ b/tests/intmap-properties.hs
@@ -792,6 +792,11 @@ prop_mergeWithKeyModel xs ys
                                             (Just x, Nothing) -> if keep_x then Just (k, x) else Nothing
                                             (Just x, Just y) -> (\v -> (k, v)) `fmap` f k x y
 
+          -- We prevent inlining testMergeWithKey to disable the SpecConstr
+          -- optimalization. There are too many call patterns here so several
+          -- warnings are issued if testMergeWithKey gets inlined.
+          {-# NOINLINE testMergeWithKey #-}
+
 ----------------------------------------------------------------
 
 prop_ordered :: Property
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.