[commit: ghc] supercompiler: Disable rules when simplifying stable unfolding to work around GHC.List non-termination (5aa31d1)

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

On branch  : supercompiler

http://hackage.haskell.org/trac/ghc/changeset/5aa31d134b1b5a20991a52d6e21b70d3142ca640

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

commit 5aa31d134b1b5a20991a52d6e21b70d3142ca640
Author: Max Bolingbroke <[email protected]>
Date:   Tue Mar 27 12:54:33 2012 +0100

    Disable rules when simplifying stable unfolding to work around GHC.List non-termination

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

 compiler/simplCore/Simplify.lhs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs
index 56e0bed..40cfbc9 100644
--- a/compiler/simplCore/Simplify.lhs
+++ b/compiler/simplCore/Simplify.lhs
@@ -760,7 +760,7 @@ simplUnfolding env top_lvl id _
        }
   where
     act      = idInlineActivation id
-    rule_env = updMode (updModeForInlineRules act) env
+    rule_env = updMode (\mode -> let mode' = updModeForInlineRules act mode in case src of InlineStable -> mode' { sm_rules = False }; _ -> mode') env
        	       -- See Note [Simplifying inside InlineRules] in SimplUtils
 
 simplUnfolding _ top_lvl id new_rhs _
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.